Professional Documents
Culture Documents
14centum VP - How To - Configure Modbus (Serial and TCPIP) Communication - Docx-1
14centum VP - How To - Configure Modbus (Serial and TCPIP) Communication - Docx-1
DISCLAIMER
THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND WHATSOEVER, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES REGARDING MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ACCURACY OF DATA.
IN NO EVENT SHALL YEF-RO BE LIABLE FOR ANY LOSS, EXPENSE OR DAMAGE ARISING OUT OF OR IN
CONNECTION WITH THE USE OF OR RELIANCE UPON THE INFORMATION IN THIS DOCUMENT.
WHENEVER IN DOUBT OR WANT MORE INFORMATION REMEMBER TO ALWAYS CHECK THE MANUAL!
Page 1 of 18
MODBUS is an application layer messaging protocol, positioned at level 7 of the OSI
model, which provides client/server communication between devices connected on different types
of buses or networks. Modbus protocol can be implemented using the following:
• TCP/IP over Ethernet
• Asynchronous serial transmission over a variety of media (i.e. RS-232, RS-422/485, etc.)
Modbus over TCP/IP is a real-time client/server communication protocol used for devices
connected on a TCP/IP Ethernet network.
Modbus RTU is a Master-Slaves protocol and is implemented using asynchronous serial
transmission. A master-slave type system has one node (the master node) that issues explicit
commands to one of the "slave" nodes and processes responses. Slave nodes will not typically
transmit data without a request from the master node, and do not communicate with other slaves.
Modbus communication:
- Serial communication modules ALR111, ALR121
- Ethernet communication module: ALE111
1. Serial communication
Page 2 of 18
1.1.2 Communication parameters
Example :
Note: When 19200 bps is specified, No Parity bit cannot be set (Parity ≠ None).
Page 3 of 18
Transmission Specification:
Note: *1 This settings can be changed from the property dialog box of the card.
Page 4 of 18
Setting Items on Communication I/O Builder :
- Element - the element numbers are displayed for reference only, they cannot be set.
- Buffer – this item sets the buffer size used by a program.
- Program Name – this item has the following format: Kt-n-sProgramName
K: FIO identifier
t: System number (Specify 1.)
n: Node number
s: Slot number
ProgramName: MODBUS
- Size - this item sets the data size (data length) necessary in the processing of a single
communication. The size is set in word units.
- Port – The port that can be set is either 1 or 2.
- IP Address – No need for IP address to be set
- Station - The station numbers that can be set are 1 to 255.
- Device&Address - this sets the contents of data to be collected from subsystem.
- Data Type - This sets data type of the subsystem data.
- Reverse - Set whether to reverse the bit/word arrangement between the FCS and the
subsystem.
- Scan - Set whether to read the communication I/O analog data into the communication
I/O data buffer at the beginning of high-speed scan of the FCS.
- Label - The name of the function block I/O terminal.
For ALR121:
● RS-485: [Point- to –Point communication]: 4 wire connection
● RS-485: [Point to Point or Multipoint communication]: 2 wire connection
Page 5 of 18
RS-485: [Point- to –Point communication]: 2 wire connection
Page 6 of 18
RS-485: [Point- to –Point communication]: 4 wire connection
The following table shows the connector specification of the ALR121 card.
Page 7 of 18
2. Ethernet communication
2.1.1 Adding an ALE111 card – right click NODE1 folder /Create New/IOM
Page 8 of 18
Transmission Specification:
Page 9 of 18
2.1.3 CommDataWW & WBTagDef
Database example:
Page 10 of 18
Setting Items on Communication I/O Builder :
- Element - the element numbers are displayed for reference only, they cannot be set.
- Buffer – this item sets the buffer size used by a program.
- Program Name – this item has the following format: Kt-n-sProgramName
K: FIO identifier
t: System number (Specify 1.)
n: Node number
s: Slot number
ProgramName: FMODBUS
- Size - this item sets the data size (data length) necessary in the processing of a single
communication. The size is set in word units.
- Port – The port is set to 1.
- IP Address – This item sets the IP address of the subsystem.
- Station - This item sets the station number of the subsystem.
- Device&Address - this sets the contents of data to be collected from subsystem.
- Data Type - This sets data type of the subsystem data.
- Reverse - This item specifies whether or not to reverse the bit or word sequences within
the FCS and in the subsystem data.
- Scan - Set whether to read the communication I/O analog data into the communication
I/O data buffer at the beginning of high-speed scan of the FCS.
- Label - The name of the function block I/O terminal.
CommDataWW:
Page 11 of 18
CommDataWW / WBTagDef : DO
Page 12 of 18
CommDataWW / WBTagDef DI (Bitpacked)
Page 13 of 18
CommDataWW / WBTagDef : DI (Boolean)
Page 14 of 18
CommDataWW / WBTagDef : AI
Page 15 of 18
CommDataWW / WBTagDef : AI & DI
Page 16 of 18
2.1.4 Configuring register calls
Page 17 of 18
3. Other consideration
Page 18 of 18