FC310x as master
FC3101 and FC3102
15
Version: 3.0
Multiple data samples within one task cycle
The two functionalities just described can now be combined in order, for instance, to give one or more slaves
in a 2 ms cycle new data every 1 ms, or to obtain new data from the slave in order to achieve better
regulation quality. In this case, settings are made under
Additional Data_Exchange Samples
on the slave's
tab instead of under
Data-Exch Poll-Rate
(as described above).
In the sample shown below, first set the factor
Number of DP cycles per task cycle
in the
"FC310x"
tab
(for
or
) of the master to 2. So that the task can send 2 different
values to the slave, or is able to receive 2 different values from the slave, the appropriate slave is to be
entered into the System Manager twice. All settings, with the exception of
Modulo
under
Additional
Data_Exchange Samples
on the slave’s
tab, must be the same. A 0 is entered here for the
corresponding slave in one of the boxes and a 1 in the other box in the System Manager. The
Multiplier
under
Additional Data_Exchange Samples
is to be set for this slave in both boxes to 2, so that each of the
two boxes that have been entered is only polled in every second DP cycle (the slave is in fact polled in each
DP cycle, as it is entered twice). For all other slaves that are only to be polled once within the task cycle (and
which of course are only therefore entered once in the System Manager), the
Multiplier
under
Additional
Data_Exchange Samples
is also set to 2.
Modulo
under
Additional Data_Exchange Samples
can now be
used to distribute these slaves over the two cycles. A slave that is polled twice but which is only to have one
variable image in the task is only to be inserted once; the
Multiplier
would be set to 1, and
Modulo
to 0.
In the present example, slaves 1 and 2 would each be entered into the System Manager twice, with these
settings:
• Additional Data_Exchange Samples/Multiplier = 2
• Additional Data_Exchange Samples/Modulo = 0 or 1
Slaves 3 and 5 would only be entered into the System Manager once, and would have these settings:
• Additional Data_Exchange Samples/Multiplier = 2
• Additional Data_Exchange Samples/Modulo = 0
Slaves 4 and 6 would also only be entered into the System Manager once, with these settings:
• Additional Data_Exchange Samples/Multiplier = 2
• Additional Data_Exchange Samples/Modulo = 1
Fig. 8: Multiple data samples within one task cycle
For slaves 1 and 2, the variables are present twice (in each case 2 boxes in the System Manager). The
variables associated with the box where Additional Data_Exchange Samples/Modulo is set to 0 are sent or
received first.
3.3.3
Sync/Freeze functionality
Sync is used for the simultaneous outputting of outputs for several slaves. Freeze is used for reading in
inputs from several slaves simultaneously.
The process in TwinCAT with FC310x and Bus Couplers (in K-bus synchronous mode) would therefore be
as follows (see the
chapter):
• The outputs are written at the beginning (I/O at the start of the task) or the end (I/O not at the start of
the task) of the task cycle