From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in configuring the boolean control

Hello,

 

i  have made a vi of my own. i want that in this vi i can operate the the two boolean controls simultaneously. i have change the mechanical action of the boolean controls, Boolean is switch when pressed and Boolean 2 is Switch untill released.

 

My issue is that when Boolean control is on ,Boolean  2 takes a long timw to operate. But when Boolean control if off then Boolean 2 works just fine as  i want it to .

 

I shall appreciate if someone can help me analyze what is wrong and suggest any remedy if possible.

 

Regards

 

Jalashwa

0 Kudos
Message 1 of 2
(2,003 Views)

I do not have IMAQ so I cannot run the VI.

 

1. How are you testing the "time to operate"? The booleans are read almost immediately when the VI starts and never read again so any changes  have no effect.  Are you using Run Continuously? That is not intended for repeating the operation of code -  it is a limited use troubleshooting tool. If the code should run multiple times place a while loop around the code and add a front panel stop button to end the run.

 

2. Except for the file paths and the indicators it appears that the code in each frame of the sequence structure is identical. Create an array of the file paths and put the code inside a for loop. Much cleaner, no hidden code, and can be expanded to any number of files just by adding elements to the path array.

 

3. How long does the code in the sequence structure take to run? Even though the case structures are parallel, the entire VI can only repeat after everything has completed. Perhaps you need two while loops, one for the code controlled by each boolean. Look at the Producer/Consumer Design Pattern for an example of parallel loops. That pattern is somewhat more complicated than you need, but you can see how parallel loops can be used.

 

Lynn

0 Kudos
Message 2 of 2
(1,988 Views)