LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean troubleshooting

Hello every body I am trying to make a loop, and i got stuck at the following part. please suggest an appropriate solution: I want to make a loop which starts saving data when it recieves a 'True' from a boolean control and then bypasses the loop itself and keeps on collecting data irrespective of the boolean output. I am attaching my 'vi'
0 Kudos
Message 1 of 18
(3,963 Views)
You could make a flat sequence with the loop in frame 1, and your data collection code in frame 2. 
Jim

LV 2020
0 Kudos
Message 2 of 18
(3,961 Views)
Thanks for replying however I would be obliged if you could explain this more elaborately. Actually if you have a look at my vi you would notice that there is only one while loop which contains both the daq and the operators, so i was wondering if i am better off with two loops or one. Vaibhav
0 Kudos
Message 3 of 18
(3,955 Views)

To latch a Boolean, you just need a shift register as shown below. Also, from what I can tell, you have no way to stop the program unless you use the Abort Button on the toolbar. Wire a stop button to the stop input of the DAQ Assistant. For clarity, you might also want to convert the output of your Greater Than function to a single Boolean. I thoroughly despise dynamic data because it just makes it harder to see the actual data type.



Message Edited by Dennis Knutson on 06-13-2008 01:28 PM

Message Edited by Dennis Knutson on 06-13-2008 01:31 PM
0 Kudos
Message 4 of 18
(3,949 Views)
What is the purpose of the numeric greater than 1?
Jim

LV 2020
0 Kudos
Message 5 of 18
(3,947 Views)
thanks a ton to everybody for replying. However..I am really sorry..coz. i am a rookie. I am not sure of the shift register option because i donot have a loop around my boolean control however the idea of making the two boolean controller a single one was great. I was thinking the abort button to be the stop so i think i note that point too. As for the 1 , actually i have a voltage channel number 3 in my daq which is measuring voltage from a source when it goes above 1 v i start the data writing process to my file. vaibhav
0 Kudos
Message 6 of 18
(3,933 Views)

What do you mean you don't have a loop around the Boolean? It's there in the VI you posted. The while loop is that squarish object around all of your code.

Never use the abort button to stop a VI. See this.

0 Kudos
Message 7 of 18
(3,929 Views)
Thanks a ton dennis, that was really helpful now the code is running just fine.
0 Kudos
Message 8 of 18
(3,893 Views)
Hi I am just having a small problem executing Dennis's solution. The vi does not allow me to wire the boolean or function to the shift register saying that i am connecting a dynamic data source to a boolean sink Kindly advice me how to sort out this problem i am attaching a picture and a copy of the vi.
Download All
0 Kudos
Message 9 of 18
(3,877 Views)
As I said above, 'convert the output of your Greater Than function to a single Boolean'. That is done with the Convert from Dynamic Data function. When you configure it, select Single Scalar and Boolean data type.
0 Kudos
Message 10 of 18
(3,869 Views)