LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timeout on shared variable node

Hi,

 

 

     It was mentioned in the CompactRIO Developer's guide to reduce CPU usage you can use a blocking read on the network-published shared variable by specifying a timeout value (in milliseconds). How exactly timeout helps reducing CPU usage? For example if I wire a 1 sec to the timeout input will it equal to put a 1 sec delay and CPU will check its value every 1sec (in this way any value change only updated every 1sec) or it has internally event kind of mechanism to notify CPU for any value change?

 

     Thanks!

 

     Regards.

 

     Tom

 

0 Kudos
Message 1 of 2
(2,518 Views)

Hi Tom,

 

The use of a Blocking Read with a Timeout allows the CPU to work on other threads in the VI, hence preventing starvation of other processes. This does so by timing out when a value is not read (for example, due to underflow). As for providing any delay, that is up to how the VI has been designed.

 

The Help link below provides further information as to this function.

 

http://zone.ni.com/reference/en-XX/help/371361G-01/lvcomm/readvartimeout/

 

I hope that this helps.

Liam A.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(2,500 Views)