Professional Documents
Culture Documents
AC500
Scalable PLC
for Individual Automation
Modbus RTU Communication
AC500 CPU - UMC
Content
1
Disclaimer ..................................................................................................................3
1.1 For customers domiciled outside Germany/
Fr Kunden mit Sitz auerhalb Deutschlands........................................................................ 3
1.2
AC500 PM554 eCo CPU communication over Modbus RTU with UMC ................4
2.1
2.2
2.3
PLC program..............................................................................................................6
3.1
PS502 Configurator......................................................................................................... 6
3.2
eCo CPU........................................................................................................................... 6
3.3
rtsinfo............................................................................................................................... 7
3.4
3.5
IP settings ........................................................................................................................ 8
PLC_PRG ...................................................................................................................9
4.1
4.2
POUs ................................................................................................................................ 9
4.3
4.4
POUs .............................................................................................................................. 10
4.4.1
4.4.2
4.4.3
4.4.4
Application Example
-1-
AC500/Issue: 09.2011
6.2
6.3
6.4
6.5
Application Example
-2-
AC500/Issue: 09.2011
1 Disclaimer
1.1 For customers domiciled outside Germany/
Fr Kunden mit Sitz auerhalb Deutschlands
"Warranty, Liability:
The user shall be solely responsible for the use of this application example described within this file.
ABB shall be under no warranty whatsoever. ABB's liability in connection with this application example or the
files included within this file, irrespective of the legal ground, shall be excluded. The exclusion of liability shall
not apply in the case of intention or gross negligence. The present declaration shall be governed by and
construed in accordance with the laws of Switzerland under exclusion of its conflict of laws rules and of the
Vienna Convention on the International Sale of Goods (CISG)."
"Gewhrleistung und Haftung:
Der Nutzer ist allein fr die Verwendung des in dieser Datei beschriebenen Anwendungsbeispiels
verantwortlich.
ABB unterliegt keiner Gewhrleistung. Die Haftung von ABB im Zusammenhang mit diesem
Anwendungsbeispiel oder den in dieser Datei enthaltenen Dateien - gleich aus welchem Rechtsgrund - ist
ausgeschlossen. Dieser Ausschlu gilt nicht im Falle von Vorsatz oder grober Fahrlssigkeit. Diese
Erklrung unterliegt Schweizer Recht unter Ausschlu der Verweisungsnormen und des UN-Kaufrechts
(CISG)."
Application Example
-3-
AC500/Issue: 09.2011
The data exchange with an external supervisor system can be done using different communication
protocols( Modbus TCP/IP, Profibus, etc.).
Application Example
-4-
AC500/Issue: 09.2011
UMC 100
blue
120 Ohm
3
COM 1
reply
white
5
SUB-D, 9 pin, male
UMC.project
AC500 PM 582 CPU modbus RTU master UMC 100 with MRP21 FBP
Application Example
-5-
AC500/Issue: 09.2011
3 PLC program
Application Example
-6-
AC500/Issue: 09.2011
3.3 rtsinfo
Application Example
-7-
AC500/Issue: 09.2011
3.5 IP settings
The programing and online acces to the CPU will be done over the ethernet port, in this case the CPU is
already configured, with the IP address 192.168.5.47, subnet mask 255.255.248.0.
PC IP Settings
The PC has to be in the same network as the CPU.
Application Example
-8-
AC500/Issue: 09.2011
4 PLC_PRG
The PLC program is given in this example as text and could be written with the actual version of the AC500
configurator.
4.2 POUs
Two POUs are created: PLC_PRG(PRG) and RUN(PRG).
In the PLC_PRG POU the instance of the COM_MOD_MAST Modbus RTU function block is called.
The parameter for the different Modbus data communication ( read/write registers in slave ) and the data
handling are handled in the POU named RUN, written in structure text.
Application Example
-9-
AC500/Issue: 09.2011
Application Example
- 10 -
AC500/Issue: 09.2011
CASE CHAIN OF
(*read binary inputs*)
0: (*send request read binary inputs*)
IF NOT UMC.DONE THEN
IF NOT (start_UMC OR stop_UMC) THEN
UMC.EN:=TRUE;
UMC.COM:=1;
UMC.SLAVE:=47;
UMC.FCT:=1;
UMC.TIMEOUT:=1000;
UMC.ADDR:=16#0;
UMC.NB:=16;
CHAIN:=100;
ELSE
CHAIN:=1000;
END_IF
END_IF
100: (*reply read binary inputs arrived*)
IF UMC.DONE THEN
UMC.EN:=FALSE;
binary_in_value:=binary_inputs;
CHAIN:=200;
END_IF
Application Example
- 11 -
AC500/Issue: 09.2011
Application Example
- 12 -
AC500/Issue: 09.2011
IF UMC.DONE THEN
UMC.EN:=FALSE;
analog_in_value:=analog_inputs;
CHAIN:=400;
END_IF
Application Example
- 13 -
AC500/Issue: 09.2011
Application Example
- 14 -
AC500/Issue: 09.2011
(*start_UMC OR stop_UMC*)
1000: (*send request for start or stop UMC*)
IF NOT UMC.DONE THEN
UMC.EN:=TRUE;
UMC.COM:=1;
UMC.SLAVE:=47;
UMC.FCT:=15;
UMC.TIMEOUT:=1000;
UMC.ADDR:=16#0100;
UMC.NB:=16;
CHAIN:=1100;
IF start_UMC THEN
start:=16#2400; (*value for start* UMC)
END_IF
Application Example
- 15 -
AC500/Issue: 09.2011
IF stop_UMC THEN
start:=16#2200; (*value for stop UMC*)
END_IF
END_IF
1100: (*reply for start or stop UMC has arrived*)
IF UMC.DONE THEN
UMC.EN:=FALSE;
CHAIN:=1200;
END_IF
Continue with read
(*(wait until start_UMC OR stop_UMC=FALSE*)
1200:
IF NOT (start_UMC OR stop_UMC) THEN
CHAIN:=0;
END_IF
END_CASE
Start/Stop UMC inputs
Application Example
- 16 -
AC500/Issue: 09.2011
Global variables
Application Example
- 17 -
AC500/Issue: 09.2011
UMC 100
COM 1
8
blue
120 Ohm
reply
white
B
RS 485
UMC. project
PC with W in XP Pro
AC500 PM 582 CPU modbus RTU master UMC 100 w ith MRP21 FBP with PC telegram analyser Docklight
Application Example
- 18 -
AC500/Issue: 09.2011
Application Example
- 19 -
AC500/Issue: 09.2011
6 Related Documents
Application Example
- 20 -
AC500/Issue: 09.2011
Application Example
- 21 -
AC500/Issue: 09.2011
Application Example
- 22 -
AC500/Issue: 09.2011
No. o. p.:
Helpline document
23
Title:
Lang.:
EN
Doc. kind: