FB_BACnet_RemoteMultiStateValue_EX
Application
The function block FB_BACnet_RemoteMultiStateValue_EX can be used for reading and write access to a BACnet object of type MultiStateValue.
VAR_INPUT
bEnablePV : BOOL;
bNullPV : BOOL;
nPV : UDINT;
bEnable: TRUE = The process data is enabled; the value resulting from bNull or nState is written to the corresponding BACnet object, FALSE = process data is disabled
bNull: TRUE = zero writing of the BACnet object (e.g. for deleting a priority), FALSE = write value from nState
nState: Value that is written to the BACnet object, if bEnable = TRUE and bNull = FALSE. Multi-State in the range [1 .. Max_Number_Of_States].
VAR_OUPUT
bReady : BOOL;
nPresentValue : UDINT;
bOverridden : BOOL;
bOutOfService : BOOL;
bFault : BOOL;
bInAlarm : BOOL;
bMultiStateFault : BOOL;
bOtherFault : BOOL;
eEventState : E_BACNETEVENTSTATE;
nNbrOfStates : UDINT;
tObjectID : T_BACnet_ObjectIdentifier:=16#FFFFFFFF;
bError : BOOL;
nErrorId : UINT;
bReady: Notification of general readiness. If this output is set, the other status outputs are valid (PresentValue, Overridden ...). If the output is FALSE, the corresponding function block FB_BACnet_Device does not report "Operational", or the block instance was not linked correctly in the TwinCAT System Manager.
nPresentValue: Current value of the BACnet object (see also BACnet specification DIN EN ISO 16484-5 for BACnet object MultiStateValue and property Present_value).
bOverridden, bOutOfService, bFault, bInAlarm: See BACnet specification DIN EN ISO 16484-5 for BACnet object MultiStateValue and property Status_Flags.
bMultiStateFault, bOtherFault: See BACnet specification DIN EN ISO 16484-5 for BACnet object MultiStateValue and property Reliability.
eEventState: E_BACNETEVENTSTATE, see BACnet specification DIN EN ISO 16484-5 for BACnet object MultiStateValue and property Event_State.
nNbrOfStates: Reports the available number of values, which the Present_Value of the MultiStateValue object can assume (1...nNbrOfStates). If "nNbrOfStates" is 0, then there is no valid "state" which the object can assume (Present_Value is 0).
tObjectID: Object ID of the BACnet object (object type and object instance).
bError: An error is pending.
nErrorId: see global constants BACnet_Globals.
VAR_IN_OUT
RemoteDevice : FB_BACnet_RemoteDevice;
RemoteDevice: Specification of the instance of the corresponding remote BACnet server block (client). A BACnet adapter can be used for several BACnet clients. See FB_BACnet_Adapter and FB_BACnet_RemoteDevice for further information.