Acyclic Exchange with PROFIBUS DPV1 Functions
The PROFIBUS DPV1 enhancement additionally supports acyclic data exchange between a PROFIBUS DPV1 master and DPV1 slaves. It allows access to %MW variables.
To use these functions between a PROFIBUS DPV1 master and the TM4PDPS1 module, the parameter DPV1Enable must be set to TRUE (default value).
Data addressing in the logic controller is %MW.
The Profibus status of the controller must be in Operate state; therefore it can be updated even if the logic controller is not running.
The %MW variables are automatically updated by the I/O driver whenever a DPV1 message is received.
It is based on PROFIBUS DPV1 read and write functions.
The logic address is the number of the %MW addressed.
2 different types of addressing are available for acyclic exchange:
Addressing Type |
Number of Requests for Read/Write %MW Variables |
Description |
---|---|---|
Direct addressing |
1 |
The address of the %MW variable is coded directly by Slot and Index fields. See restrictions in the note below. |
Indirect addressing |
2 |
oThe first request sends the address of the first %MW that the master will read or write. oThe second request reads or writes one or several values of the %MW variable. |
NOTE:
The following restrictions apply to direct addressing:
oSlot field (DU1): value 0xFF is not allowed
oIndex field (DU2): values 0xFF, 0xE9, and 0xEA are not allowed
The table shows how to create requests for accessing the %MW from the PROFIBUS DPV1 master:
Addressing |
DU0: DPV1 Function Number |
DU1: Slot |
DU2: Index |
DU3: Length (in Bytes) |
DPV1 Data Frame |
|
---|---|---|---|---|---|---|
1 Byte |
1 Byte |
1 Byte |
1 Byte |
N Byte |
||
Direct addressing |
Write |
5F hex (write) |
MSB of the %MW address |
LSB of the %MW address |
Length to read |
Values to write |
Read |
5E hex (read) |
MSB of the %MW address |
LSB of the %MW address |
Length to write |
– |
|
Indirect addressing |
Send address (Step 1) |
5F hex (write) |
1 |
E9 hex |
2 |
%MW address |
Read (Step 2) |
5E hex (read) |
1 |
EA hex |
Length to read |
– |
|
Write (Step 2) |
5F hex (write) |
1 |
EA hex |
Length to write |
Values to write |
NOTE: The Length field has to have an even value (the length in byte of one %MW is 2).