LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW RT task scheduling problem when using AI SingleScan

Based on NI examples I've implemented a 'time-critical' control loop VI which uses AI SingleScan for timing. I have a second 'normal' priority communication loop VI. The control loop runs at 1 Hz. The communication loop runs at 2 Hz. Both have simple front panels which they update. They share a RTFIFO.

When I download (to PXI 8170) and run the VI's from the RT Development System, my time-critical control loop VI does in fact run at only 1 Hz. (as shown by the Tick Count VI), however, it still starves my normal priority communication VI.
UNTIL --- I do the following:
1. pause the control loop and display it's diagram
2. highlight execution for about 1 sec.
3. close the diagram.
From this point on,
everything works perfectly.

Any suggestions on troubleshooting this problem?

Thanks for your assistance!
0 Kudos
Message 1 of 2
(2,653 Views)
For the most part the code looks good. While your code is based on examples, have you tried running an example directly? Have you tried any *faster* scan rates, such as 10 or 100 Hz? What version of LabVIEW RT do you have? If you view your ni-rt.ini file on the RT OS via FTP, does it contain lines that say:

[NI-DAQ]
UseSleepingTimedNonBuffered=TRUE

If not, add these and FTP it back and this should solve the problem, though they should already be there. If you are still experiencing problems, you might consider creating a service request to contact NI support.
0 Kudos
Message 2 of 2
(2,653 Views)