Professional Documents
Culture Documents
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
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.