ProSoft Technology MVI56E-MCM/MCMXT User Manual

Page 44

Advertising
background image

Configuration as a Modbus Master

MVI56E-MCM ♦ ControlLogix Platform

User Manual

Modbus Communication Module

Page 44 of 199

ProSoft Technology, Inc.

June 18, 2014

Label

Description

Node = 1

Issues the Modbus command to node 1 on the network.

Func = 2

Issues Modbus Function Code 2 to Read Input Coils.

DevAddress = 80

Function Code 2, DevAddress of 80 will read address 10081
Along with a count of 16, this command reads 10081 to 10096.

2.3.5 Force (Write) Single Coil 0x (Modbus Function Code 5)

Used to write a Coil of a Slave device, these are single bit addresses within a
Modbus Slave device. The IntAddress field of this command is defined down to
the bit level within the module memory, and should come from an area of
memory that has been defined within the MCM.DATA.W

RITE

D

ATA

area (this is

configured within MCM.CONFIG.M

OD

D

EF

.

Below is a sample command to write Modbus addresses 0513 of node 1 on the
Modbus network, only when the data associated with the IntAddress has
changed.

Label

Description

Enable = 2

The module will send the command only when the data within the
IntAddress field of the module has changed.

IntAddress = 160

Will write the data to the Slave device when the value at
WriteData[10].0 has changed. Because this is a bit level command, the
IntAddress field must be defined down to the bit level.

Count = 1

Will write a single bit to the device (Function Code 5 will 1 support a
count of 1).

Node = 1

Issues the Modbus command to node 1 on the network.

Func = 5

Issues Modbus Function Code 5 to write a single coil.

DevAddress = 512

Function Code 5, DevAddress of 512 will read address 0513

2.3.6 Force (Write) Multiple Coils 0x (Modbus Function Code 15)

Use this function code to write multiple Coils in the 0xxx address range. This
function code sets multiple Coils within a Slave device using the same Modbus
command. Not all devices support this function code. Refer to your Slave device
documentation before implementing this function code.

This function code will also support the Enable code of 2, to write the data to the
Slave device only when the data associated within the IntAddress field of the
module has changed. The IntAddress is once again defined down to the bit level
as a Function Code 15 is a bit level Modbus function.

Advertising