Motion Control - ElmoMC

    Wire Roller Application

    Linear Motor with Cyclic ECAM

    This application note describes the implementation of a master-slave ECAM application with a linear motor as slave and a rotary motor as master. The linear motor performs a cyclic ECAM trajectory according to the master rotary motor.
    User program
    Terms used in this document:
    Electronic CAM, in which the position reference to the drive is not directly proportional to the total external inputs, but is rather a function of them. ECAM can be performed linearly or cyclically; this document describes the cyclic implementation.


    The sequence in which the zero position is determined.


    A procedure in the user program that enables automatic execution of a program at system startup.


    An interrupt routine in the user program that is automatically called when a motor fault is detected. The user can then determine what the resulting behavior of the application should be.
    The Cyclic ECAM ModeIn ECAM mode, the user defines the motion path by entering the offset reference values of an ECAM table (EM[3] command) and the difference between entries (EM[4] command). The ECAM table is built with ET[k] command where k is any value between 1 and 1024 (entries). A linear interpolation is then performed according to the ECAM entry values (ET[k]…ET[k+1]) and the reference difference (EM[4]).

    The cyclic ECAM mode is a new feature introduced by Elmo; it allows an infinite input of auxiliary position reference values regardless of the limited range of the auxiliary position accumulators. In cyclic ECAM, the references are taken relative to the previous sample.
    The output of the ECAM table is cyclical: The ECAM entries roll endlessly from last to first.

    For more information about the ECAM modes, refer to the Software Manual and the Command Reference Manual of the relevant Elmo digital drive.

    The ApplicationThe application winds wire strings from a large base drum to a smaller target spool (rotated by the master motor) in order to prepare small spools of wire strings for common consumers. The manner in which the strings are wound on the target spool is determined by the ECAM trajectory and is controlled by the slave linear motor. The first stage, performed once at each power up, is a homing process that brings the slave axis to a zero position. The master axis then starts to turn according to the speed of the base drum. When a full winding sequence is complete, the operator removes the fully-wound target spool and a new sequence starts by sending the slave axis back to the home position. In order to keep a constant amount of string on the target spool, the speed of the master drum is synchronized by an encoder to the speed of the base drum.

    Application AssumptionsThe following issues were taken into account in developing the application:

    1. The master must turn indefinitely in the same direction without resetting the position register.
    2. The master drum changes speed according to the base drum speed.
    3. The master encoder resolution is different than the slave encoder resolution.
    4. The winding of each wire string spool must end smoothly.
    5. One full cycle of the slave ECAM table will wind the spool 1.3 turns.
    SolutionsThese solutions refer back to the application assumptions in the previous section.
    1. When working with cyclic ECAM EM[1]=2), the position reference to the slave is relative. When the master position rolls over, only the relative counts from the previous sample are considered. This way, the absolute auxiliary position (PY) has no practical relevance for the ECAM reference.
    2. A follower mode is set between the master drum and the linear motor (RM=1) so that when the master drum speed is changed or stopped, the slave follows. This relationship remains throughout the entire sequence, from the instant in which the homing procedure of the slave is complete.
    3. A follower ratio (FR) of 0.972 was used in order to synchronize the movement of the master and slave. Another option was to multiply the ECAM table entries by the follower ratio.
    4. A delay of one cycle was entered in the ECAM table in order to accommodate the requirement for a smooth completion of each spool. The delay gave a smoothing factor to the last winding at each edge.
    5. The distance between each point of the slave reference input to the ECAM table (EM[4]) was modified according to the need for 1.3 turns of the spool.
    The User Program
    The user program is in standard ".txt" format and can be opened with any text editor.
    The ".ell" extension refers to the Elmo Low Level Language for the SAX\MIS\CLA family.
    The user program can be downloaded using the Elmo Studio IDE tool in the Elmo Composer application.

    After the user program is downloaded to the drive, the SG command is used to save it to the flash memory, where it is constantly resident. When the drive is powered on, an #AUTOEXEC routine causes the program to execute automatically in an endless loop.

    Since the slave linear motor is a stand-alone device (no communication with external host), an axis control sets the digital input according to the application requirements and gets digital output as the application progresses:

    • Digital input 1: Initiates the system and sets homing mode.
    • Digital input 2: The axis control starts to move the master and informs the slave accordingly.
    • Digital output 1: Indicates the end of the initiation process.
    • Digital input 2: Indicates a motor fault.

    A homing sequence is performed on the FLS (Forward Limit Switch) and then on the index located in the middle of the linear motor. In this application, the start position is ---2000, followed by the index origin.

    The AUTO routine is used to interrupt the main loop when one of the following events occur:

    • AUTO_I1: Digital input 1 is set high.
    • AUTO_ER: The motor has been automatically shut down due to a fault, which can be read using the MF command. In this case, an output is set to indicate that a fault has occurred and the JZ command is used to return to the main loop. This is done because motor faults can appear any time (for example, main power is down) and overflowing the program counter should be avoided.

    Slave Vs. Master TrajectoryFigure 1 - depicts the relationships between the slave linear axis and the master rotary axis. The cyclic ECAM cycle is between '1' and '2'.

    Figure 2 - shows the behavior of the slave linear motor when the master rotary motor position register is rolled over. The slave axis remains in trajectory according to the ECAM reference.