LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to get a picture box to flicker, then trigger a DAQ measurement after a number of flickers, but I need the picture box to continue flickering while the measurement is being taken.

I have tried different structures, with the last being a case structure inside of the while loop that the flickering picture box is in, all in hopes of having the picture box continue to flicker between the two grey levels while the measurement is being taken. My vi is listed below. What do I need to do to make this happen? What information do I obviously not posess that may help me in the future with this sort of problem? where do I find it?
0 Kudos
Message 1 of 13
(3,425 Views)
I had a similar problem, i ended up using 2 while loops side by side. You could do your case structure in the one while loop, then do the measurement on a local variable of the picture box (or use qeues if you are worried about race conditions, or use semaphores.) in the other loop.
0 Kudos
Message 2 of 13
(3,425 Views)
I tried two while loops and a local variable, but ended up with the same problem. The picture box needs to switch between the grey levels while the DAQ is taking measurements because a photometer is continuously taking measurements of the picture while it is switching, and it is the photometer that gives off a signal while it is measuring. So if there is no grey level switching in the picturebox, then there is no signal output from the photometer, and the DAQ just reads a flat line. In all of this the photometer is not part of the program, with the exception of the sinal it sends to the DAQ. I attached the altered vi, so you could look at it, if you have any suggestions let me know. Please, if you have any suggestions, can you put them in a
more remedial form (step by step), as I am new to labview.
0 Kudos
Message 3 of 13
(3,425 Views)
Okay, this should work for you, i changed your some of your inputs to color boxes, but you can change them back if you wish. Let me know if this is what you had in mind.
Message 4 of 13
(3,425 Views)
Oh, i forgot to add, instead of the false constant on the case structure, make a comparison in the while loop on the left as to number of iterations, then make an indicator on that comparison. Then wire that indicators local variable to the case structure.
0 Kudos
Message 5 of 13
(3,425 Views)
I tis more or less what I have tried. You are the second person that I have to apologize to for accidentally putting up the wrong vi for the 2 while loop vi. I'll attach the real vi. I don't know if you have a DAQ card on your computer, but if you do try running this vi. Set the scann rate at 5000 and the # of scans to capture at 15000, then run the vi. I can count the three seconds that it takes to capture the signal, and watch the entire time as the picture box stops switching back and for while the signal is being captured. If you have better luck let me know, or if you come up with anything.
0 Kudos
Message 6 of 13
(3,425 Views)
You got me, Your version works fine on my pc. I have a 6025E data aquisition card in, so there are no errors. I tried even longer capture times, and it still switches the entire time, then records the file.
0 Kudos
Message 7 of 13
(3,425 Views)
I have a PCI-MIO-16E-4, and I am running this on Labview 6.1, do you think that either of these differences is the reason for my problem? If so do you know why?
0 Kudos
Message 9 of 13
(3,305 Views)
I didn't know that multi-threading could be turned off, or on for that matter. How would I go about finding out if it is turned off, and if so turn it back on? Would this work with a PCI-MIO-16E-4 DAQ and labview 6.1?
0 Kudos
Message 10 of 13
(3,425 Views)