Results 1 to 10 of 10

Thread: com

  1. #1
    Maximum Bitrate
    Join Date
    Jan 2005
    Posts
    515

    com

    real stupid question guys how does oine go about using the COM in the new software?

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Make sure the dll is registered. It is done by the installer, but just in case, it doesnt hurt to do it again by running the FusionCOM_Registration.cmd file.

    Then in your MDX Configuration File, manually add something like this in your general area:

    Code:
        <com status="enabled">
          <commands>
            <command id="RoadRunnerCommand" minimum_delta_vote_time="100">
              <do function="trigger output" functionTargetID="Digital Output 0" vote_opinion="on" vote_priority="medium"></do>
              <do function="trigger output" functionTargetID="Digital Output 1" vote_opinion="on" vote_priority="medium"></do>
            </command>
          </commands>
        </com>
    That above code, means that a command in RoadRunner called "RoadRunnerCommand" when received will trigger both of those votes to turn on Digital Output 0 and Digital Output 1.

    Also commands in RoadRunner's skin files that relate to MDX, need to start with "fusion".
    MDX Commands need to have "vote" as the second part, and then the id as the third part. So for instance, the button would be:

    Code:
    B02,348,70,104,75,"fusion_vote_RoadRunnerCommand",""

    Now for label displays in RoadRunner, it too must start with "fusion".
    The second section is what type the item is. It can either be an Analogue Input, Digital Output, Digital Input, Numeric Variable, or Boolean Variable with the second part being "ai", "do", "di", "varnum", and "varbool" respectively.
    The third section is what the index value is. It is as in the order they are laid out in the configuration file with 0 being at the top and N being the last one near the end of the file. Then there is an optional fourth section that specifies how many decimals (must be integer value).

    So sample code:

    Code:
    L03,260,10,150,30,255,255,255,18,"Arial Narrow:B","fusion_ai_0", ""
    L04,410,10,180,30,128,255,128,18,"Arial Narrow:B","fusion_ai_0_3", ""
    L05,260,40,150,30,255,255,255,18,"Arial Narrow:B","fusion_varbool_4", ""
    L06,410,40,180,30,128,255,128,18,"Arial Narrow:B","fusion_varnum_0", ""
    First line displays the full value of the first Analogue Input defined in your Configuration File.
    Second line displays the value of the first Analogue Input defined in your Configuration file rounded to 3 decimal positions.
    Third line displays the fifth (0,1,2,3,4 is the fifth), boolean variable as defined in your Configuration file.
    Fourth Line displays the first numeric variable as defined in your Configuration file.


    Also of course, you need to add this into your RoadRunner skin:
    Code:
    /, Fusion Control Centre
    X,FusionCOM
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #3
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Way cool! I can't wait to try this out. Thanks very much for this.

  4. #4
    Maximum Bitrate
    Join Date
    Jan 2005
    Posts
    515
    out of curiosity will the COM support work with Girder sorry if this is a question that has been brought up before

  5. #5
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by yonu View Post
    out of curiosity will the COM support work with Girder sorry if this is a question that has been brought up before
    I dont have or use Girder, so I have no idea. This is meant for RoadRunner now, it will expand to other programs later.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  6. #6
    Maximum Bitrate
    Join Date
    Jan 2005
    Posts
    515
    ok then thought I would ask

  7. #7
    Constant Bitrate
    Join Date
    Jul 2008
    Location
    Lee's Summit
    Posts
    138

    I will try it.

    2k1Toaster, I'm guessing I have found the thread you were telling me about. I have some questions if you don't mind.

    Code:
    X,FusionCOM
    Does this tell RR to run the object or is there something I have to do or create in RR.? (Like the plugins have.)

    If your using:



    Code:
    <com status="enabled">
          <commands>
            <command id="RoadRunnerCommand" minimum_delta_vote_time="100">
              <do function="trigger output" functionTargetID="Digital Output 0" vote_opinion="on" vote_priority="medium"></do>
              <do function="trigger output" functionTargetID="Digital Output 1" vote_opinion="on" vote_priority="medium"></do>
            </command>
          </commands>
    </com>

    to turn on the Digital Output 0 then what in RR turns it off?
    I see no off command? or is it just that you hit the button in RR again and it turns it off.

    Do I leave the xml config file where it is:
    Say its in C:\Program Files\Fusion Control Centre Uber MDX Edition\Configurator

    Ok that should be a good start for me. If I can get some answers I will give this a test and see if I can get my new FB to talk in RR. My application is counting on it.

    Also by do it this way can I do other stuff like math that it would understand?

    You know me all these batteries over here and it has to add up to 144 volts at some point... LOL

    Let me know and as always thanks for the help.
    Troy
    Batmaninls
    www.evorbust.com

  8. #8
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    you need that x,... in RR because that is just how RR does plugins.

    To make a button to turn on an output change the votw to ,off, instead of ,on,. to make one button do it all, allmake the vote 'toggle'.

    as always the file need to be in MDXs root directory to work.

    all math can be done in MDX and then make a label on the variable as shown above.

    I am phone only this week on vacation, responses will be slow if at all. hopefully this answers your questions.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  9. #9
    Constant Bitrate
    Join Date
    Jul 2008
    Location
    Lee's Summit
    Posts
    138
    Error Message...
    System NullRefenceException: Object reference not set to an instance of an object at FusionCom.RRExtension.ProcessCommand(string&, CMD, Object&frm) in C:\Users\Documents\Visual Studio 2008\Projects\MDX_COM\FusionCOM\Server.cs:line 101

    That's what I get when I clicked on the button in RR follow your directions to a Tee sir.

    Let me know what I did wrong
    Thanks
    Troy
    Batmaninls
    www.evorbust.com

  10. #10
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    you are trying to access something that isnt there. what are you trying to access ai/di/do/varnum/varbool? what index are you using in RR? what do you have in MDXs configuration file for that specific type?
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

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
  •