Connection With Modbus-Rtu Slaves; Overview - Omron NX-series User Manual

Hide thumbs Also See for NX-series:
Table of Contents

Advertisement

4 Serial Communications
4-4

Connection with Modbus-RTU Slaves

The following describes data exchange between the CPU Unit and Modbus-RTU slaves.
4-4-1

Overview

The NX1P2 CPU Unit can exchange data with Modbus-RTU slaves by using instructions to send a
Modbus-RTU command and receive a response.
To use this function, you mount a Serial Communications Option Board on the NX1P2 CPU Unit, set its
Serial communications mode to Modbus-RTU Master, and connect their serial ports together.
NX1P2 CPU Unit
RS-232C or RS-422A/485 Option Board
RS-232C or
RS-422A/485
The processing of the Modbus-RTU protocol and message frame format is handled by the instructions
to send a Modbus-RTU command and receive a response.
Therefore, you can easily create a program to exchange data with Modbus-RTU slaves.
Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502-E1-17 or later) for the speci-
fication of instructions.
Additional Information
The frame format of Modbus-RTU commands is as follows.
Slaves
Address
1 byte
* The byte order of the CRC code is lower byte, then higher byte.
Refer to MODBUS Application Protocol Specification for the specifications of the MODBUS
communications protocol. You can obtain MODBUS Application Protocol Specification from
MODBUS Organization, Inc.
http://www.modbus.org/
4 - 18
User program
NX_ModbusRtuCmd instruction
NX_ModbusRtuRead instruction
NX_ModbusRtuWrite instruction
Slave Address
Function Code
Slave Address
Function Code
Function
Data
Code
1 byte
0 to 252 bytes
NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (W579)
Data
CRC
Modbus-RTU command
Modbus-RTU response
Data
CRC
CRC
2 bytes*

Advertisement

Table of Contents
loading

Table of Contents