You are on page 1of 18

21/10/13

SMAR - Tutorial on the AS-i Technology


Home About SMAR Contact Us Site Map

Select the language:

Search...

Go

WHO WE ARE

SYSTEM302

SUPPORT

TECHNICAL ARTICLE :: by function

NEWS

TRAINING

INDUSTRY SOLUTIONS :: by name

AWARDS/RECOGNITION

Find your Product:

:: by technology

Tutorial on the AS-i Technology


1. Introduction 2. AS-i Associations 3. Benefits 4. Versions and Specifications 5. Characteristics 6. Connectivity 7. The Actuator Sensor Interface system 8. Safety at Work 9. AS-i Lim itations 10. Standards and Regulations 11. References

1. Introduction
In 1990, in Germany, a consortium of successful companies created a bus system for netw orking sensors and actuators called Actuator Sensor Interface ( ASInterface or in short AS-i). This system w as meant to meet some requirements based on the experience of their ow n founding members and to supply the market w hose hierarchy is bitoriented. Hence, the AS-i netw ork w as conceived to complement the other existing systems and to simplify and speed up the connection betw een sensors and actuators and their controllers.

Figure 1.1: Technological Scenario Source: ATADE, F.H. (2004) Back to Top

2. AS-i Associations
The AS-International Association w as founded in 1991 as a user group for manufacturers and users of the AS-Interface system, w hose objective is turn the AS-i into a w orld standard for the bit-oriented field of industrial automation pertaining to the Sensor Bus category. The AS-Interface UK Expert Alliance supports and promotes the technology in UK. The group provides to its members the latest market and technology information, including support to technical information, product certification, activities, courses, exhibitions and other events. Further details on http://w w w .as-interface.net or http://w w w .as-interface.com.

www.smar.com/en/asi.asp#a

1/18

21/10/13

SMAR - Tutorial on the AS-i Technology


exhibitions and other events. Further details on http://w w w .as-interface.net or http://w w w .as-interface.com. In 1999 the AS-i netw ork w as regulated by the EN 50295/IEC 62026-2 standard. The associations AS-International Association or AS-Interface UK Expert Alliance are open to new members interested in developing certified products. Back to Top

3. Benefits
An industrial system formed by AS-i netw orks is considered to be the most economical and ideal for communication betw een actuators and sensors. The benefits for using an AS-i netw ork range from hardw are savings to the commissioning of an AS-i netw ork itself. Figure 3.1 illustrates some factors that should be considered w hen choosing an industrial netw ork and each particular benefit w hen using AS-i netw orks.

Figure 3.1: Criteria for choosing the industrial network Source: AS-International Association (2008)

Under this approach, the benefits may be summarized as follow s: Sim plicity An AS-i netw ork is very simple and needs only one cable to connect the input and output modules from any manufacturer. AS-i users do not need deep know ledge of industrial systems or communication protocols. Unlike other digital netw orks, the AS-i netw ork does not need terminators or equipment description files. Simplicity is its strong point.

Perform ance AS-i systems are efficient and very fast, making them able to replace large and high-costs systems. There are AS-i masters specially designed to communicate w ith legacy control systems and provide a smooth integration of existing technologies. Best of all is that this is accomplished in a simple and reliable w ay.

Flexibility Expansibility is very easy to get just connect a module, address it and then connect the netw ork cable. Check if the pow er supply LED is connected and the connection to the next module is enabled. The AS-i netw ork supports any cabling technology: star, bus, tree, ring or other configuration up to 100 m of cable. Or else, by adding repeaters it is possible to expand the system up to 300 m. The AS-i netw ork is easy to install, since it needs no terminators at the ends.

Cost AS-i netw orks typically reduce cabling and installation costs by 50% in comparison to other conventional netw orks (Figure 3.2). The use of a single cable for connection to discrete devices reduces the need for cabinets, conduits and trays. The savings obtained in the netw ork are really significant, since using few cables brings dow n installation and commissioning costs and engineering time.

www.smar.com/en/asi.asp#a

2/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 3.2: a) Conventional systems; b) AS-i network. Source: Stonel Corporation

Cost savings w ith hardw are and the AS-i netw ork viability for especial applications are show n in Figure 3.3.

Figure 3.3: AS-i system economic viability Source: AS-international Association (2008) Back to Top

4. Versions and Specifications


Original Specification (1994, Version 2.04) In the early netw orks, the slave modules interlinking the final elements enabled the connection of four digital inputs and four digital outputs, resulting in a total of 124 inputs and 124 outputs on a single netw ork (AS-i 2.0 or AS-i 1 specs). How ever, that architecture had only a maximum 31 slaves. Its main features w ere related to the automatic substitution of a netw ork module and the update time w as easily calculated by multiplying the number of I/O nodes w ith the deterministic update time for each node (approximately 150 microseconds). This simplified calculation does not include the Management Phase w hich is negligible for typical installations.

Enhancem ents (1998, Version 2.11) Follow ing its introduction the users quickly adopted the technology, driving the demand for additional functionalities and features. As a consequence, these demands w ere addressed w ith certain specification enhancements and the specification for the AS-i 2.1 (or AS-i 2) w as released. The new functionalities added are: Increase the number of possible binary devices from 31 to 62 at one master. The maximum bus capacity increased to 248 + 186 I/O, but the cycle time changed to 10 ms.

An additional bit on the status record is used to signal peripheral errors. The indication of the slave performance w as standardized and expanded.

The number of slave profiles increased from 15 to 225 w ith the addition of new ID codes.

Better analog signals treatment, thereby broadening the spectrum of action of AS-i netw orks.

The chips for the AS-i netw ork version 2.1 are made by tw o consortiums: Siemens and Festo, the joint developers of the SAP4.1 chip, compatible pin by pin w ith the SAP4, and the group of eight other members (Bosch, Hirschmann, ifm electronic, Leuze, Lumberg, Klockner Moeller, Pepperl+Fuchs, and Schneider Electric), w hich developed the A2SI chip. Both chips provide all functionalities of 2.1 version. Additional Capabilities (2005/2007, Version 3.0) Up to 2005, the AS-i netw ork success w orldw ide, w ith approximately 10 million nodes in operation, promoted the introduction of new requirements for the netw ork. Furthermore, the increased usage of Ethernet based industrial protocols called for a low -level solution that overcome the inherent shortcomings of Ethernet (e.g. restricted topology, large data frame, costly usage of sw itches etc). This specification addressed the users requirements by defining new profiles for binary and analog data plus the introduction of a serial data transmission profile (3.0 or AS-i 3 specs). The follow ing is an incomplete list of the new capabilities Binary I/O nodes supporting extended addressing mode (A/B) w ith 4 inputs and 4 outputs; Binary I/O nodes supporting extended addressing mode (A/B) w ith 8 inputs and 8 outputs; Configurable (8, 12 or 16 bits) fast analog channel; Full Duplex bit serial data channel. With these new capabilities, AS-i becomes the ideal partner netw ork for of the currently available Ethernet based industrial protocols. Gateways to Ethernet//IPTM, PROFINET, Modbus/TCP and others are available. Some controls experts have voiced the opinion that w ithin the next 10 years netw orking solutions positioned betw een AS-Interface and Ethernet w ill not be used in any new installation. Back to Top

5. Characteristics
www.smar.com/en/asi.asp#a 3/18

21/10/13

SMAR - Tutorial on the AS-i Technology


The name Actuator Sensor Interface is a simple and elegant solution to integrate discrete sensors and actuators on process control systems. This netw ork has a series of features, as follow s: Com patibility: Sensors and Actuators from different manufacturers may be connected to a standard digital serial interface; Access procedure: Cyclic polling, single-master system; Addressing: Slaves receive a permanent address from the master or hand-held type; Topology: Without restrictions (linear, ring, star or tree structure); Medium : Tw o unshielded, non-tw isted cables (2 x 1,5 mm) for data and electrical pow er (usually 24 Vdc), typically up to 200 mA per slave, up to 8A per bus; Fast installation: electromechanical interface w ith piercing technology; Cable length: range 100 m, scaleable by repeater up to 300m; Signals: Data and electrical pow er via the same line, max. 8 A possible; Num ber of slaves: Up to 62 slaves per netw ork (version 2.1); Data: 4 inputs and 4 outputs for each slave; for more than 31 slaves, only 3 outputs (maximum of 248 binary inputs/outputs per netw ork). Useful load: 4 bits/slave/message transmitted. All slaves are requested sequentially by the master and receive 4-bit data. Each slave responds immediately w ith 4-bit data; Cycle tim e: Max. 5 ms and 10 ms according to 2.0 and 2.1 spefications, respectively; Error detection: Effective error detection and retransmission of incorrect telegrams; AS-Interface chip: 4 I/O configurable for data, 4 output parameters and 2 control outputs; Master functions : Cyclic slave scanning, data transmission for slaves and for the control unit (PLC or PC). Netw ork initialization, slave identification, transferred slave and data diagnostic. Also, reports errors to the controller and addresses the replaced slaves; Valves: Installed directly on the application, reducing piping and increasing the actuator response speed; Low cost: Low connection cost per slave and eliminates PLC input and output modules; Reliability: Highly reliable operational level in aggressive industrial environments; Open standard: Developed by renow ned industries affiliated to the AS-i International Association, w hose transmission protocol is standardized; Optional: output pow er supply cable and stop control. Back to Top

6. Connectivity
The AS-i netw ork can be connected to main control level by tw o w ays. The first one is the direct connection (Figure 6.1, left). In this case, the master is part of a PLC or PC being executed in the time cycle determined by these devices. An AS-i master can be built by any manufacturer, as it is an open standard. The second w ay is connecting it w ith a gatew ay betw een a higher-level netw ork and the AS-i netw ork (Figure 6.1, right). There are other couplers for other field netw orks, such as Profibus, Interbus, FIP, DeviceNet, CAN, etc. .

Figure 6.1 Interconnection with other digital networks. Source: AS-International Association (2008) Back to Top

7. The Actuator Sensor Interface system


The name Actuator Sensor Interface represents its ow n concept. Although technically meaning a bus, the term interfaceshow s that it provides a simple program for accessing field sensors and actuators. The AS-i industrial netw orks w ere designed to be applied on automated environments to replace the traditional actuator and sensor sw itch (on/off) connections for a single bus. In addition it can also be connected to sensor and actuator buses that perform an analog conversion or vice versa. Traditionally, these connections are made of tw isted pairs that connect each actuator and sensor, one by one, to the corresponding controller, typically a PLC Programmable Logic Controller. The AS-i system is configured and controlled by a master that programs the interface betw een a controller and the AS-i system. The master continually exchanges information w ith all sensors and actuators linked to the AS-i bus in a pre-determined and cyclic w ay. Figure 7.1 illustrates the entire AS-i system enhancing its main components: cable, AS-i pow er supply w ith its decoupling circuit, the AS-i master and slave. Interface 1: betw een the slave and the sensors and actuators; Interface 2: betw een the devices (pow er supply, master and slave) and the transmission medium; Interface 3: betw een the master and the host, in other w ords, any entity that accesses the AS-i netw ork from an upper level.

www.smar.com/en/asi.asp#a

4/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.1: Components and interface Source: SANCHES, L.B. (2004)

7.1 Transmission Medium


AS-Interface is a standard and open netw ork system (EN 50295) that connects actuators and sensors in a very simple w ay. A single cable connects the actuators and sensors w ith the upper control levels. The connection of the elements can be done in tree structure, star, line, or a combination of both. Since there are no conventional connections and w ith the reduction of terminal block and connector links, costs and mounting time, as w ell as errors, decrease. In the simple connection technique using parallel cables, each devices contact is connected separately to the ends and terminal blocks of sensors and actuators. The AS-i netw ork substitutes the traditional arrangement of multiple cables, passage boxes, conduits, trails, and cable ducts for a single cable specially developed for the AS-i netw ork. The AS-i netw ork features a single pair of w ires that transmits the data and electrical pow er to the sensors and actuators (usually 24Vdc) at the same time. The maximum netw ork configuration includes 62 slaves that are accessed cyclically by a master on the upper control level. The response time is short for every connected slave: 10 ms. Formerly, sensors and actuators w ere connected to the controller via the terminals, connectors and terminal blocks. AS-i enables the reduction of installation and maintenance costs, w ith a standard tw isted cable that allow s the exchange of data and electrical pow er betw een devices. Slaves are connected directly to the bus, w ithout additional w iring. A flexible tw o-w ay cable w as designed as standard for the AS-i netw ork. There is also a round shape cable for use only under the manufacturer specification.

7.1.1 Standard Flexible Cable This H05VV-F 2X1.5 high voltage flexible cable complies w ith the CENELEC or DIN VDE 0281 standards, it is inexpensive and easy to get.

Figure 7.2: Typical AS-i cables Source: AS-International Association (2008) e Turck Networks.

The unshielded, non-tw isted AS-i cable has tw o parallel conductors that convey data and pow er to the slaves. Its external jacket is yellow and has a characteristic geometric shape that w as designed to avoid fixation w ith reversed polarity (Figure 7.3).

Figure 7.3: Cross section of AS-i cable.

www.smar.com/en/asi.asp#a

5/18

21/10/13

SMAR - Tutorial on the AS-i Technology


