AS-interface System Guide
AS-interface is the Acronym for Actuator Sensor Interface, often referred to as AS-i. 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 for end users to install and maintain.
With AS-i, the signal is robust, balanced and has parity redundancy, so cabling is simple. One signal segment can be laid out any way: star, tree or bus, without drop limitations. The only requirement is that total length of all the cabling in a signal segment must be less than or equal to 100 meters. In addition, there are no terminating resistors.
AS-i was originally designed around the concept of a flat cable, with connections made via insulation displacement technology. 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 EN50044 standard. The M12 is also know by names such as “euro” or “micro”, and is extremely rugged. Some manufacturers have achieved over 40 pound (18-kg) pullout ratings. The cable provides IP 67 rating, if the copper wires of the M12 cable are soldered or crimped to gold-plated brass pins and sleeves at the factory.
AS-interface in the Modern Industrial Enterprise
A two level network structure is becoming the model for many manufacturers that are trying to tie their ERP systems to the factory or process floor. This is replacing the three level structure that had an information level, a controller level and a device level.
In a two level network structure, the information and controller levels are collapsed into one. In most applications, the device level does not change. Tying the ERP system to production is the motive behind the change. A truer and more realtime view of production is possible if the ERP system can get down to the controllers that carry out production. In many industries, content data logging, as well as other recorded quality tests, must be documented and archived for years to guard against frivolous litigation.
There are many technologies behind the two network levels (Refer to Appendix A). The most crucial are the Layer 3 Ethernet Switches and the venerable RFC2323, better known as IP (Internet Protocol). Layer 3 switches combine the features of a router and a Layer 2 managed switch. This allows the building of networks with defined subnets. AS-i operates at the device level, along with many other buses, such as DeviceNet, ControlNet, PROFIBUS (DP, PA, FMS), FOUNDATION fieldbus, Interbus, CANopen, CC-Link, Modbus and Modbus Plus.
AS-interface for OEMs
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-i. 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-i gateways.
In one way or another, AS-i can be integrated into almost all enterprises. OEMs can create a baseline machine using AS-i. AS-i software version 3.0 provides the power most OEMs need. The gateway or host is all that changes from customer to customer, therefore 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.
AS-interface for Batch and Continuous Flow Processing
AS-i is popular with manufacturers of I/O devices for batch and continuous flow processing, because of its versatility and embedded protocol. Most manufacturers of PLC’s and DCS’ used in processing have AS-i card modules that go into their back plane.
Many manufacturers have embedded AS-i in their discrete products including:
• Quarter-turn valves (pneumatic and electrical actuation)
• Quarter-turn valve indicators
• Indicating lights and light towers
• Sensors (inductive, capacitive and photoelectric)
• Motor control (combination contractor coil and overload device)
The AS-i vendor organization website has a very good product-manufacturer search engine, with product categories including:
• Addressing and Diagnostics Units
• Analog Modules
• Capacitive Sensors
• Command, Signaling & Monitoring Units
• Coupling Modules/Mounting Plates
• Earth Fault Monitoring Systems
• Electric Actuators
• Hydraulic Actuators
• Inductive Actuators
• Input/Output Modules
• Input Modules
• Load Feeders
• Other Actuators
• Other Sensors
• Output Modules
• Photoelectric Sensors
• Pneumatic Actuators
• Pneumatic Modules
• Power Supply Units
• Safety at Work Products
• Special Products
• Ultrasonic Sensors
• Valve Position Indicators
AS-i Safety At Work
AS-i supports a machine safety system, where safety contact devices communicate via the network. It is a simple scheme, where a safety monitor (replacing a traditional safety relay) listens to communication on the network, specifically monitoring messages relating to the defined “safety slaves”. These safety slaves send a “rolling code” in a predetermined sequence as long as their contacts are closed. If they experience any fault, the code is interrupted and the safety monitor shuts off the power. This system gives the user the capability to simply wire their safety system in conjunction with their control bus.
AS-i all versions (v2.0, v2.1, v3.0)
Bus Type: Master-to-slave, single master
Bus Topology: Free form, unrestricted branching
Maximum Physical Distance on a Signal Segment: 100 meters
Physical Distance w/ 2 Repeaters and Master in the Center: 500 meters
Transmission Signal: Alternate Pulse Modulation with Manchester II bit encoding impressed upon 30 VDC bus power carrier
Speed: 167.5 kbps, 5 msec to read/write 31, v2.0 discrete nodes, 10 msec to read/write 62 v2.1, v3.0 discrete nodes
Bus Power: 8 Amps using the same 2 wires as the data signal
Attendance Check Per Scan: Yes, an attendance list is programmed in the master and checked each scan
Error Detection: Yes, single parity bit check and bit repetition
Error Correction: Yes, master will poll the node again if it doesn’t understand. If the node doesn’t understand the master it won’t respond, then the master will poll the node again after a time-out.
Address Setting: Off line via a hand held programmer or on-line via the master. Masters are
capable of automatically addressing swap-out nodes during replacement.
capable of automatically addressing swap-out nodes during replacement.
AS-i version 2.0
Total Number of Nodes: 31 slaves and 1 master
Input/Output Bits: 4/4 (per node)
Analog Capability: Yes, but not standardized
Total Discrete Input/Output Points per Network: 124 In/124 Out
AS-i version 2.1
Total Number of Nodes: Up to 62 slaves and 1 master
Input/Output Bits: 4/3 per node (using dual addresses) 4/4 per node (using single addresses)
Analog Capability: Yes, Defined in slave profiles
Total Discrete Input/Output Points per Network: 248 In/186 Out
Maximum Number of Analog Points per Network: 124
AS-interface v2.1 Highlights
Version 2.1 (v2.1) makes the world’s 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. With AS-i, the master controls all time and network traffic, protocol is embedded in the hardware, and there are no configuration files to maintain.
Up to 62 Nodes
In v2.0, all nodes are single address slaves. V2.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 reserved for new incoming slaves. The A/B slaves allow the address range from 1A-31A and 1B-31B. A maximum of 4 discrete input bits and 3 discrete output bits are available per “A” or “B” node. The new AS-i masters from Bihl+Wiedemann supports all versions of slave addressing.
V2.0 allows analog I/O, but it is not completely defined, whereas v2.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-i’s low overhead, analog values are updated as quickly as most applications need.
AS-i version 3.0
Version 3.0 (v3.0) has additional capabilities for analog and serial I/O. This is accomplished by using more than one address for each slave, or by using fragmented data to transfer portions of the whole message for a given slave on a given cycle. High speed analog data is also defined using a scheme where a slave could consume multiple addresses, allowing a full word to be transmitted in one scan cycle.
AS-i Analog Response Time
The original AS-i consortium was composed of mostly discrete I/O manufacturers. Among them were IFM, TURCK, P&F and FESTO. Analog was not a major priority, and discrete favored decisions were made. With v2.1 and v3.0, analog capabilities are very real, but generally the read/write response time of analog is not as fast as discrete only AS-i nodes. This is true particularly with the popular v2.1 analog solution. V3.0 solves this problem by using multiple addresses for a single channel of analog data. In some cases having available addresses can be important, requiring analog data to be fragmented using the v2.1 scheme.
To illustrate the timing of fragmented analog I/O data, we will look at a real application:
A user installed a v2.0 network several years ago, which is working fine. The network has 24 discrete nodes and is running faster than the PLC. Two more discrete nodes need to be added, (the same as the other 24 nodes), plus 4 channels of analog in and 2 out. The user found the analog I/O nodes he wants - one 4 channel in and another 2 channel out, so the total number of nodes on the new upgraded system would be 28. The questions are:
• What will be the response time for the discrete and the analog?
• Does the master need to be changed?
• Is there a better solution?
• Does the master need to be changed?
• Is there a better solution?
For a discrete response time, a network of 31 nodes and 1 master can perform a complete read/write in 5 ms. The actual time for a transaction with one node is 0.150 ms. The AS-i cycle time can be calculated as:
(# of nodes + 2) * 0.150 ms
The addition of 2 to the number of nodes accounts for system maintenance time taken by the master on each cycle. The cycle time for the proposed network of 28 nodes will be 4.5 ms. This is the time it takes the master to send/receive data one time for each node on the system. The analog data fragmentation, though, requires seven cycles for the entire word of data to be updated (only a portion can be sent on each transaction, since AS-i only allows four bits per message).
Furthermore, these seven cycles only update one channel. For the 4 channel analog node seven cycles are required for each channel, for a total of 28 cycles in all. The update time for all data on this node is actually:
28 * 4.5 ms = 126 ms
The 2-channel analog out will be exactly half of that (since half the number of channels must be updated), or 63 ms.
In many applications, this is more than fast enough. 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 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.
29 nodes x 0.150 ms = 4.65 ms/scan (read/write cycle)
7 scans/analog channel x 2 analog channels/node x 4.78 ms/scan = 65.1ms response time per analog node.
Since the channels are updated sequentially, rather than concurrently, this is also the response time per analog channel.
Mixing Legacy v2.0 and v2.1 Nodes
AS-i 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-i nodes from an addressing standpoint:
• Version 2.0 and 2.1 address “0” (reserved for commissioning)
• Version 2.0 single slaves address range 1-31 (shown in Figure 1 as addresses 1-7)
• Version 2.1/3.0 single slaves address range 1-31 (shown in Figure 1 as addresses 8-15)
• Version 2.1/3.0 A slaves address range 1A-31A (shown in Figure 1 as addresses 16A-31A)
• Version 2.1/3.0 B slaves address range 1B-31B (shown in Figure 1 as addresses 16B-31B)
Single slaves, either v2.0 or v2.1/3.0, and A/B slaves can be mixed as long as the master is at least v2.1 compliant.
The v2.1/3.0 A/B slaves are subdivided into “A” and “B”. Each of the A and B addresses is considered to be a “half address”, with each using a portion of the numerical part of the address. 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/3.0 numerical addresses. There may be a “19B”, but no “19A”.
Figure 1 (page 7) shows the natural scan sequence and mapping of single and A/B slaves. A v2.1/3.0 master will scan all addresses in two cycles, first the A addresses, then the B addresses. Since a v2.0 legacy slave technically occupies both A and B addresses for its numeric address, it will be scanned on both cycles and its scan rate will be twice as fast.
It is not necessary to have the single, or “whole”, addresses at the beginning as shown in Figure 1 (page 7). The addresses of v2.0 nodes can all be at the end or randomly anywhere from 1-31. The beauty of this is that an existing legacy v2.0 system that has unused addresses can be easily upgraded and expanded to a v2.1 or v3.0 system without changing the mapping of the original v2.0 nodes.
AS-i Layout, Power Budget and Physical Media
Since AS-i is so easy to use, we sometimes forget there are rules. The same power budget rules derived from Ohm’s law exist for AS-i. It is a part of life for anyone that deals with electrical or electronic applications.
The first step in planning any industrial network is to obtain a drawing or make a sketch showing the I/O. The location of the I/O is the most inflexible parameter of any system.
The next step is sizing. In dense I/O systems, such as in the semiconductor industry, sizing is a function of the data capacity of the network. You may need two or more networks to accommodate the I/O and never come close to the physical limits of a particular bus. On the other hand, in a power plant you may need to use two or more networks to encompass the geographical I/O and never come close to the data capacity of the network.
So far in this tutorial we have only looked at the data capacity of AS-i. Simply put, that is the number of permitted nodes, the input-output bits per node and analog nodes. We will now look at the physical limits of AS-i.
AS-i is restricted to 100 meters per signal segment. In AS-i, a signal segment is the distance the sine
signal wave can travel on an AS-i specified cable before the strength of the signal is no longer reliable. The capacitance, inductance and resistance of the wire decrease the amplitude and distort the shape of the original signal.
The layout of an AS-i signal segment is completely free form except for two rules:
• The total distance of the bus cable cannot exceed 100 meters
• The bus cable cannot be laid out with closed loops
This means that the bus may be a straight line (daisy chain), straight line with drops or a star. There cannot be any topology rings. AS-i is not designed to have the signal go around in a circle.
Although the signal degrades in 100 meters, the timing requirements of AS-i allow for up to two repeaters between the master and any slave. 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-i to the limits with repeaters.
The topology in Figure 2 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.
Before looking at the power budget, we need to look at the physical media. The power budget is based upon Ohm’s 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-i 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, page 10).
AS-i wire is specified in international terminology using the cross section of the wire. It is 1.5 mm2. This is equivalent to 16 AWG (American Wire Gauge). Both have a DC resistance of ~4.1 Ohms/thousand feet.
Most countries, or consortia of countries, have electric usage standards, material standard 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-i 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 cables (table 400-5a) as suitable for 16 Amps. The maximum allowable current per the National Electric Code in the U.S. for 2 conductor 16 AWG flexible cord is 13 Amps. Also, in many AS-i systems there are branches via M12 connectors to sensors or actuators. The maximum current on the M12 pins is 4 Amps. Therefore, the entire signal segment must be based upon a 4 Amp maximum. If larger connectors (i.e.7/8 16 UN minifast) are used, the maximum allowable current increases (minifast allows up to 9 Amps). But the limiting factor is always the lesser of the cable rating and the connector rating.
The question then is: What is the value of the 1.5 mm2 or 16 AWG when it can only conduct 4 Amps? The real value is in reducing the voltage drop over the entire signal segment. The larger the cable, the less voltage drop problems will arise.
Before leaving the discussion on media, we must consider the mechanical merits of the two types of cable. The flat cable and connector that penetrates the insulation are usually rated IP 67. This rating allows for submersion in water of 1 meter depth for 30 minutes measuring the resistance change between conductors. We also typically see an IP 65 rating on the flat cable if the IDC connection is removed. IP 65 is a spray test. The cable jacket is made of rubber or a synthetic rubber blend compound. Once the teeth have been removed the rubber closes to a large degree.
One problem with the IP test in mirroring real life applications is that the water used can be quite pure. Pure water is fairly non-conductive. It is not until bases, acids or salts are dissolved in the water that the water solution becomes conductive. In North America the NEMA 4X test is used to come closer to real life. NEMA 4X is a water-salt solution spray test. Although this test simulates real life better, it still does not take into account temperature changes.
At TURCK we use an unofficial in-house “dishwasher test”. It is the closest thing we have found to simulate real life in many food applications. We set the wash on “hot”, the rinse on “cold”, and use bases and/or salts as the wash soap. The surging spray and splashing in the dishwasher causes anything flexible to wiggle and after 8 hours, if the water solution can defeat seals and gaskets, it will.
The typical flat IP 67 connection will probably not survive an hour in the dishwasher before the resistance drops to an unacceptable level. The problem is in the geometry of the cable. Flat things and round things can be sealed effectively - just think about all the gaskets and seals in an automobile. However, the AS-i flat cable just has too many angles. If effective compression is made on one surface there is a tendency for adjacent surfaces to buckle, allowing a path for the water solutions to enter.
The M12 connector should be considered in demanding applications, such as food processing. If this is not an option, or if the flat cable has already been installed and is causing a problem, a possible fix is using a non-conductive food grade silicone caulk sealant.
Power and Grounding
Both data and power are supplied on the 2-wire cable. The DC power carries the AS-i signal, so the signal and the voltage regulating circuitry of the power supply must be separated. This is accomplished through the use of a signal filter, placed between the power supply and the AS-i connection. This filter (or “decoupler”) is incorporated into many available power supplies. These supplies are designed for use in AS-i systems and are commonly referred to as “AS-i power supplies”. Refer to Figure 4.
Different than most industrial buses, the AS-i negative (-) cannot be grounded. This is because the two wires carry both the power and the signal. Grounding the signal lines would result in poor communication, if not completely lost communication.
Typical AS-i 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-i power supplies with integrated signal decoupling are available from 2 to 8 Amps. Many gateways, or AS-i masters, also come with the decoupling circuitry so that standard 24 or 30 VDC power supplies can be used. Stand-alone decouplers (or “power extenders”) are also available.
Most bus systems 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 this is to disconnect the output power completely. Another advantage of separating the output power is isolating the line noise caused by inductive devices, such as solenoids and contactors, from the bus power.
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 that consists of a 4-wire round cable with auxiliary power and data in the same cable. Standard pinning for AS-i round cable is used, and unconnected pins are used for the auxiliary power connection.
Power Budget/Voltage Drop
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 upstream junctions and tees (refer to Figure 6, page 13).
Next, the resistance between the slaves junction points and other junction points must be found. Resistance for the cable is usually given per 1,000 feet or 1,000 meters. The resistance for the segment is found by multiplying the distance by the resistance per 1,000 units (refer to Figure 6, page 13).
Ohm’s Law is then used to find the voltage drop of the segments. Starting at the power source and point of entry to the network, the voltage drop through all junctions and through to the slave is computed (refer to Figure 7, page 13).
Assuming a 24 VDC source, the voltages at the slaves in Figure 7 are 23.988, 23.991 and 23.992 top to bottom respectively. Even with a 3 Volt drop across the AS-i chip, we still have over 20 Volts for any connected device.
For most systems, it is not necessary to go through the Nodal Analysis, but with a fully loaded 62 node system it is possible to run out of power. When the voltage drop is too great for the connected devices, either the network must be broken down into two signal segments connected by a repeater, the voltage at the power supply must be increased (but not above 31.6 V), or the wire’s size (of the cable) must be increased.
Current Summation, Distance & Resistance
Segment Voltage Drops, Voltage Drop Summations
AS-i is one of the easiest buses to troubleshoot if the media is open (broken wire). 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-i 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 up-stream of the open.
Newer AS-i masters, as well as some available diagnostic tools, incorporate error counters that will give a good indication if a slave is missing master calls, or not responding properly.
Shorted Data Lines
Since AS-i 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-i, or any other bus that uses copper media, 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 downstream, if not, it is upstream.
Short-circuits can be more of a problem with AS-i 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 M12 connectorized media.
Shorted Power Lines
Troubleshooting shorted power for AS-i is the same as troubleshooting for shorted data, because power and data are on the same pair.
Shorted Transceiver or Shorted Transceiver Power Regulator
This is basically the same as a shorted data pair. The transceiver is actually integrated into the AS-i chip.
Open Transceiver or Open Transceiver Power Regulator
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.
Other Transceiver Malfunctions
The specific varieties of transceiver transmission malfunctions are nearly endless, but it does come down to 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.
• 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 ways 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.
AS-i does not have the glory of Ethernet, or the sophistication of DeviceNet, or the speed of PROFIBUS, but it gets the job done for many applications and for less money. AS-i is supported by most PLC manufacturers and DCS manufacturers, and there is a card available for virtually every PC. It is very useful as a control communication system for small, fast machinery. And while it may not always be the best choice as a primary control bus in large systems, it is very popular as a complementary bus, due to its efficiency in handling discrete I/O in a fast and easy to use manner.