beautypg.com

ProSoft Technology MVI94-MCM-MHI User Manual

Page 78

background image

Reference

MVI94-MCM ♦ Flex I/O Platform

User Manual

Serial Communications Modbus Communication Module

Page 78 of 109

ProSoft Technology, Inc.

March 29, 2011

Data is transferred between the processor and the module using the block

identification codes of 1 to 666 and 9956 to 9958 and 9960. The other block

codes control the module from the processors ladder logic. They are

implemented when the ladder logic needs to control the module. In order to use

one of the blocks, the ladder logic inserts the data and code in the output image

of the module. The data should be set before the code is placed in the block.

This operation should be performed after the receipt of a new write block from

the module. A discussion of each set of codes is given in the following topics.

Event Blocks (1000 to 1255)
These control blocks are sent from the processor to the module to execute a

Modbus command out the Modbus master port. It should be used for commands

that are not found in the command list. Use blocks 1000 to 1255 to execute

commands in the list under processor control. The format for this block is shown

in the following table.

Block Request from Processor to Module

Word Offset

Description

0

This word contains the slave device address on the Modbus network to be
considered with the command. This value is added (0 to 255) to the value of 1000.

This generates a block identification code of 1000 to 1255.

1

This word contains the internal Modbus address in the module for the command.

2

This word contains the count parameter that determines the number of digital

points or registers to associate with the command.

3

The parameter specifies the swap type for the data. This function is only valid for

function code 3, 6, and 16.

4

This word contains the Modbus function code for the command.

5

This word contains the Modbus address in the slave device to be associated with

the command.

6

Reserved

The data contained in the block is used by the module to construct a valid

Modbus command and defines what data in the virtual Modbus database to use

with the command. These parameters are the same as defined for the command

list. Refer to the Commands section of the documentation for more information.
When the module receives a block 1000 to 1255, it will check the command

queue for an available position. If there is space in the command queue, the

module will construct a command and place it in the queue. The module will

respond with the following block in the input image after processing request.

This manual is related to the following products: