MVI56E-MCM ♦ ControlLogix Platform Configuration as a Modbus Master
Modbus Communication Module User Manual
ProSoft Technology, Inc. Page 57 of 209
2.5.2 Event Command
Event Command allows you to add commands directly to the command queue,
interrupting the normal polling sequence of the module. Unlike Command
Control, Event Commands do not return an error code into the location defined
by the MCM.CONFIG.PORTX.CMDERRPTR value.
You do not need to define Event Commands in the regular command list. Event
Command adds a command to the top of the MVI56E-MCM module’s command
queue that is not defined within the command list.
Within an Event Command block, you define a Modbus command to add to the
queue.
Important: Because these special command blocks will interrupt the normal polling list, you should
use them sparingly, to avoid interrupting your normal data transfer. Make sure that the data to be
written to the Slave contains the latest value from the WriteData tag that corresponds to the Event
Command.
The following illustration describes the structure of the EventCmd block.
1 = trigger the Event Command
Used = EventCommand is executed once
Module Port # to send command out to
Modbus Slave ID command to be issued to
1100 will place the data read into
MCM.DATA.ReadData[100]
Consecutive register/bits to read or write with the
command
Swap code used with command
Function Code 3 is read 4xxxx holding registers
Address in the Slave device to read. With Function
Code 3, DeviceDBAddress of 276, the module will
read starting at address 40277 in the Slave device
Return value of 0 = Fail, 1 = Success
Block ID number for the module to recognize the
Event Command, Slave address, and Port number
to send the command out