|
Synchronization
|
|
The Master is responsible for sending a synchronization telegram
(MST) at the beginning of each communication cycle. All Slaves
(drives) will receive the MST and reset their clocks. In this
way, all Slaves will run in phase lock with the Master's clock.
Because all Slaves are in phase lock with the Master's clock,
commands can be made active in all of the Slaves at the same
instant. This means that the Master can coordinate motion
between all axes without propagation effects distorting the
motion profile. Feedback from the Slaves is handled in a similar
manner, and is latched in all Slaves at the same instant.
|
|
|
Ring Timing
|

|
Data is sent and received by the Master and Slaves through
communication telegrams. The communication telegrams are organized
over the SERCOS cycle in the manner shown in the next figure.
The SERCOS ring timing is based on the data to be placed
in the telegrams (AT, MDT), and on 6 drive parameters that
are determined by the type and features of a drive (or drives),
and 6 parameters that are written from the Master, with some
of these parameters derived or calculated from the drive's
timing parameters. The times at which the MDT and AT are sent
(relative to the sending of the MST) are determined by the
Master and sent to the Slaves during initialization.
During Phase 2, the Master reads parameters from the drives
that determine what and when the drives are able to transmit
and receive. Using this information and the desired telegram
contents, baud rate and cycle time, the Master determines
the timing and telegram parameters for each drive. The Master
then writes these parameters to the drives.
|
|
For a print-friendly version of the
above diagram, click here. |
|
Initialization
|

|
Before true synchronous data transmission can occur, the
system must first be initialized. This is done through a series
of communication phases (or just phases) in which data
is first transmitted asynchronously. The data transmitted
during these early phases is used to configure the Master
and Slaves for synchronous data transmissions in later phases.
The SERCOS protocol defines five phases.
|
Phase |
Name |
Action |
0
|
Ring Verification |
Master verifies ring closure |
1
|
Device Verification
|
Master verifies devices on
ring |
2
|
Telegram Set-Up
|
Master reads
timing data from slaves and sets up telegram timing
|
3
|
Device Parameterization |
Master continues to configure
devices |
4
|
Cyclic Operations |
Master commands devices cyclically |
|
On power-up, each drive or I/O module begins an initialization
sequence. At this time, each drive and I/O module operates
as a repeater, by simply passing received telegrams to the
next device on the SERCOS ring.
The Master is only allowed to set the communication phase
to the next logical communication Phase (Phase
0 -> Phase 1 -> Phase 2 -> Phase 3 -> Phase 4)
or directly back to Phase 0.
If at any time the Master attempts to switch a Slave into
a Phase that is not the next logical Phase, then the Slave
will immediately return to Phase 0. If at any time the Slave
receives two invalid MSTs or MDTs consecutively, the Slave
will also switch to Phase 0.
|
Phase 0:

|
During Phase 0 no
data is exchanged between the Master and the Slaves. All
Slaves must be in "repeater" mode. This means that each Slave
will retransmit any signal that it receives. In order to verify
that the communications ring is intact and capable of sending
telegrams, the Master begins sending Master Synchronization
Telegrams (MST) through the SERCOS ring.
The Slaves (drives) simply pass the MST to the next drive
in the daisy-chained ring, and eventually because of the ring
topology, the MST returns to the Master (i.e., Master will
receive its own MST). Phase 0 is completed when the Master
receives 10 consecutive MSTs. After the tenth consecutive
MST, the Master changes the phase information in the MST to
1, which commands all Slaves to switch into Phase 1 operations.
|
Phase 1:

|
During Phase 1, the Master
sends out an MDT with the address of a specific Slave in the
system. If present within the system, the Slave with the specified
address responds by sending an AT back to the Master. The
AT that is sent is rudimentary and is intended solely as a
confirmation that the addressed Slave is in the system. The
Master then repeats this query for all target Slaves. (Note
that not all Slaves in the system will be target Slaves. Target
Slaves are chosen by the application before initialization
begins.)
When the Master receives an AT from each target Slave (in
response to a query), the Master changes the phase information
in the MST to 2, which commands all Slaves to switch into
Phase 2 operations.
|
Phase 2:

|
During Phase 2, the Master
sets up the configurable data portion and calculates the duration
and time slots within the SERCOS cycle for all telegrams to
be used in Phases 3 and 4. The Master also determines the
slave operation mode for all Slaves. In order to do this,
the Master requires certain data from the Slaves. The Master
obtains this data by sending an MDT addressed to a specific
Slave, that uses the MDT's Service Channel to query the Slave
for the required data
The Slave responds by sending an AT containing the appropriate
data, in the AT's Service Channel. Once the Master has determined
all parameters, it sends them to each Slave via the MDT's
Service Channel. In Phase 2, the Service Channel is active
in both MDTs and ATs.
Once all data is transmitted to the Slaves, the Master will
initiate the Communication Phase 3 Transition Check S-0-127
procedure for each Slave.
The Communication Phase 3 Transition Check checks the validity
of all the data, and if all the data is valid, then the procedure
executes successfully. If any data is not valid, the procedure
fails and the IDN number of the invalid data is placed in
IDN-List of Invalid Operation Data for CP2 S-0-21.
After all Slaves have completed the procedure successfully,
the Master changes the phase information in the MST to 3,
which commands all Slaves to switch into communication Phase
3.
|
Phase 3:

|
In Phase 3, the real-time
synchronous and asynchronous communication starts, and the
Master uses the Service Channel to configure and parameterize
(write parameters to) the Slaves. The parameters set in Phase
3 are application-oriented (e.g., conversion factors). During
Phase 3, all communication telegram parameters sent in Phase
2 become active. Note that although Configurable Data (in
ATs and MDTs) is present in the communication telegrams, some
of that Configurable Data may not be valid until Phase 4.
The Master will still send the MST at the beginning of the
SERCOS cycle, but will now also send an MDT with a global
address at a specific time (all Slaves will receive a global
telegram). Each Slave will transmit its AT during its specified
time slot. The communication telegrams now contain the Control/Status
Word, a Service Channel, and the Configurable Data.
When the Master has finished sending parameters to the Slaves,
it will initiate the Communication Phase 4 Transition Check
S-0-128 procedure for each Slave.
The Communication Phase 4 Transition Check checks the validity
of all the data, and if all the data is valid, then the procedure
executes successfully. If any data is not valid, the procedure
fails and the IDN number of the invalid data is placed in
IDN-List of Invalid Operation Data for CP3 S-0-22.
If the Communication Phase 4 Transition Check executes successfully
and the Phase information in the MST is equal to 4, the Master
switches the drives to Phase 4.
|
Phase 4:

|
In Phase
4, a final verification of error-free drive operation
is completed. This completes the drive initialization. The SERCOS
communication loop is now operational. During Phase 4, all Control/Status
words, Service Channels, and Configurable Data (in ATs and MDTs)
are valid for the target Slaves. The Slaves (drives) are ready
to follow commands when enabled. Diagnostics (errors, warnings,
status) are enabled. |
|
|
|