LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling case structure with daq assistant (digital input)

Solved!
Go to solution

What you want is a 'latching' rather than 'switching' button.

Right click on your control and go to Mechanical Action, then choose one of the Latching options (bottom row).

 

This will make the button reset to the previous value after it is read (inside the loop).

A downside of latching buttons is that they cannot be used with Local Variables, but you don't have any (which is usually good) so you're fine to use this.


GCentral
0 Kudos
Message 11 of 13
(633 Views)
Solution
Accepted by jofu

Hi jofu,

 

you really should clean up your VI:

GerdW_0-1597739812930.png

Set the "boolean 2" before the loop starts…

 

Other stuff:

  • Those 2 DAQAssistents handling the DO channels can be combined into just one!
  • The gauge indicators allow to show a numeric display, no need for additional indicators!
  • Using the Select node (instead of the case structure) makes your code more readable.
  • No need for channel wires going back and forth between two loops…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 13
(631 Views)

Waw, I did the clean up and set the "boolean 2" before the loop starts. Now it works perfectly and looks good. Thanks GerdW!

0 Kudos
Message 13 of 13
(606 Views)