This chapter provides a programming example which explains how to build up and configure a C2C network consisting of:
two PacDrive LMCs (that is, one C2C Master and one C2C Slave)
four Sercos devices (that is, a Lexium 62 Double Drive and a PacDrive LMC 600 for each PacDrive LMC).
The design of this programming example is based on the assumption that two test training systems (TTS: VSP4EA0000500, one for each PacDrive LMC) from Schneider Electric are connected via Sercos to build up the C2C network.
For further information on the TTS, refer to Hardware Setup and “Operating Manual”, Training- and Application-Test-System PacDrive 3 TTS 3".The programming example consists of one EcoStruxure Machine Expert project for the C2C Master (C2C Master project) and one EcoStruxure Machine Expert project for the C2C Slave (C2C Slave Project).
For more information on the C2C network, refer to the chapter General Information.
Connecting two training test systems (Training Test System PacDrive3 (TTS)) using a C2C network
Synchronizing the two TTS and exchanging signals (encoder and data) in a synchronized manner.
Encoder signal exchange:
To demonstrate that synchronization and exchange of encoder signals operate correctly, one motor of the C2C Master (TTS1) executes a motion curve. This motion of the motor of the C2C Master (TTS1) is transmitted as C2C encoder signal via C2C network. A motor of the C2C Slave (TTS2) follows this signal using a 1:1 cam profile. This means, the motors of TTS1 and TTS2 carry out an identical movement.
User data exchange:
User data is transmitted (independent of the encoder signal) from the C2C Slave LMC to the C2C Master LMC in a synchronized manner. In this programming example, the content of a data structure with a data size of 10 bytes is transmitted.
This programming example represents a simple use of the C2C network. There are more options and additional possibilities available than is represented in this programming example:
In this programming example |
Possible additional options |
---|---|
C2C network includes one C2C Slave. |
More than one C2C Slave is permitted. |
C2C Slave is producer of the data. |
C2C Master and C2C Slave can both be producer or consumer of the data. A C2C Slave can be producer and another C2C Slave can be consumer of the data. |
C2C Master is producer of the encoder signal. |
C2C Master and C2C Slave can both be producer or consumer of the encoder signal. A C2C Slave can be producer and another C2C Slave can be consumer of the encoder signal. |
For each producer there is only one consumer. |
For each producer several consumer can exist. |
It is assumed that you know how to perform the following actions:
Installing firmware updates (using the controller assistant)
In EcoStruxure Machine Expert:
Establishing the communication with the controller (using Controller selection)
Establishing a connection to the controller (Login)
Adding objects to your project
Adding structures to your project
Adding libraries to your project (using Library Manager)
Adding POUs to your project and assigning tasks to POUs
Mapping Sercos devices (using Device Addressing)
Downloading and running applications
Moving axes (using the FB_MultiCam function block, the YOffsetGenerator, etc.).