Cypress | Chameleon CTM-130 | MODBUS Master Gateway

MODBUS
OPERATION
Model
Revision
Chameleon CTM-200
gateway
1.1
3066 Beta Avenue Burnaby, B.C.
Phone: 604.294.4465
Fax: 604.294.4471
support@cypress.bc.ca
V5G 4K4
2
Contents
Revision Control .............................................................................................................................................. 2
1
CTM-200 MODBUS Operation ................................................................................................................ 2
2
MODBUS Self Slave ................................................................................................................................. 3
3
MODBUS Master Gateway ...................................................................................................................... 4
3.1
4
MODBUS Serial Master Gateway Configuration ............................................................................. 4
MODBUS Slave Gateway ......................................................................................................................... 5
4.1
MODBUS Serial Master Gateway Configuration ............................................................................. 5
5
MODBUS Master ..................................................................................................................................... 5
6
Technical Support/Warranty: ................................................................................................................. 6
Revision Control
Description
Revision
Date
Customer Release
Updated Documentation for CTM-200
Updated Documentation for CTM-200
revision 1.0
07-19-2012
Revision 1.1
03-08-2013
1 CTM-200 MODBUS Operation
The CTM-200 gateway supports the MODBUS protocol commonly used in SCADA applications. The
gateway can be configured as one of four types of MODBUS devices:
 MODBUS Self Slave (section 2)
 MODBUS Master Gateway (section 3)
 MODBUS Slave Gateway (section 4)
 MODBUS Master (section 5)
This application note details how to setup a CTM-200 gateway in MODBUS mode. The MODBUS
connection uses the cellular wireless packet data network so is able to provide the advantages of high
data rates, and being always connected so available for quicker response times. Over-the-air MODBUS
messages can be configured to be sent as MODBUS RTU messages encapsulated in UDP packets, or as
© 2011 Cypress Solutions
MODBUS Operation (Revision 1.3)
MODBUS Self Slave
MODBUS TCP messages. MODBUS RTU over UDP messages minimizes wireless data usage at the cost of
less reliable data delivery. MODBUS TCP messages provide reliable data delivery at the cost of increased
wireless data usage. The default configuration for the gateway in MODBUS mode is to use MODBUS TCP
as the over-the-air protocol.
For added security, MODBUS Secure can be used to securely exchange MODBUS data. This is to support
applications that require secure communication through SSH tunneling.
To enable MODBUS Secure, the following commands must be entered:
cmd modbussecure 1
#Default value 0
cmd save
cmd pwr mode 2
Note: SSH tunneling must be setup between the remote server and CTM modem. See Securing the CTM200 using SSH Tunneling application note for more details.
The details and explanations of the commands used in these examples can be found at the following link:
http://cloud.cypress.bc.ca/documents/Command_Ref/CTM200/
2 MODBUS Self Slave
A MODBUS Master Application can “read” and “write” to a CTM modem configured as a MODBUS Self
Slave. See http://www.cypress.bc.ca/modbus_messages_ctm200.html for example read/write messages
to send from the MODBUS Master Application to the CTM modem.
Configuration for MODBUS Self Slave modem:
cmd mode 6
cmd modbusadd 3
cmd save
cmd pwr mode 2
© 2011 Cypress Solutions
#MODBUS host interface
#Self slave using MODBUS ID 3
#Save configuration
#Power cycle modem
MODBUS Operation (Revision 1.3)
3
MODBUS Master Gateway
3 MODBUS Master Gateway
3.1
MODBUS Serial Master Gateway Configuration
The following set of gateway commands will configure the gateway to act as a MODBUS serial Master
Gateway using MODBUS RTU between the MODBUS Master application and the gateway, and using
MODBUS RTU over UDP for over-the-air communication.
cmd modbusmode 1
cmd modbusctm130 1
cmd port 1 9600 8 n 1 0
cmd modbusidmap 1 123.2.1.2 502
cmd modbusidmap
cmd mode 6
cmd save
cmd pwr mode 2
© 2011 Cypress Solutions
#Set gateway to be a MODBUS serial RTU master gateway
# Use RTU over UDP for over the air communication. 0=TCP
#Set serial port settings
#Add an entry to the MODBUS ID to slave gateway IP map.
#List all entries in MODBUS ID to slave gateway IP map
#MODBUS host interface
#Save configuration
#Power cycle modem
MODBUS Operation (Revision 1.3)
4
MODBUS Slave Gateway
4 MODBUS Slave Gateway
4.1
MODBUS Serial Slave Gateway Configuration
The following set of gateway commands will configure the gateway to act as a MODBUS slave gateway
using MODBUS RTU between the gateway and the MODBUS serial slave device(s), and using MODBUS
RTU over UDP for over-the-air communications.
cmd modbusmode 0
cmd modbusctm130 1
cmd port 1 9600 8 n 1 0
cmd modbusadd 1 Serial R
#Set gateway to be a MODBUS slave gateway
# Use RTU over UDP for over the air communication. 0=TCP
#Set serial port settings
#Set the serial port slave device to have a slave ID of 1 and to
#use MODBUS RTU as the serial transmission mode.
#List all entries in MODBUS slave list
#MODBUS host interface
#Save configuration
#Power cycle modem
cmd modbusadd
cmd mode 6
cmd save
cmd pwr mode 2
5 MODBUS Master
Refer to MODBUS Master application note for more setup details
© 2011 Cypress Solutions
MODBUS Operation (Revision 1.3)
5
Technical Support/Warranty:
6 Technical Support/Warranty:
Cypress Solutions Service
Support Group
1.877.985.2878 or 604.294.4465
9.00am to 5.00pm PST
support@cypress.bc.ca
© 2011 Cypress Solutions
MODBUS Operation (Revision 1.3)
6
Download PDF