3 FC310x as master ....................................................................................................................................10
4 FC310x as slave.......................................................................................................................................64
5.2Configuration Data - CfgData ....................................................................................................... 73
5.3Support and Service ..................................................................................................................... 75
FC3101 and FC31023Version: 3.0
Table of Contents
FC3101 and FC31024Version: 3.0
Foreword
1Foreword
1.1Notes on the documentation
Intended audience
This description is only intended for the use of trained specialists in control and automation engineering who
are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing
and commissioning these components.
It is the duty of the technical personnel to use the documentation published at the respective time of each
installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE®, XFC® and XTS® are registered
trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own
purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents: EP1590927, EP1789857, DE102004044764, DE102007017835 with corresponding applications or
registrations in various other countries.
The TwinCAT Technology is covered, including but not limited to the following patent applications and
patents: EP0851348, US6167425 with corresponding applications or registrations in various other countries.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany
Please note the following safety instructions and explanations!
Product-specific safety instructions can be found on following pages or in the areas mounting, wiring,
commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The
safety instructions must be read carefully and followed without fail!
DANGER
WARNING
CAUTION
Attention
Note
Serious risk of injury!
Failure to follow the safety instructions associated with this symbol directly endangers the
life and health of persons.
Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and
health of persons.
Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to
persons.
Damage to the environment or devices
Failure to follow the instructions associated with this symbol can lead to damage to the environment or equipment.
Tip or pointer
This symbol indicates information that contributes to better understanding.
FC3101 and FC31026Version: 3.0
1.3Documentation Issue Status
VersionComment
3.0• Migration
2.2• Layout and foreword updated
2.1• Technical data and safety instructions amended
2.0• Technical description amended
1.0• First release
Foreword
FC3101 and FC31027Version: 3.0
Product Overview
2Product Overview
2.1Introduction
The functionalities of the Beckhoff PCI card FC310x (as Master [}10] and Slave [}11]) for use under
TwinCAT (NCI, PTP, PLC and IO) is described below.
TwinCAT 2.7 does not support all the functions described below. TwinCAT 2.8 on the other hand supports all
functions described below, with the exception of redundancy and of the ADS server interface of the FC310x
as a slave (these will both be supported as from TwinCAT 2.9).
The following chapters also apply to the PROFIBUS connection for the CX1000 (CX1500-M310 (master) or
CX1500-B310 (slave)); the name FC310x then also refers to the CX1500-M310 master or CX1500-B310
slave connection.
2.2FC310x - Technical Data
Technical DataFC3101FC3102
Bus systemPROFIBUS DP (standard), PROFIBUS DP-V1 (Cl. 1+2:
acyclic services, alarms), DP-V2, PROFIBUS MC (equidistant)
Number of fieldbus channels12
Data transfer rate9.6kbit/s – 12Mbit/s
Diagnostics2 LEDs per channel
Interface to the PCPlug-and-play PCI interface, 32bit with 4kbytes DPRAM per
channel
Bus interface1 x D-Sub socket, 9-pin,
galvanically isolated
CommunicationMaster and slave functionality (also mixed)
Bus devicesper channel: max. 125slaves with up to 244bytes input,
output, parameter, configuration or diagnostic data per slave
Process imageSum max.: 3kbytes input and output data
Cycle timediffering DP cycle times per slave are possible using the CDL
concept
Standard driverstandard operating system driver for Intel-compatible NIC
Real-time driverTwinCAT driver for real-time Ethernet
Supply voltage (PCI bus)5V
Current consumption(PCI bus, 5V)typ. 600mAtyp. 1000mA
Power consumption from PCI bus< 5W
Weightapprox. 45gapprox. 75g
Dimensions (Wx Hx D, without slot panel)approx. 14mmx106mmx175mm
Permissible ambient temperature range
during operation
Permissible ambient temperature range
during storage
Permissible relative air humidity95%, no condensation
Vibration/shock resistanceconforms to EN60068-2-6/ EN60068-2-27
EMC immunity/emissionconforms to EN61000-6-2/ EN61000-6-4
Installation positionvariable
ApprovalCE
0°C ... + 55°C
-25°C ... + 85°C
2 x D-Sub socket, 9-pin,
galvanically isolated
FC3101 and FC31028Version: 3.0
Product Overview
2.3Hardware Description
One FC3102 PROFIBUS fieldbus card behaves in logical terms in the same way as two FC3101 cards, i.e.
all components (with the exception of the PCI interface and the optional NOV RAM) are present in duplicate
on the FC3102 card. Each channel of the FC310x card consists of the following components:
• 80165 25MHz micro-controller
• 512k RAM
• 256k Flash
• 4k DP-RAM
• Fieldbus interface (Altera 6016 with 48MHz, RS485 bus interfacing, 9 pole SUB D plug)
• 2 LEDs (1 x green, 1 x red)
• 1 four pin and 1 two pin plug for the bootstrap loading mode
The following components are present in single form only:
• PCI interface (PLX9050: 1 interrupt input per channel, 1 interrupt output and 1 chip select signal for
DP-RAM and 1 reset line for both channels)
• optional 32k plug-in NOV RAM, addressed via an additional chip-select line
LED indicators - meanings
State of the FC310xLED display
RESET, OFFLINERed LED on, green LEDs off
STOPGreen LED off, red LED flashing (at 10Hz)
While uploading the bus configuration: red and green LEDs flash (at 10Hz)
RUNIf the associated TwinCAT task was started, the green LED is on, otherwise the
green LED will flash (with 1Hz)
When all boxes are error-free, the red LED will be off, otherwise it will flash (with
1Hz)
States of the FC310x
RESET, OFFLINE
After power-on, the FC310x is in the RESET state. It exits the RESET state when TwinCAT is started and
will enter the OFFLINE state after TwinCAT is stopped (or after a severe bus error). In the OFFLINE state,
the FC310x is not active on the bus.
STOP
After TwinCAT has started, or during reading of the bus configuration from the System Manager, the FC310x
will enter the STOP state, in which it is active on the bus, but does not yet carry out data exchange
(Data_Exchange) with the DP slaves. During the TwinCAT start, and also during an IO reset, the FC310x will
be in the STOP state. It will exit the STOP state automatically both during TwinCAT start and during IO reset
and will enter the RUN state.
RUN
In the RUN state, the FC310x will automatically establish the DP connections with all configured DP slaves.
As soon as the associated TwinCAT task was started, it will communicate with the DP slaves via
Data_Exchange. As long as the associated TwinCAT task was not yet started, it will only query the
diagnostics. If the associated task is stopped (e.g. PLC STOP, breakpoint in the PLC), the FC310x will
automatically enter CLEAR mode (outputs to 0 or slave-specific response, if FailSafe mode is supported).
Once the associated task is running again, the FC310x will automatically re-enter the OPERATE mode (all
outputs at the values set by TwinCAT).
FC3101 and FC31029Version: 3.0
FC310x as master
3FC310x as master
3.1Master
As master, the PROFIBUS DP, PROFIBUS DPV1, PROFIBUS DPV2, S5-FDL-AGAG communication and
the PROFIDRIVE-PKW Interface protocols are supported.
PROFIBUS DP
A summary of the PROFIBUS-DP master functions follows:
FunctionDescription
Standard DP
Task synchronization
Slave prioritiesThe slaves can receive telegrams with differing cycle times. The necessary
Multiple DP cyclesIn order to receive the most recent possible inputs when the task cycles are long,
Diagnostics
Error Reactions
Sync/Freeze
Upload Configuration
Master redundancy
The PROFIBUS DP [}11] chapter describes the necessary steps for establishing
a DP connection (Set_Prm - parameter, Chk_Cfg - configuration) and for the
exchange of user data (Data_Exchange).
The Synchronization [}12] chapter describes how the TwinCAT task is
synchronized with the PROFIBUS cycle.
settings are described in the Slave Prioritization/Multiple DP Cycles [}14]
chapter.
a number of DP cycles can be carried out for each task cycle, as described in the
chapter on Slave Prioritization/Multiple DP Cycles [}14].
The diagnostic [}16] facilities are described in this chapter.
It is possible for different error reactions [}16] to be set in the event of a fault (a
slave fails or the task is stopped).
Activation of the sync and freeze commands is described in the Sync/Freeze[}15] chapter.
The slaves connected to the PROFIBUS can be read via Upload Configuration[}34].
The Master redundancy [}38] chapter describes the settings required to have a
second master with the same configuration configured as a standby master (as
from TwinCAT 2.9).
PROFIBUS DPV1
A summary of the PROFIBUS-DPV1 master functions follows:
FunctionDescription
MSAC_C1
MSAC_C2
PROFIBUS DPV2
A summary of the PROFIBUS-DPV2 master functions follows:
FunctionDescription
Equidistance
The MSAC_C1 [}31] connection is established along with the cyclic connection.
The Read, Write and Data_Transport services are supported.
The MSAC_C2 [}31] connection is established independently of the cyclic
connection, and can also be used by a second master (while the first one is
communicating with the slave over the cyclic MSAC_C1 connection). The Initiate,
Abort, Read, Write and Data_Transport services are supported.
The DPV2 equidistance functionality is described in the PROFIBUS MC [}25]
chapter.
FC3101 and FC310210Version: 3.0
FC310x as master
S5-FDL-AGAG Communication
S5-FDL-AGAG communication is described in the S5-FDL [}36] chapter.
PROFIDRIVE-PKW Interface
The PROFIDRIVE PKW protocol [}35] is implemented in the PROFIBUS master, and can be used by
means of acyclic ADS calls.
3.2PROFIBUS DP
Standard DP Operation
In order to configure standard DP operation, proceed as follows in the TwinCAT System Manager:
Configure the DP Master
It is first necessary to configure a "PROFIBUS Master FC310x, PCI" I/O device (selecting "I/O devices" with
right click, and then selecting "Append Device"). Find the corresponding channel on the "FC310x" tab (see
FC310x tab under TwinCAT 2.8 [}40] or TwinCAT 2.9 [}48]) ("Search" button) and adjust the baud rate, if
necessary (the default value is 12Mbit/s).
Add DP slaves
The Beckhoff slaves or third-party devices are to be configured. (All slaves whose GSD file is stored in
subdirectory PROFIBUS of the SystemManager are displayed automatically (sorted by manufacturer).
Select the "General PROFIBUS Box (GSD)" under Miscellaneous to integrate other GSD files.
Fig.1: Adding a DP slave
In the case of modular slaves, it is then still necessary to add the terminal/IL modules (for Beckhoff slaves) or
the DP module (for third-party devices).
FC3101 and FC310211Version: 3.0
FC310x as master
System Start
TwinCAT Configuration Mode (from TwinCAT 2.9)
For the TwinCAT Configuration Mode, it is only necessary to exchange data with the configured slaves. To
do this, TwinCAT Configuration Mode is started, and configuration of the DP master is activated using the
"Reload Devices" button on the toolbar. After this, the data relating to the configured slaves can be read and
written on the associated Variables tab from the System Manager.
TwinCAT Run-Mode
For the TwinCAT Run-Mode, it is now necessary for at least one variable of the PROFIBUS master or of the
configured slave to be linked to a task. The project is then to be stored in the registry, and the TwinCAT
system then started in Run-Mode. Data exchange with the slaves is not carried out until the associated task
is started. If a number of tasks are linked with the PROFIBUS master or with the configured slave, then
whichever task has the highest priority must be started in order for data to be exchanged with the slave.
Bus parameters
TwinCAT 2.8: The PROFIBUS DP Bus parameters are to be found on the device's PROFIBUS [}42] tab,
and should only be modified by experienced users.
TwinCAT 2.9: The PROFIBUS DP bus parameters can be found in the Bus Parameters [}49] dialog, which
can be selected via the FC310x [}48] tab (Bus Parameter (DP) button). They should only be modified by
experienced users.
3.3Synchronization
3.3.1Overview
In TwinCAT RunMode, the DP master is always synchronized with the highest priority task with which the
variables are linked. Once the mapping was created, the cycle time of the corresponding task is displayed
under Cycle Time on the "FC310x" tab (for TwinCAT 2.8 [}40] or TwinCAT 2.9 [}48]) of the master. The
task has a setting to indicate whether the "I/O at the task start" should be updated or not.
I/O at task start
If the setting "I/O at task start" has been selected using the checkbox, which is the default setting for the NC
task, then a check is made before the task is started as to whether the previous DP cycle has been
completed. The inputs and outputs (the outputs being those from the previous task cycle) are copied, and
the DP cycle is started. In the example, the task cycle time is 2ms, and real-time resources are 80%:
Fig.2: I/O at task start and real-time resources not exceeded
If, in the previous example, the copying of the inputs and outputs and the task computing time exceeds
0.8ms, then NT will interrupt execution of the task, because 80% of real-time resources has been reached:
FC3101 and FC310212Version: 3.0
FC310x as master
Fig.3: I/O at task start and real-time resources exceeded
This case would still not be a problem, because the DP cycle was completed within the available time. If "I/O
at task start" is not selected, then the process is somewhat more critical, as is described below.
I/O not at task start
If the setting "I/O at task start" is not selected (checkbox) for the task (default for PLC task), the system
checks before the task starts whether the previous DP cycle was completed, and the inputs are copied. After
this the task is processed, and at the end of the task the outputs are copied and the DP cycle is started. In
the example, the task cycle time is 2ms, and real-time resources are 80%:
Fig.4: I/O not at task start and real-time resources not exceeded
In the event of "I/O not at task start" the task and the PROFIBUS have to share the bandwidth. Exceeding of
the real-time resources therefore has a much stronger effect than for "I/O at task start":
Fig.5: I/O not at task start and real-time resources exceeded
In the case described, the DP cycle starts later, and is no longer finished within the time available before the
following task cycle begins. The effect of this is that it is seen before the task is executed that the previous
DP cycle has still not been completed. It follows that inputs are not copied before starting the task, so that
the task computes with the old inputs; after the task has been processed no outputs are copied, nor is the
DP cycle restarted, so that a DP cycle is omitted. The omission of a DP cycle can be detected with the
CycleCounter, as described in the Master Diagnostics [}20] chapter.
FC3101 and FC310213Version: 3.0
FC310x as master
Comparison of I/O at task start and I/O not at task start
An advantage when "I/O at task start" is selected is that the task and the DP cycle do not have to share the
available bandwidth, and that the DP cycle starts very regularly, any jitter being the TwinCAT jitter. If "I/O not
at task start" is selected, then it is more likely that a DP cycle will be omitted; the regularity of the start times
of the DP cycles depends additionally on the jitter in the task processing. The disadvantage of the setting "I/
O at task start" is that the dead time (system response time) increases.
3.3.2Slave Prioritization/Multiple DP Cycles
Distribution of the DP slaves over a number of DP cycles (prioritization of the slaves)
Slaves can be prioritized so that the DP cycle time can be kept as short as possible in systems in which a
few slaves must be polled very rapidly, whereas a larger cycle time would be adequate for other slaves. It is
possible to specify for each slave in what multiple of cycles (Divider under Data-Exch Poll-Rate on the
slave's Features [}59] tab) it will be polled. Distributing the polling is then helpful, as, for instance, in the
case illustrated below where there are four slaves, each of which is only to be addressed in every second
cycle. It is possible to make settings so that two slaves will be polled in one cycle and the other two slaves in
the other cycle, so that the overall DP cycle time is kept as constant as possible. For this purpose, the
Features [}59] tab for the slave offers the Modulo setting under Data-Exch Poll-Rate. In the illustrated
case, slaves 3 and 5 have Modulo 0 while slaves 4 and 6 are given Modulo 1. The current modulo can be
read in the ActualModulo variable which is described in the Master Diagnostics [}20] chapter.
Fig.6: Allocation of DP slaves to several DP cycles
Multiple DP Cycles in one Task Cycle
If the task cycle time is more than twice as long as the DP cycle time, it is possible for a number of DP cycles
to be carried out within a single task cycle, in order to acquire the most up-to-date input data possible. Based
on the Number of DP cycles per task cycle factor, which can be set on the "FC310x" tab of the master (for
TwinCAT 2.8 [}40] or TwinCAT 2.9 [}48]), a timer with the cycle time (task cycle time/number DP cycles
per task cycle) is started when the first DP cycle starts, through which further DP cycles can then be started.
It is, however, necessary to check that the last DP cycle is completed in good time (before the next task
start), since otherwise one DP cycle will fail (or possibly more than one, depending on the ratio expressed in
the number of DP cycles per task cycle), as described in the Synchronization [}12] chapter.
Fig.7: Multiple DP Cycles in one Task Cycle
FC3101 and FC310214Version: 3.0
FC310x as master
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 2ms cycle new data every 1ms, 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
Features [}59] 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 TwinCAT 2.8 [}40] or TwinCAT 2.9 [}48]) 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 Features [}59] 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 AdditionalData_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.3Sync/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 Synchronization [}12] 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
FC3101 and FC310215Version: 3.0
FC310x as master
• This will start the PROFIBUS cycle
• A Sync/Freeze telegram is sent at the start of the PROFIBUS cycle
• This will cause the Bus Couplers to start a K-bus cycle with the outputs from the last task cycle and
transfer the inputs from the last K-bus cycle
• The master will then send the current outputs to each slave and pick up the transferred inputs
• The inputs are read at the start of the next task cycle
• etc.
Outputs and inputs are therefore always one cycle old.
Fig.9: Sync/Freeze functionality
On the FC310x, set the Operation Mode on the "FC310x" tab (for TwinCAT 2.8 [}40] or TwinCAT 2.9[}48]) of the master to "DP/MC (equidistant)". At the boxes to be operated via Sync/Freeze, click the flag
Sync/Freeze enable on the Profibus [}58] tab. The master always uses group 1 for the Sync/Freeze
synchronization.
3.4Diagnostics
3.4.1Overview
The Error reactions [}16] section describes the reactions that will be given to slaves that do not answer or
that answer incorrectly, to a PLC stop or at start-up. The Slave Diagnostics [}23] chapter explains how
diagnostic data provided by the slave and slave statistics can be read, while the Master Diagnostics [}20]
chapter describes general diagnostic information and statistics.
3.4.2Error Reactions
Failure of a slave
If a slave does not respond or the response is faulty, the master repeats the telegram several times until the
Max Retry limit is reached (TwinCAT 2.8: see PROFIBUS [}42] tab of the master, TwinCAT 2.9: see Bus
Parameter [}49] dialog). If a faulty telegram is received, the master repeats immediately, in the event of a
timeout the master waits for a response from the slave until the Slot time has elapsed (TwinCAT 2.8: see
PROFIBUS [}42] tab of the master, TwinCAT 2.9: see Bus Parameters [}49] dialog). At 12Mbit/s, a slot
time of 1000bit-periods and a max retry limit of 4 (default values) then a Data_Exchange telegram will delay
sending the following telegram by
TDelay = (4 x ((15 + number of outputs) x 11 + 1000) - (15 + number of inputs) x 11)/12µs
The DpState [}25] of the slave is set to 0x02 (timeout) or 0x0B (faulty telegram). The effect on the DP
connection can be set (see below).
Normal DP cycle (12Mbit/s, 5 slaves, 20 bytes I, 20bytes O per slave on average)
FC3101 and FC310216Version: 3.0
Fig.10: Normal DP cycle
first occurrence of a faulty DP cycle (slave 3 does not answer)
Fig.11: First occurrence of a faulty DP cycle
subsequent DP cycles (slave 3 no longer in the polling list)
FC310x as master
Fig.12: Following DP cycles
It can still happen that the slave answers incorrectly (e.g. because, as a result of a local event on the slave,
the DP connection has been removed). In this case, the telegram is not repeated, but the system continues
by sending the next telegram. The DpState [}25] is set to a value other than 0, the slave is removed from
the polling list and is no longer addressed in the following DP cycle (which means that the time at which the
following telegram is sent changes), until the DP connection can be established again.
Reactions in the master
The master's reactions can be set differently for each slave (see the tab for the slave's Features [}59]).
Effect on the DP connection (NoAnswer reaction) if the slave either does not answer or does not
answer correctly
This specifies whether the DP connection to the slave should be removed immediately in the absence of a
correct reception telegram, or only after the DP watchdog time has elapsed (see the slave's PROFIBUS[}58]tab).
1. If the DP connection is to be removed immediately (Leave Data Exch, default setting) the slave is removed from the polling list and is no longer addressed in the following DP cycles until the DP connection is established once again. In order to re-establish the DP connection to the slave, at least 7 telegrams are sent, and the process generally requires at least 10-20ms.
2. If the DP connection is only to be removed when the slave has not answered (or not answered correctly) within the DP watchdog time (Stay in Data-Exch (for WD-Time)), a further attempt is made in
the next polling cycle to address the slave, but if the slave does not answer, a repeat is not sent.
The "Stay in Data-Exch (for WD-Time))" (2.) setting makes sense if the PROFIBUS cycle is to continue to
operate at the most regular possible period even if a slave fails, and if the failure of a slave for one or more
cycles can be tolerated (e.g. in the DP/MC (Equidistant) [}25] operation mode). In this case the DP
watchdog time for the slave should be set according to the tolerable outage time of the slave, and the Max
Retry limit (DX) (TwinCAT 2.8: see PROFIBUS [}42] tab of the master, TwinCAT 2.9: see Bus Parameters
[}49] dialog) should be set to 0.
Normal DP cycle (12Mbit/s, 5slaves, on average 20bytes I, 20bytes O per slave) in mode "Stay in
Data Exch (for WD time)"
FC3101 and FC310217Version: 3.0
FC310x as master
Fig.13: Normal DP cycle for Stay in Data Exch (for WD time)
first faulty and subsequent DP cycles in the "Stay in Data-Exch (for WD-Time)" mode (slave 3 does
not respond)
Fig.14: First faulty and subsequent DP cycles for Stay in Data Exch (for WD time)
Changes of the slave's input data if the slave does not respond correctly
Here you can specify whether the input data of the slave are set to 0 if the slave fails ("Inputs will be set to
0", default setting) or whether the old value should be retained ("No changes"). In either case the DpState[}25] of the slave is set to value other than 0, so that the task can always recognize whether or not the data
is valid. If a slave gives a faulty answer, the input data is always set to 0, independently of the setting of
Changes of the Input Data.
Setting the slave's restart behavior if the DP connection to the slave is removed
This specifies whether the DP connection to slave whose DP connection has been removed is automatically
re-established, or whether this should be done manually as a result of a call to ADS-WriteControl (see ADS-Interface [}28]).
The reaction of the master if the DP connection to the slave is removed
This specifies whether removing the DP connection to a slave has no other effects (No Reaction, the default
setting), or whether the master should enter the STOP state, thus removing the DP connections to all the
slaves.
Effect on the state of the master (Clear mode), if the DP connection to the slave is removed
Clear mode (TwinCAT 2.8: see PROFIBUS [}42] tab of the master, TwinCAT 2.9: see Fault Settings [}51]
dialog) can be used to specify that the master should switch to or remain in "Clear" state, as long as at least
one MC slave (setting: "Only MC slaves") or any slave (setting: "All slaves") does not respond correctly (i.e.
has a DpState [}25] not equal 0).
The Reaction of the Master setting (see the slave's Features [}59] tab), which was described in the
previous chapter, has priority over the Auto-Clear mode, so that when an appropriately set slave fails, the
Master enters the STOP state.
Failure of the master
Monitoring in the PLC/IO task
In the event of persistent bus faults, the DP cycle also may extend up to 100ms, even with 12Mbit/s. In
order to monitor the DP master, there is a status variable CycleCounter, and this can be linked in the PLC
(see the Master Diagnostics [}20] chapter). This variable is incremented by the master after each DP cycle,
so that failure of the master can be detected by monitoring this variable in the PLC.
FC3101 and FC310218Version: 3.0
FC310x as master
Monitoring in the slave
In order to monitor failure of the master and data transmission on the PROFIBUS, a watchdog (see the
box's PROFIBUS [}58] tab) can be activated (default setting: watchdog activated with 200ms). The
Watchdog must be set to at least twice the maximum Estimated Cycle Time and Cycle Time (see
"FC310x" tab (for TwinCAT 2.8 [}40] or TwinCAT 2.9 [}48]) of the master).
Failure of the PLC/IO task
A distinction is made between a PLC stop, reaching a break point and a task stop (the I/O task and NC task
are only stopped when the entire system stops). In the case of a PLC stop, the output data is set to 0 by the
PLC, whereas when a breakpoint is reached the data initially remains unchanged.
In the master, the task is monitored with a monitoring time (TwinCAT 2.8: according to the setting Clear
Delay x task cycle time on the PROFIBUS [}42] tab of the master, TwinCAT 2.9: according to the setting
Task Watchdog x task cycle time in the Fault Settings [}51] dialog). If no new data transfer takes place
within this monitoring time, the master switches to "Clear" state according to the setting Reaction on PLC
Stop or Reaction on Task Stop (TwinCAT 2.8: see PROFIBUS [}42] tab of the master, TwinCAT 2.9: see
Fault Settings [}51] dialog) (outputs are set to 0 or safe state (Fail_Safe = 1 in the GSD file, default setting)
or remains in "Operate" state (outputs retain the last value). The "Operate" setting is valuable when the
outputs should not be cleared when a breakpoint is reached in the PLC. However, if the PLC stops, the
outputs will still be set to 0 (by the PLC), even if the master remains in the "Operate" state. It should,
however, be noted that the outputs will only be zeroed if the previous DP cycle is completed in time (see the
Synchronization [}12] chapter). It should therefore only be set during the commissioning phase.
Failure of the host
To monitor a host crash (e.g. blue screen on a PC), a watchdog time can be set (TwinCAT 2.8: see FC310x
[}40] tab of the master, TwinCAT 2.9: see Fault Settings [}51] dialog). If this watchdog timer elapses, the
master enters the OFFLINE state, so that the DP connections to all the slaves are removed, and the master
logs off from the PROFIBUS, ceasing to carry out bus accesses.
Start-up behavior
The DP connections to all the slaves are established when the TwinCAT system starts up. Until the highest
priority task that is involved has not been started, the master still does not send any Data_Exchange
telegrams even after the DP connection has been established, and sends only diagnostic telegrams. As
soon as the highest priority task has transferred data once, and the DP connection for the corresponding DP
slave has been established, the master cyclically (with the highest priority assigned task) sends one
Data_Exchange telegram to each of the corresponding slaves.
In addition, the Operate Delay and Clear Mode settings (TwinCAT 2.8: see PROFIBUS [}42] tab of the
master, TwinCAT 2.9: see Fault Settings [}51] dialog) can be used to specify when the master switches
from "Clear" state (outputs are set to 0 or safe state (Fail_Safe = 1 in the GSD file)) to "Operate" state
(outputs correspond to the outputs transferred by the task). The Operate Delay specifies the minimum
length of time for which the master should remain in the "Clear" state following the first transfer of data. As
has been described above, the Clear mode specifies whether the master changes into or remains in the
"Clear" state if a slave in general or an MC slave in particular fails.
Shut-down behavior
The reaction to the stopping of the TwinCAT system is exactly the same as has been described above in the
"Failure of the Host" chapter; the DP connections to all slaves are removed, and the master logs itself off
from the bus.
FC3101 and FC310219Version: 3.0
FC310x as master
3.4.3FC310x - Master Diagnostics
Diagnostic Inputs
The master possesses a variety of diagnostic variables that describe the state of the card and of the
Profibus. They can be linked in the PLC:
Fig.15: Diagnostic variables of the PROFIBUS master
CdlInfo:
CdlInfo.error: Shows the number of slaves with which data exchange could not take place in the last cycle.
The BoxState of the slaves should only be checked if this value is not equal to 0.
CdlInfo.cycleCounter: Is incremented at the end of each PROFIBUS cycle in order that this variable can
indicate whether the last cycle was completed before the task was started.
CdlInfo.actualCycleTime: Shows the current cycle time in 4/25µs. This variable is updated only when all
slaves are involved in the data exchange (also when CdlInfo.error is 0).
CdlInfo.actualModulo: Indicates the current modulo. This variable is only of significance if the slaves are
prioritized (see the Slave Prioritization/Multiple DP Cycles [}14] chapter)
Counter: Used for the Redundancy mode [}38]
DiagFlag: Indicates whether the card's master diagnostic information has changed. It can then be read via
ADS [}28] by the control program, after that the "DiagFlag" variable is reset.
GlobalState: GlobalState[0] indicates the state of the FC310x, GlobalState[1-2] indicate global bus statuses,
while GlobalState[3] is reserved for extensions:
RESET (1): Card router not started (after start-up of the PC).
INIT (2): Router started but card not active on PROFIBUS.
STOP (3): Card active on PROFIBUS, but no cyclic data exchange.
FC3101 and FC310220Version: 3.0
FC310x as master
STOPPING (4): Card ends cyclic data exchange.
RUN (0): Card in cyclic data exchange.
GlobalState[1] counts the detected bus errors (as from FC310x, version 1).
GlobalState[2]: Bit0 is set, if no 11bit idle time is detected on the PROFIBUS (-> check cabling), bit1
contains the operation mode CLEAR (bit1 = 1) or OPERATE (bit1 = 0), the other bits (2..7) are reserved for
expansions (from FC310x, version 1).
GlobalState[3] is reserved for expansions.
CycleFailedCounter: This counter shows how often the FC310x PROFIBUS cycle was unready at the start
of the TwinCAT task.
StartRedundantMasterFlag: Is used for the Redundancy mode [}38]
Master Diagnostics Data
The master diagnostic data can be read by ADS [}28]:
ADS-Read parameters Meaning
Net-ID
Port200
IndexGroup0x0000F100
IndexOffsetOffset within the diagnostic data
LengthLength of the diagnostic data that is to be read
DataDiagnostic data
Net-ID of the master (see the device's ADS [}44] tab)
The master diagnostic data has the following structure:
OffsetDescription
0 -125BusStatus list, one byte per station address 0-125, which contains the station
status (see BoxState for PROFIBUS boxes, additional for stations that are not
configured: 0x80 - not available, 0x81 - slave, 0x82 - master not ready for token
ring, 0x83 - master ready for token ring, 0x84 - master in token ring)
126 - 127reserved
128 - 135State of the FC310x (->GlobalState)
136 - 137Send error counter for all sent telegrams
138 - 139Receive error counter for all received telegrams
140 - 255reserved for extensions
256 - 257
258 - 259Cycle Start Error Counter, counts up one when the PROFIBUS cycle is restarted
260 - 261
262 - 263reserved for extensions
264 - 265Minimum reload value of real-time timer
266 - 267
268 - 269
270 - 271
Sync Failed counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46]
(TwinCAT 2.9))
before the old cycle is complete (intercepted by the TwinCAT-IO driver, only
possible with customized drivers)
Time Control Failed counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
Maximum reload value of the real-time timer (max. FCxxxx jitter (see tab EquiDiag[}46] (TwinCAT 2.8) or MC-Diag [}46] (TwinCAT 2.9)) = max. reload value -
min. reload value)
PLL Overflow counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46]
(TwinCAT 2.9))
PLL Underflow counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
FC3101 and FC310221Version: 3.0
FC310x as master
TcIo diagnostic data
The TcIo driver also generates diagnostic data that can be read, activated, deactivated and reset by ADS. It
is, however, deactivated by default. They are enabled if the tab EquiDiag [}46] or GeneralDiag [}44]
(TwinCAT 2.8) MC-Diag [}46] or DP-Diag [}54] of the device is selected and disabled if the tab if
deselected.
Activation, deactivation and resetting the TcIo diagnostic data
ADS-Write parameters Meaning
Net-IDPC Net-ID
Port300
IndexGroup0x00005000 + Device-Id (device's General tab)
IndexOffset0xFFFFF100
Length2
Data0: Deactivation of the Tclo diagnostic data
1: Activation of the Tclo diagnostic data
2: Resetting the Tclo diagnostic data
Reading the Tclo diagnostic data
ADS-Read parameters Meaning
Net-IDPC Net-ID
Port300
IndexGroup0x00005000 + Device-Id (device's General tab)
IndexOffset0xFFFFF100
LengthLength of the Tclo diagnostic data
DataTcIo diagnostic data
The Tclo diagnostic data has the following structure:
FC3101 and FC310222Version: 3.0
OffsetDescription
0 -3
4 - 7
8 - 11
12 - 15
16 - 19
20 - 23
24 - 27
28 - 31
32 - 35
36 - 39
40 - 43
44 - 47
48 - 51
52 - 55
56 - 59
60 - 63
64 - 67
Max. TwinCAT jitter (in 100ns, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46] (TwinCAT 2.9))
Min. mapping time (in 100ns, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
Min. mapping time (in 100ns, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
Max. FC310x jitter (in FC310x ticks, see tab EquiDiag [}46] (TwinCAT 2.8) or
MC-Diag [}46] (TwinCAT 2.9))
CycleWithNoDxch counter (see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag[}44] (TwinCAT 2.9))
CycleWithRepeat counter (see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag[}44] (TwinCAT 2.9))
Max. repeater/cycle (see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag [}44]
(TwinCAT 2.9))
Actual cycle time (in 4/25µs, see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag [}44] (TwinCAT 2.9))
Max. cycle time (in 4/25µs, see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag[}44] (TwinCAT 2.9))
Max. cycle time (in 4/25µs, see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag[}44] (TwinCAT 2.9))
RealFailedCycle counter (see tab GeneralDiag [}44] (TwinCAT 2.8) or DP-Diag[}44] (TwinCAT 2.9))
EquiCycleNoDxch counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
EquiCycleRepeat counter (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
Max. Repeats/Equi-Cycle (see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag[}46] (TwinCAT 2.9))
Actual Equi-Cycle-Time (in 4/25µs, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46] (TwinCAT 2.9))
Max. Equi-Cycle-Time (in 4/25µs, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46] (TwinCAT 2.9))
Min. Equi-Cycle-Time (in 4/25µs, see tab EquiDiag [}46] (TwinCAT 2.8) or MC-Diag [}46] (TwinCAT 2.9))
FC310x as master
3.4.4Slave diagnostics
DP-State
Each DP slave has a status variable that indicates the current state of that DP slave. This status is
maintained in real time, so that it is always adapted to the current DP slave data, and can be linked to a PLC
variable (-> DpState [}25] of the slave):
Fig.16: Slave diagnostics - DP state
FC3101 and FC310223Version: 3.0
Loading...
+ 53 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.