Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Plug-in Worklog: PSUmonitoRR

  1. #11
    Maximum Bitrate DaveDog's Avatar
    Join Date
    Mar 2004
    Location
    Greenacres, WA
    Posts
    606

    suggestion

    perhaps this proposed plugin could be designed to be user selectable to support all the data connected power supplies, M4-ATX, M3-ATX, DS-ATX, as well as Carnetix 2140.

    This would make the plugin much more popular
    TruckPC - gutted, being used for test setup
    BoatPC - All in 1 in cuddy, N7 using VNC on dash, RR
    BlazerPC - Nexus 7 with Timur's USBROM

  2. #12
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    If you could post a link to the API/SDK for those PSU's I can look at it, and see what I can come up with.

    I think it would be some of the most vital information that can be skinned alongside speedfan and similar system monitoring controls. It would also be nice to have some event triggers, like ONIGNITION, OFFIGNITION, etc, to trigger other events.

    I'm still really new at coding, so this might take a little while to produce compared to the codevets that could do this blindfolded with both hands tied behind their backs.

    So far the planned skincommands.txt will include the following:

    Labels:
    psuBATT_V - displays Input Voltage
    psuBATT_C - displays Input Current
    psuBATT_W - displays Input Power available (psuBATT_V X psuBATT_C = psuBATT_W)
    psuPRI_V -displays Primary Output Voltage
    psuPRI_C - displays Primary Output Current
    psuPRI_W - displays Primary Output Power used (psuPRI_V X psuPRI_C = psuPRI_W)
    psuSEC_V - displays Secondary Output Voltage
    psuSEC_C - displays Secondary Output Current
    psuSEC_W - displays Secondary Output Power used (psuSEC_V X psuSEC_C = psuSEC_W)
    psuEFF - displays overall efficiency (psuTOTOUT / psuBATT_W = psuEFF)
    psuTOTOUT - displays total output power (psuPRI_W + psuSEC_W = psuTOTOUT)
    psuTEMP - displays PSU internal Temperature in C, but can be converted to F with the "C2F" tag

    Indicators:
    psuIGNITION - on when the PSU's ignition line shows voltage, off without
    psuPULSE - normally off, but if a pulse input is used, on when pulse is activated
    psuFANSTAT - on when PSU's internal fan is active, off without
    psuDLYON - on after delay on interval, and remains until power is removed from PSU
    psuACPI - normally off, but on when ACPI is activated
    psuPOWGOOD - on as long as sufficient power is supplied to the PSU, off without
    psuPS_ON - on when PSU is on, off without
    psuBATT - on when Battery voltage and current are within acceptable range, off when overcurrent, or under/overvoltage
    psuPRI - on when connected to primary output, and voltage and current are within range, off when output shows overcurrent.
    psuSEC - on when connected to secondary output, and voltage and current are withing range, off when output shows overcurrent (overcurrent is shown on PRI)
    psuOVERTEMP - off when temp is below 60C, on when over.
    psuCONNECT - on when PSU is connected to the USB port, off without

    Sliders:
    psuSLD_BATT_V
    psuSLD_BATT_C
    psuSLD_PRI_V
    psuSLD_PRI_C
    psuSLD_SEC_V
    psuSLD_SEC_C
    psuSLD_TEMP


    Possible other commands:

    Labels:
    psuSD_DLY_MIN - Shut Down Delay in minutes
    psuSD_DLY_SEC - Shut Down Delay in seconds
    psuDMT - Dead Man's Timer in Hours
    psuDLYON_SEC - Delay On For remote output in seconds
    psuBU_LO - Boot Up Lock Out time remaining in seconds
    psuSD_LO - Shut Down Lock Out time remaining in seconds
    psuLO_BAT - Low Battery protection limit in volts
    psuFIRMWARE - Displays current firmware version

    Sliders:
    psuSLD_SD_DLY_MIN
    psuSLD_SD_DLY_SEC
    psuSLD_DMT
    psuSLD_DLYON_SEC
    psuSLD_BU_LO
    psuSLD_SD_LO
    psuSLD_LO_BAT

    Button Codes:
    psuUPDATE - Saves the current settings to the EEPROM
    psuRESET - Resets settings to EEPROM defaults
    psuJUMPERS - Loads PSU_JUMPER_MENU.skin to change soft jumpers


    Depending on the SDK/API for the M(x)-ATX and DS-ATX units, there mey be more commands. This is looking like a lot of coding, but will probably be worth the effort.
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  3. #13
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    If you haven't done that yet, you should be able to export the class into a .tlb file using "regasm /codebase /tlb P2140API.dll" then load it up to use it with the extension plugin sources.. or you could simply edit their demo in C# and have it send commands to RR regularly to set variables with the desired values -- just suggestions of course.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  4. #14
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Great, now my noob colors come out.
    I tried regasm /codebase /tlb P2140API.dll in Start>Run, and it couldn't find regasm.

    The whole thing is a little overwhelming. I wonder if this can't be done in autoit?

    In laymans terms, what I want to do is this:

    read variables from program a, create variable in program b.

    Obviously it's a little more complicated than that. If it can be done in AI, I understand how to create the variables for RR, but what would I need to read the info from P2140?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  5. #15

  6. #16
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Quote Originally Posted by Enforcer View Post
    Please don't use AI.
    ok
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  7. #17
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Quote Originally Posted by guino View Post
    If you haven't done that yet, you should be able to export the class into a .tlb file using "regasm /codebase /tlb P2140API.dll" then load it up to use it with the extension plugin sources.. or you could simply edit their demo in C# and have it send commands to RR regularly to set variables with the desired values -- just suggestions of course.
    ok, i've got the P2140API.dll exported to P2140API.tlb...

    I've looked through the example plugin, and it looks like for all my labels, I would use this code:

    Code:
    '*****************************************************************
    	'* This Function will be called with a requested label code and
    	'* format specified at the skin file. Simply return any text to
    	'* be displayed for the specified format.
    	'*****************************************************************
    	Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
    		
    		Select Case LCase(LBL)
    			Case "mylabel"
    				'This example returns a "hello" text to show it works
    				ReturnLabel = "Hello from Extension!"
    				
    				'Specify whatever and whichever labels you wish to create
    				'You can add as many as you'd like, and you can process complex labels as long
    				'as you parse them yourself (i.e. "mycomplexlabel;parameter")
    				
    				'Case "mycommand2"
    				'Insert Command code here
    				
    		End Select
    		
    	End Function

    So first I have to reference the codes from the API, then send those codes as a label to RR with returnlabel right? How do I reference the API in the code?

    so if I want to turn Batt_V (from P2140API) into psuBATT_V (in RR) the code might look something like this:

    Code:
    	Public Function ReturnLabel(ByRef LBL As String, ByRef FMT As String) As String
    		
    		Select Case LCase(LBL)
    			Case "psuBATT_V"
    				
    				ReturnLabel = $Batt_V
    								
    		End Select
    		
    	End Function
    As long as I create the $Batt_V variable from the Batt_V command right?

    Or, am I way off base?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  8. #18

  9. #19
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Quote Originally Posted by Enforcer View Post
    Yep, you seem to have the idea.
    Thanks, I feel like I might have a grasp on this, but then again, a fellow forum member had an idea about solar panels, it's all about the practice though. If I can't practice the idea, it means nothing.

    I think I can get it, but how do I reference the P2140API.dll in the code so that the variables actually work?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  10. #20

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Plug and play but where
    By AJWatU in forum LCD/Display
    Replies: 4
    Last Post: 10-19-2007, 04:39 PM
  2. USB plug hard wired to glovebox
    By sky_lennard in forum Power Supplies
    Replies: 5
    Last Post: 09-29-2007, 11:52 PM
  3. Where to Buy 3 Contact DC Power Plug
    By tallyman in forum General MP3Car Discussion
    Replies: 0
    Last Post: 03-18-2007, 09:53 PM
  4. EPIA MII 10000 onboard USB plug help
    By guizai in forum General Hardware Discussion
    Replies: 5
    Last Post: 01-26-2007, 06:08 PM
  5. Replies: 5
    Last Post: 07-12-2003, 01:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •