You are on page 1of 6

VersaMax Serial Communications Module

February 2012

GFK-2423E

Product Description

5V Power

The VersaMax Serial Communications Module, IC200CMM020,


operates as a Modbus RTU Master in a VersaMax I/O Station
controlled by a Genius Network Interface Unit or a PROFINET
Scanner.

The module supplies 5V power to external devices via the serial port.
The amount of power available to external devices is approximately
100mA, and varies depending on how the serial device(s) are wired.
The module itself requires 10mA, and a half-duplex line terminated with
120 Ohms at each end requires an additional 83mA. The actual
current draw depends on serial line terminations, duplex mode, serial
line activity, and use of external adapters that may require additional
5V power. (This module does not use 3.3V.)

Revision

IC200CMM020-EA

Firmware upgrades:

None

If the total load exceeds 200mA, an internal current-limit switch


prevents damage and shuts down serial communication and external
power flow. The modules OK LED will be amber. The user must
alleviate the overdraw condition. Communication and power flow will
resume when the condition is resolved.

Serial Communications Modules may be installed at any location in the


I/O Station. Up to two Serial Communications modules can be used
per I/O Station.
Genius NIU

Optional booster
power supply

Serial Communications
Module

Specifications
Number of Serial
Communications
Modules

Serial Communications Port


The RS-485 serial port is a 15-pin subminiature D connector. For
RS-232 communications, an RS-485 to RS-232 adapter such as
IC690ACC901 can be used. Adapter IC690ACC901 can be installed
with its right-angle cable hanging down.

Serial Port Pin Assignments


Signal

Direction

Function

Shield

--

Shield drain wire connection

NC

NC

ATTACH

Input

P5V

Output

5V to power external adapters

RTS(A)

Output

Request-to-Send (A) output

0V

--

Ground reference

CTS(B)

Input

Clear-to-Send (B) input

RT

--

Termination for RDA

10

RD(A)

Input

Receive Data (A) input

11

RD(B)

Input

Receive Data (B) input

12

SD(A)

Output

Transmit Data (A) output

13

SD(B)

Output

Transmit Data (B) output

14

RTS(B)

Output

Request to Send (B) output

15

CTS(A)

Input

Clear to Send (A) input

Shel
l

Shield

--

Shield for 100% (continuous)


coverage

COMMREQ command
memory (%AQ) required
in the GENERIC_COMM
module hardware
configuration

Depends on individual COMMREQ


content.

COMMREQ response
memory (%AI) required

Minimum: 2 words
Maximum: 64 words

RTU Master Commands

As described in Modbus RTU


Communications Manual, GFK-2220.
Minor differences as described below.

Minimum: 22 words Maximum: 64


words

65520, Initialize RTU Master Port


8000, Clear RTU Master Diag. Status
8001, Read RTU Master Diag. Status
8002, Send RTU Read/Force/Preset Query
8003, Send RTU Diagnostic Query

The minimum of 22 words is the required amount of memory that


needs to be configured in the GENERIC_COMM module configuration
to execute the Initialize RTU Master Port Command (65520). The
minimum for all other commands is dependent on the size of the
command and the amount data requested (if any).

Product Revision History

This port supports both 2-wire and 4-wire electrical interfaces:

Maximum: 2 per Genius NIU


I/O Station

Number of RTU slaves


1 to 247
per Serial
Communications Module

The module will support communication baud rates of 1200, 2400,


4800, 9600, and 19200, and half or full duplex operation.

Pin

Maximum: 8 per VersaMax Profinet


Scanner (PNS)

Two-Wire Interface (single shielded twisted pair, half-duplex mode


only) Connect D1 to RD(A) at pin-10, D0 to RD(B) at pin-11, and
the shield to frame ground at pin-1.
Four-Wire Master Interface (two shielded twisted pairs, full-duplex
mode) Slaves receive data from the RTU master over the
MODBUS master pair RXD1 & RXD0. At the same time, the RTU
receives data from the slaves over the MODBUS slave-pair TXD1
& TXD0. Connect RXD1 to SD(A) at pin-12, RXD0 to SD(B) at
pin 13, TXD1 to RD(A) at pin 10, TXD0 to RD(B) at pin 11, and
both shields to the frame ground at pin 1.

Rev
IC200CMM020-EA

Feb. 2012

Date

Label change. No changes to


features, performance or
compatibility.

Description

IC200CMM020-DA

Mar. 2011

Labeling change. No changes


to compatibility, functions or
performance.

IC200CMM020-CA

Mar. 2010

Changed manufacturing
location. No changes to
compatibility, functionality or
performance.

IC200CMM020-BA

Oct. 2008

Updated Power Supply OK


signal circuitry.

IC200CMM020-AA

Jan. 2006

Initial product release

VersaMax Serial Communications Module


February 2012

GFK-2423E

Preinstallation Check

6.

Carefully inspect all shipping containers for damage. If any equipment


is damaged, notify the delivery service immediately. Save the damaged
shipping container for inspection by the delivery service. After
unpacking the equipment, record all serial numbers. Save the shipping
containers and packing material in case it is necessary to transport or
ship any part of the system.

Power up the System, and Observe the Module LEDs. The


LEDs indicate the presence of power and show the operating
mode and status of the module.
OK
MOD
PORT
ACT

Quick Start Guide


1.

Install the Communications Carrier on the DIN Rail by simply


clicking it into place.

OK

Note: Connecting carriers must be


installed on the same section of 35mm
x 7.5mm DIN rail.
The DIN rail must have a conductive
(unpainted) finish for proper
grounding.

2.

MOD

Install the Module on the Communications Carrier.


The latch on the module must be in the
unlocked position.

PORT
ACT

Align the connectors and the latch post


and press the module down until the
two tabs on the bottom of the module
click into place.

Installation in Hazardous Locations

Connect the communications bus to the connector on the


front of the module.

4.

Remove the connector cover on the right-hand side of the


Communications Carrier. Do not discard this cover; you will
need to install it on the last carrier. It protects the connector pins
from damage and ESD during handling and use.

Connector
Cover

5.

OFF when the module is not powered or no


communication activity is occurring. For example,
communication activity will not occur during an
overpower condition.
Blinking green indicates the module is online and
communicating.

Turn the latch to the locked position to


secure the module to the top of the
carrier.

3.

OFF when the module has not yet started its powerup
sequence.
Green indicates the module has successfully completed
powerup diagnostics.
Amber means the module has detected overpower
condition. No powerflow or communication activity will
take place.
Blinking amber means the module has failed powerup
diagnostics. The number of blinks indicates the fault
type.
Blinking green indicates the module is in boot mode or
its firmware is being updated.
OFF when the module is not powered.
Green when the module is operating normally.
Blinking amber indicates the module configuration is
missing, incomplete, or incorrect.

Install additional modules by mounting modules on their


carriers and sliding them along the DIN rail to fully engage the
connectors in the sides of the carriers.

This equipment is suitable for use in CLASS I, DIVISION


2, GROUPS A, B, C, D or non-hazardous locations only.
WARNING - EXPLOSION HAZARD - substitution of
components may impair suitability for CLASS I, DIVISION
2;
WARNING - EXPLOSION HAZARD - when in hazardous
locations, turn off power before replacing or wiring
modules; and
WARNING - EXPLOSION HAZARD - Do not connect or
disconnect equipment unless power has been switched off
or the area is known to be non-hazardous.

VersaMax Serial Communications Module


February 2012

GFK-2423E

Configuration

Modbus RTU Communications

In VersaMax PROFINET IO device in an RX3i PROFINET network, the


Serial Communications module is configured by selecting it from the
PROFINET Scanner submodule list in the programming software. For
details, see the PACSystems RX3i PROFINET Controller Manual,
GFK-2571.

The VersaMax Serial Communications module supports Modbus RTU


Master protocol. To operate as a Master, the Serial Communications
module must receive commands from a remote host. For example, the
remote host could be an RX7i PLC that communicates with the I/O
Stations VersaMax Genius NIU via a Genius Bus Controller module.

In a VersaMax Genius network, the VersaMax Serial Communications


module is configured using the GENERIC_COMM configuration feature
of the programmer.

Receiving Commands from a Remote Host

Initially, the modules default Reference Addresses for %AI and %AQ
data have a length of zero. These data lengths must be changed, as
shown in the example Proficy Machine Edition v5.50 screen illustrated
below, before the module can communicate with the Ethernet NIU. The
%I and %Q lengths must stay zero. The module cannot communicate
on the serial network until it receives a valid configuration.

The Serial Communications module exchanges commands with the


remote host via the input and output memory areas of the I/O Stations
Genius NIU. The commands used for these communications are
referred to as memory mapped COMMREQs because their format is
similar to the existing Modbus RTU COMMREQ (Communication
Request) commands. These commands are defined in the document
Modbus RTU Communications, GFK-2220C or later, which is available
at www.ge-ip.com/support.

Enter the value 10 for the module ID when configuring the module as a
GENERIC_COMM module in the Genius NIU system. The
GENERIC_COMM module configuration will display the value
FFFF980A for the Module ID parameter

