EasyManuals Logo

Omron TJ2-MC64 - PROGRAMMING User Manual

Omron TJ2-MC64 - PROGRAMMING
362 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #225 background imageLoading...
Page #225 background image
Communication protocols
PROGRAMMING MANUAL 219
Revision 1.0
4.3.3 ModbusRTU
The ModbusRTU protocol provides single point to point communication
between the TJ2-MC64 and a ModbusRTU master. Implementation of
the protocol is provided on serial port 1 for RS232 and port 2 for RS485.
Baud rate and slave address can be set in the BASIC program during serial
port initialisation.
The Modbus protocol is initialised by setting the mode parameter of the
SETCOM instruction to 4. The ADDRESS parameter must also be set
before the Modbus protocol is activated.
Example
ADDRESS=1
SETCOM(9600,8,1,2,1,4) ‘Port 1 as MODBUS port at 9600 baud
ADDRESS=1
SETCOM(19200,8,1,2,2,4) ‘set up the RS485 port at 19200 baud
The protocol can be de-selected by setting the option to 0 in the SETCOM
command.
SETCOM(19200,8,1,2,2,0) ‘set the RS485 port to normal mode.
Functions
The following Modbus functions are supported:
/i
Code Function name Action
1 Read Coil Status Read I/O
2 Read Input Status Read I/O
3 Read Holding Registers Read VR variables or TABLE memory in both
integer or IEEE floating point format
5 Force Single Coil Write I/O
6 Set Single Holding Register Write to a VR variable or a TABLE location in
both integer or IEEE floating point format
16 Set Multiple Holding Registers Write to multiple VR variables or TABLE loca-
tions in both integer or IEEE floating point for-
mat
23 Read & Write Multiple Holding
Registers
in both integer or IEEE floating point format
Code Function name Action

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron TJ2-MC64 - PROGRAMMING and is the answer not in the manual?

Omron TJ2-MC64 - PROGRAMMING Specifications

General IconGeneral
BrandOmron
ModelTJ2-MC64 - PROGRAMMING
CategoryController
LanguageEnglish

Related product manuals