Figure 7.3: Cross section of AS-i cable. Source: LIAN, S.C.P. (2003) The cable does not need cutting or stripping to be connected. This practice generally causes undesirable voltage drops and is a constant bad contact source. On the other hand, it has an interesting w ay to be installed, w hich favors costs savings in its implementation. This is a simple principle: the contact w ith the internal conductors is done by conductive blades that penetrate in the plastic insulation to reach the internal copper w ires. The internal shielding has a healing property that closes it w hen the blades are disconnected, w ithout being seen w hen being cut lengthw ise. Evidently the shielding remains perforated, but w ithout the risk of a short circuit. Figures 7.4a and 7.4b illustrate the concept.

Figure 7.4: a) Module and bus coupling; b) Perforation pins Source: SILVA, W.A.C.M (2008) and AS-International Association (2008).

In addition to the pow er supply available to slaves through the yellow cable that became a sort of registered trademark for the AS-i system and serves almost all purposes, some slaves may need a supplementary pow er supply, especially the most pow erful actuators. An additional black cable w ith the same properties is used only for supplying pow er. It also uses the same previous penetration technique and supplies up to 24 Vdc. When selecting an adequate transmission media, tw o relevant electrical considerations should be done: the DC resistance on the pow er supply and the transmission features on the frequency band used on the communication. At least 2A of current must be available for transmission on the slave pow er supply. Within these requirements, other cables can be used on specific cases, like for conducting larger currents or the need for movable cables. Besides these tw o types of cables there is also a red version for until 230 Vac.

7.1.2. Round Cable This cable w as designed specifically for the AS-i, w ith almost similar electrical features, but w ith a specific type of installation. This cable can be shielded or unshielded, but preferably the unshielded are used, w ith the follow ing characteristics (at a frequency of 167 kHz): R: < 90 m/m C: < 80 pF/m Z : 70 to 140 G: 5 S/m It is also recommended a cable w ith a transversal cross-section of 2 x 1.5 mm2.

Figure 7.5: Unshielded round cables Source: AS-Interface Association

7.1.3 Connections of the AS-i line Any connection to the AS-i line shall meet the follow ing requirements, w hether a conventional technology or an insulation piercing technology is used: Contact resistance maximum of 6 m; Minimum allow able current of 1.5 Inom (minimum of 3A for a general AS-i line);

www.smar.com/en/asi.asp#a

6/18

21/10/13

SMAR - Tutorial on the AS-i Technology


Minimum allow able current of 1.5 Inom (minimum of 3A for a general AS-i line); Contact voltage range of 10 V to 70 Vdc; Shock and vibrations in compliance w ith item 7.4 of IEC 60947-5-2; Strain relief in compliance w ith annex E of IEC 60947-5-2; If a clamp or a screw terminal connector is used for connections, its capability shall be at least a 2 x 1.5 mm2. If plug connectors are used, the D.2 type according to annex D of IEC 60947-5-2 is preferred.

7.1.4 Cable Length The maximum length for an AS-i netw ork cable shall not exceed 100m w ithout the use of repeaters. A maximum of tw o repeaters to extend the length of the line to 300 m is permitted. Four repeaters may be used to extend the line to 500 m if the master is centrally positioned on the first line segment. The length of AS-i line is calculated by adding the line length to tw o times (2x) the length of the connection accessories. Example: 50 m of yellow cable and 5 tap-offs w ith 2m of cable gives a netw ork length of 50 + 2 x (5 x 2) = 70 m netw ork. Figures 7.6 and 7.7 show solutions for extender and repeater connections to extend the AS-i line.

Figure 7.6: Solution w ith one extender and one repeater Source: AS-Interface Association

Figure 7.7: Solution w ith tw o repeaters Source: AS-International Association (2008).

7.2 Power Supply


The AS-i pow er supply has four functions, as follow s: 7.2.1 Pow er Supply The pow er supply unit w orks w ith a voltage of 26.5 V to 31.6 Vdc, and supplies a current of 0 A to 8 A (typical current per slave is 200 mA) under normal operating conditions. The pow er supplied to the slaves and partially to the master through tw o w ires is the same used to transmit AS-i data, and can be connected to any point on the netw ork. On long lines, the voltage drops must be taken into account but should not exceed 3 V on a w hole 100 m cable. The unit has an internal overload protection circuit w ith current limit. 7.2.2 Balancing The pow er supply unit also balances the AS-i netw ork, w hich is operated as a non-grounded symmetrical system. For noise immunity the AS-i cable must installed as symmetrical as possible through the balancing circuit show n in Figure 7.8. The shielding connection must be at an adequate point on the machine or the system. Only at this point it can be connected to the system ground (GND).

www.smar.com/en/asi.asp#a

7/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.8: AS-i pow er supply simplified diagram Source: SANCHES, L.B. (2004)

7.2.3 Data Decoupling The third function of the pow er supply unit is decoupling data, w hich is normally done by the decoupling netw ork on the pow er supply module. This netw ork consists of tw o inductors of 50 H each (L1 and L2) and tw o resistors of 39 each in parallel. The inductors perform a differentiation job on the voltage pulses to convert the current pulses generated by the transmitters connected to the netw ork. At the same time, they prevent short circuits on the cable. The coupling betw een the inductors shall be as close as possible to 1, meaning that the mutual inductance must tend to 200 H. 7.2.4 Safety The fourth function is related to safety. The AS-i system w as designed as a system for low voltages w ith safe separation (Protective Extra Low Voltage). In other w ords, according to the relevant IEC standards, safe separation betw een the pow er supply and the AS-i netw ork is required.

7.3 Redundancy
This situation is not very common on AS-i netw ork, since it is a system w here prevail discrete communication and also robustness, determinism and simplicity. The redundancy can w ork at the master and the pow er supply levels. So far there is no redundancy at the cables and slaves levels. A netw ork may have a redundant master. It w ill stay in monitoring mode and w ill take over control w hen noticing a failure or lack of communication on the part of the active master. In regard to the pow er supply, this is also possible w ith a pow er extender, w hen tw o pow er supplies are connected in a redundant mode.

7.4 Interface 1: Sensors and Actuators


7.4.1 The AS-i Slave The AS-i slave, as show n in Figure 7.1, represents the link betw een the AS-i transmission system and Interface 1, to w hich the sensors and actuators are connected. The slave pow ers the sensors/actuators and handles communication betw een them and the master. When the AS-i specification w as developed, it w as clear that the slave needed to be small and compact as w ell extremely inexpensive to be able to be integrated directly to the sensors and actuators. This can be achieved only through the use of a highly integrated circuit, w hich originated the famous AS-i chip. The AS-i slave chip allow ed for sensors and actuators to be integrated to the AS-i bus as a slave device that recognizes the master output command and sends data in response. A great number of sensors and actuators used recently in automation allow low cost per connection in AS-i slave chips. In the case of analog devices, the data exceed 4 bits of useful information per cycle: the data are divided and sent in several cycles. An AS-i chip can be used in tw o possible w ays: Embedded in sensors and actuators, w ith the elements integrated to the AS-i (Figure 7.9) and every data bit and parameter available to the device (sensor or actuator).

