Command control blocks, Event command – ProSoft Technology MVI71-MNET User Manual

Page 64

Advertising
background image

MVI71-MNET ♦ PLC Platform

Reference

Modbus TCP/IP Interface Module

User Manual


Page 64 of 109

ProSoft Technology, Inc.

June 23, 2009

Command Control Blocks

Command control blocks are special blocks used to control the module. The
current version of the software supports four command control blocks: event
command control, command control, warm boot and cold boot.

Event Command

Event command control blocks send Modbus TCP/IP commands directly from the
ladder logic to one of the client on the module. The following table describes the
format of these blocks.

Offset Description

Length

0

2000

1

1 to 4

IP Address

4

5

Service Port

1

6 Slave

Address

1

7

Internal DB Address

1

8

Point Count

1

9

Swap Code

1

10

Modbus Function Code

1

11

Device Database Address

1

12 to 63

Spare

52

The parameters passed with the block construct the command. The IP Address
for the node to reach on the network is entered in four registers (1 to 4). Each
digit of the IP address is entered in the appropriate register.

For example, to interface with node 192.168.0.100, enter the values 192, 168, 0
and 100 in registers 1 to 4. The Service Port field selects the TCP service port
on the server to connect. If the parameter is set to 502, a standard MBAP
message will be generated. All other service port values will generate a Modbus
command message encapsulated in a TCP/IP packet.

The Internal DB Address parameter specifies the module’s database location to
associate with the command. The Point Count parameter defines the number of
points or registers for the command. The Swap Code is used with Modbus
functions 3 and 4 requests to change the word or byte order. The Modbus
Function Code
has one of the following values 1, 2, 3, 4, 5, 6, 15 or 16. The
Device Database Address is the Modbus register or point in the remote slave
device to be associated with the command.

When the module receives the block, it will process it and place it in the
command queue. The following table describes the format of this block.

Word Description

0

This word contains the block 2000 identification code to indicate that this block contains a
command to execute by the Client Driver.

1 to 4

These words contain the IP address for the server the message is intended. Each digit (0
to 255) of the IP address is placed in one of the four registers. For example, to reach IP
address 192.168.0.100, enter the following values in words 1 to 4

→ 192, 168, 0 and 100.

The module will construct the normal dotted IP address from the values entered. The
values entered will be anded with the mask 0x00ff to insure the values are in the range of
0 to 255.

Advertising
This manual is related to the following products: