DRL PFB USB - Manual
DRL PFB USB - Manual
Profibus DRL-MPI-USB
DRL-PFB-USB
Direct-Link® PC Network Interfaces
1. Overview.........................................................................................5
Introduction..............................................................................................................5
Prerequisites ...........................................................................................................5
USB requirement.....................................................................................................6
2. Installation......................................................................................7
Installation procedure ..............................................................................................7
Driver installation.....................................................................................................7
7. S5 messaging...............................................................................35
Description of S5 messaging ................................................................................35
Devices parameters ..............................................................................................36
Supported features................................................................................................38
Frame size limits ...................................................................................................44
Configuration and setting of PROFIBUS PLC couplers (SINEC® L2)..................45
8. PROFIBUS DP messaging...........................................................53
Description of Profibus DP-V0 ..............................................................................53
Description of Profibus DP-V1 ..............................................................................56
Profibus DP master supported features ................................................................57
Profibus DP slave supported features...................................................................58
Introduction
The Direct-Link™ PC Network interfaces solution DRL-MPI-USB enables your applications to
communicate with Siemens PLCs and compatible equipment using the.
S7 protocol (S7-300, S7-400) manufactured by Siemens
MPI protocol (console outlet) manufactured by Siemens
MPI slave protocole (S7-200) manufactured by Siemens
The Direct-Link™ PC Network interfaces solution DRL-PFB-USB offers, in addition to the DRL-
MPI-USB solution
Profibus DP-V0 master/slave class 1&2 EN50170
Profibus DP-V1 master class 1&2 EN50170
Simatic S5 messaging manufactured by Siemens
These solutions uses the USB100PFB network adapter compatible with Profibus standard EN
50170 (RS485 with 500 Volts galvanic insulation) at speeds ranging from 9.6 kbps up to 12 Mbps.
Remarks:
• These solutions don’t require any external protection system to run.
• However, Data servers are an optional feature and required appropriate rights to run.
Without these rights, only the DLL library is available.
The rights are burned in the USB adapter before shipping. It is however possible to
upgrade your rights on site by entering a code supplied by your retailer.
For more information, please refer to the manual “Software protection and options”
• The supplied USB adapter is strongly linked with the ordered solution (DRL_MPI_USB or
DRL_PFB_USB) and cannot be used indifferently with both solutions.
• Profibus DP-V1 is supported only through DLL access.
Prerequisites
The DRL PCNI product is compatible with Microsoft Windows 2000 (SP4 recommended),
Windows XP (SP2 recommended) and Windows 2003 Server.
The DRL PCNI solutions require a specific firmware embedded in the BradCommunications
USB100PFB module. As a consequence, DRL-MPI-USB and DRL-PFB-USB solution cannot
run with a USB100PFB module delivered with other products (e.g. BradCommunications
USB100PFB commDTM module, …)
Only one BradCommunications USB100PFB module must be plugged at the same time
Be sure that the “Power Options Properties” in the “Control panel” of your computer will not
suspend the USB port, especially when the usb solution is used on a laptop.
It is recommended to use USB cable supplied along with the product. If longer cable is required, the
USB cable must be certified and capable of USB high-speed.
Installation procedure
To use the DRL PCNI solution on BradCommunications USB100PFB module, during software
installation, select the Profibus EN50170 protocol.
Driver installation
After software installation, first time you will plug the BradCommunications USB100PFB module,
the operating system will ask you to install the driver. To do this, just click on button of every
window as indicated bellow:
Note :
LEDs
There are three LEDs on the BradCommunications USB100PFB module:
one LED near the USB connector
two LEDs near the Profibus connector
Colour Signification
OFF USB cable not connected or Suspend mode activated (power
energy management )
RED USB Enumeration in process. Once the USB modem connected,
the led remains red until the USB connection between the
Windows driver and the module is completed.
GREEN USB Connection established
Colour Signification
OFF Communication not initialized
RED Physical bus access error :
Check if the Profibus Connector is plugged or check the complete
Profibus wiring, termination resistor set at both ends…
GREEN Network ready
Colour Signification
OFF Communication not initialized
RED Layer 2 error or Init error
Check the Profibus :
• Timing configuration.
• Profile chosen.
• Parameter configuration (HSA, TTR, TSLOT,..).
GREEN Communication ready
Note
For more information about troubleshooting your Profibus network, see
the chapter “In case of problems”.
Environmental specifications
Storage temperature: -20°C to 70°C
Operating temperature: 0°C to 55°C
Humidity: 5% to 95% RH non-condensing
Typical Current Draw for USB connection: 350mA
Power on Profibus connector: 100mA maximum
Galvanic isolation: 500V (UTE C93-703 rules)
• Select the DRL-MPI-USB or DRL-PFB-USB solution with the menu Description / Add a
board or with the button
• Then, configure Profibus master’s parameters. For that, Double-click on the icon
symbolizing the master in the Protocol view.
• Configure the parameters according to your master configuration. Help for each field is
available directly in the Configuration console in the description field.
Activate the network detection with the menu command “Network/Read network
configuration… ” or with the button
Note
To be able to insert a DP device in the configuration, you must own its
GSD description file. This GSD file, provided by your device
manufacturer, must be inserted previously in the Device Library of the
configuration console
see also the “implementation” manual
When adding a detected device other than Profibus DP in the Protocol view, a
dialog box appears enabling you to specify the type of messaging to use :
Note
All kinds of Profibus stations are always detected (DP, S5, S7,…
devices). Stations not supported by the DRL-MPI-USB solution should
not be inserted when this solution is used.
Your BradCommunications USB100PFB module is not yet linked to your Profibus network, but you
know the devices to be configured.
Note
To be able to insert a DP device in the configuration, you must own its
GSD description file. This GSD file, provided by your device
manufacturer, must be inserted previously in the Device Library of the
configuration console
see also the “implementation” manual
Description of S7 messaging
Using the S7 messaging, it releases the PG interface (MPI port) by connecting directly on any
Profibus coupler socket of the S7 PLC. S7 functions allow PLCs to communicate together in client and
server mode, up to 12 Mbs transmission speed. This S7 messaging allows a direct access to the S7 CPU
memory tags.
Topic Name:
The name of the topic. This name is used in Data servers (OPC, PCDDE, …) to
access the device.
Number:
Number affected to this device.
Comment:
Describes the device
Station Address
Profibus station address configured on the device
If the Link parameter box is checked, you cannot change this value which is set
identical to the device number
Local SAP:
Local SAP must be different to Station Address. It must be different for each devices.
The maximum value is 53. So, only 54 devices (SAP 0 to 53) could be accessed.
When a new device is inserted in the configuration, the local SAP is automatically set
to the station address + 1 (only if the station address is less than 52)
Link parameters
Station Address is automatically set according the Number parameter.
Active Configuration
Activate the device configuration in the applicom® interface: used to delete a device
from the applicom® interface while keeping its configuration in the console.
Note
Not all parameters are described in this documentation. For more information
on each parameter, refer to description field in the configuration console.
x DB number
y: Byte number
z: Number of the bit in the byte (0 to 7).
n : No. of the timer or of the counter (0 to 99)
Addressing limits:
Remarks:
The PROFIBUS S7 communication is currently validated on couplers CP 342-5 and CP
443-5.
Only the current value (CV) of the timers and counters can be accessed (read and write).
By default, any read request of words , double words or floating words will return an arry of
consecutive data in memory. So,
- if you read two words, starting a word MW1, the word MW1 and MW3 will be returned
(build respectively with bytes MB1-MB2 and MB3-MB4)
- if you read two double words, starting a word MD2, the double words MD2 and MD6 will be
returned (build respectively with bytes MB2 to MB5 MB2 and MB6 to MB9)
In order to simplify your application’s design and also to optimize communication when OPC or
DDE servers are used, our recommendation is o leave the default options and
- to always use even addresses for word data ( MW0, MW2,…)
- to always use addresses multiple from 4 for double word and floating data (MD0, MD4,…)
However, you may need to access word, double words or floating words whose addresses are
aligned on even or odd addresses. To solve this problem, you can select the required addressing mode in
the configuration console (switched in “expert mode”), on byte, word or double word addresses. By
making a request to read several words, you can then access a table of words irrespective of their
physical addresses.
Example 1: An application wants to read in a request the word MW11 and the word MW13 . It will
therefore use a read request from address 11.The response content will take the following form:
Obviously, this addressing principle cannot be applied to writing several variables in a request.
Writing 2 words from address 11
Advanced Note
You can however force the use of another descriptor (generally, the
standard descriptor, composed of generic syntaxes which can be used
irrespective of the protocol or the messaging. This descriptor can be set
using the advanced options – see your data server manual). Pay
attention however, the syntax descriptor also determines some request
optimization features related to the type of device targeted and the data
mapping of this device. If you change the default descriptor, some
device access optimizations will therefore be disabled, with a possible
loss of performance.
The Siemens S7 PLC descriptor allows you to use S7 syntaxes documented in the following table.
Remarks:
Warning
Use of String, array and Matrix modes requires some precautions due to data
alignment configuration (see previous chapter in this manual) .
For an alignment on byte addresses when reading 16-bit words or an
alignment on byte or word addresses when reading 32-bit words, the write
continues to use word addressing for the 16-bit words and double words for the
32-bit words. With array and matrix mode, an item symbolizing for example a
word array does not designate the same variables in write as in read.
Consequently, array and matrix mode can only be used in read.
Note
The limit values for parameters n and l depend on the protocol. With PCDDE,
however, they can never exceed 128 for the bits and the bytes, 64 for the
words, 32 for the double words and the floating words.
Notes
With the OPC, DAS or DDE/SuiteLink data servers, If you use the
default syntax descriptor (Siemens S7 PLC descriptor), the server will
make the optimizations for read access:
All the unitary data will be accessed by reading bytes ( so
200 bytes max by frame)
Others limitations applies only in case of arrays or strings.
Notes
With PCDDE, each variable writing results in the creation of a frame.
• Then, declare the hardware configuration of your PLC. You will need to declare:
1 Rack
1 Power supply
1 CPU (note the slot number for the server device configuration)
1 Coupler "PROFIBUS" CP443-5.
• Click on "PROFIBUS"
• Load the configuration in the PLC in “Stop" mode, then switch into "Run".
The green indicator lamps of the CPU and the coupler must be lit steady.
• The coupler is ready to operate and to be connected.
Note
When devices are disconnected from the network, communication
errors may occur (status 54 or 55 ). To avoid these problems, it is best
to choose the customized profile, and adjust the value of Tslot.
In MPI Slave, the used messaging is the S7 messaging embedded in DPV1 Class 2 exchanges.
Topic Name:
The name of the topic. This name is used in Data servers (OPC, PCDDE, …) to
access the device.
Number:
Number affected to this device.
Comment:
Describes the device
Station Address
Profibus station address configured on the device
If the Link parameter box is checked, you cannot change this value which is set
identical to the device number
Link parameters
Station Address is automatically set according the Number parameter.
Active Configuration
Activate the device configuration in the applicom® interface: used to delete a device
from the applicom® interface while keeping its configuration in the console.
Note
Not all parameters are described in this documentation. For more information
on each parameter, refer to description field in the configuration console.
y : Byte number.
z : Number of the bit in the byte (0 à 7).
Remarks :
The MPI Slave PROFIBUS communication is currently validated on couplers 215, 216, 221,
222, 224, 224XP, 226 on the EM277 Profibus DP
Advanced Note
You can however force the use of another descriptor (generally, the
standard descriptor, composed of generic syntaxes which can be used
irrespective of the protocol or the messaging. This descriptor can be set
using the advanced options – see your data server manual). Pay
attention however, the syntax descriptor also determines some request
optimization features related to the type of device targeted and the data
mapping of this device. If you change the default descriptor, some
device access optimizations will therefore be disabled, with a possible
loss of performance.
area Size/nb
mementos 65536 bytes 0 <= x <= 65535 0 <= y <= 7
Inputs 65536 bytes 0 <= x <= 65535 0 <= y <= 7
Outputs 65536 bytes 0 <= x <= 65535 0 <= y <= 7
Warning
Use of String, array and Matrix modes requires some precautions due to data
alignment configuration (see previous chapter in this manual) .
For an alignment on byte addresses when reading 16-bit words or an
alignment on byte or word addresses when reading 32-bit words, the write
continues to use word addressing for the 16-bit words and double words for the
32-bit words. With array and matrix mode, an item symbolizing for example a
word array does not designate the same variables in write as in read.
Consequently, array and matrix mode can only be used in read.
Note
The limit values for parameters n and l depend on the protocol. With PCDDE,
however, they can never exceed 128 for the bits and the bytes, 64 for the
words, 32 for the double words and the floating words.
Notes
With the OPC, DAS or DDE/SuiteLink data servers, If you use the
default syntax descriptor (Siemens S7 PLC descriptor), the server will
make the optimizations for read access:
All the unitary data will be accessed by reading bytes ( so
76 bytes max by frame)
Others limitations applies only in case of arrays or strings.
Notes
With PCDDE, each variable writing results in the creation of a frame.
Then load the configuration in the PLC. The green indicator lamps of the CPU and the coupler
must be lit steady. The coupler is ready to operate and to be connected, after running the launch file
"pcinit".
Description of S5 messaging
The S5 messaging developed by Siemens France uses the SDA services. This access is materialized by
a program section (supplied by us in the product) to be integrated in the Siemens PLCs. This program
consists of an FB(FB100). It is validated on the CPUs 928, 928B, 942, 943, 943B, 944, 944B, 945, 946,
947, 948, 948B and on the 95U. The solution is always client of the exchanges and the PLCs are always
servers.
S5 messaging is carried in the "Data" part of a PROFIBUS telegram. Management of this protocol is
completely transparent for product users.
S 5 Byte 0 & 1
00 : Read Object type DB No. Byte 2 & 3
01 : Write (6 bits)
(2 bits) (If type 01 otherwise 0)
Address of first object Byte 4 & 5
Number of objects Message counter Byte 6 & 7
Object type:
Topic Name:
The name of the topic. This name is used in Data servers (OPC, PCDDE, …) to
access the device.
Number:
Number affected to this device.
Comment:
Describes the device
Station Address
Profibus station address configured on the device
If the Link parameter box is checked, you cannot change this value which is set
identical to the device number
Local SAP
SAP that transmits the request (0-53).
For the S5-115U/135U/155U :
- Local SAP must be different to physical PLC address
For the 95U:
- Local SAP = Physical PLC address (parameter TLN) + 1.
Remote SAP
For S5-115U/135U/155U
- Remote SAP = LSAP ( Service Access Point Local) cpu job.
For the 95U:
- Remote SAP = Physical address of the communication channel (parameter TS)
+1
Note
Not all parameters are described in this documentation. For more information
on each parameter, refer to description field in the configuration console.
The SMerkers and the DX cannot be accessed with all Siemens CPUs.
For access to words in the mementos or in the SMerkers, to input words and output words,
these words are accessed in a byte area, word 1 being composed of bytes 1 and 2, word 2
of bytes 2 and 3, etc. The words therefore overlap on each other.
For access to double words and floating words in the mementos or in the SMerkers, these
variables are accessed in a byte area, double word 1 being composed of bytes 1, 2, 3 and
4, double word 2 of bytes 2, 3, 4 and 5,… The variables therefore overlap on each other.
Remark:
the limiting values of the parameters n and l depend on the protocol.
Remark:
the limiting values of the parameters n and l depend on the protocol.
Object
Bit 1600
Byte 200
Word 100
Double word, floating word 50
Timer/Counter 100
Notes
With the OPC, DAS or DDE/SuiteLink data servers, If you use the
default syntax descriptor, the server will make the optimizations for
read access:
All the unitary data will be accessed by reading bytes in
memento and words in Data Blocks
Others limitations applies only in case of arrays or strings.
Notes
With PCDDE, each variable writing results in the creation of a frame.
Notes
* : A bit write request limited to a maximum of:
- 8 bits for a memento or a Smerker with start address modulo 8
- 8 bits for the outputs with start address modulo 8
-16 bits for a DB or a DX with start address modulo 16
Example:
You can force on an output board:
8 bits from address 0
7 bits from address 1
etc.
Communication between the PLC processor and the coupler is carried out via a dual port RAM
thereby ensuring very fast exchanges. This data exchange is carried out using communication blocks
which are PLC sub-programs partly supplied with the product. The CPUs supported are 95U, 928, 928B,
942, 943, 943B, 944, 944B, 945, 946, 947, 948, 948B.
These sub-programs are stored in directory install\simatic\simatic.s5 on the CD-ROM.
You must then transfer this file into the PLC CPU. When this block is called you must enter the following 3
parameters:
SYNCHRON
Initialization and synchronization between the CPU and the CP.
This block calls the SEND and RECEIVE functions, a data block DB150.(not modifiable) and the
mementos MB255,MB0,MB1,MB2,MB3,(MW0 and MW2).
Remark: The " FB100 " of the S5-95U uses another specific program "FB101" integrated with file
L2RW95ST.S5D
SEND
Transmission of data from the processor of the S5 PLC to the communication coupler.
RECEIVE
Reception of data from the network to the PLC program via the communication coupler.
Remark:
The FB Server SINEC® L2 "FB100" is called in a given PLC cycle as many times as there different
connections to 1 or more PCs, referring to different contract numbers.
Example:
The following example shows how these function blocks must be called if you are using a PLC in
the S5-115U family. Note that the number of the function blocks differs from one type of PLC to another.
The SYNCHRON block must be called by the PLC program on each hot or cold restart of the PLC.
In block OB1 you must call block FB100. This special block links the SINEC® L2 reception request
to the PLC data area.
The Profibus protocol uses access to layer 2. The service used is SDA (Send Data with
Acknowledge).
TYPE
To define an access to layer 2, TYPE must be OUV.(link open)
PRIO
Access on SINEC® L2 can be defined in high or low priority.
SSNR
You must enter the SSNR (memory page area) (range of values 0 to 3)
ANR
Configurable as you choose, "job number" is used during direct accesses to layer 2, ANR
must be between 134-186., parameter ANR of the SIEMENS special block (FB100) must be
initialized to this value.
SAP
SAP (Service Access Point) is an address extension. All frames are received / transmitted by
this SAP.
Configuration is carried out with COM 5430 TF software under SINEC® NCM supplied by
SIEMENS. When the software is started and open, you must configure each part of the CP 5430 board.
You must configure the system identification "SYSID" via the menu Edit\Init CP. In this section you must
enter the L2 address of the station, the station type (must be Active), the base No-Int, the number of
interfaces (CP5430) and parameters complementary to your project. You must now configure the network
parameters then create a logical link via the menu Edit\Links. Choose Free layer 2 link, the following
screen is displayed:
The Profibus protocol uses access to layer 2. The service used is SDA (Send Data with
Acknowledge).
PRIO
Access on SINEC® L2 can be defined in high or low priority.
SSAP
Local Service Access Point is an address extension. All frames are received / transmitted by
this SAP.
No_I
You must enter the SSNR (memory page area) (range of values 0 to 0.3)
No_O
Configurable as you choose, "job number" is used during direct accesses to layer 2, No-O
must be between 134-186., parameter ANR of the SIEMENS special block (FB100) must be
initialized to this value.
A configuration example for the CP 5431 FMS coupler is provided in the directory
install\simatic\simatic.s5\s5 of the CD-ROM
Configuration is carried out with COM 5431 FMS software under SINEC® NCM supplied by
SIEMENS. When the software is started and open, you must configure each part of the CP 5431 board,
as below:
1) Configure the coupler identification via the menu Edit\initialize CP.In this section you must enter
the L2 address of the station, the station type (must be Active), the base SSNR, the number of
interfaces (CP5431) and parameters complementary to your project.
2) You must now configure the network parameters via menu Edit\Conf.Local-Networks. The
following screen is displayed:
3) Then create a logical link via menu Edit\Links. Choose Layer 2 link free, the following screen is
displayed:
PRIO (H/L) :
Access on SINEC® L2 can be defined in high or low priority.
SSAP :
Local Service Access Point is an address extension. All frames are received / transmitted by
this SAP.
SSNR :
You must enter the SSNR (memory page area) (range of values 0 to 0.3)
ANR :
Configurable as you choose, "job number" is used during direct accesses to layer 2, ANR
must be between 134-186., parameter ANR of the SIEMENS special block (FB100) must be
initialized to this value.
The contract No. corresponds to parameter ADDR, remote station address (@ PC), passed in on
calling the function block FB100.
For further details on the DB1 parameters, refer to the manufacturer's documentation
Remarks:
The link type is AGAG.
The priority must be low (Caution! Make sure to define same priority on the PC side),
ADDR contract No. = SINEC® L2 address of the PC.
the class 1 DP master functionalities for optimized exchange of input/output data and equipment
diagnostics,
the class 2 DP master functionalities for access to equipment belonging to other masters and
reading the DP slave input/output configurations,
Multi-master operation, to enable several profibus masters to run on the same network (for
example: a class 2 DP master and a class 1 DP master). This operation is based on the token
ring. It is a logical ring where each master station passes in a defined order (of increasing
address), the token giving the right to transmit or pass its turn.
The information required for equipment configuration is contained in a file of type XXXXXX.GSD which is
supplied by the manufacturer. It is required to import the GSD file in the equipment library of the
configuration console..
The format of the GSD file is described in the standard EN 50170, volume 2, PROFIBUS.
• Equipment initialization:
For the dedicated equipment, the DP master uses the function DDLM_Slave_Diag to detect the presence
of equipment connected on the network. On acknowledgment of this question the master transmits the
parameters entered or from the GSD files to the equipment with the function DDLM_Set_Prm. The
input/output configuration phase then takes place. With manual configuration, the configuration from the
configuration console is sent via the function DDLM_Chk_Cfg. For automatic configuration, the
configuration sent is that contained in the equipment; it is obtained by calling the function DDLM_Get_Cfg
(function class 2).
• Data access :
For dedicated equipment, the data exchange is cyclic. It is based on the Profibus DDLM_Data_Exchange
function. It is used to transmit to the equipment the output data and receive in return its input data. If the
equipment has inputs only, an empty frame is sent, if the equipment has outputs only an empty frame is
received.
Example:
Master Master
1 2
4 5 6 7
In this configuration:
slaves 4 and 5 are dedicated to master 1,
slaves 6 and 7 are dedicated to master 2,
slave 5 is shared, the main master is master 1, the secondary master is master 2,
master 1 can read and write on equipment 5, whereas master 2 can simply read the slave's
input/output data.
Equipment initialization:
For shared equipment, initialization is carried out by the main master of the equipment. The mechanism is
then the same as for equipment dedicated to a single master
For the main master, the equipment is seen as a dedicated slave. The mechanism is then the same as for
equipment dedicated to a single master
For the secondary master, the data exchange is acyclic. It is based on the Profibus class 2 functions
DDLM_Read_Input and DDLM_Read_Output. This operation does not allow writing of outputs. On
Profibus DP, only the main master can write the outputs.
The input/output data can be accessed in read by the same PLC functions as those used for the
dedicated slaves (ReadPackIByte, ReadPackQByte, etc.), and by the same DDE and OPC items.
Profibus DP-V1 master, use the remaining time in the Profibus cycle or "dead time" to set up an acyclic
link with any slave. This acyclic exchange can therefore last for several polling cycles.
A Profibus DPV0 Class1 Master can open a DPV1 connection to its own slaves in Class1 mode or in
Class 2 mode.
A Profibus DPV0 Class2 Master can open a DPV1 connection to any slaves in Class 2 mode only!
A Profibus DPV1 Class2 communication requests a connection between the Profibus DPV1 Class2
Master and the Profibus DPV1 Slave. This connection will then be maintained by the Profibus DPV1
master generating an idle request. To close the connection the master sends an abort request.
Note :
- The MSAC2_Initiate service is automatically managed by the firmware,
the first DPV1 request will generate the connection if necessary.
- The DPV1 polling is automatically managed by the firmware.
- The DPV1 idle is automatically managed by the firmware.
Note :
The local slave does not support the DPV1 class1 and class2
functionality.
Gsd Name:
Name of the GSD file.
Gsd Revision:
Version ID of the GSD file format.
Identification number:
The module identification number .It will be compared to the device on the network. If
they are different, the connection will be refused. This identification number is
provided in the GSD file.
Watchdog Control:
This parameter enables a remote station to switch into an error mode if no data has
been exchanged during this period (Bus Fault). The value 0 deactivates this
monitoring.
This value is a multiple of 100 ms.
Default value: 50.
MIN_TSDR
Minimum time between reception of the last bit of a telegram and transmission of the
first bit of the next telegram. This value is expressed in tBit.
The available range is from 11 to 255.
Default value: 11
Sync Mode:
Indicates that the device operates in Sync Mode as soon as the control command is
delivered by means of the DDLM_Global_Control function.
Warning:
The modules that you configure here should match exactly the physical setup
of your slave devices.
To use this Profibus DPV1 functionality, it is necessary to set True in “DPV1 Enable”. Using DPV1
commands without enabling this option will generate a status 46.
Remarks:
Note
Each parameter is described in the description field of the configuration
console.
• the class 1 DP functionalities for optimized exchange of input/output data and equipment
diagnostics,
• the class 2 DP functionalities for access to equipment belonging to other masters and
reading the DP slave input/output configurations,
The information required for equipment configuration is contained in a file of type XXXXXX.GSD
which is supplied by the manufacturer.
The format of the GSD file is described in the standard EN 50170, volume 2, PROFIBUS.
Note
The remote master will include the applicom® DP slave in its configuration
through the use of the description files associated with the board used.
This functionality provides data exchange with a master in the network. The size of the input and
output data can be configured and enables all exchange combinations (0 to 244 bytes). The slave can
ensure data consistency up to sizes of 122 bytes.
Allocation of an equipment number during configuration enables access to data in the local slave
identically to that of a remote slave.
Caution:
Data transmitted by the remote master (output variables) refreshes the input variables of the
product.
The data received by the remote master (input variables) corresponds to the output variables of
the product.
applicom®
Library interface
DP Slave DP Master
Write functions
OUTPUT OUTPUT
DATA DATA
The statuses of functions guarantee refreshing of data with the remote master as long as it sets the
"Bus Time-out" (Watchdog control) parameter.
» Equipment
Used to define the applicom® equipment number. This number is used by the application layers, in
association with the board number.
» Input size
Used to define the size of the inputs managed, in reception, by the local slave on the Profibus DP
network.
The available range is from 0 to 244 bytes.
Default value: 244
» Output size
Used to define the size of the outputs managed, in reception, by the local slave on the Profibus DP
network.
The available range is from 0 to 244 bytes.
Default value: 244
» Data format
Selects the memory representation of 16 and 32-bit words:
• Little Indian (Intel): In increasing address order: low order byte – high order byte.
• Big Indian (Motorola): In increasing address order: high order byte - low order byte.
Default value: Big Indian (Motorola).
» Description
Free text field, use it as required.
The address argument of the read and write bit primitives is calculated according to the following
equation:
(number of byte transmitted * 8) + bit rank.
The address argument of the read and write byte, word, double word and floating word primitives
corresponds to the number of bytes transmitted
Remarks
The product uses the CSRD (DATA EXCHANGE) services which provide a means of refreshing
the inputs/outputs asynchronously with respect to your application. The read/write functions
therefore read and modify the buffers asynchronously with respect to the refresh cycle.
The SYNC commands can be used to synchronize the slaves according to events. If the line
" Sync_Mode_supp = 1 " appears in the GSD file, the checkbox in the configuration of the
configurator equipment will be checked.
Bit Byte
address address
0-7 0
8 - 15 1
16 - 23 2
24 - 31 3
32 - 39 4
40 - 47 5
48 - 55 6
56 - 63 7
... ...
By configuration, when the console is switched in “expert mode” from menu “File\Preferences\Expert
Mode” in configuration console , two types of alignment can be used:
Alignment on word:
This mode returns, during a read of several words, contiguous words of even or odd
address.
Example:
A read of 3 words from address 0 will return words 0, 2 and 4.
A read of 3 words from address 1 will return words 1, 3 and 5.
During a write, the same addressing mode is applied.
Example:
A write of 3 words from address 0 will write words 0, 2 and 4.
A write of 3 words from address 1 will write words 1, 3 and 5.
Alignment on byte:
This mode offers the advantage, during a read of several words, of returning words of even
and odd address.
Example:
A read of 4 words from address 1 will return words 1, 2, 3 and 4.
During a write of several words, "alignment on word address" is always applied.
By configuration, when the console is switched in “expert mode”, three types of alignment can be used:
Alignment on double word:
This mode returns, during a read of several double words, contiguous double words with address
step of 4.
Example:
A read of 3 double words from address 0 will return double words 0, 4 and 8.
A read of 3 double words from address 1 will return double words 1, 5 and 9.
A read of 3 double words from address 2 will return double words 2, 6 and 10.
During a write of several double words, "alignment on double word address" is applied.
Alignment on word:
This mode returns, during a read of several double words, contiguous double words of even or odd
address.
Example:
A read of 3 double words from address 0 will return words 0, 2 and 4.
A read of 3 double words from address 1 will return words 1, 3 and 5.
During a write of several double words, "alignment on double word address" is applied.
Alignment on byte:
This mode offers the advantage, during a read of several double words, of returning double words
of even and odd address.
Example:
A read of 4 words from address 1 will return double words 1, 2, 3 and 4.
During a write of several double words, "alignment on double word address" is applied.
X: rank of variable
Warning
String, array and Matrix modes require certain precautions in use. For
an alignment on byte addresses when reading 16-bit words or an
alignment on byte or word addresses when reading 32-bit words, the
write continues to use word addressing for the 16-bit words and double
words for the 32-bit words. With array and matrix mode, an item
symbolizing for example a word array (WOx_n_l) does not designate
the same variables in write as in read. Consequently, array and matrix
mode can only be used in read.
Object DLL/OPC/DAS/PCDDE
Bit 1952
Byte 244
Word 122
Double word, floating word 61
Notes
With the OPC, DAS or DDE/SuiteLink data servers, If you use the
default syntax descriptor (itemdp.dll), the server will make the
optimizations for read access:
All the unitary data will be accessed by reading bytes
Others limitations applies only in case of arrays or strings.
Notes
With PCDDE, each variable writing results in the creation of a frame.
To access to Profibus DPV1 Data or specific DPV0 functionality it is necessary to use the Service
interface only available as DLL command. These Service interface is not available over any of our
data servers like OPC, DDE, Suite/Link, DAServer.
This Service Interface can be accessed through the DLL Function : AuWriteReadMsg (for more
details about this function refer to the following chapter)
These specific Profibus DP services can also be used from the diagnostic tool via the tabs DP-V0,
DP-V1 C1 and DP-V1 C2.
Service Function
56 DPV0_C2_DDLM_Read_Input
57 DPV0_C2_DDLM_Read_Output
58 DPV0_C1_DDLM_Global_Control
59 DPV0_C2_DDLM_Get_Config
60 DPV0_C2_DDLM_Slave_Diag
0x10037 DPV0_C2_DDLM_Set_Slave_Add
67 DPV1_C1_MSAC1_Read
68 DPV1_C1_MSAC1_Write
69 DPV1_C2_MSAC2_Read
70 DPV1_C2_MSAC2_Write
72 DPV1_C2_MSAC2_Abort
if (wLen)
{
if ( (wLen <= (244 -3)) )
{ /* Get slave data */;
GetData(&byTxBuf[wNbTx],wLen);
wNbTx += wLen;
}
else
{ /* length error */
printf("Error : \r\n%s \r\n",GetStatusDefinition(21));
return;
}
}
if (wLen)
{
if ( (wLen <= (244 -3)) )
{ /* Get slave data */;
GetData(&byTxBuf[wNbTx],wLen);
wNbTx += wLen;
}
else
{ /* length error */
printf("Error : \r\n%s \r\n",GetStatusDefinition(21));
return;
}
}
AuWriteReadMsg (wChan, /* Channel number */
wEquip , /* Station address */
dwMsgParam, /* service */
wNbTx, /* Number of bytes to send */
byTxBuf, /* send buffer */
&wNbRx, /* number of bytes received */
byRxBuf, /* receive buffer */
&dwStatus ); /* return code */
The function "AuWriteReadMsg" enables the address of a Profibus DP station to be changed (Set
Slave Address) only on non-configured stations.
This function requires the following 8 parameters:
wChan: 16-bit word indicating the targeted channel.
wEquip: 16-bit word indicating the physical address of the targeted Profibus DP station.
dwMsgParam: 32-bit word initialized to the hexadecimal value 0x00010037.
wNbTx: Number of bytes to transmit to the lpbyBufTx buffer.
lpbyBufTx: Near pointer to the transmission buffer. Up to 244 bytes of data can be placed in the
transmission message.
pwNbRx: Near pointer to the number of bytes received. The return value indicates the number of
bytes received, if the variable indicated by pdwStatus is equal to zero.
lpbyBufRx: Near pointer to the reception buffer. Up to 244 bytes of data can be received in the
buffer.
pdwStatus: near pointer to an error status 32-bit word 1
AuWriteReadMsg sample
A Sample is available in the Product installation directory under the following sub-directory:
"Development\Visual Studio\C\Example\Profibus\ProfibusDpAuWriteReadMsg"
To be integrated into a project or to be compiled, this file requires access to the following files: applicom.h
and applicom.lib
Problems resolution
Problem Suggestions
The BradCommunications Verify that the USB cable is correctly inserted on the both sides
USB100PFB is connected to Bad USB cable. Test with the supplied cable if another one is
the machine but the LED near used
the USB connector remains off
The BradCommunications The computer doesn’t recognize the device.
USB100PFB is connected to The driver has not been installed. Run the installation program in
the machine but the LED near “modify mode” and select the S7, MPI on USB protocol
the USB connector remains Verify in the Windows Device Manager that the USB DC100
red Fieldbus adapter is present without error. If there is an error,
disconnect and reconnect the BradCommunications USB100PFB
on the computer, then “Scan for hardware change” in the Device
Manager. If the error persists, uninstall and reinstall the software
No device present after Check your Profibus configuration on devices (address, speed)
network detection. Check the Profibus cable.
Check the master settings in the configuration console.
or
see also in this manual:
Network detection indicates a General points about the Profibus protocol
network problem. Checking stations on the Profibus network
Checking the Profibus wiring
At least, one of the two leds Check your Profibus configuration on devices (address, speed)
near the Profibus connector is Check the Profibus cable.
not green Check the master and devices configuration in the console.
Also, check that the BradCommunications USB100PFB module is
usable with usb solution.
For additional status Additional status are detailed in the chapter 8 of this manual
For a Profibus network to operate correctly, the following points must be respected:
Each station has a unique physical address.
All stations are set to the same transmission speed or can detect the speed used
automatically.
The highest station address (HSA) configured for each master station is greater than or
equal to the highest master station address.
The Slot time (TSL) of each master station is adapted to the network architecture. The
value of this parameter increases for networks with several master stations, long cable
lengths or which include the use of repeaters.
Inside the Console, in the network detection tab, the online action command allows you to check
quickly the list of passive and active stations connected on the network. This action can be
performed before to configure your device.
RECEIVER
ACTIVE TERMINATION
ACTIVE TERMINATION
The station which has a termination activated must always be powered up.
A network operating correctly at 9.6 kbit without termination may have serious malfunctions at 1.5
Mbit since the risks of disturbance are greater at high speed.
The Profibus connectors are equipped with terminals to fit two cables. The position of the cable in
the connector is important. If the cable is not connected to the correct terminal, the PROFIBUS
network link will be considered as interrupted.
Whether a station is active or passive depends on the device considered. Generally, simple field devices
such as motor controls are passive, whereas "intelligent" devices such as PLCs are active. Many devices
can be configured as either passive or active.
To prevent all the active stations accessing the bus at the same time, a station which wants to transmit
must wait until it has received authorization to access the bus. It receives this authorization in the form of
a special telegram, the "token".
• The token moves automatically from one active station to the next active station (in increasing
order of station address).
• The token is transmitted around a logical ring, i.e. the station with the highest address sends the
token to the station with the lowest address. Rule valid for each station: between transmission of
the token and reception of the token there is a token rotation cycle.
• Each active station "knows" the addresses of the other active stations. An active station checks
cyclically the range of addresses between it and the next active station. This range of addresses
is called the "GAP". During this check it detects the possible:
- Addition of an active or passive station.
- Deletion of a passive station.
The GAP is an update factor, it indicates the frequency where a new cycle of Fdl_status is sent. This
service builds a list of the active stations on network (LAS: list active stations).
If the check shows that a new active station has been added, the new station receives the token
immediately.
• If there is only one active station and all the other stations are passive, the network operates on
the master-slave principle.
• If all the stations are active, it is a purely token passage type network.
The figure shows a PROFIBUS network with 3 active stations and 3 passive stations.
1 2 3
4 5 6
The token rotation cycle takes a certain amount of time. The maximum token cycle time must be set in the
configuration console as the Target-Rotation-Time.
The value set for the Target-Rotation-Time (TTR) must be respected even when there is a large volume of
data to be transmitted. To respect this time, PROFIBUS adopts the following principle:
Each active station measures the time during which it did not have the token. This time represents for it
the effective token rotation time.
It compares this measured time with parameter TTR. The processing of the telegrams to be transmitted
depends on the result of this comparison and the link priority:
• Measured token rotation time < TTR:
All the existing transmission and reception contracts are executed until the TTR is reached or
until all pending contracts have been executed: firstly the contracts on the high priority links,
then the contracts on the low priority links.
• Measured token rotation time >= TTR:
A single high priority contract will be executed. The low priority contracts will only be
executed during subsequent token cycles, when the measured token rotation time is again
less than the TTR (Target Rotation Time).
Note :
All Profibus parameters are described in the configuration console (description
fields).
Profibus is a complex protocol where a lot of timing are used to handle properly the communication. A bad
timing can generate communication troubles.
When you configure your Profibus network in the configuration console, the product provides default
timing, depending as much as possible of your topology. These timings are estimated to provide the best
compromise for all active stations (master or client/ server) or passive stations (device) configured.
Profibus defines also some standard profiles (DP, universal,..) corresponding to different kinds of Profibus
station type. These profiles can be selected in our configuration console. Each profile will set the default
communication timing on the best way:
Profile DP
This profile should be chosen if your configuration contains only DP devices
Profile “MPI
This profile should be chosen if your configuration contains at least one S7-200 device
Profile Universal
This profile should be chosen for any other case (e.g. mix of different devices)
It can then normal to detect some communication problem after having configured your network and
initialized the solution.
In the case where only other messaging modes (S7, S5…) are used, this parameter is not used in the
same way, This time will then be used by our product to regulate the FDL_status sends. it should be then
set to largest time (set to 20, 2ms) because this service can to perturb some other stations as Simatic S5.
If you use a MPI socket to communicate with a S7 PLC, even if the MPI profile has been selected both in
the PLC and in our configuration console, some communication troubles can appear.
Indeed, this profile can vary dramatically depending on the device.
So, if you encounter any communication problem , please refer to the technical note
“Technote_Troubleshooting - MPI messaging.pdf” available from the main installation directory.
General status
0 No anomaly detected. The function was properly executed.
32 Bad parameter
Bad number of variables.
45 Initialize the interface before it is used by typing the Initialization command.
59 - Access denied.
- Access Rights not valid.
- Messaging not enabled.
In this case, please contact your product supplier.
66 Not enough hardware interface memory.
76 Bad firmware version.
In this case, please contact your product supplier.
92 - None detected USB100PFB module can be used by DRL-MPI-USB or DRL-PFB-USB.
- USB error between computer and USB100PFB module
After correcting the problem, you must reinitialize the solution by executing PCINIT
93 Driver access problem.
After correcting the problem, you must reinitialize the solution by executing PCINIT
255 Used by the PCDDE server. Initial value of the items "STATUS_READ" and "STATUS_WRITE". This value
indicates that no transaction has taken place between "PCDDE" and the interface.
-6 The TRANSCYC function (or TRANSCYCPACK) is used with a cyclic function number which was activated, but
which is no longer.
-5 The user program attempts to make a deferred transfer TRANSDIF (or TRANSDIFPACK) even though the
current deferred request is not finished.
-1 Deferred transfer request TRANSDIF (or TRANSDIFPACK) concerning a write which occurred correctly.
0 No anomaly detected. The function was properly executed.
1 Unknown function.
The function requested is not supported.
2 Bad address.
The address of the variable that you are soliciting is bad.
3 Bad data.
Additional information:
Function: BINBCD, BCDBIN.
- At least one of the values accessed is not in BCD format (0<= value <= 9999).
4 Inaccessible data.
32 Bad parameter passed to the function.
Bad number of variables.
35 Data not available in cyclic read.
Attempt to transfer data by TRANSCYC (or TRANSCYCPACK) before reading it in the device.
Most desktop and laptop computers sold after 2002 are USB 2.0 enabled. USB 2.0 enabled
means that the computer has one or more USB-enhanced host controllers. To determine if your
computer running the Windows XP or Windows Server 2003 operating system has a USB-
enhanced host controller, follow these steps:
1. Start Device Manager. To do so, click Start, and then click Run. In the Open box, type
devmgmt.msc, and then click OK.
2. In the Device Manager window, expand the Universal Serial Bus controllers node.
Look for a host controller with the word "Enhanced" in the title. If you find one, your system has
USB 2.0 capable ports and has the necessary host controller drivers.
Windows 2000 and Windows XP were released before USB 2.0 hardware was available, so
the drivers were released for those operating systems in the service packs. To install drivers,
follow these steps:
1. Follow the procedure described in the answer to the previous question to verify that your
computer has USB 2.0 ports that required you to install a driver for the enhanced host controller.
2. In the Device Manager window, expand the Other Devices section as explained under
the previous question, and then double-click Universal Serial Bus (USB) Controller.