From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

timed loop with dual core processor

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?

 

 

0 Kudos
Message 1 of 10
(2,671 Views)

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

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 10
(2,666 Views)

Thank you for the response . But I am using the single VI in which both the loops are running.

 

0 Kudos
Message 3 of 10
(2,656 Views)

Stopping Parallel While Loops in LabVIEW with One Stop Button

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 10
(2,653 Views)

I tried the same solution using the timed while loop. It is not working.

0 Kudos
Message 5 of 10
(2,645 Views)

At this stage it might help to see your code. Is one of the loops stuck perhaps?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 6 of 10
(2,642 Views)

Yes, the 2nd while loop which is constructing the image is stuck. I have attached the vi.

0 Kudos
Message 7 of 10
(2,638 Views)

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?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 8 of 10
(2,629 Views)

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.

0 Kudos
Message 9 of 10
(2,624 Views)

>>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

 

This point is just as important, make sure you appreciate this issue too Smiley Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 10
(2,621 Views)