Commands from the remote host to the module are sent via %AQ
memory. The module returns the command response in the first two
%AI registers that have been configured for the module. The content of
the command status response is shown below.
%AI Word Location

Description

Word 1

Command Status Word

Word 2

Sequence Number of Command

Word 3-n

Data (if any)

Because the status information is mapped into memory, the


COMMREQ status address segment selector (Word 3) and offset
(Word 4) in the COMMREQ command block are ignored.
The module forms the requested RTU Master command and
exchanges data with an RTU Slave device. The data is returned to the
remote host starting at the third %AI register configured for the module
(see table above).
The status values used for the Command Status Word are identical to
the values listed in the Modbus RTU Communications Manual, with
one additional status value added to indicate that the module is ready
to receive commands.

Operational Notes and Open Issues


Application programs should use the Command Ready
indication to synchronize the first command to the module upon
Genius NIU system power up.

Do not set the serial port baud rate higher than 19200 baud.
The Data Length parameter is ignored for function codes 5 and 6.
The Data Start and Data Length parameters are ignored for
function codes 7 and 17. For function code 67, the Data Start
parameter must be set to 1 and the Data Length parameter must
be set to 62.
Firmware update occurs at 19200 baud. If the module is
configured for operation at a different baud rate and you wish to
perform a firmware update, first change the Genius NIUs serial
port configuration and select 19200 baud. Then, when running
the Winloader update utility, select 19200 baud. Then return the
GNIUs baud rate setting to its original value.
If the Genius bus scan rate is slower than the PLC CPUs sweep
time, a command may be written into %AQ memory at the PLC
CPU, but overwritten with a newer command before the original
command is transferred to the GNIU for processing. It will appear
that the original command has been dropped.
When executing a Communications Restart Query, a timeout
status will be returned if the Query is sent to a single RTU Slave
address and the Slave is currently in Force Listen Only Mode. No
timeout will occur if the RTU Broadcast Address is used.
When incrementing the sequence number to send a new
command, a rollover of the 16-bit integer value from 65535 to 0
will not result in a new command being sent since zero is not
recognized as a valid sequence number.

Major Error
Code

Minor
Error
Code

Numeric
Status
Value

COMMAND_READY

None

0002h

Description
The RTU Master
is ready to
accept I/O
commands.

VersaMax Serial Communications Module


February 2012

GFK-2423E

Flow Control and Command Sequencing

Part 1: Initialize the Master Serial Port Command Program Block

The remote hosts application program initiates a COMMREQ by


executing a COMMREQ function block to the communication module in
the remote host such as a RX7i PLC. The communication module
then sends the COMMREQ block as data to the Genius NIU. At the
remote host, the COMMREQ function block causes the COMMREQ
command/data block to be sent to the module once each time the
COMMREQ is executed.

First, the serial port is configured with the Initialize Master Serial Port
Command (65520)

When the Genius NIU receives the incoming command/data block, it


sends the block to the Serial Communications Module during the next
output scan. The memory-mapped command uses a sequence
number in the second word of the COMMREQ structure (the NOWAIT
mode parameter) to indicate that a new command has been sent.
After power-up, the module indicates when it is ready to receive
commands by returning a Command Status Word value of
COMMAND_READY. Until the module is ready to receive
commands, changing the sequence number has no effect. Once the
module has issued a status value of COMMAND_READY, any
change to the value of the sequence number prompts the module to
process the current command in the modules %AQ memory. The
application program can send the command multiple times by simply
changing the sequence number.
The sequence number value of zero has a special meaning it is
interpreted as a request to clear the modules input values. Upon
receipt of a 0 sequence number, the CMM020 will check if the entire
%AQ memory area is set to zero. If so, the modules %AI memory
area will be cleared and the COMMAND_READY value will be
returned in the status. Note: Any time the Genius NIU is not receiving
data from the Genius Bus Controller, it sends default data (all zeroes)
to the CMM020. Therefore, the default data is interpreted as a clear
request.

COMMREQ status value: Zero


Sequence Number: set to current sequence value (%AQ0002)
Protocol: Modbus RTU
Mode: Master
Data rate: 9,600 bits/Sec.
Parity: Even
Flow control: None
Turnaround delay: Zero
Response message time-out: STANDARD (0.5 Sec.)
Bits per Character: 8 (Not configurable)
Stop Bits: 1 (Not configurable)
Port Interface: (Not configurable)
Half-Duplex Mode: 2-Wire
Character-gap time-out: Default
RTS Drop Delay: Zero

