As I Tutorial
As I Tutorial
AS-interface
Simple,
Robust,
Device-Level,
Bus
NOTES:
AS-interface Tutorial
Revision 1.0
Table of Contents
TOPIC
1.
PAGE
AS-interface
1.1. v2.0 and v2.1
1.2. v2.0
4
4
4
1.3. v2.1
Version 2.1 Highlights
2.1. Overview of v2.1
5
5
5
3.
2.2. Up to 62 nodes
2.3. Analog
AS-interface in the Modern Industrial Enterprise
5
5
5
4.
6
6
7
5.
6.
10
10
11
11
11
14
15
17
17
17
17
18
18
18
18
2.
7.
8.
AS-interface
AS-i is an acronym for Actuator Sensor Interface. This may be the most high-tech bus of
the traditional industrial networks. A huge amount of work has gone into its design to
make it the simplest bus to use.
The signal is robust, balanced and has parity redundancy, so cabling is simple. One signal
segment can be laid out anyway; star, tree or bus, without drop limitations. The only
requirement is that all the cabling in a signal segment must be equal to 100 meters or less
in total length. In addition there are no terminating resistors.
The traditional AS-i flat cable is still being used for many applications, but today many
users and OEMs are switching to round cable with M12 connectors. The M12 connector is
an international specification defined by the EN50 044 Standard. The M12 is also known
by names such as euro or micro and is extremely rugged. Some manufacturers have
achieved over 40 pounds (18-kg) pullout ratings. It is truly a heavy-duty IP67 connection
with the copper wires of the cable being soldered or crimped to gold-plated brass pins and
sleeves at the factory.
1.1.
Bus type
Bus topology
Physical distance on a single signal
segment
Physical distance with 2 repeaters
and master in the center
Transmission signal
Speed
Bus power
Attendance check per scan
Error detection
Error correction
Address setting
1.2.
v2.0
Input/Output bits
4/4
Analog capability
v2.1
Input/Output bits
4/3
Analog capability
Yes, defined
124
Version 2.1
Version 2.1 makes the worlds most popular actuator-sensor bus more powerful. More
diagnostics, better analog capability and up to 62 field nodes per drop are available
without the complexity of the higher-level buses. AS-interface is a simple master-to-slave
structure. The master controls all time and network traffic. Protocol is embedded in the
hardware. There are no configuration files to maintain.
2.2.
Up to 62 nodes
In v2.0 all nodes are Single Address Slaves. Version 2.1 specifies Single Address
Slaves and A/B Address Slaves. Single address slaves have a maximum of 4 discrete
input bits and 4 discrete output bits. The address range is 1-31, with 0 being reserved for
new incoming slaves. 0 is the default address set by manufacturers when a slave leaves
the factory. The A/B-Slaves are one of the major changes of v2.1. The address ranges
are 1A-31A and 1B-31B. A maximum of 4 discrete input bits and 3 discrete output bits are
available per A or B nodes. The new AS-i masters from Bihl+Wiedemann can be used
with legacy v2.0 single address slaves, v2.1 single address slaves and v2.1 A/B slaves.
2.3.
Analog
Version 2.0 allowed analog I/O, but it was not completely defined. Version 2.1 defines
analog data. The master polls the analog station multiple times and assembles the
fragmented analog data into complete 16 bit values for delivery to PLCs, Industrial PCs or
host buses. Due to AS-is low overhead analog values are updated as quick as most
applications need.
3.1.
As one OEM claims, I make the same machines over and over again, but differently each
time. What he is saying is that each one of his customers has some slight variation.
The enterprise view [Appendix A] shows the versatility of AS-interface. It is supported by
more PLC manufacturers than any other bus. It can be a sub bus off almost any other
bus. It can be a drop off Industrial PCs and there are Ethernet to AS-interface gateways.
In one way or another AS-interface can be integrated into almost all enterprises. OEMs
can create a baseline machine using AS-interface. Version 2.1 provides the power most
OEMs need. The gateway or host is all that changes from customer to customer. The
benefits are exceedingly significant. The physical machine and the device level control
system can be fine-tuned with standard, semi-standard and customized media and I/O.
Semi-standard and customized products are where the biggest cost savings and
differentiation are achieved from one OEM to another.
3.2.
The versatility of AS-interface shown in the enterprise view along with the simplicity of its
embedded protocol are reasons that AS-interface is popular with manufacturers of I/O
devices for batch and continuous flow processing. Most manufacturers of PLCs and DCSs
used in processing have AS-interface card modules that go into their back plane.
Many manufacturers have embedded AS-interface in their discrete products. More analog
v2.1 AS-interface products will come in the future. Some popular AS-interface embedded
products are:
Load Feeders
Masters
Analog Modules
Other Actuators
Cables
Other Sensors
Capacitive Sensors
Output Modules
Chips
Photoelectric Sensors
Pneumatic Actuators
Pneumatic Modules
Electric Actuators
Repeaters
Extenders
Gateways
Services
Hydraulic Actuators
Software
Inductive Sensors
Special Products
Ultrasonic Sensors
Input Modules
What stands out about AS-interface is the number of products that have AS-i embedded
into the input or output device.
Response time
The discrete response time is pretty easy. A network of 31 nodes and 1 master can do a
complete read-write in 5 msec. The actual time per discrete node to use is 0.165 msec.
The proposed network of 28 nodes will be 4.62 msec, but only for the discrete I/O. The 4
channel analog node will actually take a little less than 130 msec.
The analog value is actually sent to the master in fragments requiring 7 scans per analog
channel. Since there are 4 analog channels the node will require 28 scans at 4.62 msec
for a complete read. That is, 28 x 4.62 msec = 139.36 msec.
The 2-channel analog out will be exactly half of that, or 64.68 msec. In reality the analog
out will be updated twice as often as the analog in.
In many applications 140 msec is fast. Compared to process buses and older serial
communications based on RS-232C or D and proprietary RS-485 that measured level or
temperature, this speed is indeed sufficient. However, it is not fast enough for web control
or some of the other motion applications.
One way to improve the speed, although it still may not be fast enough for motion control,
is to break the 4 analog channels in into 2 nodes of 2 channels. This will add another node
for a total of 29, but will improve the analog speed. Following are the calculations:
29 nodes x 0.165 msec = 4.78 msec/scan (read-write response time for all discrete)
7 scans/analog channel x 2 analog channels/node x 4.78 msec/scan = 70.0 msec
response time per node (rounded per scientific notation).
Since the channels are updated sequentially, rather than concurrently, this is also the
response time per analog channel.
20
A
10
11
1
2
13
1
4
15
16A
17A
18A
19A
21A
22A
30A
31A
16B
17B
18B
22B
30B
31B
Figure 1
AS-interface does not require any correlation between the physical location and the logical
address, but for this example we will create a linear bus topology with consecutive
addressing.
There are five types of AS-interface nodes from an addressing standpoint:
Version 2.0 and 2.1 address 0 for incoming nodes
Version 2.0 single slaves address range 1-31 (shown in Figure 1 as addresses 1-7)
Version 2.1 single slaves address range 1-31 (shown in Figure 1 as addresses 8-15)
Version 2.1 A slaves address range 1A-31A (shown in Figure 1 as addresses 16A-31A)
Version 2.1 B slaves address range 1B-31B (shown in Figure 1 as addresses 16B-31B)
Single slaves, either v2.0 or v2.1, and A/B slaves can be mixed as long as the master is
v2.1 compliant.
The v2.1 A/B slaves are subdivided into A and B. Single slave nodes cannot have v2.1
addresses. There cannot be a single slave node address 8 and an 8A or 8B.
It is not necessary to have complementary A and B v2.1 integer addresses. There may
be a 19B, but no 19A.
Figure 1 shows the natural scan sequence and mapping of single and A/B slaves. A v2.1
master will scan all addresses in two cycles, first the A addresses, then the B addresses.
6.1.
Layout
10
6.2.
Repeaters
Although the signal degrades in 100 meters, the timing allowed by AS-interface approved
masters allows for two repeaters. Essentially the repeater re-manufactures the signal. The
strength and shape are brought back to the original condition so the signal can travel
another 100 meters. Figure 2 shows two topologies if we take AS-interface to the limits
with repeaters.
Repeater
100
meters
Repeater
100
meters
Repeater
Tee
100
meters
Repeater
100
meters
Repeater
100
meters
100
meters
100
meters
100
meters
Repeater
Figure 2
The topology in the upper diagram would permit a total network length of 300 meters from
the PLC host or any host to the far end.
The lower diagram, with the host anywhere in the center signal segment, allows for 500
meters end-to-end. This layout is still based upon time. If the host and the last station on
the upper leg are communicating, the rules are satisfied because there are only two
repeaters between them and no signal segment is looped or longer than 100 meters.
6.3.
Physical Media
Before talking about the power budget we need to look at the physical media. The power
budget is based upon Ohms Law with current, voltage and resistance being functions of
one another. The physical media specifies the copper cross sectional size of the wire, and
therefore a resistance.
AS-interface is available in both flat cable with IDC (Insulation Displacement Cable)
connectors or round cable with industry standard M12 EN50 044 connectors. [Refer to
Figure 3]
11
10
2.5
1.5
4
3.6
6.5
2 x 1.5mm2
2 x 18AWG
2 x 16 AWG
4
Male
Female
1+(BN)
AS2
3-(BL)
AS-interface
AS-interface wire is specified in international terminology using the cross section of the
wire. It is 1.5mm2. This is equivalent to 18 AWG (American Wire Gauge). Both have a DC
resistance of ~ 4.1 /thousand feet. InterlinkBT offers a 16 AWG cable primarily for the
North American markets. Resistance and distance are the same all over the planet. The
distance may be in different units but there is a conversion constant somewhere. The
problem is not in the physics but the interpretation of the physics.
Most countries, or consortia of countries, have electric usage standards, material
standards for the jacket and conductor insulation and approval standards. A cable
approved in one country may be perfectly suited for the standards of another country, but
unless it has appropriate approvals most electrical inspectors will red-tag it. Codes
require recognized third party approval on most electrical equipment. If the third party
approval agency is not recognized an inspector has very little choice but to disallow it.
Therefore, although it may be a true AS-interface certified cable, it still needs the
appropriate approvals and must be installed in a manner consistent with jurisdictional
codes in the country in which it will be used.
Several European cable suppliers list their cable as suitable for 16 amps. The maximum
allowable ampacity per table 400-5a of the National Electric Code in the U.S. for 2conductor 18 AWG flexible cord is 10 amps. Also, in almost every AS-interface system
there are branches via M12 connectors to sensors or actuators. The maximum ampacity
of the M12 pins is 4 amps. Therefore the entire signal segment must be based upon a 4
amp maximum.
12
Food grade
non conductive
silicon caulk
13
Both data and power are supplied on the two-wire cable. The DC power carries the ASinterface signal. The AS-interface signal and the voltage regulating circuitry of the power
supply do not get along and must be separated. The theory of filtering designated
frequencies is as old as radio, but there is still some art in the sizing and layout of the
components. Filtering is also called decoupling. [Refer to Figure 4]
Primary
Power
Terminals
Power
Supply
L
R
L
AS-interface +
AS-interface -
R=39, L=50H
Optional Shield
Figure 4
Different than most industrial buses, the AS-interface negative (-) cannot be grounded.
This is because the 2 wires carry both the power and the signal. Grounding the signal
lines would result in poor communication, if not completely lost communication.
Typical AS-interface media is not shielded. If an application does arise where shielding is
required then the shield would be grounded in only one place, as shown in Figure 4.
AS-interface power supplies with integrated signal decoupling are available from 2 to 8
amps. Many gateways also come with the decoupling circuitry so that standard 24VDC
power supplies can be used.
The original AS-interface power supply provided voltages in the 30VDC range. The actual
specification was 29.5 to 31.6 volts DC. The reason for being higher than the industry
standard nominal 24VDC was to compensate for the voltage drop on the line as well as
the drop through the AS-interface IC chip. The goal was to be able to supply the end
device with 24VDC (+10%/-15%).
The original intentions were good, but none of the other industrial buses went this route.
They all stayed with 24VDC nominal power sources. Although the voltage drop through
the AS-interface IC can be as high as 3 volts, nodes on other buses also have 1-2 volt
drops through protective devices.
One of the more economical ways to use AS-interface is to use 16 AWG cable, a standard
24VDC power supply and a master with a built-in decoupler. The 16 AWG cable handles
the voltage drop better and standard 24VDC power supplies are price competitive.
6.5.
Auxiliary Power
Most bus systems today have auxiliary power for outputs. Often outputs need to be
killed, as in the case of machine stop or emergency stops. The most reliable way to do
14
2.5 1.5
3.6
6.5
2
2 x 1.5mm
2 x 18AWG
2 x 16AWG
Female M12
1 + Aux.
Power
2 (N.C.)
3 - Aux.
Power
Figure 5
The same cabling solution for bus power has been adapted for auxiliary power, except the
jacket is black. [Refer to Figure 5] The pinning convention is the same for the round M12
connection. A second solution is also available which consists of a four-wire round cable
with auxiliary power and data in the same cable. Standard pinning for the AS-interface
round cable is used, and unconnected pins are used for the auxiliary power connection.
6.6.
Power Budget
This topic could also be titled Voltage Drop. Arriving at the current requirements is
straightforward. It is simply an addition of the connected loads.
The best way to calculate the voltage is a Nodal Analysis. This type of analysis involves
summing the current at each slave. This could include connected loads such as sensors
and the internal load of the node itself. Then sum the currents from the slaves at up
stream junctions and tees. [Refer to Figure 6]
Next the resistance between the slaves and junction points and other junction points must
be found. Resistance for the cable is usually given per 1000 ft or 1000 meters. The
resistance for the segment is found by multiplying the distance times the resistance per
1000 units. [Refer to Figure 6]
15
10 m - 0.014
Tee
170mA + 60mA =
230 mA
4 Sensors
Total load
+ Internal load
130 mA
20 m - 0.027
Tee
130mA + 40mA =
170 mA
20 m - 0.027
Valve
Position
Indicator
load
40 mA
Open
Closed
30 m - 0.041
Operator
Station
Pushbutton
and Pilot
Lights
60ma
Figure 6
Tee
170 mA
23.988V
Open
23.991V
Figure 7
16
4 Sensors
Total load
+ Internal load
130 mA
Closed
Valve
Position
Indicator
load
40 mA
Operator
Station
Pushbutton
and Pilot
Lights
60ma
7. Troubleshooting AS-interface
You sometimes hear that AS-interface is difficult to troubleshoot. The reality is that it is,
isnt and might be. It really depends on the problem and to which bus AS-interface is
being compared.
7.1.
Open media
AS-interface is one of the easiest buses to troubleshoot if the media is open. Nodes
before the open will report while nodes after the open will not. This is not the case with
physical ring buses (unless the ring bus has undamaged redundant media) or if the nodes
after the open are smart enough to start an error message following a time-out.
AS-interface is also better than buses that use terminating resistors. Without one end
being terminated, as in the case of an open, communication is not assured with nodes upsteam of the open. Sometimes you are lucky and sometimes not.
7.2.
Since AS-interface has data and power on the same wire pair, when they are shorted the
entire segment goes down. One way to troubleshoot this problem with AS-interface, or
any other bus that uses copper media for that matter, is to go about half way down the
segment and open the media. If the up-stream side comes to life, then the short is down
stream, if not, it is up-stream. To put it simply, divide and conquer.
Short circuits can be more of a problem with AS-interface than other networks because of
the IDC cable. Once you open the flat cable media you need to repair it. This is one of the
reasons many people are going to the M12 connectorized solution.
7.3.
Troubleshooting shorted power for AS-interface is the same as troubleshooting for shorted
data because power and data are on the same pair.
This is almost identical to CANbus based networks because the power pair provides the
current and voltage to the transceivers. Once power is down, the network is also down.
Again, divide and conquer is the most common method to locate the short.
17
This is basically the same as a shorted data pair. The transceiver is actually integrated
into the AS-interface chip.
7.5.
This is fairly easy to troubleshoot because the rest of the network will be live and only the
node with the open electronics will fail to report when polled.
7.6.
The specific varieties of transceiver transmission malfunctions are nearly endless, but it
does come down two troubleshooting scenarios:
The transceiver sticks On and brings down communications for the whole segment.
We can sometimes get help from the communication LEDs on a node and sometimes
not. Another divide and conquer scenario.
The transceiver trash talks. This is not a very scientific term but is very descriptive. It
can be a bad oscillator resulting in bad timing or something else, but in some way it is
talking a foreign language in a room where no one else understands. When this
happens, the node is not understood by the master and, therefore, absent.
8. Summary
AS-interface does not have the glory of Ethernet or the sophistication of DeviceNet, or the
speed of ProfibusDP, but it gets the job done for many applications and for less money.
AS-interface is supported by most PLC manufacturers and DCS manufactures, and there
is a card available for virtually every PC. It may not be every plants primary industrial
network but should be at least considered as a first alternate.
18
DeviceNet
ProfibusDP
Unmanaged
Ethernet
Switch
Process/
Control/
Automation/
Engineering
PLC Control
Profibus, DeviceNet,
CANOpen, Modbus,
Modbus Plus, Interbus,
Foundation Fieldbus
AS-interface
AS-i
ProfibusPA
Manufacturing/Process Work
Ethernet
Ethern
Bar
Code
Reader
Backbone switch
Ethernet
OPC
Control Client-Server
PLC
Manual
Assembly
Host
Cell
Leve
Camera
OPC
OPC
Severs
Severs
ID, Quantity, ID,Quantity,
Condition
Condition
e.g.
e.g.
weigh scale level, count
Printer
Scal
e
Switch
Layer 3
To
Office,
Shipping
&
Gateway
Industrial PC Control
Profibus,DeviceNet,
CANOpen,Modbus,
Modbus Plus,Interbus,
Foundation Fieldbus
Connectorize
Wiring
Exposed
IP 67
Enclosed
Cabinet
Wiring
Connectorize
Wiring
Manufacturing/Process Work
Manufacturing
Subnets
IT Administrator
Servers Farm or
SAN (Server Area
Enterprise Router
or Internet Router
Appendix A
AS-interface Tutorial
In the Americas
InterlinkBT, LLC
3000 Campus Drive
Plymouth, Minnesota 55441, USA
Phone: (01) (763) 694-2300
Fax: (01) (763) 694-2399
Engineering Support: 1-888-546-5880
Email: [email protected]
URL: www.interlinkbt.com