Page 20 of 33 FirstFirst ... 101112131415161718192021222324252627282930 ... LastLast
Results 191 to 200 of 328

Thread: Fusion Brain Version 6 -- Beta Testing

  1. #191
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by rEegLer View Post
    Tested it, running version 1.1.0.286. It still only lets me have one output on at a time.
    I just retested with the exe outside of the dev environment and everything works ok... Copy the exe only to a new folder, run from there. Add a couple buttons, does it work?

    Also, I still can't get the digital output timer to work right. Here is my Config file startup action:

    Code:
    <startup action="FuseGL.ExecuteCode" inputArgs="Logic/Amp_ON.cs;AMP_ON_NS.TURN_AMP_ON;DigitalOutputPort___TurnOn;{FB.DigitalOutput(0.10)};{(int)100};" />
    Here's my cs file named Amp_ON.cs:

    Code:
    using System;
    using System.Collections.Generic;
    using FB_USB_2011;
    using FuseGL.GUI.Text;
    using FuseGL.Logic;
    
    namespace AMP_ON_NS
    {
        class TURN_AMP_ON
        {
            public object DigitalOutputPort___TurnOn(FB_Monitor.DigitalOutputPort _port, int how_often_in_milliseconds)
            {
                if (allAnaloguePortsToDisplay.ContainsKey(_port)) { return true; }
                System.Timers.Timer _timer = new System.Timers.Timer();
                _timer.AutoReset = true;
                _timer.Interval = how_often_in_milliseconds;
                _timer.Elapsed += delegate(object sender, System.Timers.ElapsedEventArgs e)
                {
                    someDigitalOutputPort.Value = 255;
                };
                _timer.Start();
            }
        }
    }
    That code won't compile. If you look in the trace file, it should say that too. You have no variable called "allAnaloguePortsToDisplay" anywhere, so you can't use that. Also you have called your FB_Monitor.DigitalOutputPort "_port" so you cannot then refer to it as "someDigitalOutputPort".
    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

  2. #192
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Quote Originally Posted by 2k1Toaster View Post
    I just retested with the exe outside of the dev environment and everything works ok... Copy the exe only to a new folder, run from there. Add a couple buttons, does it work?
    Tried that and it does the same thing. Is anyone else having similar problems or just me?


    That code won't compile. If you look in the trace file, it should say that too. You have no variable called "allAnaloguePortsToDisplay" anywhere, so you can't use that. Also you have called your FB_Monitor.DigitalOutputPort "_port" so you cannot then refer to it as "someDigitalOutputPort".
    I'll try this and let you know how it goes.
    Love

  3. #193
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by rEegLer View Post
    Tried that and it does the same thing. Is anyone else having similar problems or just me?


    I'll try this and let you know how it goes.
    So you had no other files at all other than the exe and you went through the configuration and it still didn't work? Can you post your entire configuration file please.
    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

  4. #194
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Took the exe and put it in an empty folder (my test folder), created two buttons, each controlling a different digital output. Here's the config file:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <FuseGL_User_Settings>
      <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - BTN - DO[0,10]" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <image_hover location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.BaseButtonHover" />
        <text text="Toggle: 10" />
        <size width="240" height="75" />
        <location x="585" y="150" 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_ChangeTextOnDigitalOutputChange;ChangeButtonTextOnDigitalOutputPersistant;{FB.DigitalOutput(0.10)};{this.text};Turn off: 10;Turn on: 10;" outputTo="this.text.text" />
          <onMouseDown action="FB.ToggleDigitalOutput" inputArgs="Port:0.10" />
        </events>
      </User_Object>
      <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - BTN - DO[0,25]" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <image_hover location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.BaseButtonHover" />
        <text text="Toggle: 25" />
        <size width="420" height="105" />
        <location x="975" y="135" 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_ChangeTextOnDigitalOutputChange;ChangeButtonTextOnDigitalOutputPersistant;{FB.DigitalOutput(0.25)};{this.text};Turn off: 25;Turn on: 25;" outputTo="this.text.text" />
          <onMouseDown action="FB.ToggleDigitalOutput" inputArgs="Port:0.25" />
        </events>
      </User_Object>
    </FuseGL_User_Settings>
    Love

  5. #195
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053


    I didn't repackage the new dll...

    Give me a couple minutes.
    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. #196
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Get the new update, then try. Apologies.
    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

  7. #197
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Yup. Worked. Thanks!
    Love

  8. #198
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Quote Originally Posted by 2k1Toaster View Post
    That code won't compile. If you look in the trace file, it should say that too. You have no variable called "allAnaloguePortsToDisplay" anywhere, so you can't use that. Also you have called your FB_Monitor.DigitalOutputPort "_port" so you cannot then refer to it as "someDigitalOutputPort".
    Sorry you have play dumb with me because I don't know C# very well. I feel like a blind guy trying to pee in urinal. All I'm trying to do is make digital output port 1 turn on with a timer every 500ms. I just don't know the correct syntax for that. I work off examples but I haven't seen one that actually just turns on a digital output. Will startup or timer features be available in the GUI setup in the future?
    Love

  9. #199
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Untested code:

    Code:
        class TURN_AMP_ON
        {
            public object KeepOutputOn(FB_Monitor.DigitalOutputPort _port)
            {
                _port.Value = 255;
                _port.DigitalOutputStateChangedEvent += delegate(FB_Monitor.DigitalOutputPort event_port)
                                                            {
                                                                if (_port.Value != 255)
                                                                {
                                                                    _port.Value = 255;
                                                                }
                                                            };
            }
        }
    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

  10. #200
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Quote Originally Posted by 2k1Toaster View Post
    Untested code:

    Code:
        class TURN_AMP_ON
        {
            public object KeepOutputOn(FB_Monitor.DigitalOutputPort _port)
            {
                _port.Value = 255;
                _port.DigitalOutputStateChangedEvent += delegate(FB_Monitor.DigitalOutputPort event_port)
                                                            {
                                                                if (_port.Value != 255)
                                                                {
                                                                    _port.Value = 255;
                                                                }
                                                            };
            }
        }
    No timer needed?
    Love

Similar Threads

  1. ** NEW Fusion Brain Version 6, Pre-Order NOW **
    By 2k1Toaster in forum Fusion Brain
    Replies: 259
    Last Post: 04-07-2013, 02:48 PM
  2. Fusion Brain version 4
    By MattFreitag in forum Fusion Brain
    Replies: 7
    Last Post: 08-01-2010, 04:32 PM
  3. Fusion Brain -- Digital Encoder Beta Test
    By 2k1Toaster in forum Fusion Brain
    Replies: 52
    Last Post: 09-18-2009, 02:11 PM
  4. Fusion Brain Version 4 Manual
    By greenman100 in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 12-19-2008, 02:11 PM
  5. Fusion Brain Version 4 ready for Beta Testers!
    By greenman100 in forum Fusion Brain
    Replies: 15
    Last Post: 11-13-2008, 10:21 PM

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
  •