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.
State
Value
Description
Inactive
0
Set message to inactive
Standby
1
Set message to active but do not broadcast
Active
2
Set message to active and broadcast
To broadcast messages to slaves
  1. Click the
    Broadcast
    tab, and then select the
    Use Broadcast Mode
    check box.
  2. In the
    Mode
    group, 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
  3. (optional) For the
    Message Count
    and
    Fixed Time
    broadcast modes, in the
    Mode
    group, select the
    Use Control Variable
    check box and indicate the
    Modbus
    address for the message control variable to set a variable to control the broadcast message.
  4. To set the
    Wait Time
    interval for processing of messages between broadcasts, indicate the interval duration in milliseconds.
  5. In the
    Slave List Control
    area, 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
  6. Define the messages for broadcast:
    1. Click
      New
      .
      The
      New Broadcast Message
      dialog box appears.
    2. Choose the message type:
      Write Coils
      or
      Write Registers
      .
    3. In the
      Variable Network Address
      area, indicate the starting
      Modbus
      address of the variables as mapped in the
      Trusted
      system.
    4. In the
      Modbus
      Slave Address
      area, indicate the first and last addresses of the address range of the variables for the slave.
    5. In the
      Message Control
      area, select the
      Application Controls Message
      check box and enter the
      Modbus
      address of the application variable to use for controlling the message.
  7. Click
    Save
    .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal