Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Commissioning Example AC500

Scalable PLC
for Individual Automation

Dial-up Connection with


CM574-RCOM Communication
Modules

RCOM

abb
Content
Introduction ................................................................................................................................ 2

Example Configuration .............................................................................................................. 2

Configuration of the CM574-RCOM Communication Modules .............................................. 3

Configuring the Master ............................................................................................................ 3


Configuring the Slave .............................................................................................................. 3
Configuring the Modem ........................................................................................................... 4
Setting up the Phone Book ...................................................................................................... 4

Implementation of the User Program ....................................................................................... 4

Implementation of the Master .................................................................................................. 4


Implementation of the Slave .................................................................................................... 8

Commissioning Example 1 RCOM AC500/Issue: 04.2009


Introduction
This example shows how to realize data transmission between two RCOM Communication Modules
using a modem based dial-up connection in operation mode RCOM+. The transmission speed of the
connection in this example is set to 9600 Baud/s (no parity).
The set up of the AC500 PLCs and the modems will be described as well as the projecting of the master
and slave devices.
The corresponding projects can be found in the examples folder:
x RCOM Master: AC500_RCOM_DIAL_UP_MASTER_PM571_V13.pro
x RCOM Slave: AC500_RCOM_DIAL_UP_SLAVE_PM571_V13.pro

Example Configuration
The basic hardware setup consists of two AC500 PLCs, each using
x 1 CPU PM571
x 1 terminal base with at least 1 Communication Module slot
x 1 CM574-RCOM Communication Module
The connection between a modem and a CM574-RCOM Communication Module requires a cable with
the following pin assignment:

In addition to that a cable is recommended that connects the CONSOLE port to a PC with a terminal
emulation software to view protocol information or error messages.

Commissioning Example 2 RCOM AC500/Issue: 04.2009


Configuration of the CM574-RCOM Communication Modules
Configuring the Master
To configure the CM574-RCOM as a master device the parameter “Operation mode” must be set to
“RCOM Master”. The address or node number must be set to 0 while “Parity” should be “None”. Ensure
that “Hayes compatible dial modem” is selected as “Type of modem”. The “Character timeout” should
be set to 50 msecs. The value for the “Turnaround time” should be increased to 6000 msecs.

If the CONSOLE port is used (recommended) the parameter “Debug level” of module “CONSOLE”
should be set to “Level 2” to obtain detailed information and error messages of the protocol.

Configuring the Slave


To configure the CM574-RCOM as a slave device the parameter “Operation mode” must be set to
“RCOM Slave”. The parameter address must be set to a value greater than 0. In this example select 1 for
the slave. “Parity” should be “None”. Ensure that “Hayes compatible dial modem” is selected as “Type
of modem”. The “Character timeout” should be set to 50 msecs. The value for the “Turnaround time”
should be increased to 6000 msecs.

If the CONSOLE port is used (recommended) the parameter “Debug level” of module “CONSOLE”
should be set to “Level 2” to obtain detailed information and error messages of the protocol.

Commissioning Example 3 RCOM AC500/Issue: 04.2009


Configuring the Modem
This example uses ABB H&IT HSM-ECO Remote Modems that provide the ability to use both operation
modes, RCOM and RCOM+. The following setup of the AT command setting is required for a successful
operation:

Setting up the Phone Book


For both projects the telephone numbers of the RCOM devices must be configured. To use a dial-up
modem, a corresponding module has to be appended to the RCOM/RCOM+ module in the PLC
configuration as described in the PLC configuration steps of the CM574-RCOM. See The AC500 PLC
Configuration for further information.

For consistency reasons, the phone book of the master as well as the phone book of the
slave(s) must be equal.

NOTICE

To add a new entry to the phone book, append a telephone number to the modem. The tab “Module
parameters” provides the possibility to set up the corresponding dial prefix identifier and the
corresponding telephone number of the node that should be configured.

Implementation of the User Program


The example shows how to write a dataset with word length 2 to the slave and how to read a dataset from
the slave with word length 14. In addition to that event polling is used to transfer a dataset from the slave
to the master.

