Announcement

Collapse
No announcement yet.

Enabling an output trigger

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enabling an output trigger

    Can someone help me with this?

    I'm doing a simple temperature controller. I monitor the water temperature in my car and when it hits a pre-set level, I want to turn on some relays.

    I have a screen that displays all my inputs, variables, & outputs, and when I set the controller up in the most straightforward way, it works as intended. But I want to enable the trigger based on the state of an 'enable' screen button.

    I compare a Fahrenheit sensor to a number. Next I compare the output of the > comparator to a variable that represent the 'enable' state - based on my button. Then it goes to my output. But my 'then statements' trigger an output when the temp exceeds the threshold regardless of the state of the enable signal.

    Click image for larger version

Name:	logic1.jpg
Views:	1
Size:	15.3 KB
ID:	2305641

    I also tried setting a new variable, but no difference.

    Click image for larger version

Name:	logic2.jpg
Views:	1
Size:	16.6 KB
ID:	2305642

    Any ideas what I'm doing wrong?

    Thanks,

    Shep
    Shep

  • #2
    you need to do "wvo_enable == whatever" tied to the second input of the AND gate
    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

    Comment


    • #3
      Originally posted by 2k1Toaster View Post
      you need to do "wvo_enable == whatever" tied to the second input of the AND gate
      So, using the debugger it seems that my "Enable" button only sets the variable wvo_enable momentarily. I'm new at this and I reckon I'm a dummy, but I kind of thought when the button was showing the 'pressed' image that it would hold the variable in that state rather than momentarily setting it then returning to its original state.
      Shep

      Comment


      • #4
        Originally posted by no_hazmats View Post
        So, using the debugger it seems that my "Enable" button only sets the variable wvo_enable momentarily. I'm new at this and I reckon I'm a dummy, but I kind of thought when the button was showing the 'pressed' image that it would hold the variable in that state rather than momentarily setting it then returning to its original state.
        If so, then you have a priority conflict. Change the button to high priority and make sure it is "attached" to the vote.
        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

        Comment

        Working...
        X