03-05-2014 03:28 AM
I have a LabView program that collects voltage in a while loop parallel to the rest of the program which moves a Thorlabs rotator and counts with an SR400 photon counter, rotates again, counts etc.
Since I have put a hold function on the rotator for it to finish moving before the SR400 starts, also the voltage collection halts until move is complete. I thought that LabView did things in parallel so that if I put a while loop outside the sequence of the other stuff, that would run continuously no matter what happens in the other part.
Is there a way to make it do what I want?
I also would like to have a common stop button for both parts, but then the voltage measurement won't start until the counter starts.
The counter is started inside a while loop where a button is placed and I thought I could wire that button to the parallel loop but then the latter waits for the status of the button before it begins aquiring data...
03-06-2014 04:20 AM - edited 03-06-2014 04:24 AM
Hi otg,
Provided that you have multiple CPU-cores available on your system, LabVIEW will execute all parallel code in parallel. For example, inside a while loop, if two wires of code (with no interdependence) are drawn in parallel, LabVIEW will execute them in parallel. Another example is if you have two while-loops next to each other. As soon as both have started, they will execute in parallel. However, note that if you would utilize a resource that cannot be shared, parallel processing will be halted, or yield an error.
For more information, please take a look at the following two resources:
http://www.ni.com/white-paper/14565/en/
ftp://ftp.ni.com/evaluation/labview/ekit/multicore_programming_resource_guide.pdf
Regarding your question with a common stop button, you could e.g. use local variables, see link below.
http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE?OpenDocument
03-06-2014 04:31 AM
Thank you (Tack ska du ha? (gissar att du är svensk bara) 🙂 )
I'll look into that and see if that solves my problem. Guess the motor control invoke boolean input "wait until move is complete = True" might still mess things up but perhaps I find something in your links that will let my voltage data input run continuously in parallel anyway