Figure 7.9: Sensor or actuator with integrated AS-i. Source: AS-International Association (2008).

Another w ay is using the AS-i slave chip embedded in modules w here conventional sensors and actuators may be connected. Figure 7.10 show s a module w ith tw o inputs for sensors and tw o inputs for binary actuators.

www.smar.com/en/asi.asp#a

8/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.10: Module 2I/2O for conventional sensors/actuators Source: AS-Interface Association.

7.4.1.1 Structure of the AS-i Slave Regardless of w hether the slave is implemented using the integrated circuit or some other w ay, it w ill have the structure show n in figure 7.11, w hereby the connections for interface 1 may be physical or logical, and those for interface 2 must be physically present. In the supply voltage the data path is separated from the pow er path by an inductance. In order to implement it in a integrated circuit (IC), this inductance is realized electronically and guarantees that the slave sustains a highly-enough resistance on the communication data frequency band. The supply voltage is furnished on the Vout terminal.

Figure 7.11: AS-i slave architecture Source: SANCHES, L.B. (2004).

In the receiver the voltage pulses detected on the AS-i cable are filtered, digitized and w ritten to the receive register. At the same time the received signal is subjected to various plausibility checks to ensure that no noise pulses have corrupted the master request. In the sender the information from the send register is encoded and sent out over the AS-i cable as a current pulse sequence according to the APM modulation. The sequence controller finally decodes the master requests, checks them for errors, carries out the commands encoded in them and if appropriate causes a reply to be sent. The sequence controller also has a memory w hich is used for recording the slave address and w hich can store it for an unlimited time w ithout pow er (nonvolatile). The slave has the follow ing registers and flags: Address register: This 5 bit-w ide register contains the current slave address. If the address sent in a master request agrees w ith the address contained in this register, then this slave w ill reply. After a RESET the register is loaded w ith the address contained in the non-volatile memory. Its contents can be changed by the master using the commands Delete Address or Address Assignment. Identification registers : These 4 bit-w ide registers contain the I/O configuration and the ID Codes of the slaves. They are permanently stored and loaded from the non-volatile memory after a RESET. They are (w ith the exception of the ID Code 1) fixed at the time the slave is manufactured and cannot be modified. Data output register : The Data Output register is 4-bits w ide and contains the data from the last Data Request, w hich w as received w ithout any error by the slave. Those bits that are allocated to an output in accordance w ith the I/O configuration are output on the respective data port, and the information from the other bits is ignored. After a RESET the register is loaded w ith the default value FHex. Param eter output register: This 4 bit-w ide register contains the parameters from the last w rite parameter request from the master that w as received w ithout error by the slave. The bits are output on the corresponding parameter ports. Receive register: This 12 bit-w ide receive register contains the last message sent by the master for further processing in the on the sequence control. Send register: This 5 bit-w ide send register has the slave response to be sent. Status register: This 3 bit-w ide register indicates certain slave status conditions or errors: Flag S0: is set during address storage if the new address has not yet been permanently stored. Flag S1: is set if the input FID reports a peripheral error. Flag S3: is set if an error has occurred w hile reading the address from the permanent memory. Synchronization flag: Ifthe slave has correctly received a master request, decoded it and, if appropriate, acknow ledged w ith a reply, the Synchronization flag is set. In the synchronized state the master pause is monitored after the master request for one bit time, and the slave response can start after a tw o bit times. Data exchange blocked flag: This flag is set by a RESET, and it is reset by errorless receipt of the first parameter request to its ow n slave address. This prevents data requests from being accepted as long as the parameter ports have not been loaded w ith the nominal parameters. This behavior is necessary for preventing misunderstandings betw een the master and slave. It could happen, for example, that due to poor electrical contact on the AS-i cable a slave w ithout the master know ing it receives no supply voltage for a brief time and performs a RESET. Then the parameters ports are reset, and any associated functions of the slave are set to the default state. As a consequence, the slave could respond differently than the master expects.

7.4.2 Interface 1 As show n in Figure 7.11, the interface 1 has four data ports w hich, depending on the selected I/O Configuration, can be either as inputs ports, as outputs ports or bidirectional communication. A data strobe output is also provided, w hich signals w hen output data are present and w hen input data are expected. For actuator slaves it is recommended that the time-out monitor, also called a w atchdog and w hich is integrated in the slave IC, be activated. If, w hile a timing member is running, no new correctly received Data Request arrives at the address of the slave, the actuator can use the w atchdog to place the system in a safe state. Such time-out monitoring allow s a variety of error possibilities to be covered, such as hardw are faults in the master, interference on transmission cable or loss of the address in the slave, and makes the AS-i system safer. Normally, a time-out period is specified from 40 to 100 ms. In addition to the data ports, w hich are provided for cyclical data exchange w ith the master, additional ports are available w hich are used for (acyclic) parameter output. Here again an additional strobe ouput indicates w hen a new parameter message has arrived. The FID input is used to signal peripheral errors. If the slave electronics detect an error (such as overloaded supply voltage caused by an external short), this input can be used to display the event locally, through LEDs and to report it to the master using the status register. The master makes an entry in the list of peripheral errors and sets a collective flag.

www.smar.com/en/asi.asp#a

9/18

21/10/13

SMAR - Tutorial on the AS-i Technology


Finally, a DC voltage is provided to the connected sensor or actuator on the Vout port w hich is generally w ithin the tolerance range of 24V +10/-15%.

7.5 Interface 2: Transmission system


Interface 2 includes the specifications necessary for an effective data exchange betw een the elements connected to the AS-i bus. It defines the w ay to accessing the physical medium, the data exchange on the electrical level and how to deal w ith some communication errors, as w ell as the time requests on the transactions.

7.5.1 Netw ork structures The topology for AS-i netw orks is left to the users discretion to simplify the project. The restriction is not observed if the maximum limit for the cable length is 100m. If longer lengths are required, repeaters are used to extend the netw ork range, provided the limit of 62 slaves and one master is observed. No terminal impedance is needed, simplifying the installation. Structures in tree, linear, star or ring are possible (Figure 7.12).

Figure 7.12: Physical network topologies Source: AS-International Association (2008)

7.5.2 Modulation The selection of an adequate modulation for the AS-i should be taken into consideration the follow ing requirements w hich led to the creation of a new modulation procedure know n as Alternating Pulse Modulation (APM). The most important is: The message signal superimposed on the supply voltage for the sensors and actuators must be direct current free; The slaves sender (and w here possible the masters sender) must be able to generate the signal in a simple, i.e. cost-effective and space-saving manner. Since the AS-i cable has impedance w hich increases greatly over the frequency, the message signal must be relatively narrow -banded. High levels of noise radiation are also unacceptable.

