Industrial Communication
Introduction
●
Profibus = PROcess FIeld BUS
●Initialized in 1987 by the German Ministry for Research and Technological Development.
●Now managed by an association of PROFIBUS Manufacturers, Users and
research institutions
●More than 1100 members worldwide (Profibus International) ●More than 1100 members worldwide (Profibus International)
●
Conforms to standard EN 50 170
●
3 Versions of Profibus
●Profibus FMS ●Profibus PA ●Profibus DP http://www.profibus.orgProfibus Versions
Layers Used in ISO Model
●
3 Layers used for Profibus
APPLICATION Cyclical and Acyclical data services
PRESENTATION Not used
SESSION Not used
SESSION Not used
TRANSPORT Not used
NETWORK Not used
DATALINK Serial link Master/Slave or Token Ring if multimaster
Physical Layer
●
RS485 or Fiber Optic
●
Baudrate from 9.6 Kbps to 12 Mbits
●
Max distance without Repeaters: Depends on the Baudrate
Bit rate
9.6 Kb/s 187.5 Kb/s 500 Kb/s 1,5 Mb/s 3 Mb/s19.2 Kb/s 6 Mb/s
93.75 Kb/s 12 Mb/s
●
Maximum number of stations: 32 without repeaters, 122 with 3
repeaters
●Address range : 1 to 125
●Address 126 : reserved for address assignment via the bus
●Address 127 : reserved for broadcast and multicast
93.75 Kb/s 12 Mb/s
Connections
●
SubD 9 or Open Connector
VP* (6) B (3) VP* (6) B (3) 390 Ω Data line B 390 Ω B (3) A (8) DGnd* (5) B (3) A (8) DGnd* (5) 220 Ω 390 Ω 220 Ω 390 Ω A (8) B (3) Device 2 A (8) B (3) Data line A Device 3
Link Layer
●
Passive stations (slaves) uses the master-slave concept.
●Master polls the slaves one by one.
●The transmit message send to the slaves is called « PPO » (Parameter
Process Object).
●
Active stations communication is based on the token ring concept.
Frame Transmission
●
Up to 244 bytes of user data in one frame
●
Security mechanisms
Start Delimiter Length Destination address …. User Data (max. 244 bytes) Frame check sequence End delimiter●
Security mechanisms
● Start delimiter and End delimiter
● Parity bit
● Slip-free synchronization
● Frame Sequence Check (CRC)
Profibus Distributed Peripherals (DP)
●
3 Types of Stations
●DP Master Class1 (DPM1): Programmable controllers (PLC, PC, etc…)
●DP Master Class2 (DPM2): Development or diagnostic tool
●DP Slave: Peripheral device performing cyclic exchanges with its active station
●
3 Types of Profiles
●DP-V0: basic functionality of DP, including cyclic data exchange (implicit
exchanges) station, module and channel-specific diagnostics
●DP-V1: DP-V0 features + on request data communication for parameter
assignment (explicit exchange) alarm handling
●DP-V2: for isochronous mode and data exchange broadcast (slave-to-slave communication, dedicated for motion control)
Application Profile
●
Device Variable & Profile Defined in GSD File
●General specifications
●Information on vendor and device names, Hardware & software versions, supported transmission rates …
●Master specifications
●Contain all master related parameters, such as: the maximum slave
●Contain all master related parameters, such as: the maximum slave number that can be connected, or upload and download options.
● Or slaves specifications
● Contain all slave related specifications such as: the number and type of
I/O channels, diagnostic texts & information on the available modules in the modular devices case.
Standardized Profiles
●
IO Profiles Defined by the Organization
●Profibus provides some profiles depending of the application to define an interoperability between similar devices for different vendors.
●Examples:
●PROFIdrive (Speed drive device) ● Low-voltage switchgear
● Low-voltage switchgear
● Encoders
● Panel devices (HMI)
•ATV71
Data Exchanged
●
Fixed Mapping
●
PKW
●Reach any other data
Bytes 0 & 1 Bytes 2 & 3 Bytes 4 & 5 Bytes 6 & 7 INPUT PERIODIC Bytes 0 & 1 Bytes 2 & 3 Bytes 4 & 5 PKW Bytes 0 & OUPUT
●
Explicit Exchange
●Read / Write requests ●DPV1 only ! Bytes 6 & 7 Bytes 8 & 9 PKW Bytes 0 & 1 PKW Bytes 2 & 3 PKW Bytes 4 & 5 PKW Bytes 6 & 7 APERIODIC PKW Bytes 0 & 1 PKW Bytes 2 & 3 PKW Bytes 4 & 5 PKW Bytes 6 & 7
Configuration Parameters
●
Parameter Telegram
●Configuration of the device thanks to the fieldbus
Programming Modbus with Unity Pro
PRM: Profibus Remote Master
●
Not a Simple Gateway
●Standalone Profibus Master
●Polled by any Unity based PLC with IO Scanning
●
Configuration in the DTM Browser
●Configuration of the Master
●Configuration of the Master
●Configuration of Slave (3rd party DTM can be added)
●
Automatic IO Scanning Line & IODDT Variable Creation
●Program it as it was an in rack module
●
3 Compatible DTMs
●Master DTM
●Generic Profibus Device DTM
Hardware Description
●
4 leds for PRM and PROFIBUS diagnostic
●
Embedded dual port Ethernet switch
●Daisy chain (loop in a next step) ●2 status led / port
●2 status led / port
●
Sub D9 PROFIBUS RS485 connector
●9.6 Kbps to 12 Mbps
●
External 24V power supply
FDT / DTM Configuration
●
Field Device Tool
●Vendor tools integrated inside one tool
●Tools are Device Type Managers (DTM)
●
Benefit: Common Environment:
Frame Application●
Benefit: Common Environment:
●User Management ●DTM Management ●Data Management ●Network Configuration ●Navigation HART
(Device Type Manager DTM)
Device Tool Managers
Communication DTM Communication Driver Modbus, Ethernet, etc.. Gateway DTM Device DTM BTM BTM Device Driver Gateway DriverDTM in Unity Pro
●
DTM Browser
●Integrated DTM (implemented when module added from the PLC_Bus)
●Dedicated DTM (devices that can interact with Unity Pro application)
●Third Party DTM (Unity Pro used as any other FDT frame application)
Hardware Catalog
●
DTM Database
●Tools Menu – Hardware Catalog
●
Update Tool
●Used to add New devices inside the catalog
●Used to add New devices inside the catalog
●DTM must be installed in Windows before
DTM Transfer
●
With Project Transfer
●Integrated DTM
●
Direct Ethernet Communication
●Dedicated or Third Party DTM
Switch
PLC
DTM Transfer for Non Integrated DTM
PRM Master DTM
●
Master DTM
●Dedicated DTM to be used with Unity Pro
●Profibus topology description by instantiating Device DTMs in the FDT frame browser
●Profibus network scan capability
●PLC I/O Scanner lines automatically configured in Unity Pro to scan the
●PLC I/O Scanner lines automatically configured in Unity Pro to scan the PRM process image
●Ready-to-use structured variables automatically created in Unity Pro for the
Profibus devices
PRM Master DTM
●
Dedicated to Unity Pro
Ethernet UNITY Pro V5.0 Profibus PA PRM Input Profibus DP DP Class 1 PRM master DTM Generic DTM
PRM Generic Profibus Device DTM
●
Generic Profibus Device DTM
PRM CommDTM
●
CommDTM
●Supervision & partial configuration of the PRM
●Can be used in Unity and any FDT application and any FDT application
Master DTM and Comm DTM
●
Services Can Run in Parallel
UNITY Pro V5.0 PRM Com DTM
Asset Management Profibus PA PRM Ethernet Input Profibus DP DP Class 1 PRM master DTM Management
High availability with HSBY architectures
compatibility
PLC “primary” UNITY Pro V5.0 Asset Management PLC “secondary” Profibus PA Ethernet Input Profibus DP DP Class 1Exercise
●
PRM Master DTM (p6-17)
– Install the PRM DTM
– Add the PRM inside the Hardware Catalogue
– Add the PRM inside a Unity Pro project
Dynamic Assignment
●
IP Assignment Given By Servers
Switch Request for IP @Request for IP @
Switch Switch Server Your IP @ Your IP @ Client
BootP Server
●
Server Has a Populated List of Devices
●Devices identified with their MAC address
My MAC address is 00.80.F4.FF.00.D5, Can I get an IP Address?
Device #1 Master (Server)
00.80.F4.FF.00.D5 192.168.0.23
My name is 45.80.F4.FF.33.12, Can I get an IP Address?
00.80.F4.FF.44.21 192.168.0.81 00.80.F4.FF.F2.15 192.168.0.40
Sure! You are listed in my address table. Take this address: 192.168.0.23
Device #2
Sorry, you are not listed into my address table. Use your default IP address
BootP Server (Cont.)
●
Example in Unity Pro
●
Limitation: Device Cannot Be Changed without Reconfiguration
●As each device has a unique MAC address, replacing a failed device needs
DHCP Server
●
Same As BootP but Based on Role Name
●User configurable names used instead of MAC Addresses
My name is STBNIP2212_023, Can I get an IP Address?
Device #1 Master (Server)
STBNIP2212_023 192.168.0.23
My name is TesysT_072, Can I get an IP Address?
TesysT_046 192.168.0.87 ATV71_555 192.168.0.21
Sure! You are listed in my address table. Take this address: 192.168.0.23
Device #2
Sorry, you are not listed into my address table. Use your default IP address
DHCP How To Create Role Names
●
Depends on The Device
●Using embedded HMI (ex: ATV71)
●Using web based applications (ex: Advantys STB)
●Using dedicated applications (ex: Unity Pro)
●Using hardware switches (ex: Tesys T, Advantys STB)
●
Hardware Switches Example:
●Base name + Custom number derived from Switches
DHCP Server
●
Example with Unity Pro
●
Advantage: Easiness of Replacement
●Compared to the BootP method, replacing a faulty device with DHCP doesn’t need to reconfigure the PLC application.
FDR Server
●
Additional Feature of A DHCP Server.
●Send the stored configuration inside a replaced device
My name is TesysT_072, Save my settings now!
Device #1 Master (Server)
TesysT_072 192.168.0.87
Saved Config. of TesysT_072
Device #1 Device #1
Master (Server)
TesysT_072 192.168.0.87
Saved Config. of TesysT_072
New Device
My name is TesysT_072, Can I get an IP Address?
Sure! You are listed in my table. Take this address: 192.168.0.87
Moreover, I found a configuration corresponding to your role name. Here is your new configuration.
PRM General Settings
●
IP Used For DTM
Connection
●
DHCP Entry Automatically
Copied in the Network
Settings
●
Name Must Match with
Implicit Exchange: IO Scanning
●
Table of Words Exchanged Automatically Between Master & Slave
Master / Client
IO Scanning
IO Scanning (Cont.)
●
Debug View Online Mode (M340 and Premium Only)
IO Scanning Specific Integration Tool
●
Only with Compatible Devices
Transfer Organization
●
Transfer Unity Application to the M340
Exercises
●
PRM Configuration (p6-32)
– Set the MAC address
– Set the IP address: 192.168.0.X3
– Create the role name with the rotary switches
– Activate the DHCP
●
IO Scanning Configuration (p6-42)
– Add a network
– Configure the IP address of the M340: 192.168.0.X5
– Set the appropriate line in the IO Scanning
– Verify the address server
PRM Configuration Settings
●
Basic Settings
●Baudrate, stations range
●
Advanced Settings
●Advanced parameters
automatically calculated – to be changed only if needed
changed only if needed
●
IO Scanning
●Behavior in regards with the IO Scanning
PRM Basic Settings
●
Baudrate
●
PRM Master Address
●Used in case of multimaster
●
Highest Station Address
PRM Advanced Settings
●
TTR Management
●Token circulation (Multimaster)
●
Error Management
●
Other Timing Management
●Used if gateways, repeaters..
●
Calculated Timing
●
Device Watchdogs
●
Profibus Cycle
PRM IO Scanning Settings
●
IO Scanning Automatic Implementation
●
Scan Optimization
PRM Management
●
Dedicated Function Blocks Library
●
PRM_MGT
●Used to start the PRM master ●Depends on the PLC
Exercises
●
Modifying Some Settings (p6-54)
– Set the PRM watchdog to 5sec
– Set the Modbus Health timeout to 3sec
– Test the new settings
●
Enable the Profibus Master (p6-58)
– Install the Profibus Library
– Implement the PRM_MGT FB
– Insert the appropriate variables
– Operate the Master
Add Devices In The Database
●
Add Device with GSD
●Generic GSD DTM will be created from GSD.
●
Add Device from DTM
Add Devices In The Configuration
●
Device Menu – Add Device
●
Fieldbus Discovery
Device Profibus Parameters
●
Device Address
●
DPV1 Settings
●
Profibus Settings
●
Profibus Settings
Device Parameters
●
Device With DTM
Device Parameters
●
Device From GSD
Process Variables
●
Custom Names
Online Diagnostics
Online Diagnostics (Cont.)
●
Process Variables Diagnostic
Online Diagnostics (Cont.)
●
I/O Values
Online Diagnostics (Cont.)
Exercises
●
Add a Device from a GSD (p6-68)
– Add the GSD in the library
– Add the device in the DTM Browser
●
Configure a Device from GSD (p6-75)
– Change the address of the device to 5
– Change the address of the device to 5
– Configure the modules
– Configure the module’s parameter: fallback mode
– Update the IO Scanning
– Connect and test
DPV1 Explicit Exchange
●
Function Blocks
●PRM_ID
●Set the ID of which PRM to use
●RDREC
●Execute a read parameter request
●WRREC
DPV1 Explicit Exchange (Cont.)
●RDIAG
●Read diagnostic when the device requires it
Exercises
●
Diagnostic Management (p6-87)
– Create a diagnostic by tripping the Tesys U
– Read the diagnostic and reset the bit using RDIAG
●
Read Data Record (p6-89)
– Implement the RDREC to read the ID register
– Implement the RDREC to read the ID register
●
Write Data Record (p6-81)
– Implement the WRREC
Limitations Of The PRM
●PRM is
not compatible with EIP scanners
● Modbus protocol is compatible, but no link between PROFIBUS Master DTM and EIP configuration (EIP master DTM must evolve to accept a future PROFIBUS gateway DTM)
●
Limited redundant architectures
● No daisy chain loop,
● No dual master, no dual Ethernet attachment
●Miscellaneous
●
No online modification
of the PROFIBUS configuration● No import/export of the FDT/DTM configuration
● Empty Terminal Service depends of PLC memory capacity and number of DTMs ●Typical PROFIBUS DTM consumes 20 to 30 Kbyte
Profibus
●
Main Features Reminder:
●up to 100m at 12Mbit/s, 1200m w/o repeaters at 93,75kbit/s -●response time < 2ms at 12Mbit/s
●up to 126 devices, up to 32 per segment
●maximum 244 byte as user data per telegram ●shield used as reference point
●error detection: good (HD=4) ●low process data flexibility