Motion Control - ElmoMC

    Box Labeling

    Master - Slave application: ECAM with modulo offset

    User program
    Background This note applies to the use of the master-slave application with ECAM mode. It suggests a solution for a slave that performs a non-linear trajectory while following a master.

    This note covers:

    • On-the-fly disengagement and re-engagement of the follower motion
    • Modulo counting of the ECAM table offset entry
    • Modulo counting of the slave reference and feedback
    • Modulo counting of the master feedback

    The basic assumptions are that:

    • The master moves at any speed
    • The slave performs a constant trajectory over the master location
    • The slave disengages the follower after each cycle
    The applicationThe application prints a matrix on a box. A conveyer driven by the Tuba Servo Controller is the master that carries the boxes. The distance between two boxes is not constant and each arrival of a box is marked with a high-speed input that captures the master location. This location is the base offset for a preprogrammed ECAM table. The ECAM table is used as a reference to the slave trajectory.

    The slave is a roller driven by the Cornet Servo Drive (MIS), and contains two matrixes that perform the printing on the box. The roller completes one cycle each two boxes. After printing, the roller stops following the master conveyer and returns to its homing location. This location is actually the beginning of the next motion (start of the ECAM table). The roller begins following again after the fast input is sensed and the follower is re-engaged. Problems Encountered

    • The slave (roller) linear speed must be adjusted to the conveyer speed while printing.
    • The slave rolling each cycle can cause a loss of synchronization between the master reference and the slave feedback.
    • The slave must HOME each cycle regardless of the fact that the reference is an auxiliary reference.
    • The slave must adjust the absolute position after each consecutive cycle in order to prepare for the next cycle.
    • The master must roll over without losing synchronization with the follower referencing.
    • The slave trajectory is repetitive regardless of the master location.
    • Two boxes can arrive at the roller at the same time. In this case, the captured location of the first box can be lost because the captured location of the master is ambiguous.
    • To accelerate the roller speed in order to synchronize with the conveyer belt at the printing area, an ECAM table is used. The trajectory of the slave is nonlinear. The ECAM table assures that the linear speed of the roller exactly matches that of the conveyer belt when the load reaches the printing location. (Refer to The Recorded Slave Trajectory.)
    • To overcome this, the MIS offers a smooth modulo count when it exceeds the slave position limits. The smoothness is achieved by maintaining the velocity command regardless of the change in the slave feedback indication for each modulo rollover.
    • The position command to the controller is built from the auxiliary reference (in this case the master reference) and any software command. The HOME location can be achieved by giving the absolute location of HOME or, as in this case, using the modulo rollover location that is half of the roller cycle.
    • A position-relative command is applied on-the-fly as a software command. The relative position command adjusts the software position command to the starting location of the next cycle; that is, the next box to be printed.
    • The master continues to count practically to the limit of the position register. When it is rolled, the slave does not follow and no interference is made to the slave movement. The reference to the ECAM table is taken after an offset from the master. Since this offset is modulo, the actual reference to the slave is always within the limits of the ECAM trajectory.
    • By using an automatic capture routine that interrupts the internal user program, the location of the conveyer is captured each box regardless of the location of any prvious box. Each box is allowed only after a previous one passes the fast input switch. Since this is a very short interrupt routine, several boxes can be marked almost immediately. This application requires only two captures at the same time.
    The User ProgramThe following program (#@AUTOEXEC) is downloaded to the controller and starts each time the amplifier is powered on. This example assumes that the slave (roller) is 8000 ppr (32000 counts). The printing area is between locations 10000 and 14000. After printing, the slave continues to its HOME location according to a software relative command.

    The AUTO_ routine actually interrupts the performance of the program each time an event (according to the AUTO_) is triggered. This ensures that an event such as an auxiliary capture switch (AUTO_HY) or amplifier fault (AUTO_ER) accepts priority over the fluent program.

    • To view the User program click here.

    The Recorded Slave TrajectoryWith the recorded position command taken from the roller, the acceleration of the slave can be seen from point "1" to point "2". At point "3" the 1st box was actually printed and the slave continues with a PTP movement to the start of the next box at point "4" (location -16000 after modulo).

    The next box arrives at point "5" and the roller starts to accelerate again.
    While this box is being printed another box arrives and at point "6" an immediate follower engagement is performed. The next box is printed.

    Note that each cycle takes 14000 counts and the "HOMING" takes 2000 counts more.
    The trajectories are the same regardless of the conveyer location and the roller starting point.