The result w as Alternating Pulse Modulation (APM), a procedure for serial transmission in the base band and is show n in Figure 7.13. The bit sequence is first encoded into a bit-sequence that performs a phase change w henever the signal changes (Manchester coding). The result is a send current that in conjunction w ith the single inductor in the system uses differentiation to generate the desired signal voltage level on the AS-i cable. Each rise in the send current thus results in a negative voltage pulse and each drop to a positive voltage pulse. In this w ay it is quite simple to generate signals in the slaves that have a higher voltage than their actual supply voltage. This eliminates inductors from the slaves and keeps the integrated electronics small and inexpensive. On the receiver side these voltage signals are detected on the line and converted back into the send bit- sequence. The receiver synchronizes itself w ith the first detected negative pulse, w hich it interprets as a start bit of message. If the voltage pulses approach sin2 pulses, the requirements for low limit frequency and low noise emission are met at the same time. This is done by means of suitable shaping of the send current pulses, w hich are generated like the integral of a sin2 pulse. Using this modulation procedure and the available topologies, bit times of 6s are attainable, w hich allow s a gross transmission rate of 167 kbit/s. Since the cables do not have terminators, the message pulses have a large amplitude variation. The AS-i represents an extremely robust system able to deal w ith the problem caused by cable end reflections that reach the higher frequencies.

Figure 7.13: AS-I network modulation signal Source: SANCHES, L.B. (2004).

www.smar.com/en/asi.asp#a

7.5.3 Access procedures Since the AS-i w as designed to replace star type 2-point connections (traditional cable tree), a bus access procedure w as selected w hich reproduces this topology

10/18

21/10/13

SMAR - Tutorial on the AS-i Technology


Since the AS-i w as designed to replace star type 2-point connections (traditional cable tree), a bus access procedure w as selected w hich reproduces this topology and is able to ensure a defined response time (the master-slave access w ith cyclical polling). The master sends a telegram that is received at a particular slave address, and the slave contacted at this address replies w ithin the provided time. This operation is described like a transaction. The transmission system only enables the connection to a bus w ith one master and a maximum of 62 slaves. The procedure chosen for AS-i allow s the construction of very simple and thereby cost-effective slaves w hile providing at the same time the greatest possible flexibility and integrity. In case of a brief disturbance on the line, for example, the master can repeat telegrams to the address w hich received either no reply or an invalid reply. This means it is not necessary to repeat the entire cycle over again.

7.5.4 AS-i m essages There are tw o types of AS-i messages: those sent by the master and the slave responses. Figure 7.14 illustrates a transaction and the periods of time involved. The AS-i message consists of a master request, a master pause, a slave response and a slave pause. All master requests are exactly 14 bit times in length, and all slave responses have a length of 7 bit times. A bit time corresponds to a uniform 6s.

Figure 7.14: Structure of an AS-i. message Source: SICK Industrial Sensors (2010).

The master pause is allow ed to be at least 2 and maximum of 10 bit times in length. If the slave is synchronized, it can begin to send its response after as soon as 2 bit times. If it is not synchronized, it requires 2 bit times longer, since is monitoring the master pause during this time for any additional information before it can accept the poll as valid. If the master, how ever, has not received the start bit for the slave response after 10 bit times, it can assume that there is no response forthcoming and it can begin w ith the next request. The pause (slave pause) betw een the end of a slave response and the next master request should be no more than 1.5 to 2 bit times in length. A master poll of a standard slave consists of: Start Bit (ST) . Identifies the beginning of the master request. Its value is alw ays 0. Control Bit (SB). Identifies the type of request: 0 for data, parameter request or address assignment; and 1 for command request. Address (A4..A0). Address of the contacted slave address requested (5 bit). Inform ation (0, D3D0). These 5 bits contain in order to the type of request, the information to be transferred to the slave. Parity Bit (PB). The number of all "1" in the master call has to be even. End Bit (EB). Identifies the end of the master request. Alw ays has value 1. The slave response consists of: Start Bit (ST). Identifies the beginning of the slave response. Its value is alw ays 0. Inform ation (D3..D0). These 4 bits represent the properly information sent to the master. Parity Bit (PB). The number of all 1 in the slave response has to be even. End Bit (EB). Alw ays w ith value 1, it signals the end of the slave response. AS-i Specification Version 2.1 (1998) created the possibility of connecting 62 slaves to an AS-i netw ork instead of previous 31. To make this possible, an information field bit is used for select bit, as it is know n. Hence, the slaves connected to the bus w ere divided in tw o groups of a maximum 31 slaves: group A and group B. Therefore, a slave, besides having an address, received a distinguishing type: A or B. This change w as introduced in a w ay to avoid losing the compatibility of old version slaves w ith new version masters. The former slaves can be addressed normally, but occupy tw o addresses each. They do not distinguish slave A from slave B and do not recognize a selection bit as such, but as normal information bit. The masters adapted to the new version have w ays to identify the slave type and send requests properly. This w ill be seen further on.

7.5.5 Data integrity and error response Reliable error recognition is of great importance for a faultless communication over the AS-i cable, w hich is generally unshielded. Since the AS-i telegrams in the transactions are quite short, the error detection is different from the one normally applied to other field netw orks. The master request contains 11 bits of data to be checked, and the slave response has 4 bits. The addition of bits for checking message errors w ould drastically reduce the achievable netw ork transmission rate. So instead AS-i performs greater checking on the bit transmission itself. This makes use of the know ledge of redundancies in the code and the fixed lengths of the telegrams. As a result the follow ing errors can be distinguished: Start bit error; Alternating error; Pause error; Information error. Parity error; End bit error; and Telegram length error. Each master request and each slave response is subjected to these checks. If one of the errors named is detected, the request is considered faulty or the response is invalid.

7.5.6 Analog Signals AS-i supports the transmission of analog signals and the digitalized analog signal value is separated in multiple parts and transmitted in several cycles. An analog input signal of 12-bit data requires 6 cycles, forming the total transmission time of 30 ms (in the version 2.1 of the AS-i specification). An A/D conversion circuit must be integral part of the slave device w ith analog I/O signals. This circuit w ill execute not only A/D conversion, but also freeze the converted value until all bits are totally transmitted, and only then w ill be ready for a new analog signal sample. The AS-International defined a standard for analog signal transmissions (defined on the profile S-17 of the AS-Interface specification). To facilitate its use, some PLCs already offer functional blocks to be applied w ith analog signal values. To ensure data consistency betw een master and slave, a handshake bit w as defined in the profile, w hich is inverted by the slave and returned. Thus the master may check if the slave has responded and the slave may check if the master w ants the last request to be repeated or if it w ants the next data. On the other hand, this reduces the useful load on each frame to 3 bits per cycle, w hile ensuring the right transmission of data even w ith disturbances. For analog inputs, the master requests and the slave responds; for analog outputs, the slave requests and the master responds.

