Вы находитесь на странице: 1из 15

Communication AC500

Modbus TCP

Scalable PLC AC500

ABB Group Version 3.1 (2012-07)
Technical Guides

ABB Group
March 11, 2013 | Slide 2
Modbus TCP with AC500
Configuration and parameterization
Program in CoDeSys

Modbus TCP Communication
Coming up

ABB Group
March 11, 2013 | Slide 3
AC500 is server. It is exchanging
data on clients request.

CP600 is client. It is initiating the
communication.
Modbus TCP Communication
AC500 as Server and / or Client
Data exchange between CPUs.

Modbus TCP communication also
via CM577 possible.

Each PLC can act as client and /or
server.


ABB Group
March 11, 2013 | Slide 4
Modbus TCP with AC500
Configuration and parameterization
Program in CoDeSys

Modbus TCP Communication
Coming up

ABB Group
March 11, 2013 | Slide 5
Modbus TCP Communication
Configure Modbus TCP (1)

Add Modbus TCP on Onboard_Ethernet or CM577_ETH
Result:

ABB Group
March 11, 2013 | Slide 6
Modbus TCP Communication
Configure Modbus TCP (2)
If the Port is acting as a server
configure number of
connections to be created
simmultaneously to different
clients

Byte order for AC500
communication is Big endian =
Motorola byte order


The other parameters could be
changed due to optimize the
communication.

ABB Group
March 11, 2013 | Slide 7
Modbus TCP Communication
Configure Modbus TCP (3)
In the server project the
Modbus buffer area could be
selected as %M or %R area
(default: %M area)

Optionally in the server project
areas could be protected
against write and / or read
access by clients.
Writing / reading is disabled
beginning at the set address
and is valid up to the set end
address (inclusive).



ABB Group
March 11, 2013 | Slide 8
Modbus TCP with AC500
Configuration and parameterization
Program in CoDeSys

Modbus TCP Communication
Coming up

ABB Group
March 11, 2013 | Slide 9
Modbus TCP Communication
Client: Program in CoDeSys
Enabling parameter (0 -> 1 edge)
Number of Communication Module
Function code. Here Read registers (words)
Addr. of the slave connected serial to the server
10 words

Starting from Server address 0 (%MW0.0 or %RW0.0)

Copy to own memory area starting with address
of the operand (an array or an addresable area)
IP-address of the Server
Result of
data
exchange
This FB is only for the Client (no FB for Server).

ABB Group
March 11, 2013 | Slide 10
Modbus TCP Communication
Function Codes
01 or 02 read n coils (bits)
255 bits (up to firmware version V01.33)
1800 bits (from firmware version V01.41)
03 or 04 read n registers (words)
100 words / 50 double words
05 write one coil (bit)
1 bit
06 write one register (word)
1 word
07 read 8 coils (bits)
8 bits
15 write n coils (bits)
255 bits (up to firmware version V01.33)
1800 bits (from firmware version V01.41)
16 write n registers (words)
100 words / 50 double words
22 mask one register (word)
only with CPUs with Onboard Ethernet
23 read and write n registers
(word)
only with CPUs with Onboard Ethernet

AC500 supports following Modbus function codes:

ABB Group
March 11, 2013 | Slide 11
Modbus TCP Communication
Program in CoDeSys
Enable FB by a puls signal
FB is dedicated to the CPU internal ETH port
IP-addres of the server is 10.33.71.175, no routing to another serial slave
Write 5 words to the 11. word of the servers Modbus buffer (%MW0.10 or
%RW0.10) from own area beginning with the address of the variable
ARRAYofWORD

ABB Group
March 11, 2013 | Slide 12
Modbus TCP Communication
Program in CoDeSys
Enable FB by a puls signal
FB is dedicated to the CPU internal ETH port
IP-addres of the server is 10.33.71.174, no routing to another serial slave
Read 5 words to the 11. word of the servers Modbus buffer (%MW0.10 or
%RW0.10) from own area beginning with the address of the variable
ARRAYofWORD

ABB Group
March 11, 2013 | Slide 13
Modbus TCP Communication
Read / Write Addresses
Input and Output cannot be directly accessed by using Modbus
The address assignment for word and double word accesses is done according to the
following table :








Line 0 %MW0.0 to %MW0.32767 and line 1 %MW1.0 to %MW1.32767
Line 0 only for PM554_ETH, PM564_ETH and PM57x_ETH

ABB Group
March 11, 2013 | Slide 14
Cross-References to Documentation
1. CoDeSys Help\Target System\
AC500 / S500\ Function Block Libraries AC500 \
Ethernet Library


2. CoDeSys Help\Target System\
AC500 / S500\System Technology \System
Technology of the AC500 Communication
Modules\The Ethernet Communication Module\
Modbus on TCP/IP

ABB Group
March 11, 2013 | Slide 15

Вам также может понравиться