Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Real time error handling in example

I am looking at the LabVIEW 'Real-Time Control on CompactRIO (RIO Scan Interface)'  example. This example has a real time part, but there is also a que in it for error handling. If I read the documentation on real time loops RT fifo's are recommend in real time loops. As shared resources can influence the determism of the application. I was wondering if this is the case here. The que will only be used when an error or warning is generated. But it has an option to log warnings. If you have then a deterministic loop were component generates a unimportant warning then your determism of the loop is gone right?

 

EDIT: this thing does off course nothing with warnings. So only with errors determism is disturbed.

 

 

 

 

Download All
0 Kudos
Message 1 of 2
(4,536 Views)

Hello LennartM,

 

You are correct that RT FIFOs are recommended when streaming data or sending messages if you need determinism, and that queues do not provide determinism.

 

Please have a look at the following KB:

http://digital.ni.com/public.nsf/allkb/7AE7075AF1B2C58486256AED006A029F

 

What is the difference between RT FIFOs and Queues?
Functionally, RT FIFOs and LabVIEW Queues are both First-in, First-out buffers. However, the following are the major differences between them:

  • RT FIFOs execute deterministically in time-critical code and LabVIEW Queues do not. This comes from the fact that Queues use blocking calls when reading/writing to the shared resource while RT FIFOs use non-blocking calls.
  • RT FIFOs are fixed size while the queues grow as elements are added to them.
  • RT FIFOs will execute the code even if there are errors at input. They can (and will) produce new errors and propagate existing errors.
    LabVIEW 8.6 and later: RT FIFO VIs have been replaced with RT FIFO Functions. RT FIFO Functions will not execute normally if an error exists at input. RT FIFO Functions provide standard error in functionality.
  • Queues work with any data type, while the data types that can be used with RT FIFOs are limited. Usually any data type that involves additional memory allocations cannot be used with RT FIFOs in order to preserve determinism.

 

I am unable to locate the specific example you are refering to. Could you please specify the full name and location of the example so that I may have a look at it? Thank you.

 

Also, keep in mind that not all cRIO examples are written with determinism in mind.

 

 

Best regards,

 

Christopher

 

0 Kudos
Message 2 of 2
(4,435 Views)