ProSoft Technology MVI94-MCM-MHI User Manual
Page 35

MVI94-MCM ♦ Flex I/O Platform
Configuration
Serial Communications Modbus Communication Module
User Manual
ProSoft Technology, Inc.
Page 35 of 109
March 29, 2011
3.6
[Commands]
The [COMMANDS] section of the configuration file sets the Modbus master port
command list. This list polls Modbus slave devices attached to the Modbus
master port. The module supports numerous commands. This permits the
module to interface with a wide variety of Modbus protocol devices.
The command list is formatted differently than the other sections of the
configuration file. Commands are present in a block between the labels START
and END. These labels inform the program where the list resides. The module's
program will parse all commands after the START label until it reaches the END
label or until the command count entered for the port is reached.
The function codes used for each command are those specified in the Modbus
protocol. Each command list record has the same format. The first part of the
record contains the information relating to the MVI94-MCM, communication
module and the second part contains information required to interface to the
Modbus slave device. The command structure is displayed in the following table
for all functions supported:
Each parameter is discussed in the following topics.
3.6.1 Enable Code
This field defines whether the command is to be executed and under what
conditions. If the parameter is set to 0, the command is disabled and will not be
executed in the normal polling sequence. The command can be executed under
the control of the processor using a Command Control block. Setting the
parameter to a value of 1 for the command causes the command to be executed
each scan of the command list if the Poll Interval Time is set to zero. If the Poll
Interval time is set, the command will be executed, when the interval timer
expires. If the parameter is set to 2, the command will execute only if the internal
data associated with the command changes. This value is valid only for write
commands. If the parameter is set to 3, it will function in the same manner as an
enable code of 1except that the floating-point is disabled for this command. A
parameter value of 4 is the same as a parameter value of 2 but with floating-point
handling disabled for the command.