ClientReadProperty_ManyOutputs
ClientReadProperty_ManyOutputs (FB)
ClientReadProperty_ManyOutputs (FB)FUNCTION_BLOCK ClientReadProperty_ManyOutputs
Short description
Updating properties of BACNET objects (read access) Typical application: Querying a measured temperature value via BACNET
Representation

Interfaces
Inputs
xEn
BOOL
TRUE
Enable / disable communication ( TRUE = enabled )
itfServer
BACnet.IBACnetServer
Interface variable for referencing the server
xUpdateActual
BOOL
FALSE
Update of actual values ( on each rising edge )
xResError
BOOL
FALSE
Reset of the error outputs ‘eErrorCodeCom’ and ‘eRepyErrorCode.XXX’ (on each rising edge)
Outputs
dwDeviceID_Fb
DWORD
0
Number of the BACnet target device (range: 0 - 4194302) - feedback
eObjectType_Fb
BACnet.CmpBACnet.IEC_BACnet_Object_Type
Type of the object - feedback
dwObjectInstance_Fb
DWORD
0
Number of the object (range: 0 - 4194303) - feedback
ePropertyType_Fb
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID
Type of the property - feedback
eActPropertyDataType
BACnet.CmpBACnet.IEC_BACNET_DATA_TYPE
BACNET - data type of the property
sValueOutput
STRING
‘’
Display of the output for the current value of the property
xValidValue
BOOL
FALSE
Validity status of the actual value of a property (TRUE = actual value valid)
rValue
REAL
Current value of the property in REAL format (floating point according to IEEE754 - 32 bit)
xValue
REAL
Current value of the property in BOOL format
sValue
STRING
Current value of the property in STRING format (character string)
diValue
DINT
Current value of the property in DINT format (signed integer)
udiValue
UDINT
Current value of the property in UDINT format (unsigned integer)
byValue
BYTE
Current value of the property in BYTE format (integer 0 - 255)
lrValue
LREAL
Current value of the property in LREAL format (floating point according to IEEE754 - 64 bit)
stValue
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_CONTENTS
Actual value of the property in the IEC_BACNET_PROPERTY_CONTENTS format (direct access to the interface)
xRegToServer
BOOL
FALSE
Status of registration at the BACnet server (TRUE = successful registration)
xConfigObject
BOOL
FALSE
Status of the object's configuration (TRUE = successful configuration)
eState
BACnet.CmpBACnet.IEC_BACNET_STATUS
Status of communication
eErrorCodeCom
BACnet.CmpBACnet.IEC_BACNET_STATUS
Most recent communication error
eErrorCodeDevice
BACnet.CmpBACnet.IEC_BACNET_ERROR_CODE
Most recent device error transmitted by the BACnet target device (BACnet server)
eReplyErrorCode
TYPE_OF_REPLY_ERROR_CODE
Most recent communication error in the reply to one's own request
xAlarm
BOOL
FALSE
General fault ( TRUE = fault )
xAlarmCom
BOOL
FALSE
General fault - communication ( TRUE = fault )
xBusy
BOOL
Communication indicator ( TRUE = communication )
Setpoints / parameters
tTimeUpdateActual
TIME
T#3s
Update interval for operations influenced by the input 'xUpdateActual' ( 0 = no automatic update, > 0 cyclical update )
dwDeviceID
DWORD
Number of the BACnet target device (range: 0 - 4194302)
eObjectType
BACnet.CmpBACnet.IEC_BACnet_Object_Type
BACnet.CmpBACnet.IEC_BACnet_Object_Type.OBJ_ANALOG_INPUT
Type of the object
dwObjectInstance
DWORD
Number of the object (range: 0 - 4194303)
ePropertyType
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID.PROP_PRESENT_VALUE
Type of the property
udiTimeoutFB
UDINT
5*1000*1000
Timeout duration for the instance of the FB BACnet.BACnetClientReadProperty (in microseconds, 0 = no timeout, CBML ETrigATo)
Function description
General
This function block transmits actual values of properties via BACNET communication (read access). The selection of the property to be read is done via the parameters dwDeviceID, eObjectType, dwObjectInstance and ePropertyType. The validity of the actual value after a transmission is signaled at the output 'xValidValue'. The output with the actual value is presented at the output 'sValueOutput' after a successful transmission.
Enable / disable communication
Enabling/disabling of communication is done via the input 'xEn' (Default = TRUE = enabled). On every rising edge at the input 'xEn', a transmission of the actual value with the current settings is triggered. In the disabled state, the outputs assume predefined states and a deregistration from the server takes place at the same time.
Triggering a transfer
The transmission of the actual value of the property can be triggered as follows (Prerequisite: xRegToServer = TRUE)\
every rising edge at the input 'xEn'
every rising edge at the input 'xUpdateActual'
periodically at the interval 'tTimeUpdateAvtual' (Default: T#3s)
once after each download
once after every change of the configuration
Configuration of the BACNET object
The BACNET object is uniquely defined by the following parameters:\
Device address 'dwDeviceID'
Object address 'dwObjectInstance'
Object type ‘eObjectType’
Property type ‘ePropertyType’
Feedback of the current parameters
At the outputs with the index '_Fb' the current setting values of the BACNET parameters are available for display purposes.
Output 'ePropertyDataType'
At this output, after a successful transmission, the BACNET data type of the selected property is available. It also determines the output used for presenting the actual value.
Output 'sValueOutput'
At this output, after a successful transmission, the name of the output variable that contains the valid actual value is available.
Output 'xValidValue'
At this output, after a successful transmission, the validity of the transmitted property is available.
Outputs for the current actual value of the property
Depending on the validity of the actual value (xValidValue = TRUE) and the name of the output variable (sValueOutput) the actual value is available at the corresponding output.
Output 'xRegToServer'
This output permanently provides the status of the internal connection to the BACNET server. A successful connection to the server is a prerequisite for transmitting the setpoint.
Output 'xConfigObject'
This output permanently provides the status of the successful configuration of the BACNET object.
Display of faults
Faults are indicated at the aggregate output 'xAlarm' ( = TRUE ). It contains the current states of communication errors (xAlarmCom) and device errors (xAlarmDevice). Communication faults are indicated at the output xAlarmCom with a time delay: gc_Parameters.gc_tOnDelayxAlarmCom (Default = 60s). Device faults are indicated without delay at the output xAlarmDevice. In the event of a communication error, an explanatory text for the cause is available at the output 'eErrorCodeCom'. It always shows the cause of the last communication error. In the event of a device error, an explanatory text for the cause is available at the output 'eErrorCodeDevice'. It always shows and updates the cause of the last communication error. In the event of an error in the reply telegram, an explanatory text for the cause is available at the output 'eReplyErrorCode'.
Output 'xBusy'
This output signals the active transmission of the actual value ( = TRUE ).
CODESYS
InOut:
Input
xEn
BOOL
TRUE
Enable / disable communication ( TRUE = enabled )
Input
itfServer
BACnet.IBACnetServer
Interface variable for referencing the server
Input
xUpdateActual
BOOL
FALSE
Update of actual values (on every rising edge )
Input
xResError
BOOL
FALSE
Reset of the output 'eError' (on each rising edge)
Output
dwDeviceID_Fb
DWORD
Number of the BACnet target device (range: 0 - 4194302) - feedback
Output
eObjectType_Fb
BACnet.CmpBACnet.IEC_BACnet_Object_Type
Type of the object - feedback
Output
dwObjectInstance_Fb
DWORD
Number of the object (range: 0 - 4194303) - feedback
Output
ePropertyType_Fb
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID
Type of the property - feedback
Output
ePropertyDataType
BACnet.CmpBACnet.IEC_BACNET_DATA_TYPE
BACnet - data type of the reply telegram
Output
sValueOutput
STRING
‘’
Display of the output for the current value of the property
Output
xValidValue
BOOL
FALSE
Validity status of the actual value of a property (TRUE = actual value valid)
Output
rValue
REAL
Current value of the property in REAL format (floating point according to IEEE754 - 32 bit)
Output
xValue
BOOL
Current value of the property in BOOL format
Output
sValue
STRING(255)
Current value of the property in STRING format (character string)
Output
diValue
DINT
Current value of the property in DINT format (signed integer)
Output
udiValue
UDINT
Current value of the property in UDINT format (unsigned integer)
Output
byValue
BYTE
Current value of the property in BYTE format (integer 0 - 255)
Output
lrValue
LREAL
Current value of the property in LREAL format (floating point according to IEEE754 - 64 bit)
Output
stValue
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_CONTENTS
Actual value of the property in the IEC_BACNET_PROPERTY_CONTENTS format (direct access to the interface)
Output
xRegToServer
BOOL
Status of registration at the BACnet server (TRUE = successful registration)
Output
xConfigObject
BOOL
Status of the object's configuration (TRUE = successful configuration)
Output
eCBMState
BACnet.CmpBACnet.IEC_BACNET_STATUS
CBM - communication status (updates: states DONE, ERROR and ABORT)
Output
eComState
ClientReadProperty_ComStates
Communication status (updates: states No_Execution, Target_Device_Searching, Request_Sending, Reply_Waiting, Finishing)
Output
eErrorCodeCom
BACnet.CmpBACnet.IEC_BACNET_STATUS
Most recent communication error
Output
eErrorCodeDevice
BACnet.CmpBACnet.IEC_BACNET_ERROR_CODE
Most recent device error transmitted by the BACnet target device (BACnet server)
Output
eReplyErrorCode
TYPE_OF_REPLY_ERROR_CODE
Most recent communication error in the reply to one's own request
Output
xAlarm
BOOL
General fault ( TRUE = fault )
Output
xAlarmCom
BOOL
General fault - communication ( TRUE = fault )
Output
xBusy
BOOL
Communication indicator ( TRUE = communication )
Input Const
udiTimeout
UDINT
((5 * 1000) * 1000)
Timeout duration for the instance of the FB BACnet.BACnetClientReadProperty (in microseconds, 0 = no timeout, CBML ETrigATo)
Input Const
ePropertyType
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID
BACnet.CmpBACnet.IEC_BACNET_PROPERTY_ID.PROP_PRESENT_VALUE
Type of the property
Input Const
dwObjectInstance
DWORD
Number of the object (range: 0 - 4194303)
Input Const
eObjectType
BACnet.CmpBACnet.IEC_BACnet_Object_Type
BACnet.CmpBACnet.IEC_BACnet_Object_Type.OBJ_ANALOG_INPUT
Type of the object
Input Const
dwDeviceID
DWORD
Number of the BACnet target device (range: 0 - 4194302)
Input Const
tTimeUpdateActual
TIME
TIME#3s0ms
Update interval for operations influenced by the input 'xUpdateActual'
Methods:
CLEAR_RESULT_OUTPUTS
CLEAR_STVALUE
FB_Exit
Structure:
CLEAR_RESULT_OUTPUTS (Method)
CLEAR_STVALUE (Method)
FB_Exit (Method)
Last updated