www.smar.com/en/asi.asp#a

11/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.15: Analog value transmission sequence. Source: ATAIDE, F.H. (2004).

7.6 Interface 3: The AS-i Master


The AS-i master represents the bridge to the users controller or to a host fieldbus system. It organizes data traffic on the AS-I cable independently, so that at its interfaces to the controller and to the connected sensors and actuators the system behaves like a traditional cable tree, w hile allow ing additional user functions such as the transmission parameter settings or monitoring and diagnostics information. The AS-i specification divides the master into three layers, w hich describe the master from the AS-i cable to the host interface (Figure 7.16).

Figure 7.16: AS-i Master Structure in layers Source: SANCHES, L.B. (2004)

The physical transmission of the requests from the master is specified by the interface 1 and has basically the same characteristics of the slave. The low er logic layer is the transmission layer, w hich is responsible for the transmission and reception of individual telegrams. The automatic telegram repetition w hen the slave response fails is possible and ensures the upper layers integrity. The sequence control or execution control is just above the transmission layer and passes requests for data transmission to the latter. The sequence control controls the sequence telegrams. In addition to the actual sequence control, the sequence control layer processes functions that are requested by the host through the master layer. In addition to the sequence control, the sequence control layer processes functions that are requested by the host through the master layer. The highest layer is the master layer, in w hich the AS-I functions are adapted to the respective host system. This layer is w here profiles are formed w hich allow a restriction of the master functions usable by the host.

7.6.1 Master Requests The AS-i master connects the interfaces 2 and 3 through messages sent to the slaves, one by one. In the follow ing section are show n some possible few requests that the master can perform to a given slave through the interface 2, and the behavior expected from the slave to cope w ith these requests or, in reality, its responses. Figure 7.17 show s all possible requests a master can make to a slave, per AS-i specification 2.1, w hich accepts the extended addressing. One can notice the presence of a select bit on the requests. This bit replaces the bit previously used on the exchange of common data. The addition of this new bit made possible addressing tw ice as much the initial number of slaves: 62. The slaves then, besides having an address betw een 0 and 31 gained an A or B type, that is defined by the select bit.

