Vous êtes sur la page 1sur 19

Serial Gateway Mode

Pass through communications

CX Drive to Omron Inverters (Modbus RTU)


CX Drive to Omron Servo Drives (SmartStep
(SmartStep, W Series
Series, WN Series)
CX Thermo to Temp Controllers (CompoWay /F)
CX Programmer to PLCs. (Hostlink)

RS232, 422, 485

Any comms method


Serial, Ethernet,
Controller Link,
D i N t etc.
DeviceNet,
t

Serial Gateway Mode


The Serial Gateway Mode is a relatively new
feature that has been added to several types
yp
of PLC serial ports.
These include:

CJ1W-SCUxx V1.2 +
CS1W-SCUxx V1.2 +
CS1W SCBxx V1
CS1W-SCBxx
V1.2
2+
CJ1x-CPUxx-(H) V3.0 + Peripheral / Host Link
CS1x-CPUxx-H V3.0 + Peripheral / Host Link
CP1H xx Port 1/ Port 2

Serial Gateway How it works

The software (CX drive for example) sends a FINS command to a specific serial port configured in
Serial Gateway Mode.
The Serial Port strips off the FINS header and passes the embedded command (Modbus for
example) to the serial device.
The Serial Port receives the response from the serial device, and delivers it back to the software.

Serial Gateway Possible Combinations


CS1 / CJ1
Peripheral /
Hostlink *(1)
( )

CS1
SCBxx *(2)

CS1 / CJ1
SCUxx *(2)

CP1H
Port 1 / Port 2

CP1H + CJ1WSCUxx *(2)

Inverter

NG

OK

OK

NG*(3)

OK

Temp
Controller

OK

OK

OK

OK

OK

Servo

NG

OK

OK

NG*(3)
(3)

OK

PLC

NG

OK

OK

NG

OK

Note 1: CS1 / CJ1 must be firmware version 3.0 or higher.


Note 2: SCU / SCB must be firmware version 1.2 or higher.
N 33: CP1H supports inverters
Note
i
/ servos via
i Modbus
M db RTU Easy
E
Master
M
Function.
F
i

Easy Modbus Master


Thi
This iis a new ffunction
ti off CP1H exclusively!!!!
l i l !!!!
This function allows the user to send Modbus
commands from ladder without complex programming.
The Easy Modbus Master uses the Serial Gateway
function of the serial port.

Easy Modbus Master


The Easy Modbus master function automatically:
Calculates the Modbus CRC-16 Check Code
Performs a timeout function on communications

Modbus Overview
Modbus Types
Modb
Modbus
s ASCII is transmitted b
by RS232 in ASCII characters,
characters
uses LRC error checking and is usually a one-to-one protocol.
Modbus RTU is preferred for serial transmission of binary (hex)
characters,
h
t
uses CRC-16
CRC 16 error checking
h ki
and
d is
i usually
ll
implemented using RS422/485. This is the Modbus that Easy
Modbus Master Supports.
Modbus Plus is a peer-to-peer protocol using proprietary
hardware similar to Controller Link.
Modbus TCP/IP is Modbus RTU protocol enclosed in a TCP
packet and intended for transmission on Ethernet.

Modbus Overview

Omron Inverters onlyy use Function Codes 03 and 10 ((HEX).


)

Modbus Overview
Modbus Register Map in Inverters
Parameter
Number

Modbus
Register
Number

Extracted from 3G3MV Manual

Modbus Overview
Read Multiple Registers (Function Code 03)
Example: Read from node 1, 1 register starting at register 0118

Command

Normal
Response

Error
Response

Modbus
Node #

Function
Code

01

03

Modbus
Node #

Function
Code

01

03

Modbus
Node #

Function
Code

01

83

Starting Modbus
Register

01

18

Number
of Bytes
of Data

02

Number of
Registers to Read

00

Data # 1

17

70

01

C1

05

Modbus CRC 16
Check Code

B6

Modbus
Error Modbus CRC 16
Code
Check Code

22

Modbus CRC 16
Check Code

29

Extracted from 3G3MV Manual

50

F1

Modbus Overview
Write Multiple Registers (Function Code 10)
Example: Write to node 1, 1 register starting at register 0118

Modbus Function Starting Modbus


Node #
Code
Register

Command

Normal
Response

Error
Response

01

10

Modbus
Node #

Function
Code

01

10

Modbus
Node #

Function
Code

01

90

01

Number of
Registers to Write

18

00

Starting Modbus
Register

01

18

Number
of Bytes
of Data

01

02

Number of
Registers Written

00

01

Modbus
Error Modbus CRC 16
Code
Check Code

22

CC

19

Extracted from 3G3MV Manual

Data # 1

02

Modbus CRC 16
Check Code

58

Modbus CRC 16
Check Code

80

32

BB

5C

Easy Modbus Master Step 1


1 Assemble the Modbus command in PLC memory

Easy Modbus Master Step 2


2 Turn on Execute Bit to send the Modbus command

Note: In the preliminary manual for CP1H, the port


numbers are reversed.
reversed The above information is correct.
correct

Easy Modbus Master Step 3


3 Wait for the Executing bit to turn off, and then
examine the result bits.

Note: In the preliminary manual for CP1H, the port


numbers are reversed.
reversed The above information is correct.
correct

Easy Modbus Master Step 4


4 Examine the Modbus response

Filling in the Easy Modbus Registers

This will read 1 register starting at 0118


This example uses Port # 2

Examining the Response

This example uses Port # 2

Filling in the Easy Modbus Registers

This will write 1 register starting at 0118 with the value 1770
This example uses Port # 2

Examining the Response

This example uses Port # 2

Vous aimerez peut-être aussi