Implementation of the Master


The first step is the implementation of an instance of function block RCOM_INIT that is used to initialize
the RCOM Communication Module at the specified slot (1 in this case). To process incoming events of
the slave a RCOM_REC function block is projected and called every cycle as soon as the initialization of
the local Communication Module has been finished.

Commissioning Example 4 RCOM AC500/Issue: 04.2009


The function block must be called cyclically to ensure proper functionality of the RCOM Communication
Module. The outputs DONE and ERR must be checked to get the initialization state. Once output DONE
is TRUE and ERR is FALSE the Communication Module is initialized and ready for further operation.
After a successful initialization the variable bTrigger must be manually set to start the dialing process
represented by function block RCOM_DIAL. Otherwise the master waits for incoming calls of the slave to
show how the automatic polling process is executed.

In case of a finished dialing process triggered by the master, the RCOM initialization function blocks for
cold start, warm start and normalization are started in the next steps to initialize the slave and prepare it
for further request telegrams that are used for data transmission.

Commissioning Example 5 RCOM AC500/Issue: 04.2009


Once the normalization step has finished successfully the data transmission can be executed. In this
example the first step of data transmission is the call of a write request to transfer a data set of word
length 2 to the connected slave. The function block RCOM_TRANSMIT is used to realize this operation.
The data that is written to the slave is located in the word array arwDataOut[0..1]. The input DATA of the
function block is set to the array’s address using the ADR operator. The input ID is set to 2 what specifies
the data set number which must equal a corresponding data set on the slave side. The length of the data
set is set to value 2 at input LEN.
After this step a read request will be started by using the function block RCOM_READ. The requested
data set is specified at input ID (3 in this case). A corresponding data set is projected in the slave project
that is also described in this documentation. The received data is written to word array arwDataIn[0..13].
Input DATA must be set to the address of the array via the ADR operator. The length in words is
specified at input LEN.
The next step triggers an event poll (RCOM_POLL) on the slave to check for new events that will be read
from the slave’s event queue and processed by local RCOM_REC function blocks.

Commissioning Example 6 RCOM AC500/Issue: 04.2009


In case of an error the, master hangs up the phone (function block RCOM_HANGUP) and waits for
incoming calls or a new dialing process that is started manually.

Commissioning Example 7 RCOM AC500/Issue: 04.2009


Implementation of the Slave
As shown in the master implementation the slave also requires the creation and call of an instance of the
function block RCOM_INIT.
The two requests that will be sent by the master require corresponding implementation of the function
blocks RCOM_READ_SLV and RCOM_REC which will react to incoming read or write request telegrams
of the master:
x An instance of function block RCOM_READ_SLV with input ID set to 3 reacts to the read request
projected in the master. The data that will be read from the master is located in word array
arwDataOut[0..13]. Its address is set at input DATA of the function block.
x An instance of function block RCOM_REC with input ID set to 2 reacts to the incoming write request
projected in the master. The data contained in the master’s telegram will be copied to word array
arwDataIn[0..1]. Its address is set at input DATA of the function block.
Both function blocks are called cyclically to ensure proper reaction to the incoming telegrams. In case of
data reception or the completion of a read request the output NEW of the corresponding function block is
set to TRUE (until next call of the function block).

The variable bPutEvent can be set to TRUE to add an event that contains data for the master to the
slave’s event queue with the function block RCOM_TRANSMIT. After the function block is done the
program dials the master to trigger an event poll in case of a successful connection to the master.

Commissioning Example 8 RCOM AC500/Issue: 04.2009


Manual No. 2CDC xxx xxx Xxxxx

abb
ABB STOTZ-KONTAKT GmbH
Eppelheimer Straße 82 Postfach 101680
69123 Heidelberg, Germany 69006 Heidelberg, Germany
Telephone (06221) 701-0
Telefax (06221) 701-240
E-Mail automation-helpline.desto@de.abb.com
Internet http://www.abb.de/stotz-kontakt

You might also like