12-20-2010 08:05 AM
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
12-21-2010 09:09 AM
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.