Note that if there is non-zero data in the PLC CPUs %AQ memory
when the Genius NIU powers up, that data will be transferred to the
CMM020 after the Genius NIU joins the Genius Bus. Since the initial
default data sent to the CMM020 is all zeroes, the non-zero data is
interpreted as a command. This may result in behavior that the
application creator did not intend.
The Serial Communications module will only process one command at
a time. Therefore, the remote hosts application program must monitor
the sequence number location in %AI memory for the return of the
sequence number sent with the command. After the module returns the
sequence number, the program logic should check the status value
returned in %AI memory before sending a new command. The module
ignores any new commands that have been sent by incrementing the
sequence number before the command is completed. Likewise, no
new command is sent to the module until the sequence number is
changed. When the current command is complete, the module will
again process incoming commands when the sequence number is
changed.

Example

To trigger the command, the sequence number, %AQ0002 must be


incremented.

In this example, an application program in a host PLC initializes the


Master Serial Port Command Program Block, then sets up the Send
RTU Preset Query Command (08002).
In the host PLC, the Genius Bus Controller is configured at %AQ0001.
In the I/O Station, the VersaMax Serial Communications module is
configured in the Genius NIU to have 48 %AQ references starting at
%AQ0001 and 32 %AI references starting at %AI0001. In this
example, the AQ memory reference offsets in the PLC are the same as
those used in the Genius NIU. However, that is not necessary.
Note that no commands are sent until reference %AI0001 in the I/O
Stations Genius NIU indicates the Command Ready Status value of 2.

When the sequence number in %AI0002 matches the value sent in


%AQ0002, it checks the command status value. If the command
status value in %AI0001 is 1, the command has been successfully
executed. The Serial Comm Module is configured as an RTU Master
and ready to accept Modbus RTU commands.

VersaMax Serial Communications Module


February 2012

GFK-2423E

Part 2: Set Up the Send RTU Preset Query Command (08002)

Initialize RTU Master Port: 65520 (FFF0)

%AQ
Word
Location
Word 1

Value

Description

16 for Modbus RTU


Master

Word 2

0-65535

Word 3

0 (Ignored)

Word 4

0 (Ignored)

Word 5
Word 6

0 (Ignored)
0 (Ignored)

Word 7
Word 8
Word 9
Word 10

65520
3
1
2 = 1200, 3 = 2400,
4 = 4800, 5 = 9600,
6=19200
0 = None, 1 = Odd,
2 = Even
0 = Hardware,
1 = None

Port Setup Command/Data Block


Length in words (includes Words 7
22, inclusive)
Command Sequence number that will
be incremented any time a new
command is being sent.
Status Word Memory Type (for memory
mapped command, status will be
returned in the first word %AI memory.)
Status Word Address 1. (for memory
mapped command; status will be
returned in the first word %AI memory.)
N/A
WAIT Mode time-out values are unused
(N/A for memory mapped command)
Command Port Setup
Protocol Modbus RTU
Mode Master (New for Modbus RTU)
Data Rate Do not specify any values
other than 2,3,4,5,6.

COMMREQ status value: Zero


Sequence Number: set to current sequence value (%AQ0002)
Address: RTU Slave Address 3
RTU Function Code: 16
RTU Data Address: 101
Number of Data Points: 1
Data: 0x1234

Word 11
Word 12

As before, to trigger the command, the sequence number, %AQ0002


must be incremented.

Word 13
Word 14

0 (Ignored)
0 = Long (8 Seconds),
1 = Medium (2
Seconds),
2 = Standard (500ms),
3= Short (250ms),
4= Very Short (150ms)

Word 15

1 (Ignored)

Word 16

0 (Ignored)

Word 17

0 (Ignored)

Word 18

01
0 = Default

Word 19

0 65,535 (0 to 6.5535
seconds)
0 = Default
(0 to 6.5535 seconds)
0 = Default

Word 20

Words
21 22

When the sequence number in %AI0002 matches the value sent in


%AQ0002, it checks the command status value. If the command
status value in %AI0001 is 1, the command has been successfully
executed. The Serial Communications Module has successfully
transmitted the Modbus RTU command to RTU Slave Device 3.

0 (Ignored)

Parity
Flow Control
SNP Turnaround Delay
Response message time-out the
specified value must be greater than
the sum of the longest receive-totransmit delay for all slaves plus the
longest response message
transmission time at the current data
rate.
Bits per Character Modbus RTU
requires 8 bits.
Stop Bits Modbus RTU forces 1 stop
bit.
Port Interface not software
configurable only one port is available.
Half-Duplex Mode Setting the
parameter to 0 configures the port to
operate in 2-wire mode. Setting the
parameter to 1 configures the port for 4wire mode.
Character-gap time-out in 100microsecond units.
RTS Drop Delay in 100 microsecond
units.
The required minimum Port Setup
command/data length includes these
words. However, the Modbus RTU
Master ignores their values.

