This chapter provides a programming example which explains how to build up and configure a C2C network consisting of:
otwo PacDrive LMCs (that is, one C2C Master and one C2C Slave)
ofour 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.
Objective of the Programming Example
oConnecting two training test systems (Training Test System PacDrive3 (TTS)) using a C2C network
oSynchronizing the two TTS and exchanging signals (encoder and data) in a synchronized manner.
oEncoder 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.
oUser 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. |
NOTE: The programming example only serves as a demonstration for the configuration of a simple C2C network.
NOTE: This programming example is intended for experienced users, who are familiar with the basics principles and usage of electrical systems and the PacDrive system.
It is assumed that you know how to perform the following actions:
oInstalling firmware updates (using the controller assistant)
oIn EcoStruxure Machine Expert:
oEstablishing the communication with the controller (using Controller selection)
oEstablishing a connection to the controller (Login)
oAdding objects to your project
oAdding structures to your project
oAdding libraries to your project (using Library Manager)
oAdding POUs to your project and assigning tasks to POUs
oMapping Sercos devices (using Device Addressing)
oDownloading and running applications
oMoving axes (using the FB_MultiCam function block, the YOffsetGenerator, etc.).