Figure 7.17: Master requests based on specification 2.1 Source: BECKER et al. (2002

These requests are analyzed one by one, as follow s. Read I/O con guration: With this request the master can read the set I/O configuration of a slave. This is sent in the slave response to this request and is used together w ith the slave Read ID-Code requests for unambiguous identification of a slave. The I/O configuration refers to the data ports on Interface 1 of the slave and is defined as show n in Figure 7.18. In this definition IN means a process input, OUT a process output, I/O a bi-directional behavior of the port, and TRI indicates high-impedance outputs w ith no funcion. The latter state is assumed w hen during the reset a read error of the slaves data memory means that no unambiguous I/O configuration could be determined. Wherever an output OUT (and no bi-directional behavior) is defined, this means that the corresponding information bit in the slave response is undefined. Likew ise, the information bit from master request remains w ithout meaning w herever an input (IN) is defined, even though the bit is sent.

www.smar.com/en/asi.asp#a

12/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.18: I/O conguration. Source: BECKER et al. (2002)

This I/O configuration allow s unneeded information to be hidden. At the same time the I/O configuration is used together w ith the ID Codes for identification of the slaves. This reference is the slave profile. The I/O configuration is 4 bits long, is fixed by the manufacturer and is stored in the slave so that it cannot be changed. Read ID Code: The slave ID code compliant w ith the version 2.1 of the specification has tw o other codes, besides the original ID code read by the master on the Read ID Code request: "Extended ID Code 1" and "Extended ID Code 2". Together they identify different slaves. The slaves compliant w ith the new specification have the ID code A in hexadecimal, w hile an ID code B indicates a safety at w ork slave. All of the slaves w ith an ID code equal to A also have tw o other ID codes. Read Extended ID Code 1: This command is similar to the previous one and reads the slave extended code 1. The user can change this part of the ID Code. Read Extended ID Code 2: This code extends the slave configuration possibilities and, as the original ID code, cannot be modified by the user, being explicitly defined by the manufacturer. A slave profile issued by the combination of the ID codes and the I/O configuration contains a parameter behavior definition, data ports and other additional slave characteristics. Data Request: This command is most commonly used on the AS-i to attribute slave output values on the interface 1 and get input values in response. As said before, the ports behavior is defined by the I/O configuration. The data ports can be used in various w ays, not only as binary inputs and outputs of process variables. They also are used as additional configurations and as digitalized representation of analog process variables. Parameter Request : This command is used by the master to send the bit pattern for the parameter outputs on Interface 1 that control certain functions in the slave. The last sent parameter value is stored in the slave until it is overw ritten by a new one or reset. For a standard slave 4 bits of parameter data are available, and 3 bits for a slave in extended addressing mode, since one of them is used as selection bit. A parameter request to address 00HEX is not possible, since the slave w ould interpret this as an addressing request. Address Assignm ent: This command allow s the master to permanently set the slave address w ith the previous address 00HEX to a new value. The slave sends a recognition response and starts the recording of the non-volatile memory, w hich cannot last longer than 500 ms. During the process the slave begins responding to the requests on the new address. This request allow s replacing damaged slaves w ithout restarting the netw ork. Reset Slave: This command can be used to set a slave to its base state. It has the same effect as the reset after applying supply voltage or the reset on the reset input of Interface 1. It does not last longer than 2 ms. Delete Operating Address: The command Delete Address is used to temporarily delete the operating address of a slave and is needed in conjunction w ith Address Assignment because the Address Request can only be performed by a slave having an operating address 00HEX. For example, to change a slave address the Delete Address request is used first and next the Address Assignment. The slave acknow ledges error-free receipt of Delete Address w ith the reply 00HEX and can be reached from this point on under the new address. Deleting the operating address in this manner is not permanent. To restore the original address stored in non-volatile memory after executing this command, use the command Reset_AS-I Slave. Read Status: This request is used to read out the status register of the corresponding slave. Its content is sent in the slave response to this request. The status register of a slave contains three flags w hose meanings are as follow s: S0: "Address Volatile". This flag is set w hen the slave-internal routine for permanently storing the slave address is running. S1: "Peripheral Error". This flag is set w hen the slave has detected a high input on the interface 1 FID port, w hich indicates an external failure on the equipment. S3: "Read error non-volatile m em ory". This flag is set w hen a read error occurs during a reset w hile reading the non-volatile memory. The bit S2 is not used yet and is reserved for future enhancements. The master can use the information from status register for diagnostic purposes. Slaves according to Specification 2.0 do not support the flag Peripheral error. When the master is communicating w ith a slave having extended ID Code 2 equal to FHEX, it ignores flag S1. Broadcast : command requests containing 15HEX are defined as broadcast commands. These are characterized by the fact that they do not need to be replied to by the slaves. For this reason, they are atypical of normal AS-i data communication and until now only the broadcast command Reset is defined.

7.6.2 Transm ission Layer This layer, also know n as transmission control, exchanges individual telegrams w ith the slaves. It receives a remittance request from the sequence control, together w ith the data that w ill be sent via the communication channel w ith the addition of the start bit, the parity bit and the end bit, w hich generate the master frame (telegram). This telegram is sent according to the time requirements of the transmission system, as described on 7.5 section. The function for data transmission offers the sequence control, tw o transmission methods: one-time transmission or repeatable transmission. In the first case, if there is no response from the slave after the w aiting time limit, or, if the response is not a valid one, the transmission control reports the error immediately to the upper layer, w ithout resending the telegram. In the second one, the error is only reported after a second unsuccessful try. On the other hand, if the transaction is successful, the transmission control provides the sequence control w ith the data sent by the slave w ithout the additional start, end and parity bits. The transmission control also reports an AS-i Power Fail (APF) signal to indicate that the supply voltage on the line is too low . Figure 7.19 illustrates the state machine that models the transmission control behavior. The MT initials come from multiple transmission and means that the transmission control resends a telegram in case of error on the first one. Alternately, ST means single transmission, and the error is reported after the first failure. The status transitions occur in function of logical operations represented by the operators in italic and and or. The inputs and outputs are separated by a slash ( /)

www.smar.com/en/asi.asp#a

13/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.19: Transmission control Source: SANCHES, L.B. (2004)

7.6.3 Data fields and lists on the sequence control The execution control or sequence control generates AS-i telegrams in the correct sequence, using the individual frame sending service executed by the low er layer. To this effect, it has a set of data and lists that keeps the image of the AS-i netw ork and its slaves constantly updated, w hich is used by the upper layer to implement the interface w ith the host. These data fields are presented as follow : Input Data Image (IDI): This field contains the copies of the most recent slave data received by the data request. Each slave occupies 4-bit memory. Output Data Image (ODI): This field contains the most recent data w ritten by the host to be sent to the slaves by a data request. Here also are required 4 bits to each one of the 62 slaves. Analog Input Data Image (AIDI): This field contains the most recent data received from the slave analog inputs according to the 7.3 and 7.4 profiles, like the IDI data. Analog Output Data Image (AODI): This field, like the previous one, contains the most recent data to be sent to the analog outputs. Con guration Data Image (CDI): This field contains the I/O and ID codes for each slave. Therefore, 2 bytes are required for each slave. Permanent Con guration Data (PCD): This field is similar to the previous one, although in a non-volatile area. The ID codes or I/O configuration of a slave absent from the netw ork are filled w ith the F value (hexadecimal). Parameter Image (PI): This area is reserved for each slave 4-bit parameter. Therefore, tw o slaves occupy one byte. Permanent Parameter: This field keeps the parameters configured for each slave and is in a non-volatile area, like the PCD. List of Detected Slaves (LDS): Each slave corresponds to one bit in this list and is activated w hen the slave is detected correctly. List of Activated Slaves (LAS): In this list the bit corresponding to the slave is activated w hen the slave is activated correctly. List of Projected Slaves (LPS): This list is on the non-volatile memory and represents the slaves that are supposed to be connected to the AS-i netw ork w hen it is turned on. List of Peripheral Fault (LPF): In this list the bit corresponding to the slave is activated w hen a high signal is detected on the slave FID pin (section 7.4).

In addition to these data fields, the execution control reports the master conditions to the host through the flags. The flags are the follow ing: Con g_OK: This flag is set w hen nominal and actual configurations are in agreement. This Config_OK flag enables simple monitoring of the configuration; LDS.0: Indicates the presence of a slave w ith address 0, w hich is not allow ed on the normal operation; Auto_Address_Enable: Indicates that the automatic addressing is enabled; Auto_Address_Available: Indicates that there are conditions to execute the automatic addressing*; Mode: Indicates if the master is on Configuration mode (1) or Protected mode (0). Norm al_Operation: Indicates that the master is transiting cyclically betw een the normal operation stages; AS-i Pow er Fail (APF): Indicates voltage on the bus below the low er limit; Of ine_Ready: Activates w hen the offline phase is complete; Periphery_OK: No slave is reporting a periphery error; Offline: When activated by the user, sw itches the master from a sequence control to offline phase; Data Exchange Active: Enables data exchange betw een the master and the slaves.

*For the sake of terminology, a distinction is made betw een this flag and the previous one. The first one is user-defined and permits the auto addressing, provided certain conditions are met, w hich is indicated by the Auto Address Available flag. Its noting that four of these flags are user enabled - host - and affect the master behavior: the tw o last ones in the list, Auto Address Available and Mode. All the others flags cannot be altered by the user and are controlled by the master. The master behavior is divided in several stages, or phases, w hich are executed by the execution control. Figure 7.19 illustrates the status device that shapes the execution control behavior. The dotted area indicates the normal operation mode, i.e., w hen the master performs a cyclic data exchange w ith the configured slaves and keeps the "Input Data Image" up to date and the data ports according to the "Output Data Image" area. Besides the exchange of input and output data carried out during the Data Exchange stage, information is exchanged in the normal operation cycle of the netw ork management in the other tw o stages. The operational detailing on each stage w ill permit to grasp the execution of the entire control process behavior, and, consequently, most part of the master behavior.

www.smar.com/en/asi.asp#a

14/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.20: Execution control stages Source: SANCHES, L.B. (2004)

7.6.4 Transm ission Phases After the supply voltage has been turned on, the master cycles through various transmission phases. First initialization takes place in the offline phase, follow ed by the detection stage, w hen the slaves connected to the bus are identified. After being detected, the slaves are activated on the next stage and are ready to enter the normal operation cycle (dotted line in Figure 7.20), w hich is formed by a data exchange phase, a management phase and finally an inclusion phase. As w ell as the cycle of data exchange, management and inclusion phases is identified as a normal operation, the offline phase composes the master initialization, w hereas the detection and activation phases compose the master start-up. Initialization Initialization during the offline phase places the master in base state. The data in the "Input Data Image" for all slaves are set to zero (inactive inputs), and the "Output Data Image" to one (inactive outputs). This ensures that the state of the slave outputs does not change w hen the master is turned on. The sequence control can be brought to any other state to the offline phase by setting the offline flag. The offline flag thus has the function of resetting the complete netw ork and the master. Startup In startup operation the sequence control detects all the connected slaves and activates them. In the detection phase the master sends requests to read the slave I/O Configuration and ID codes, one by one. Slaves that respond to all requests are entered in the List of Detected Slaves (LDS). Their I/O Configuration and their ID codes are stored in the Configuration Data Image (CDI). In the activation phase the master operation modes are considered as follow s: Configuration mode (also called as project mode); Protected mode. In configuration mode all detected slaves (w ith exception of the zero address) are activated by a "Parameter Request", w here all slave output parameters are w ritten, and a Data Request w ritten on the corresponding slave ports. If the slave responds correctly to these tw o requests it is activated and is included on the LAS. In protected mode only the detected slaves w hich are also listed in the List of Projected Slaves (LPS) and w hose I/O configuration and ID Codes agree w ith the projected configuration are activated. The master thus exchanges data only w ith the pre-configured slaves. At the end of the activation phase a check is made to see w hether the nominal (detected) and actual configuration (projected) agree and then Config OK flag is set. Figures 7.21 and 7.22 show flow sheets that simulate the master behavior on the detection and activation phases.

Figure 7.21: Detection phase flow sheet Source: SANCHES, L.B. (2004)

www.smar.com/en/asi.asp#a

15/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.22: Activation phase flow sheet

Norm al Operation The normal operation is w here the actual data w ith the connected sensors and actuators takes places. A cycle consists of data exchange, management and inclusion phase.

7.6.5 Function sequence in the m aster In normal operation after the detection and activation phase is concluded, there is cyclical communication betw een the master and all connected slaves. Such a cycle consists of the data exchange phase, the (optional) management phase and the inclusion phase. On each cycle, the management phase is attributed an AS-i transaction, and the same happens in the inclusion phase. This mechanism makes possible to keep a high scanning speed of all slaves, updating their output data and reading the input data in a same transaction, w ithout harming the management operation on the netw ork that occurs in the tw o other phases, w hich can be completed in multiple cycles. Figure 7.23 illustrates the behavior of the master during the Data Exchange phase. Note that the communication w ith a certain slave must fail along the 3 cycles so that it is removed from the lists of detected slaves (LDS) and activated slaves (LAS). This guarantees that the netw ork w ill operate adequately even in situations subject to noises that cause failures. In this last case, the Config OK flag is deactivated.

www.smar.com/en/asi.asp#a

16/18

21/10/13

SMAR - Tutorial on the AS-i Technology

Figure 7.23: Simplified flow sheet of the data exchange phase.

After the Data Exchange phase is completed, the management phase may begin. In the management phase acyclical telegrams are sent to the slaves. Unlike the Data Exchange phase, w hen all activated slaves are accessed before the next phase, only one telegram is sent and the functions requiring more than one telegram to be completed are executed through several cycles. During the management phase the master uses as many requests as possible to execute the tasks required by the host. If there is no function to be executed, the master may send status-reading telegrams, dumb telegrams or even send no telegrams in this phase. After the management phase, comes the inclusion phase, w hen all new slaves are searched at the end of each cycle. During each cycle, a slave is requested. This request is carried out by the transmission control w ithout repeat in case of error, because the error is not critical. If an activated slave responds, or there is no response, the next slave is requested at the follow ing activation phase. If a non-activated slave responds, its ID codes are requested on the next phases and the LDS is then updated. On the next phase, depending on the master operation mode, the slave is activated and moves into the LAS. The activation is carried out by sending a request parameter to the slave for update according to the Parameter Image (PI) field. Finally, on the last stage the master sends a data request by sending input data according to the "Input Data Image". Hence, a slave inclusion occurs the same w ay as for the start-up procedures. If a slave w ith 0 address is detected during the inclusion phase, even if a projected slave is not present, the automatic addressing is blocked by the deactivation of the "Auto_Address_Available" ag. The same happens w hen a located slave is not projected. The Config OK flag is set at the end of each inclusion phase. Immediately next, the Data Exchange phase of a new cycle begins. It is important noticing that each phase of the normal operation cycle alternates betw een the type A and the type B slave groups. Before the creation of the extended addressing, this did not happen, because the tw o types of slave did not exist. After the version 2.1, how ever, the cycle occurs alternately, as show n in Figure 7.24. It is w orth mentioning that the slaves compliant w ith the old specification are accessed in every cycle, since they do not have A/B differentiation. Therefore, the data scanning cycle on the extended address is tw ice as large as the previous one, but the old-specification slaves continue to perform the exchange of data in the same time as the previous cycle.

Figure 7.24: Normal operation of the execution control with extended addressing Source: SANCHES, L.B. (2004)

7.6.4 The m aster layer and the Interface 3 The master interface w ith the host (interface 3) is only defined in a logical w ay, w hile the implementation is up to the manufacturer to carry out. It is specified by the standards only as functions that should be executed by the master. The master layer is the one that adapts these functions to the specific host. As explained earlier, the host is normally a fieldbus system w ith an upper hierarchy, like a PLC or a PC. So, accessing the master and thus an AS-i netw ork is done in many w ays. If the host is a PC, for example, the master may be on a board connected to the main board and is accessed through drives that implement the function defined by the interface 3 and are adapted for this system on the master layer. The possibilities are virtually innumerable. If the host is a PLC, the master is nearly alw ays an external module, regarded as an ordinary I/O module, w hich is accessed by adequately mapped memory areas. The interface is implemented in a different w ay. The same reasoning applies to the AS-i gatew ays. On the market, there are AS-i gatew ays for Probus DP, DeviceNet, Modbus, and others. There are few functions that make possible the effective data exchange betw een the master and the slave. Most of them access the master data fields that maintain an updated image of the netw ork to collect the information they need. Those carrying the data exchanged are executed on the management phase, w hich may send a telegram on each cycle. The functions: "Read Input Data", "Write Output Data", They access the "Input Data Image" and Output Data Image" fields to return or w rite data adequately. "Write Parameter" It w rites a set of parameters on Parameter Image and also executes a request of parameter script on the management phase. Thus, w hen a request Read Parameter is performed by the host, the slave must be accessed directly, but only on the parameter image, w hich is alw ays updated w ith the slave real parameters. In addition to these functions there are: "Get LDS", "Get LAS", "Get LPS", They return the corresponding lists and also access the adequate data fields on the execution control. The permanent data are accessed by: "Get LPS"; "Get Permanent Parameter"; "Get Permanent Conguration"; And it is recorded by the corresponding

www.smar.com/en/asi.asp#a

17/18

21/10/13
"Set LPS",

SMAR - Tutorial on the AS-i Technology


"Set Permanent Parameter", "Set Permanent Conguration". Note that the functions that recording data permanently bring the master to the offline phase and reinitiate its behavior. It is also possible to read the configuration fields through the functions: "Read Actual Conguration Data", "Read Parameter Image". The functions: "Project Actual Conguration Data", "Project Actual Parameters" They imp

www.smar.com/en/asi.asp#a

18/18

You might also like