PROFIBUS: THE LONG RUN Profibus FMS (Fieldbus Message Specification), 1991 ISO-OSI levels 1,2,7 PLC-PLC, PLC-SCADA, PLC-Field device (complex, obsolete) Profibus DP (Device Peripheral), 1994 Simpler than FMS, normally 1 master (PLC), several slaves (field devices) Market leader Profibus PA (Process Automation), 1995 Different and more robust physical layer (IEC 61158-2) Profinet, 1991 Different from Profibus, integrated with ICT www.profibus.com IEC 61158/61784 Type 3 1
PROFIBUS: THE LONG RUN www.profibus.com IEC 61158/61784 Type 3 2
PROFIBUS: THE LONG RUN OS OS Internet PROFIBUS on Ethernet/TCP-IP PLC Manufacturing IPC Process RS 485 or FO PROFIBUS DP RS 485-IS or MBP-IS PROFIBUS DP/PA AS-Interface 3
PROFIBUS: ACTORS 4
PROFIBUS: DPM1 5
PROFIBUS: NORMALLY NOT MULTI-MASTER Multimaster by token ring Not-selected master can appear as a slave of the master with token Multimaster by gateway coupler- (not really multi-master) Combination of two fast monomaster systems (up to 244 byte of mailbox) From siemens 6
PROFIBUS: HIDDEN FOR MASTER PROGRAMMER PROFIBUS DP: interfaccia DP sui master Nel master girano due processi: l applicazione di automazione e il task di comunicazione. Questi processi sono separati. Dunque, generalmente, il Ciclo Applicazione e il Ciclo DP non sono sincronizzati. MASTER (PLC,DCS) APPLICAZIONE Download Tool di programmazione Ciclo Applicazione programma applicativo Immagine INPUT Immagine OUTPUT INTERFACCIA DP Ciclo DP Download configurazione PROFIBUS DP Tool di configurazione 7
PROFIBUS: UP TO 124 SLAVES 0 Servizi di diagnosi, programmazione 1 Master (di classe 1) Riservato, non assegnare agli slave 2 125 Slave (max 124 salve diversi) 126 Indirizzo per il servizio Set slave address Riservato, non assegnare agli slave 127 Indirizzo broadcast Riservato, non assegnare agli slave 8
PROFIBUS: THE PHYSICAL LAYER Mezzi trasmissivi: Caratteristiche RS 485 Doppino twistato e schermato Baudrate compresi tra 9.6 kbit/s e 12 Mbit/s 32 dispositivi per segmento Distanza = 100 m @ 12 Mbit/s (1000 m @ 187.5 kbit/s). La distanza può essere estesa per mezzo di repeater MBP-IS (automazione di processo, zone a rischio esplosione) Doppino twistato e schermato Baudrate fisso a 31.25 kbit/s Alimentazione dal bus e sicurezza intrinseca opzionale Da 10 a 32 dispositivi per segmento Distanza fino a 1900 m per segmento Fibra ottica (insensibilità ai disturbi) Fibre Monomodali, Multimodali, Plastiche o PCS/HCS Baudrate compresi tra 9.6 kbit/s e 12 Mbit/s Distanza con può essere estesa con repeater fino a 100 km NB: Dipendono dal consumo e dalla classe Ex 9
PROFIBUS: THE PHYSICAL LAYER RS485 / RS485-IS Cavo a 2 fili per applicazioni generiche Three media allowed FOC Cavo a fibre ottiche (Protezione EMC, Lunghe distanze) MBP / MBP-IS Cavo a 2 fili, autoalimentato per applicazioni a sicurezza intrinseca Accopp. FO Accopp. FO MBP = Manchester Bus Powered IS = Intrinsecally Safe 10
PROFIBUS: THE PHYSICAL LAYER, RS485 RS 485: La tecnologia di base Dispositivo Max 32 dispositivi Resistenze rx in parallelo Dispositivo La ricezione avviene su un impedenza RX TX RX TX Il bus deve essere terminato + 5 V + 5 V 390 I I 390 B B 220 V bus diff 220 A A 390 GND La trasmissione avviene per mezzo di una corrente La tensione differenziale minima èdi ±200 mv (solitamente 4-5V) La rete di terminazione deve essere alimentata (corrente di polarizzazione) GND 390 11
PROFIBUS: THE PHYSICAL LAYER, RS485 RS 485: waveforms Line B Line A Differential voltage B-A 12
PROFIBUS: THE PHYSICAL LAYER, RS485 DB9 connectors (or M12 if vibrations) Pin Nome segnale Descrizione 1 Schermo Schermo, terra, calza del cavo 2 M24 Massa per l uscita a 24 V 3 Linea B RXD-TXD (ricezione trasmissione) positivo 4 CNTR-P Segnale di controllo direzione per repeater (RTS) 5 DGND Massa digitale (per la terminazione) 6 VP Alimentazione 5 V (per la terminazione) 7 P24 Alimentazione a 24 V 8 Linea A RXD-TXD (ricezione trasmissione) negativo 9 CNTR-N Massa segnale di controllo direzione device stub 13
PROFIBUS: THE PHYSICAL LAYER, RS485 Everything is under control TXD-P or Line B (red) TXD-N or Line A (green) 14
PROFIBUS: THE PHYSICAL LAYER, RS485 RS 485: Topologia Nel collegare i dispositivi l uno all altro bisogna tenere gli stub (derivazioni) più corti possibile (la max. lunghezza degli stub dipende dal baud rate) Ogni dispositivo deve avere la propria fonte di alimentazione Se si usano baud rate uguali o superiori a 1.5Mbit/s bisogna tenere i cavi sempre più lunghi di 1 metro Le terminazioni devono essere sempre alimentate Max 32 stazioni Connettore con terminazione attivata Connettore con terminazione disattivata Alim. Alim. Alim. Alim. 15
PROFIBUS: THE PHYSICAL LAYER, RS485 RS 485: the termination problem Le terminazioni sono attivate solo agli estremi Tre terminazioni attivate Questo segmento è sconnesso 16
PROFIBUS: THE PHYSICAL LAYER, RS485 Active terminations solve the problem of turn-off a node Terminazione attiva Terminazione attiva ON ON Alim. Alim. Master 17
PROFIBUS: FDL (FieldBus Data Link) Note: SD3 practically unused 18
PROFIBUS: FDL (FieldBus Data Link) PROFIBUS FDL: Message SD2 (data exchange) SD2 LE LEr SD2 DA SA FC DATA UNIT FCS ED L SD2 Start Delimiter (68H) LE Information length (from 4 to 249) LEr Information length repeated (Hamming distance = 4) DA Destination address SA Source address FC Frame Control DATA UNIT Data field (max length 246) FCS Frame Check Sequence ED End Delimiter (16H) L Information length (L = from 4 to 249) 19
PROFIBUS: FDL (FieldBus Data Link) PROFIBUS FDL: Message SD1 (data request or Ack) SD1 DA SA FC FCS ED L SD1 Start Delimiter (10H) DA Destination address SA Source address FC Frame Control FCS Frame Check Sequence ED End Delimiter (16H) L Information length (L = 3) 20
PROFIBUS: FDL (FieldBus Data Link) PROFIBUS FDL: Message SD4 (token transfer) SD4 DA SA SD4 DA SA Start Delimiter (DCH) Destination address Source address PROFIBUS FDL: Message SC (short Ack) SC SC Short acknowledgment (E5H) 21
PROFIBUS: RULE OF THUMB How to easily estimate the cycle time of data exchange Max. performance at 12 Mbaud (Tbit=83ns, Tbyte=11Tbit=0.917μs ~ 1μs) Slaves are cyclically polled Each slave takes a time Tmc equal to the sum of time taken by the request message from master to that slave and the response message Tmc ~ 28 μs + TdataI/O Tcycle ~ Nslave(28 μs + TdataI/O) Es. Nslave = 32, TdataI/O = 4 byte, Tcycle = 32*32 μs ~ 1 ms 22
PROFIBUS: DIRECT DATA LINK MAPPER 23
PROFIBUS: THE SLAVE 24
PROFIBUS: THE GSD FILE 25
PROFIBUS: PROFILE 26