| |
Modbus
Communications
The
Modbus MotionBASIC Extension (MBX) allows ORION motion controllers to
communicate using the Modbus network protocol. The Modbus factory data
transfer network provides a convenient and cost-effective method for data
communications between ORION motion controllers, programmable logic
controllers, man-machine interfaces, host computers and other intelligent
devices which support it.
Modbus Architecture
The Modbus network is a single master, multi-drop network which supports
up to 247 slave devices. An ORION motion controller with a Modbus
MotionBASIC Extension (MBX) supports one Modbus port as either a network
master or slave depending on the software configuration selected. The
preferred physical layer for the Modbus network is four- wire RS-422/485
asynchronous serial communications (ORION includes two ports). Three-wire
RS-232 communications may be required in some installations. In this case,
additional hardware is required. Modicon J478 modems can be used for
communication over long distances or to provide multi-drop operation using
RS-232 devices.
Modbus Plus
The NM-BM85-000 BridgeMux can be used as a gateway between a Modbus Plus
network and up to four ORION motion controllers configured as Modbus
masters or slaves.
Modbus Protocol Support
ORION motion controllers with the Modbus MotionBASIC Extension can be
configured to operate as a Modbus master or as a slave in either ASCII or
RTU mode. The baud rate can be set from 1200 to 38.4K baud. For a full
description of the network modes and functions, refer to the Modicon
publication PI-MBUS-300, Modbus Protocol Reference Guide.
Hardware Interface
ORION motion controllers can interface a Modbus network through one of its
built-in RS-422/485 serial ports or via one of the optional RS-232 or
RS-422 communications adapters.
Installation
To install Modbus communications in an ORION motion controller:
- connect one of the integral ORION
RS-422/485 serial ports for the physical communications link,
- make sure the MotionBASIC System Card
containing the Modbus MBX is installed
- configure and test the interface, and
- map register numbers to any MotionBASIC
variables containing data to be communicated over the network.
Operation
Modbus is a Factory Data Communications Network and requires that you map
register numbers to the MotionBASIC variables containing data to be
communicated over the network. Both ORMEC pre-defined variables and user
variables can be mapped, and the mapping takes place only once in the
initialization section of your program. After that, other than initiating
commands as the Modbus master, all Modbus communications are handled in
the background by the real-time operating system, transparent to your
MotionBASIC program. Heavy Modbus traffic may slow program operation
however, due to the lack of a co-processor to support communications
processing. Modbus is generally used to transfer integer variables and I/O
information, but Modbus communications between ORION motion controllers
supports the transfer of all MotionBASIC data types including integers,
longs and sets as well as single and double precision floating point.
Modbus Master Support
As the Modbus master, an ORION motion controller can initiate all Modbus
command functions. Frequently used functions are implemented as individual
built-in MotionBASIC statements. All other functions, including those not
listed in the chart, can be generated by your program using a powerful
custom function statement. Data sent or received by these functions is
obtained from, or loaded into, registers that are mapped to MotionBASIC
program variables.
Modbus Slave Support
As a Modbus slave, an ORION motion controller can respond to the Modbus
functions shown in the chart. The Read/Write Holding Registers functions
can transfer up to 120 registers per transaction. The Read Coils and Read
Inputs functions can transfer up to 512 coils and/or inputs per
transaction.
Data is transferred to, or received from Modbus functions using register
numbers mapped to MotionBASIC program variables. All Modbus slave
communications occurs in the background and is transparent to your
MotionBASIC program. In addition, Modbus slave communications is
configurable to allow any network changes to certain registers to trigger
a specified subroutine. This feature makes it easy for Modbus
communications to initiate an action to be taken by any ORION motion
controller.
Modbus Functions Initiated by
ORION as the Master
| Function
Code* |
Description |
| 01 |
Read
Coil Status |
| 02 |
Read
Input Status |
| 03 |
Read
Holding Registers |
| 04 |
Read
Input Registers |
| 05 |
Force
Single Coil |
| 06 |
Preset
Single Register |
| 08 |
Loopback
Test (diagnostic code 0) |
| 16 |
Preset
Multiple Registers |
*--Modbus master functions not listed are
supported using the "Custom Command" feature
Modbus Functions Recognized by
ORION as a Slave
| Function
Code* |
Description |
| 01 |
Read
Coil Status |
| 02 |
Read
Input Status |
| 03 |
Read
Holding Registers |
| 05 |
Force
Single Coil |
| 06 |
Preset
Single Register |
| 08 |
Loopback
Test (diagnostic codes 0,1,4,10-18) |
| 16 |
Preset
Multiple Registers |
Click here to view/print/download
an Adobe Acrobat PDF of this document including drawings of Supported
System Configurations (123k).
|
|