PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble using Real Time "Wait" and "Wait until"

Hi,

My problem is:
When I use Labview Realtime with a while loop in CompactRIO, if I use a "Wait" or "Wait Until" function with unit "us" ot "ns" the loop will stop there forever. However, if I set the unit to ms, the loop can normally run.

Besides, if I run the same vi under the host computer (not under CompactRIO), the loop can run correctly with whatever units "ms", "us", or "ns".

Can anyone help me to solve this problem or tell me why?

Thanks!

0 Kudos
Message 1 of 4
(4,065 Views)
Hi RT,

The Wait and Wait Until Next ms Multiple functions (Functions >> Programming >> Timing) only have a 1 ms resolution, so there's a good chance the Real-Time system balks when a value less than 1 ms is passed to it.

To achieve <1 ms resolution, I suggest using the RT Timing Wait and Wait Until Next ms Multiple express functions (Functions >> Real-Time >> Real-Time Timing). With these VIs you can set the timing based on a tick, us, or ms scale. Cheers.

Michael K.

| Michael K | Project Manager | LabVIEW R&D | National Instruments |

Message 2 of 4
(4,052 Views)
hi Michael,

Indeed I used the
RT Timing Wait and Wait Until and got the problems I posted.

I don't know if this is because the CompactRIO9004 doesn'tnot support the loop faster than 1KHz? or is there any other reasons?

If the 9004 doesn't support loop faster than 1KHz, will other RT system such as PXI-8196RT support higher loop speed? And which NI RT system product, besides the FPGA, can I get the fastet loop  speed?

Thanks,
0 Kudos
Message 3 of 4
(4,037 Views)
Hi mfxyie,

The cRIO-9004 definitely supports a timed loop faster than 1 kHz. Here are two documents that discuss setup and possible solutions. Let me know if you still have any problems/questions.

Why does a CRIO-9004 only provide a timed loop of 1kHz (clock) and not 1MHz?
   http://forums.ni.com/ni/board/message?board.id=280&message.id=760&requireLogin=False

How do I synchronize all time bases for my cRIO-9002/9004 RT controller and enable the Enable the Microsecond Timing Source for my cRIO-9002/9004 RT controller?
   http://digital.ni.com/public.nsf/websearch/5B1A53C9A9B46D48862570A00067C913?OpenDocument

Michael K.


| Michael K | Project Manager | LabVIEW R&D | National Instruments |

0 Kudos
Message 4 of 4
(3,985 Views)