Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with XML on off buttons

    I am integrating a Fusion Brain v6 using the software FuseGL, which is only in alpha stage and the creator stopped working on the program so I have to create code to use my Fusion Brain v6. The code file is in XML, Some have used VB.NET to program it. The FuseGL software allows me to create buttons, but has no options to add variable and I need to integrate my HVAC heater controls. First I am working on my blower motor switch. A simple switch where if switch is in the OFF position, the ignition (polarity +) makes the OFF position wire hot and the blower speed positions 1-5 are not hot. When switching blower motor swtich from OFF to position 1, the ignition wire connects to position 1 and OFF position wire is not hot anymore. If I switch the blower to position 2, the OFF position, position 1, 3, 4, and 5 are not hot. This switch is manual and I am going to integrate the blower motor to my fusion brain using six 12vdc relays.

    So you probably have an idea of what I'm trying to accomplish, the thing is I don't know how to program the fusion brain with code. Since there are no variables in the FuseGL program, I need help creating the code for the xml file. I think I need to create variables with boolean or instances so if I click on a button to turn it on, the result will turn off any buttons that are on and only one button will be on at a time. Can anyone write out a template code so I have an idea how to write it so if I turn a button on, it will turn on the digital output and turn all others off? I have dreamweaver, excel, and visual basic 2008. Maybe someone can recommend another program or is dreamweaver enough to do what I want?

    My vehicle is a 2000 Chevrolet Monte Carlo. It has manual heater controls with vacuum lines. I replacing the manual heater control with a digital heater control with vacuum lines out of a 1999 Chevy Lumina, but the 1992 service manual has the correct wiring for the digital controller.



    Here are the parts I'm using to integrate my HVAC: TYCO 12vdc relays:



    PC board:



    AC Delco 15306155 wire harness so I don't have to cut into my factory harness:





    Here is the case I made for the FBv6. It's made of ABS plastic Metra 89-00-9032 and plastic standoffs:





    The other case is just for my carputer's power supply:



    On my FBv6, the digital output 25 is stuck on the on mode, oh well:



    My Analog HVAC controller with vacuum lines:
    Last edited by ladybridgeport; 10-07-2012 at 12:06 AM. Reason: Added more info

  • #2
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts




    Simply unplug the blower motor harness and connect my white wire harness adapter:


    I soldered 18 AWG wire to the PC board:



    The reverse side of PC board has my relays:





    Now I can connect my harness to the blower harness and solder my wires to Cat6 wire that I ran from the trunk to my concoction. The Cat6 wires are nice because they have a bundle of 20-some gauge wire so it doesn't bulk under the carpet.

    Last edited by ladybridgeport; 10-07-2012 at 12:10 AM.

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is the xml code for two of my buttons, button 0 and button 1: I'm pretty sure I need a if, then statement to make if button 0 is on, it automatically turns off button 1. Also if I turn on button 1, it will automatically turn off button 0. I will have a total of six buttons. Button 0-5

    <?xml version="1.0" encoding="utf-8"?>
    <FuseGL_User_Settings>
    <User_Object type="FuseGL_Object">
    <setting type="string" name="GL - BTN - DO[0,0]" />
    <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
    <image_hover location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.BaseButtonHover" />
    <text text="Toggle: 0" />
    <size width="120" height="30" />
    <location x="135" y="135" z="0" alignment="L" />
    <setting type="int" border_size="1" />
    <setting type="bool" mouse_cursor_to_hand_on_hover="true" />
    <events>
    <startup action="FuseGL.ExecuteCode" inputArgs="ChangeTextOnDigitalOutputChange.cs;FuseGL_TextManipulation.InternalFlyCompile_ChangeTextO nDigitalOutputChange;ChangeButtonTextOnDigitalOutputPersistant;{FB.DigitalOutput(0.0)};{this.text};T urn off: 0;Turn on: 0;" outputTo="this.text.text" />
    <onmousedown action="FB.ToggleDigitalOutput" inputArgs="Port:0.0" />
    </events>
    </User_Object>
    <User_Object type="FuseGL_Object">
    <setting type="string" name="GL - BTN - DO[0,1]" />
    <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
    <image_hover location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.BaseButtonHover" />
    <text text="Toggle: 1" />
    <size width="120" height="30" />
    <location x="135" y="195" alignment="left" z="0.0" />
    <setting type="int" border_size="1" />
    <setting type="bool" mouse_cursor_to_hand_on_hover="true" />
    <events>
    <startup action="FuseGL.ExecuteCode" inputArgs="ChangeTextOnDigitalOutputChange.cs;FuseGL_TextManipulation.InternalFlyCompile_ChangeTextO nDigitalOutputChange;ChangeButtonTextOnDigitalOutputPersistant;{FB.DigitalOutput(0.1)};{this.text};T urn off: 1;Turn on: 1;" outputTo="this.text.text" />
    <onmousedown action="FB.ToggleDigitalOutput" inputArgs="Port:0.1" />
    </events>
    </User_Object>
    </FuseGL_User_Settings>

  • #4
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what I came up with so far, not sure about variable name. A guy from work said to create an instance. The program describes fusion brain and ports as (0,0), (0,1) The (0...is the fusion brain number, I can connect up to 15 fusion brains. The ...,0) is the port number so fusion brain number 0 on port 0 is (0,0). Fusion brain 0 on port 1 is (0,1). I'm hoping by adding the following if, then statement it will automatically turn off all ports except the port that is turned on. Can someone check to see if I need to change anything?

    <rule>
    <if>
    <conditions>
    <condition var="GL - BTN - DO[0,0]" operator="true"></condition>
    <!-- more conditions possible -->
    </conditions>
    <then>
    <startup action="FB.ToggleDigitalOutput" inputArgs="Port:0.1"/>
    </then>
    </if>
    <elseif>
    <condition var="GL - BTN - DO[0,1]" operator="false"></condition>
    <statements>do nothing</statements>
    </elseif>
    <else>
    <statements></statements>
    </else>
    </rule>
    Last edited by ladybridgeport; 10-07-2012 at 03:21 PM.

  • #5
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found this code for toggle a can node:

    /* Toggle CAN Outputs */
    void toggleCanOutputs(MPICan can, long nodeNumber, long channelCount)
    {
    long returnValue;
    long channel;
    MPICanNodeInfo canNodeInfo;

    /* Find out how many digital outputs this node supports. */
    returnValue =
    mpiCanNodeInfo(can, nodeNumber, &canNodeInfo);
    msgCHECK(returnValue);

    /* Turn off all the digital outputs. */
    if( canNodeInfo.digitalOutputCount < 32 ) {
    mpiCanNodeDigitalOutSet(can, nodeNumber, 0, canNodeInfo.digitalOutputCount, 0, 1 );
    } else {
    mpiCanNodeDigitalOutSet(can, nodeNumber, 0, 32, 0, 1 );
    mpiCanNodeDigitalOutSet(can, nodeNumber, 32, canNodeInfo.digitalOutputCount - 32, 0, 1 );
    }

    /* Set each output bit in turn. */
    for(channel = 0; channel<CHANNEL_COUNT; channel++) {
    /* Turn digital output "on" */
    returnValue =
    mpiCanNodeDigitalOutSet(can, nodeNumber, channel, 1, 1, 1 );
    msgCHECK(returnValue);

    /* Pause for one half second */
    mpiPlatformSleep(500);

    /* Turn digital output "off" */
    returnValue =
    mpiCanNodeDigitalOutSet(can, nodeNumber, channel, 1, 0, 1 );
    msgCHECK(returnValue);
    }
    }

    The above (Turn digital output "off") uses mpiCanNodeDigitalOutSet. I need to find the right label for my version. I think I may have to use FB.ToggleDigitalOutput replaced with FB.DigitalOutputSet unless someone knows the specific command for turning it off? Feel free to give you insight.

  • #6
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    FB.TurnOffDigitalOutput turns it off

  • #7
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,453
    Thanks
    1
    Thanked 21 Times in 19 Posts
    Ladybridgeport, I know no one's answered your questions yet, and I realize you're really trying hard. I have been watching this thread, and I wish I could help you on this one. I just wanted to leave a note to cheer you up, letting you know that you haven't been ignored here.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

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