Você está na página 1de 2

Lon Spyder Tech Tip

Working with Network Variable Fail Detection


The Lon Spyder controllers include the ability to detect network failure. When an input is configured for fail detect, if the Spyder does not receive an update from the sending device (another Lon device or the JACE) the value seen by the internal logic will change to a predetermined value to indicate the loss of network data. This predetermined value cannot be modified. In addition, even if your network input is configured without failure detection the predetermined value will be present on power-up until the device begins receiving updates from the network. The actual value observed when network failure is present depends on the configuration of the software input point. As a rule of thumb, input points configured as byte and enums will receive 255 when failure is detected. Points other than byte and enums will receive a value of +inf when failure is detected. The following table illustrates typical configurations and fail detect values received.

SNVT Type SNVT_count_f SNVT_count SNVT_count SNVT_count SNVT_count SNVT_hvac_emerg SNVT_occupancy SNVT_hvac_mode SNVT_count

Internal Unit Float SInt16 UInt16 SByte UByte HvacEmerg Occupancy HvacMode Custom

Invalid Value +inf +inf +inf 255 255 255 255 255 255

Invalid Trapping Logic Use Select Use Override X X X X X X X X X

Good programming practices should include logic used in conjunction with input nvs to detect network failures. The Override function block is best suited for inputs which will receive +inf. Avoid using the Override block with inputs which provide a 255 on failure because the Override will interpret 255 as valid data and never relinquish control to a lower priority input. In the example below, the FloatOrInt16Input network input will have control of ModulatingOutput whenever valid data is being received. On a loss of communication or if NaN is sent from Niagara the MyProgramLogic app will have control of the modulating output.

When working with byte or enumerated input types, a Select function block is typically used to provide a fallback value on input failure detection. In the example below, the BinaryOutput will be on when ByteOrEnumInput is receiving a 1 and off when receiving a 0. If a network input failure is detected, Select x will receive a value of 255. This causes it to output the default slot which in this case is linked to 0, which turns off the BinaryOutput.

It is important to note that the Spyder does not support default values for network inputs. All network inputs will be invalid (failure detect state = +inf or 255) on initial power-up until data is received from the network. There is a Fallback slot available on software input points which is not visible by default. However, it can be forced to appear and a value can be set or linked to it. This Fallback value is a Niagara feature and is not implemented on the Spyder. A fallback value will not be downloaded to the device even if a value appears in the fallback slot.

Rev 2 Contributed by John Hutchey

Você também pode gostar