03-26-2012 02:27 AM
Hello,
I am using LabVIEW 2009. I am using two timed loops with a dual core processor. The first loop is used by the first core which is generating random data and the second loop is used to construct the image using the data received from the first loop. My question is how can I stop both the loops/processors simultaneously?
03-26-2012 03:03 AM - edited 03-26-2012 03:05 AM
If you want to stop both the VI simultaneously then you need use global variables where the value should be set before giving to the stop terminal
03-26-2012 04:02 AM
Thank you for the response . But I am using the single VI in which both the loops are running.
03-26-2012 04:03 AM
03-26-2012 04:50 AM
I tried the same solution using the timed while loop. It is not working.
03-26-2012 04:51 AM
03-26-2012 05:21 AM
Yes, the 2nd while loop which is constructing the image is stuck. I have attached the vi.
03-26-2012 06:04 AM
Your first loop will exit when the iteration counter equals your "max queue size" variable (-1), which means the STOP button won't get read if the loop exits before you press stop.
I can also see you haven't wired a timeout to the dequeue element. This means it will sit indefinitely waiting to read an element from the queue, and if there are none to read it will cause your loop to stop responding.
I'm not sure what you're trying to achieve in the code, but you appear to be pushing n random numbers into a queue, then pulling them all out in a for loop embedded within a single case of another timed loop? Why not just create an array of random numbers and directly wire this to your IMAQ ArraytoImage.vi?
03-26-2012 06:49 AM
Thanks Thoric for responding. I understood your point that I haven't wired a timeout to the dequeue element.
Actually, I am working on a project in which I am receiving the images taken by the IR camera through the TCP/IP Offload Engine (TOE). The TOE is configured here as the TCP server and the client application in the LabVIEW is receiving the data. The data is reshaped into a 2D array of the size 240 X 320 (which is the size of the IR camera image). Then using these data an image is being reconstructed. So, as per the requirement , I need to collect the data in one core of the processor and the another core will reconstruct the image. So, I have created a dummy application here to learn the functionality of the timed loop and the use of dual core processor.
Therefore, I am pushing the data in the queue and dequing it in the another timed loop.
03-26-2012 06:55 AM