field buses
TRANSCRIPT
Fieldbuses and the IEC61158 standard
Application
Automation
Discrete Process
Business
Control
Device
Bit-level sensor
LON
wor
ks
CA
N
Serip
lex
Prof
ibus
FM
SPr
ofib
us D
P
Ethe
rnet
Sens
or lo
op
AS-
i
Dev
iceN
et
SDS
Ethe
rnet
Ethe
rnet
Con
trol
Net
Prof
ibus
P-N
et FF H
SE
Swift
Net
Wor
ldFI
P
Inte
rbus
FF H
1
Mod
Bus
OC
TOB
US
: IEC
6115
8
PROFIBUS
PROFIBUS• PROFIBUS is a short form for PROcess FIeldBUS and is a vendor-independent, open
fieldbus standard.
• It was developed in Germany as a joint project between several vendors. The most important ones : Siemens, Klöckner Möller (now Moeller Electric), and Bosch. The first specification was ready spring 1990. One year later it was taken in as a part of the german standard (DIN 19245) and became later a European standard (EN 50170).
• PROFIBUS is now part of the new international, Octobus standard IEC 61158.
• The PROFIBUS uses the IEC 1158-2, RS-485 or Fiber Optic technology. With the new PROFInet, the PROFIBUS will open up for the communication on Ethernet.
• In PROFIBUS we use the term Profile for different :- Station types : Application Profiles (PA-devices, Encoders, Drivers, ..)- Protocols : Communication Profiles ( DP, FMS, TCP/IP)- Signal transmission: Physical Profiles (RS-485, IEC1158-2, O.F., Ethernet)
• This design philosophy enhances transparent communication both horizontally and vertically in a company. While PROFIBUS DP and PROFIBUS FMS are two compatible protocols, PROFIBUS PA is an application profile using the PROFIBUS DP protocol.
• PROFIBUS DP and PROFIBUS FMS use the same transmission technology, Fiberoptics or RS 485 (0 / 5V signals), but PROFIBUS PA, on the other hand, use the IEC 1158-2 transmission technology ( 0 / 20 mA).
• The next pages will explain the characteristics of DP, PA and FMS.
Communication Profiles
Physical Profiles
RS-485
IEC 1158-2
Optical Fiber
Application Profiles
PA
Encoder
PROFIDrive
PROFISafeDPPROFIBUS EN 50170
TCP/IPFMS
Etherne
t
PROFILES
Master
PLC
Slave Slave Slave Slave
- RS 485 - 9.6 kBit/s to 12 MBit/s
PLC
DP
DP : Distributed Peripherals
DP : Distributed Peripherals• The objective of PROFIBUS DP is fast and effective communication on the field level. It uses
RS 485 (Voltage levels 0 and 5 V) or Fiber Optics. The baudrate can be chosen from 9.6 kBit/s to 12 Mbit/s. The cycle time will also depend on the amount of data to be transmitted.
• The communication is build on the master/slave principle, with typically a PLC or a PC as a master and several stations as slaves: Digtal I/O, Analogue I/O, AC or DC drives, Magnetic or pneumatic valves, panels, etc.
• The DP stations must be assigned a unique address, a number (0 to 126). One master can handle at most 126 slaves. Each station can send or receive a maximum of 244 bytes.
• In RS 485, the network needs a repeater for every 32 stations. A repeater is also needed if the cable distance is long (100m at 12 Mbit/s, 1200m at 9.6kBit/s). The total length of the network can not exceed 10 km.
PLC
Operator
Panel
Valve Node Modular
I/O
DP - Example
DP - Example• The picture above shows some of the instruments on
production machine. It shows a PLC, a panel, a pneumatic valve node and a modular I/O station.
• The PLC is the master, the other three are slaves.
• The modular station is expandable with both analogue and digital I/O’s .
• All the stations are connected to the same PROFIBUS cable
PROFIBUS-DP 9.6kBit/s 12 MBit/s
Process Device
Manager
PROFIBUS-PA 31.25 kBit/s
Segment Coupler / Link
H2
H1+
x
x
PA : Process Automation
PA : Process Automation• The two main reasons for choosing a PA solution are : 1. Intrinsically safety: With PA it is possible to make intrinsically safe solutions. 2. Powering over the bus The PA-instrument can get its power supply over the bus, on the same two wires as data is transmitted.
• PA uses the DP protocol, and it can not exist without a DP master. The PA network will be a part of a DP network.
• The transmission technology used by PA is IEC 1158-2. The baudrate is fixed: 31.25 kBit/s , and the signal levels are 0 and 20 mA. Therefore it is a need for a signal translator between the PA and the DP part of the network. There are two kinds of such a translator : Coupler and Link.
• A Coupler does signal transmission only – Seen from the DP side, all the PA instruments act like DP stations. The coupler is totally transparent. If a coupler is used, the baudrate on the DP side will be fixed .
• A Link is equipped with intelligence so that the DP network can run with any of the H2 baudrates (9.6 kBit/s to 12 Mbit/s). The link has its own DP address – and the PA stations are addresses under this.
Master
FMS
PLC
Master Master Slave Slave
PLS
- RS 485 - 9.6 kBit/s to 12 MBit/s
FMS : Fieldbus Message Specification
• The objective for FMS is multimaster communication at the cell level. It is better for the transmission of larger amounts of data like programs or data blocks. Typically we use FMS between PLCs and PCs.
• FMS uses the same signal transmission technology as DP: Fiber Optics or RS 485 with voltage signal levels. The baudrate of FMS is as for DP : 9.6 kBit/s to 12 Mbit/s.
SCADA PC with CITECT and
PROFIBOARD
SIEMENS S300 PLC Moeller PLC
FMS - Example
FMS - Example
• We use FMS between the monitoring PC and the two PLCs
not used
DP PAFMS
Fieldbus MessageSpecification (FMS)
IEC 61158-2
PROFIBUS guidelines
IEC Interface*Fieldbus Data Link (FDL)
RS-485 / Fiberoptikk
EN 50 170 DIN E 19245 partl 4
DP-Functions
Application Profiles
The PROFIBUS protocols
The PROFIBUS protocols• The principles for the FMS, DP and PA protocols are
shown above. FMS and DP use the same transmission technology. The physical layer for these two protocols follow the standard EN 50 170.
• The PA standard for this layer is IEC 61158-2. • The next layer, the link layer, is equally described in
all three protocols.• At user level, DP and PA are equal and FMS is
different.
2 wires
shield
Wiring
Wiring
• The PROFIBUS-cable must have special characteristics conserning surge impedance, cable capacitance, core cross section, loop resistance and signal attenuation.
• It must be a twisted pair type cable with shield (braided and/or foil). A standard PROFIBUS cable has one green and one red wire. Red shall be connected to + or B and green to – or A at the PROFIBUS stations
Pin no Signal Description 3 RxD/TxD-P Data line B + (red wire)
5 DGND Signal Ground
6 VP Power for termination (P5V)
8 RxD/TxD-N Data line A - (green wire)
Pin assignement
Pin assignement
• Standard 9 pin D-sub contacts are used with the pin assignments as shown above. Of the 9 pins only 4 are in use : 3 and 8 for signal + and - , 5 for grounding and 6 for power to the termination.
Station 1 Station 2
Shield
RxD/TxD-P (3)
DGND (5)
VP (6)
RxD/TxD-N (8)
(3) RxD/TxD-P
(5) DGND
(6) VP
(8) RxD/TxD-N
390 Data line B
Data line A
DGND (5)
VP (6)
220
390
RxD/TxD-P (3)
RxD/TxD-N (8)
Termination, RS485
Termination, RS485• The PROFIBUS cable must have a termination in each end of
the bus. If this is not done, reflections will cause errors and the communication stops.
• The termination is done by connecting the two wires in the cable to a voltage as shown in the above picture. The resistance network lies usually inside the PROFIBUS contact and can be connected/disconnected to the VP and DGND by a switch on the contact. There are also some contacts that have no termination, and others with fixed termination.
Idle
Start 1 2 3 4 5 6 7 8 Parity Stop StartBit sequense:
1. octet
LSB MSB
2. octet
LSB
The smallest data package
• PROFIBUS DP uses high and low voltage to represent each bit . When nothing is transmitted, the voltage is high. The 8 bits of data are packed in packages of 11 bits as shown above : The first bit is a low start bit, then comes the 8 data bits. The last bit is a high stop bit. After the data bits and before the stop bit, the package has a parity bit. This bit is set to 1 (high) or 0 (low) depending on the number of ones in the data word – and so that there always are an odd number of ones among the 11 bits of the package. The station that receives the package can then check for the number of ones and in that way check if errors have occured during transmission.
• So – already in the physical layer – there is an overhead of 3 bits for every 8 databits. The 11 bits that carries one byte (8 bits) are called an OCTET.
• The physical code used in DP and FMS, is called NRZ : Non Return to Zero
tbit 1 bit 2 bit 4 bit 6bit 3 bit 5
1 0 1 01 1
I0
I0+9mA
I0-9mA
Data representationIEC – 6 1158-2
• PROFIBUS PA uses another bit representation than PROFIBUS DP.
• The picture above shows how the data is modulated on top of the 10 mA current – giving a signal that changes between about 19 mA and 1 mA. Notice the bit representation which is called Manchester Code In this code it is always a shift for each data bit ( this differs from the NRZ code used in DP, see previous page).
• A shift from high to low means 1 and a shift from low to high means 0.
Termination
Termination
2 3 30 31
62 61 33 32
Termination
Repeater
Repeater
Station 1
Stations, repeaters and segments
Stations, repeaters and segments
• Each PROFIBUS station is given a unique address which should be a number between 0 and 126. This means that it can never be more than 127 stations in a network. If the cables are long or the number of stations exceeds 32, it is a need for repeaters. Each segment has to be terminated in each end – see the picture above.
Aktive stations, MASTERS
Passive stations , SLAVES
PLCPLC PC
PROFIBUS
Logical token ring
Token ring
Token ring• PROFIBUS gives a deterministic network. This means that each
station is guaranteed the access to the bus within a fixed time.• This determinisme is taken care of by a token ring system –
administrated from the data link level. The token passes between the masters . The station that holds the token can control the bus. The master communicates with all its slaves during the period it has the token. The master either sends data to the slave or asks the slave for data. A slave can not send any data without a request from its master.
Exchange of data, master/slave
Data
Status
DP-
Slav
e
DP-
Mas
ter
Request
Data
DP-
Slav
e
DP-
Mas
ter
Slave Master
Master Slave
Exchange of data, master/slave
• The above picture shows the principle of data exchange between master and slave. The master gets the data telegram from a slave after having sent a request telegram. When the master sends a data telegram to the slave, the slave must respond with a status telegram.
1.) Token Passing
2.) FDL Status Request Telegram
3.) Data Telegram
SDx = Start Delimiter xDA = Destination AddressSA = Source Address
FC = Function CodeFCS = Frame Check SequenceED = End Delimiter
LE = LengthLEr = Repeated LengthDSAP = Destination Service Access PointSSAP = Source Service Access PointDU = Data Unit
SD4 DA SA
SD1 DA SA FC FCS ED
SD2 LE LEr SD2 DA SA FC DSAP SSAP DU FCS ED
TaleHead
The 3 most common PROFIBUS telegrams
The 3 most common PROFIBUS telegrams
• In the picture above each little box is one OCTET – except for the DU, the Data Unit, which can be one or more octets depending on the length of data.
• The Token Passing telegram is three octets = 33 bits.• The FDL Status Request telegram is 6 octets = 66 bits.• The Data Telegram has a head of 9 octets = 99 bits and a tale
of 2 octets = 22 bits.
Data transmission at 1.5 MBaud
” Idle time ” for master : typical 75 Tbit = 50 s ” Station delay time ” for slave : typical 11 Tbit = 7.3 s
Total, 2 bytes of data : (33+66+143+75+11)Tbit = 0.219 ms
Tbit = transmission time, 1 bit = 0.6667s
OCTET : 11 Tbit = 7.3 s
Token Passing : 33 Tbit = 22 s
Status / Request : 66 Tbit = 44 s
Data : Head (9 octets) + Tale (2 octets) + Data (n octets)2 bytes of data : 13 x 11 Tbit = 143 Tbit = 95.3 s
Data transmission at 1.5 MBaud• The example above shows how long time it takes to send 2 bytes of data, either from master
to slave, or from slave to master. When calculating transmission times, it is common to use the term Tbit :
• 1 Tbit = the transmission time for 1 bit.
• 9.6 kBit/sek 1 Tbit = 0.1 ms• 19.2 kBit/sek 1 Tbit = 0.05 ms • .• .• 12 Mbit/sek 1 Tbit = 0.08s
• In addition to the actual time for transmission, we must also calculate the time spent at the master side (Idle time for master) and at the slave side ( station delay time). In this way we can calculate the transmission time for all transmissions to/from all the slaves. Then we can calculate the total cycle time, taking into account an extra 10 to 20% for retransmitting and diagnostics.
Configuration
PROFIBUS Configuration Software
System Configuration
Electronic Data Sheet (GSD - files)
PLC
PROFIBUS
GSD GSD GSD GSD GSD GSD
PLC
Configuration• The configuration of the PROFIBUS network is done in the software for the master.
So – it looks a bit different for the Omron PLC than for the Siemens PLC. But the principle is the same. Each PROFIBUS station must be accompanied by a GSD or GSE file which is an electronic data sheet. (GSD is German and stands for Geräte Stamme Datei). GSD-files can be downloaded from the PROFIBUS web site (www.profibus.com).
• The GSD-files must be installed in the hardware catalogue or data base of the configuration software. The network is configured by connecting to the PROFIBUS network the actual stations which must be present in the catalogue.
• Each station is referred to by its address. The baudrate, cycle time and other bus parameters are also set during configuration. The software gives default values of the bus parameters.
THE END