Showing results for 
Search instead for 
Did you mean: 

Lag in Dequeue Function


Hey people,


I have been having a pretty strange and confusing issue going on in my project that I am hoping someone could help me with. I am programming the automation of a dc motor dyno test procedure. Basically you apply and voltage to the motor and current to a particle brake and stream data such as torque and speed as well as voltage and current. This program has two modes of operation, auto mode and manual mode. In auto mode the program inputs the different input voltage/current values and runs through 5 second data collection cycles until the last input current/voltage value is inputted. In manual mode you enter the input voltage and current value manually and then manually record data displayed. I am using producer/consumer architecture and seem to be having an issue with my dequeue functions in my "Data Manipulation" Loop. The strange thing about it is that the issue only occurs in manual mode. What happens is that the streaming data only displays my current and torque readings and then after about 5 seconds the speed and voltage is then displayed. I cant seem to figure out why there is a lag in the dequeueing between the two modes. Attached below is a zip of my project and associated VI's. There is a step by step test procedure in the project documentation as well. Any response or feedback will be greatly appreciated, thank you!



0 Kudos
Message 1 of 3

I think the only obvious thing that I can see that might be the cause of your problem is here:



You have 3 de-queues (with -1 timeout - so they will wait forever for data) that can cause the program to wait. First you have to send an Acquire Data queue command (which then re-queues itself) but once inside that loop it is then waiting on the AI Queue and Counter Queue for data until the loop can finish executing.


This means the rate of your Acquire Data, Counter and AI Queue must be the same for the node to execute without delays - otherwise one queue might backing up or return stale data.

Message 2 of 3
0 Kudos
Message 3 of 3