LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop 2 is not responding using the Events also the Loop 1

I am working on a project to log data on 100 KS speed. I have made here demo code. when I am using the events in Loop 2 this is not executing also stream of Loop 1 not executing which is controlled by a local variable of indicator "Boolean" from Loop 2, I am using QUEUE also the Channel Writer for data stream. This is not running.

 

Please suggest what is problem . 

 

Pankaj

Download All
0 Kudos
Message 1 of 3
(891 Views)

Hi James,

 

because you created deadlocks!

For the "Queue" VI: the first loop starts to produce data, but is not allowed to put them into the queue as "boolean" is FALSE.

Loop2 is calling the TimeOut event case and tries to read data from the queue: as there is no data in the queue it waits forever…

This results in an Deadlock: the first loop is not allowed to place data in the queue, while the 2nd loop cannot set the "boolean" because it is waiting for data to arrive!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(874 Views)

Thank You.

 

Got your Point.

I consider Dequeue VI in case of the Timeout Event of LOOP 2.

Now working.

 

 

 

0 Kudos
Message 3 of 3
(839 Views)