Denotes serial port default settings

Modem Support: The CMM020 allows the RTS serial port signal to be used
as a modem keying signal. When 0 = HARDWARE is specified, the port asserts
RTS and waits for CTS to become active before transmitting. If CTS does not
become active within 2 seconds, a time-out error code is returned to the status
location specified in the Send RTU Query COMMREQ. If CTS becomes active
and then is de-asserted while the port is transmitting, up to 5 milliseconds may
elapse before transmission stops. The maximum number of characters
transmitted after CTS is de-asserted is proportional to the data rate. These
values are in addition to the character that is being transmitted at the time CTS is
de-asserted.

RTU Master Commands Supported


The Serial Communications module supports RTU Master command
numbers 65520, 8000, 8001, 8002, and 8003 as described in the
Modbus RTU Communications Manual, GFK-2220, with a few
differences as described below.

Command 65520 Initialize RTU Master Port


If it is necessary to change the serial port settings from the default
values, the Initialize RTU Master Port command can be sent to the
Serial Communications module by placing the values shown below into
the modules configured %AQ memory references. The module
returns the status of the request in the first word of its configured %AI
memory references and the commands sequence number in the
second word.

VersaMax Serial Communications Module


February 2012

GFK-2423E

RTU Master Command 8000 Clear RTU Master Diagnostic Status


Words

RTU Master Command 8003 Send RTU Diagnostic Query


As described in the Modbus RTU Communications Manual, with the
exception that the Status Word Memory Type and location are ignored.
The status is returned to the first word of %AI memory.

As described in the Modbus RTU Communications Manual, with the


exception that the Status Word Memory Type and location are ignored.
The status is returned to the first word of %AI memory.

RTU Function Codes Supported

RTU Master Command 8001 - Read RTU Master Diagnostic Status


Words

The Serial Communications module supports the following RTU


Function Codes.

As described in the Modbus RTU Communications Manual, with the


exception that the Status Word Memory Type and location are ignored.
The status is returned to the first word of %AI memory.

Function Code
Value

RTU Master Command 8002 -Send RTU Read/Force/Preset Query

Dec.

Hex.

01

Read Output
Table

02

Read Input
Table

03

Read
Registers

04

Read Analog
Inputs

The Send RTU Read/Force/Preset Query command is sent to the


Serial Communications module by placing the values shown below into
the modules configured %AQ memory references. The module
returns the status of the request in the first word of its configured %AI
memory references and the commands sequence number in the
second word.
Send RTU Preset Query: 08002 (1F42)

Function
Name

%AQ Word
Location

Value

Description

Word 1

Command/Data Block Length

Word 2

0-65535

Command Sequence number that will be


incremented any time a new command is
being sent.

05

Force Single
Output

Word 3

0 (Ignored)

Status Word Memory Type (N/A for


memory mapped command, status will
be returned in the first word %AI
memory.)

06

Preset Single
Register

07

Word 4

0 (Ignored)

Status Word Address 1. (N/A for


memory mapped command, status will
be returned in the first word %AI
memory.)

08

15

0F

Read
Exception
Status
Loopback/
Maintenance
Force Multiple
Outputs

16

10

Preset Multiple
Registers

17

11

Report Device
Type

67

43

Read Scratch
Pad Memory

Word 5

0 (Ignored)

WAIT Mode time-out values are unused


(N/A for memory mapped command)

Word 6

0 (Ignored)

WAIT Mode time-out values are unused


(N/A for memory mapped command)

Word 7

8002

Command - Send RTU Master


Read/Force/Preset Query

Word 8

0 247

Target RTU Device Address

Word 9

16

RTU Function Code

Word 10

0-65535
(Application
dependent)

RTU Data Address/Start Address

Word 11

1 - 51

RTU Number of Points or 16-bit


Registers

Word 12

0 (Ignored)

Data Memory Type of source (N/A for


memory mapped command.)

Word 13

0 (Ignored)

Data Address of source (N/A for memory


mapped command.)

Words 14
(14 + Word
11 1)

Data to be sent in the Preset Command.

RTU Master
Command
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU Diagnostic
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query
Send RTU
Read/Force/Preset
Query

Slave
Reference
Type

Valid as
Broadcast
Query?

%Q

No

%I

No

%R

No

%AI

No

%Q

Yes

%R

Yes

%Q

No

N/A

No

%Q

Yes

%R

Yes

N\A

No

N\A

No

You might also like