The output ErrorID which reflects an actual error number is only valid for one cycle if output Error is set to TRUE. To capture this error number an external function must be programmed.
The output ModMastErrorAct reflects an actual error occurred in Modbus job. This output is only TRUE for one cycle. At that cycle the output ModMastErrorIDLast reflects the actual ErrorID from the ModRtuMast job. The ModMastErrorIDLast will keep this error ID until a new rising edge of the Enable input is given.
However, there are internal diagnosis variables available, which are not shown at any output, but can be accessed from the function block instance.
These additional diagnosis variables can be accessed by opening the function block instance or through the block visualization “VisuDrvModbusRTUBroadcast”.
-
iWriteErrCnt: number of errors in write jobs since Enable = TRUE.
-
wLastWriteErno: holds the error number of the last executed write job.
For all drives, which are connected to same Modbus RTU line, one instance of broadcast block DrvModbusRtuBroadcast is enough and it must be connected to same LineToken of DrvModbusRtu function blocks which are used for communication between PLC and each drive on Modbus RTU line. All those communication function blocks of one Modbus RTU line must be linked together via one variable of type ModRtuTokenType, connected to the InOut LineToken. Via this variable the Modbus token is passed to the next drive / device, so only one drive / device at a time is communicating with the PLC.
All the drives should be configured either in Classic Profile or Enhanced Profile and accordingly the function block DrvModbusRtuBroadcast should be parameterized. Mix of profile with few drives in Classic and few drives in Enhanced should not be used when using DrvModbusRtuBroadcast block, if using such configuration along with DrvModbusRtuBroadcast may lead to incorrect operation.
If the user changes drive profile while drive is online with PLC, function block outputs may give wrong indication.
The Modbus RTU broadcast job is sent to all devices on the same physical Modbus RTU line.
Therefore, if other Modbus devices than ACS / DCS drives are connected to the same line using the ModRtuToken communication block it´s highly recommended not to use the DrvModbusRtuBroadcast function block.
This might only be used, if the user is aware about the behavior of the connected devices if they receive the Modbus broadcast job.
If a Modbus RTU broadcast job is sent to access a register in the drive which has no valid mapping information then Modbus broadcast job is not aborted but will just send out the broadcast message without any error in the function block. This broadcast message is ignored by drives which have no valid mapping information.
Therefore, the drive parameters in FBA DATA OUT have to be configured according to the used ‘NvarWrite’ input number respectively.