Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does a CRIO-9004 only provide a timed loop of 1kHz (clock) and not 1MHz?

I essentially have a compact CRIO-9004 and require a PID loop with update rates around 4-5 kHz. Additionally, I was hoping to use multiple 'timed loops' in the program in order to synchronize certain events. During this coding, the timed while loop will not work with a 1MHz clock rate and I am stuck with a clock rate of 1kHz instead. NI claims that PID loops in conjunction with the CRIO may have up date rates as high as 200 ksps. However, it appears that by employing the 1kHz clock that I can only obtain 1 ksps.

What are my options?

Thanks,
Shane
0 Kudos
Message 1 of 5
(6,822 Views)
Hello Shane,

We can do over 100 ksps on the FPGA by having a normal while loop and an appropriate wait function. Remember we cannot do a DI or AI in a Single Cycle Timed Loop(SCTL). So as long as you have the PID analysis on the FPGA, we can do over 100 ksps, but if you bring it over to the RT side, I am sure we cannot do 200 ksps on the controller itself. If you can point out to me as to where you read the information, I can take a look at it and get it fixed.

Regards,

Arun V
National Instruments
0 Kudos
Message 2 of 5
(6,805 Views)
Shane,

On the CompactRIO platform the best method of advanced timing is often to create your timing sources on the FPGA, and trigger the actions in RT from the FPGA timing. This method allows you to accurately and deterministically time your application much faster than the 1kHz RT timed loop.

As for 200kHz PID control, that can be accomplished by using a fixed point PID VI on the FPGA. Using a single channel of the 9215 AI module and 9263 AO module, along with the fixed point PID operation, you can perform PID control at rates up to 214kHz. Using the recently released 9201 or 9221 AI module, even faster rates are possible.

Chris
0 Kudos
Message 3 of 5
(6,786 Views)

Hi all,

"As for 200kHz PID control, that can be accomplished by using a fixed point PID VI on the FPGA. Using a single channel of the 9215 AI module and 9263 AO module, along with the fixed point PID operation, you can perform PID control at rates up to 214kHz. Using the recently released 9201 or 9221 AI module, even faster rates are possible."

I was just checking the max sampling rate of the 9215 input module, the spec sheet says it's 100kS/s.  My question is, how can you achieve a PID loop rate of >200kHz?  Wouldn't you be bottlenecked by the 9215?  Shouldn't each PID loop iteration process a new data point acquired by the input module?

John Wu

Message 4 of 5
(6,517 Views)

John-

The 9215 has a conversion time of 4.4us when scanning 1 channel (see page 14 of the 9215 operating manual).  This equates to a little over 227KS/s.  The 100KHz value is if you are reading from all 4 channels.

Link to operating manual:

http://digital.ni.com/manuals.nsf/websearch/5F2E9640C1CFE645862573AF007ABAD9

Dustin

Message Edited by Support on 10-16-2009 09:16 AM
0 Kudos
Message 5 of 5
(6,475 Views)