AS-Interface.
Polexa, Radu ; Moraru, Sorin Aurel ; Grigorescu, Costin Marius 等
1. INTRODUCTION
The Actuator/Sensor Interface or AS-Interface, normally abbreviated
to AS-i, is a connection system for the lowest process level in
automation systems. The cable harnesses previously found at this level
are replaced by a single electrical cable, the AS-i cable. Using the
AS-i cable and the AS-i master, the simplest binary sensors and
actuators can be connected to the control devices at the field level via
AS-i modules.
The AS-interface is distinguished by several main characteristics:
* AS-interface is optimized for connecting binary sensors and
actuators. The AS-i cable is used both for data exchange between the
sensors/actuators (AS-i slaves) and the AS-i master as well as for power
supply to the sensors/actuators.
* Simple and cost-effective wiring: simple installation with the
"penetration" technique, high flexibility with tree-like
wiring.
* Fast reaction times: the AS-i master requires a maximum of 5 ms
for cyclic data exchange with up to 31 nodes.
* Nodes (AS-i slaves) on the AS-i cable can be either
sensors/actuators with an integrated AS-i connector or AS-i modules to
which, up to four conventional binary sensors/actuators can be
connected.
* With standard AS-i modules, up to 124 actuators/sensors can be
operated on the AS-i cable.
* If you use AS-i modules with the extended addressing mode, up to
186 actuators and 248 sensors can be operated with one extended master.
* Extended AS-i masters from SIMATIC NET support extremely simple
access to analog sensors/actuators or modules operating in compliance
with the AS-Interface slave profile.
2. SYSTEM COMPONENTS IN THE AS-I NETWORK
The system components in the AS-i network are: AS-i master; AS-i
slaves, distinguished according to their design as AS-i modules or
sensors/actuators with an integrated AS-i connection; AS-i cable, AS-i
power supply unit, addressing unit; SCOPE for AS-Interface.
The following diagram illustrates how the described components can
be interconnected. The tree structure is particularly clear (Fig. 1.).
[FIGURE 1 OMITTED]
There are two AS-i master categories: standard AS-i master and
extended AS-i master. Standard AS-i master could be: PLC, PCs IBM
compatible, I/O distribute dispositive. Up to 31 standard slaves or
slaves with the extended addressing mode (A slaves only) can be attached
to standard AS-I masters. The extended AS-i masters support 31 addresses
that can be used for standard AS-i slaves with the extended addressing
mode. AS-i slaves with the extended addressing mode can be connected in
pairs (programmed as A or B slaves) to an extended AS-i master and can
use the same address. This increases the number of addressable AS-i
slaves to a maximum of 62. (Margineanu, 2005)
All the nodes that can be addressed by an AS-i master are known as
AS-i slaves. There are two categories of AS-i slaves: AS-i modules--are
AS-i slaves to which up to 4 conventional sensors and up to 4
conventional actuators can be connected; sensors/actuators with an
integrated AS-i connection--can be connected directly to the
AS-Interface.
The AS-I cable, designed as an unshielded two-wire cable, transfers
signals and provides the power supply for the sensors and actuators
connected using AS-I modules. Networking is not restricted to one type
of cable. If necessary, appropriate modules or "T pieces" can
be used to change to a simple two-wire cable.
The AS-I power supply unit supplies power for the AS-i nodes
connected to the AS-i cable. For actuators with particularly high power
requirements, the connection of an additional load power supply may be
necessary (for example using special application modules).
3. AS-I NETWORK PROGRAM CONTROLLED
An AS-i network is fully managed by a specialized communications
processor that plays the role of master. The communications processor is
attached to an special controller that extension is embedded in the
slot.
The communications processor is seen by the special controller like
an set of registers:
* a status register, where to find information about the
functionality of the processor (protected mode or in configuration) and
that it is or not operational. This register is an input register for
the controller;
* a command register, through which is possible to perform commands
to communication processor. This register is an output register for the
controller;
* more input-output memory banks which can be selected by the
command register in or from which it can be possible to retrieve
information for AS-i networks data.
3.1 Using CP242-8 module to access the AS-i network
This module is designed by the Siemens company in order to connect
the controllers from S7-200 class to AS-i network and PROFIBUS. The
place where the status registers and the control registers could be seen
depends on controller which is attached to CP242-8 module. To examine
how it is seen the extension module to S7-200 controllers, it is
necessary to use the special memory bytes from SMB8 to SMB21. These
bytes are organized in pairs: one byte is for the identification
register and the other one is an error register. (Simatic Net, 2006)
The status register is seen as an input register and is located in
the first byte of free entry. The control register is seen as an output
register and is located in the first free byte output.
The communication processor is represented like a series of 16
memory banks for input or output, where it is possible to transfer input
data or output data for slave modules and other response data or
commands. Each input and output memory bank is of length equal to 8
double words. (Simatic Net, 2006)
Accessing the program data from the slave is done by reading or
writing in the memory banks. To do this, it must set the PLC_RUN bit
from the command register and select the 0 memory bank. Data are
available to be read if the CP_READY bit is equal to 1. For each slave
unit in the memory bank are 4 bits reserved. The program for S7-214
controller which is reading the inputs from a slave, which has the
address equal to 2 and transfer them to the QBO outputs from S7-211
controller. The program is running a procedure which reads the
corresponding memory bank and transfer it to the output, only in case
CP_READY=1. (Simatic Net, 2006)
From a program that runs on a controller it can be seen commands to
the CP242-8. There are a lot of commands which can be sent. The most
important ones are the reading and writing of the various parameters and
data, change of addresses, status reading, etc. Each command has a
number of parameters. First the user must specify the number and the
parameters of the command into a buffer. This buffer is located in the
memory bank number 2 and each byte is described in the specific
documentation. (Simatic Net, 2006)
To receive a command the PLC_RUN bit must be set in the control
register from communication processor. Afterwards the answer from
CP242-8 must be expected, and this will set the CP_READY bit in the
status register. Then the ASI_COM bit from control register will be set,
and the takeover response will be made only after the communication
processor will set the AS_RESP in the status register. Depending on the
type of command will find the response to the bank 2 to 5 for the output
memory from the communication module.
I will exemplify one command and the program sequence which should
be run for its success. The chosen command has 1DH code. This command
has no parameters and returns the input data from slave devices and a
diagnostic list for all the slave devices named delta list. The command
structure contains a single byte to be loaded into the byte 0 of bank 2.
This byte shall contain the command code: 1DH. The response takes the
banks 2 and 3 of the buffer and contains in the first byte the command
echo, then the status (if the byte is 0 then the command was executed
without errors, otherwise returns an error code which can be found in
the company documentation). Next in the first part are the slave data
and then, in the second part, a delta list for all the slave devices
(Fig. 2.).
[FIGURE 2 OMITTED]
The program starts with selecting the memory bank 2, for loading
the command code, setting the RUN_PLC bit from the control register and
the ASI_COM bit resetting. If the communication processor is ready
(CP_READY=1) the command code is loading in the memory bank. The command
sending (ASI_COM=1) will be achieved only on the ascending front from AP
input 0. When the communication processor sends the response
(ASI_RESP=1) the procedure which processes the response information is
called. Processing the data in my example is simple and consists in
transferring the data to the controller's outputs. Obviously, the
slave devices address must be known. The main program is presented below
and also the routine.
4. CONCLUSION
AS-i is a monomaster system. This means that there is only one
master in the AS-i network, which controls the exchange of data. The
AS-i master supervises all the AS-i slave one after another and waiting
for a response. AS-I uses constant length messages and a single-speed
for communications (167 kbit/sec). There are no complicated procedures
required for transmission control, messages length identification or
data format. This makes the master to examine all the slave AS-i devices
in maximum 5 ms and update data to AS-i master and to AS-i slave
devices. Into an AS-i network is possible to connect maximum 31 standard
AS-i slave devices.
The main advantages for AS-i interface are:
* all the data communication and power cables in one special cable
* less work and components
* higher safety in functionality.
5. REFERENCES
Margineanu, I. (2005). Use of computer for process control, Course
for automatics engineering, Transilvania University of Brasov, Romania
*** (2006), As-Interface--Introduction and Basic Information,
SIMATIC NET (electronic format)
*** (2008) www.ad.siemens.de/net, Accesed on:2008-02-25
*** (2008) www.as-interface.com, Accesed on:2008-04-22
*** (2009) www.turk.com, Accesed on:2009-03-05