97
A.2.
Data exchange method: synchronous or asynchronous?
By setting DM 1016, the user may select to synchronise the PROFIBUS-DP bus cycle with the PLC cycle. If
selected, each PLC I/O refresh the PROFIBUS-DP master will attempt to trigger a new fieldbus cycle. If the
previous fieldbus cycle had not yet been completed, a new attempt will be made at the next I/O refresh.
The default setting is no synchronisation between PLC cycle and fieldbus cycle. In that case, fieldbus cycles
are triggered autonomously, independent of the PLC cycle. All input data from the latest bus cycle is kept in a
buffer for the PLC to access at I/O refresh time.
In general, it will be advantageous to select the asynchronous method if the PLC cycle time is considerably
larger than the PROFIBUS cycle time. It will be better to choose synchronous mode when both cycles are in
the same order of magnitude due to the additional buffering required in asynchronous mode.
Without additional tools it is difficult to determine the actual PROFIBUS-DP cycle time. The calculations in
Chapter 2 will give a rough indication, but if the actual network is available, a measurement is more reliable.
With the help of the sample program on the next page, it is possible to measure the cycle time in all but the
most extreme cases, i.e. at very high baud rates with very few slaves. The method is based on automatic
variation of the PLC cycle time to determine when input data is still refreshed each PLC scan.
Determine PROFIBUS cycle time
1.
Using the configurator software, build the desired bus configuration and download the corresponding
configuration file into the C200HW-PRM21. The complete configuration needs to be connected and
powered up.
2.
Enter the sample program as shown on the next page in the PLC CPU.
3.
Make the following settings in DM to achieve the minimum I/O refresh time, then restart the unit to activate
these settings. (Note that the slave outputs will remain reset since no data is transferred from the PLC)
DM 1000
0001
One output area
DM 1003
0000
Output area size = 0
DM 1007
0001
One input area
DM 1008
0000
Input buffer offset = 0
DM 1009
A050
Start at IR 050
DM 1010
0001
Input area size is 1 word
DM 1016
0001
Synchronous data exchange
The PLC scan time will eventually settle on a fixed value.
If the value of DM 0000 falls to 0, the cycle time of PROFIBUS-DP is less than the minimum PLC cycle time
that can be achieved. For any other value than 0, the PROFIBUS cycle time equals the PLC scan time MINUS
the I/O refresh time. With the DM settings as above (1 I/O word transferred), the C200HW-PRM21’s I/O refresh
on C200H alpha series PLCs takes 1.4 ms, on C200HS 2.1 ms.
Synchronous data transfer mode with PLC scan time fully adapted to PROFIBUS cycle time.
Summary of Contents for C200HW-PRM21
Page 1: ...C200HW PRM21 PROFIBUS DP Master Unit OPERATION MANUAL Cat No W349 E2 2...
Page 2: ......
Page 3: ......
Page 4: ......
Page 5: ...C200HW PRM21 PROFIBUS DP Master Unit Operation Manual Produced May 2000...
Page 6: ...iv...
Page 8: ...vi...
Page 12: ...x...
Page 66: ...Debug mode Section 4 4 50...
Page 98: ...Messages Section 6 4 82...
Page 108: ...Maintenance Section 7 3 92...
Page 110: ...94...
Page 112: ...96...
Page 116: ...100...
Page 120: ...104...
Page 124: ......