VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous custom device with Timed Loop

I'm using an asynchronous custom device for my task. I see a strange behavior while using timed loop instead of while loop. When I use the RT loop as a while loop, the custom device runs fine. Then I had some requirement which insist me to run the custom device in sync with the PCL, I have used the methods mentioned here -

 

http://zone.ni.com/reference/en-XX/help/372846M-01/veristandmerge/sync_async_cd_with_pcl/ 

 

As I have changed this, my timed loop is stopping abruptly. All other loop in the custom device is running fine. The time loop is not going to exit, no error is coming out of it, only the execution is stopped.

 

VS Issue.JPG

The picture explains the situation as the top left graph shows the Rt loop rate in micro seconds. My PCL rate is 5kHz, and I'm running the custom device at decimation 1. So till 13 second the timed loop ran in around 200 micro second, and the last iteration when it worked correctly was the iteration number 67853. Then the loop count and the loop rate stops updating (showing a flat line in the loop rate of 203 micro second). At the same point of time other low priority loops continue to work(the graph on the right side from a low priority loop).

 

 

2020-03-02 15_08_16-Greenshot image editor.png

The picture shows that the timed loop which stops running. The code inside the sub-vi is just reading and writing 2 FPGA DMA channels which is tested in LabVIEW RT and is capable of running within 60 micro second. 

 

2020-03-02 15_08_47-Greenshot image editor.png

The timed loop setting is shown above. we are running using the device clock with decimation 1, PCL rate 3kHz. and filter watchdog error is enable. I have changed all the available settings and there is no improvement !

 

Anybody having any idea regarding the issue or something similar ?

0 Kudos
Message 1 of 3
(2,484 Views)

Hello meBaga,

 

What setup do you have?

What insists you, what is the requirement?

Have you seen this document?

 

 

__________________________________________
The best way to thank, is to give KUDOS
0 Kudos
Message 2 of 3
(2,299 Views)

Hello meBaga,

 

I suspect this is caused by the usage of a notifier in a timed loop. The async template uses a notifer for two purposes: sending the status of initialization code and a final shutdown status.

 

As a test, I would recommend disabling the notifier. If that test runs successfully, you could look into replacing the notifiers with a more appropriate mechanism (maybe RT FIFO).

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 3 of 3
(2,282 Views)