Broadcast Messages to Slaves
The
Modbus®
master supports broadcasting messages to slaves. A Modbus
broadcast is an unacknowledged write data message sent from the master using slave ID 0. All slaves on the communications link that support broadcast messages process the message. Since the data transfer is one way only, broadcast messages are restricted to coil and holding register writes only. A broadcast sequence consists of any number of messages. Each message is enabled or disabled individually from the application. Each broadcast message counts towards the maximum number of slave messages allowed for the T8151 Communications Interface
.
TIP:
When using broadcast messages, configure at least one
non-broadcast message addressed to a specific slave.
For message control, enter the
Modbus
address of an application variable to control the message depending on the broadcast mode.Where a control variable is defined for either a broadcast or slave message, the message is enabled when the coil or holding register contains a zero value. All other values disable the message. The data type used for a control variable is either Boolean (coil) or integer (holding register).Use different
Modbus
addresses for all control and status holding registers, and control variable coils.Variable Data Type | Value | Message |
---|---|---|
Boolean (coil) | False | Enabled |
True | Disabled | |
Integer (holding register) | 0 | Enabled |
Non-zero | Disabled |
Possible broadcast modes:
Property | Description |
---|---|
One Shot | Sends a single broadcast sequence upon detecting an edge on the control variable within the application. After sending all enabled broadcast messages, the mode is suspended until detection of a new edge on the control variable. |
Message Count | Sends the broadcast sequence after sending every number of slave messages. Set the Every number of messages value. At run time, the application cannot change the number of messages. All messages sent to the slaves are counted. Configured messages that are disabled by the application do not count as sent messages. After sending the required number of slave messages, the broadcast sequence starts. If required, configure the control variable to enable and disable the broadcast mode. |
Fixed Time | Sends the broadcast sequence at every fixed time interval defined in the configuration, in milliseconds. Set the Every time interval. At run time, the application cannot this interval. The time interval measurement starts from the point of sending the first broadcast message and ignores the time taken to send the sequence and any wait times. Therefore, set the time interval to a value greater than the time taken to send the broadcast sequence. If required, configure the control variable to enable and disable the broadcast mode. |
When a broadcast is initiated, enabled messages in the list are sent one after another. Set a wait time interval between each message to allow for processing time of the slave devices.
Slave list control indicates the behavior for message scheduling. The possible values are:
- Restart, restarts with the first defined message for each slave after completing the broadcast sequence
- Suspend, suspends the sequence and continues at the same point after the broadcast
When creating a broadcast message, define these properties:
Property | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Message Type | Type of message to broadcast to slaves. Possible types are Write Coils (multiple Boolean variables) or Write Registers (multiple analog variables). | ||||||||||||
Variable Network Address | Modbus address range of the variables as mapped in the Trusted system. Specify only the first address since the last address is calculated automatically. | ||||||||||||
Modbus Slave Address | Slave’s address range for the variables. Enter the first and last addresses. Possible addresses for coils range from 1 to 9999 and possible mappings for registers range from 40001 to 49999. Write up to 512 coils or 123 registers in a single message. | ||||||||||||
Message Control | The address of the application variable to control the message. If application does not control the message, leave unchecked. These are the valid values for a message control holding register. Invalid values result in the inactive state. Use different Modbus addresses for all control and status holding registers, and control variable coils.
|
To broadcast messages to slaves
- Click theBroadcasttab, and then select theUse Broadcast Modecheck box.
- In theModegroup, select the broadcast mode:
- One Shot, sends a single broadcast sequence upon detecting an edge on the control variable
- Message Count, sends the broadcast sequence after sending a fixed number of slave messages
- Fixed Time, sends the broadcast sequence at a fixed time interval defined in the configuration
- (optional) For theMessage CountandFixed Timebroadcast modes, in theModegroup, select theUse Control Variablecheck box and indicate theModbusaddress for the message control variable to set a variable to control the broadcast message.
- To set theWait Timeinterval for processing of messages between broadcasts, indicate the interval duration in milliseconds.
- In theSlave List Controlarea, indicate one of these for slave list control or message scheduling:
- Restart, restarts with the first defined message for each slave after completing the broadcast sequence
- Suspend, suspends the sequence and continue at the same point after the broadcast
- Define the messages for broadcast:
- ClickNew.TheNew Broadcast Messagedialog box appears.
- Choose the message type:Write CoilsorWrite Registers.
- In theVariable Network Addressarea, indicate the startingModbusaddress of the variables as mapped in theTrustedsystem.
- In thearea, indicate the first and last addresses of the address range of the variables for the slave.ModbusSlave Address
- In theMessage Controlarea, select theApplication Controls Messagecheck box and enter theModbusaddress of the application variable to use for controlling the message.
- ClickSave.
Provide Feedback