FB_BACnet_RemoteProgram_EX
Application
The function block FB_BACnet_RemoteProgram_EX can be used for reading and write access to a BACnet object of type Program.
VAR_INPUT
Notice: Variables shown in red are not included in the basic version of the function block, but in the _WR version.
bEnablePV : BOOL;
ePV : E_BACNETPROGRAMREQUEST;
bRetrigger : BOOL;
bEnablePV: Enables the value of input ePV. If the input is set to TRUE, the value of ePV is written to the property Program_Change of the object. If the input is set to FALSE, 0xFFFF is written to the process data of the property Program_Change of the object. The value 0xFFFF prevents writing to the remote server and therefore writing to the remote object.
ePV: Request to the remote program object. If bEnablePV was set to TRUE, the value of the input is written to the property Program_Change (see also Transition diagram).
bRetrigger: A change from FALSE to TRUE triggers writing of the input ePV to the property Program_Change, if input bEnablePV is set to TRUE.
VAR_OUPUT
bReady : BOOL;
ePrgState : E_BACNETPROGRAMSTATE;
ePrgChangeReq : E_BACNETPROGRAMREQUEST;
ePrgReasonHalt : E_BACNETPROGRAMERROR;
bOverridden : BOOL;
bOutOfService : BOOL;
bFault : BOOL;
bInAlarm : BOOL;
bProcessError : BOOL;
bOtherFault : BOOL;
tObjectID : DINT:=-1;
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.
ePrgState: Feedback of the current program state (see also Transition diagram).
ePrgChangeReq: Feedback on the state of the current program request (see also Transition diagram).
ePrgReasonHalt: Error feedback on program cancellation.
bOverridden, bOutOfService, bFault, bInAlarm: See BACnet specification DIN EN ISO 16484-5 for BACnet object Program and property Status_Flags.
bProcessError, bOtherFault: See BACnet specification DIN EN ISO 16484-5 for BACnet object Program and property Reliability.
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.