Input and Output Parameters Structure
The middle column of the table below identifies which parameter is applicable to each coordinate system motion instruction, that is, to MCLM and MCCM. Before any of the parameters identified in the first column below may be used in the MCLM or MCCM instruction, you must execute an MDCC instruction and it must be active (IP bit is set).
Parameter | Instruction | Mode |
---|---|---|
Input Parameters | ||
Lock Direction | MCLM, MCCM | Master Driven Only |
Lock Position | MCLM, MCCM | Master Driven Only |
Command Tolerance | MCLM, MCCM | Master Driven and Time Driven |
Event Distance | MCLM, MCCM | All modes (Master Driven or Time Driven) |
Output Parameter | ||
---|---|---|
Calculated Data | MCLM, MCCM | All modes (Master Driven, Time Driven, and Timed Based) |
Input Parameters
This table describes the input parameters.
Lock Direction
Data Type | Description | Valid Default Values |
---|---|---|
Immediate | This parameter is used for both Time Driven and Master Driven Mode. The controlling axis is the Master Axis (axis is programmed in the MDCC command) for Master Driven Mode and the axis that is programmed in the motion instruction (for example, MCLM) for Time Driven Mode. The first word of the Lock Direction enumeration definition (see enumeration table below) identifies the lock type as either:
The second word of the enumeration specifies the direction in which the Master Axis has to be moving when it crosses the Lock Position for the lock to take effect. For an MCLM and MCCM instruction, the Slave Coordinate System always moves in one direction - its programmed direction - while it follows the Master Axis, regardless of the direction of the Master Axis. If the Master reverses, the Slave Coordinate System stops. | Valid = 0-4 Default = None (Enumeration 1-4 are currently not allowed in Time Driven mode.) |
For Master Driven Mode, the enumerations are as follows:
(Forward is positive velocity, reverse is negative velocity.)
The enumerations table is shown.
Enumeration | Definition | Description |
---|---|---|
0 | None | Indicates that the Lock Position is not active. If Lock Direction is set to None and the Master Driven mode is selected by the speed parameter of the motion instruction, the system will error. Conversely, if Lock direction is not set to a value other than None and the speed parameter units indicate Time Driven mode, an error is also generated. |
1 | Immediate Forward Only | Motion starts immediately when the Master is moving in the Forward Direction. The Master Axis is only followed while it is moving in the Forward Direction. |
2 | Immediate Reverse Only | Motion starts immediately when the Master Axis is moving in the Reverse Direction. The Master Axis is only followed while it is moving in the Reverse Direction. |
3 | Position Forward Only | Motion starts (that is, the Slave Coordinate System locks to the Master Axis) when the Master Axis crosses the Lock Position while it is moving in the Forward Direction. The Master Axis is only followed while it is moving in the Forward Direction. Note that if the start position equals the Lock Position and this enumeration is selected, then motion will not start because the Lock Position will not be crossed. |
4 | Position Reverse Only | Motion starts when the Master Axis crosses the Lock Position while it is moving in the Reverse Direction. The Master Axis is only followed while it is moving in the Reverse Direction. Note that if the start position equals the Lock Position and this enumeration is selected, then motion will not start because the Lock Position will not be crossed. |
For Time Driven Mode, the enumerations are:
Enumeration | Definition | Description |
---|---|---|
0 | None | Indicates that the Lock Position is not active. |
1 | Immediate Forward Only | The instruction will error with MDSC_LOCKDIR_CONFLICT (95). |
2 | Immediate Reverse Only | The instruction will error with MDSC_LOCKDIR_CONFLICT (95). |
3 | Position Forward Only | The instruction will error with MDSC_LOCKDIR_CONFLICT (95). |
4 | Position Reverse Only | The instruction will error with MDSC_LOCKDIR_CONFLICT (95). |
Lock Position
Data Type | Description | Valid Default Values |
---|---|---|
IMMEDIATE REAL or TAG | Lock Position in Master Driven Mode The position on the Master Axis where a Slave Coordinate System should start after the move has been initiated on the Slave Coordinate System when executing in Master Driven Mode. This is an absolute position (plus or minus) on the Master Axis in Master Axis units. You can specify a Lock Position to delay the start of motion of a Slave Coordinate System after the motion instruction has been initiated on the Slave Coordinate System. If an axis in the Slave Coordinate System is already moving and a coordinated move instruction (MCLM, or MCCM) with a Lock Position is activated on the Coordinate system, then you will receive an MDSC_LOCK_WHILE_MOVING error for the MCLM or MCCM instruction. Because Merge is always performed immediately when an instruction is enabled, a merge instruction that starts at a nonzero velocity with both a Lock Position and a Merge enabled will receive an MDSC_LOCK_WHILE_MOVING error. The Lock Direction determines the direction in which the Master Axis must be moving when it crosses the Lock Position before the Slave Coordinate System locks to the Master Axis. Note that if there is an unwind value specified on the Master Axis, then the Lock Position must be between 0 and the unwind value (that is, the Lock Position cannot be more than one unwind.) This parameter is only used in Master Driven Mode. Lock Position in Time Driven Mode There is no Lock Position in Time Driven Mode for a coordinate system. An error will be generated if the Lock Direction is not NONE and the system is in Time Driven Mode for an MCLM or MCCM. This parameter is only used in Master Driven Mode. Axis Lock Behavior When the Master axis crosses the Master Lock position in the direction as specified by the motion instruction, the Slave Coordinate System becomes locked to the Master axis. The LockStatus bit is set at this time. The MCLM and MCCM instructions on the Slave Coordinate System in MDSC mode go IP as soon as they reach the head of the motion queue. The head of the queue is defined as the move right before the active move. For the Immediate Forward Only or Immediate Reverse Only Lock Directions, the Slave Coordinate System gets locked to the Master Axis immediately when the MCLM or MCCM instruction is executed (goes IP). For the Position Forward Only or Position Reverse Only Lock Directions, the slave gets locked to the Master Axis when the Master Axis crosses the Master Lock Position in the direction as specified by the motion instruction. In either case, the LockStatus bit is set when the lock occurs. Because there is no bi-directional behavior defined, once locked, the Slave Coordinate System follows the Master only in the specified direction. If the Master reverses direction, then the Slave stops following the Master. Note that the LockStatus bit remains set until the Master decelerates to zero. It is cleared at the point of reversal of the Master axis. The Slave does not follow the Master while the Master travels in the reverse direction. If the Master axis changes directions again, then the axis LockStatus bit is set again when the Slave Coordinate System crosses the original reversal point, at which time the slave resumes following the Master Axis. On the Slave Coordinate System the following restrictions apply:
On the Master Axis, no special restrictions apply. Note that if an instruction with the merge enabled is enqueued, then the whole queue is flushed and the active move is terminated. Note that if Master Axis filtering is enabled on the master axis, then the lock position for the Slave Coordinate System is delayed by the filter; the amount of delay is dependent on the filter bandwidth. | Default = 0.0 |
Command Tolerance
Data Type | Description | Valid Default Values |
---|---|---|
IMMEDIATE
REAL or
TAG | The position on a coordinated move where blending should start. When Termination Type 6 is used, the Command Tolerance on the instruction faceplate is used instead of the value for the Command Tolerance that is configured in the Coordinate System. | Valid = 0.0 |
Event Distance
Data Type | Description | Valid Default Values |
---|---|---|
ARRAY or 0 (The array must be a minimum size of 4. If the array is greater than 4, only the first four locations specified are used.) | The position(s) on a move measured from the end of the move. This is an array of input values that specifies the incremental distances along the move on the Slave Coordinate System. Each member of the array is measured as follows:
If the value in the Event Distance array is 0.0, then it is the time or distance for the whole move. The values entered in the Event Distance array are the same for both Time Driven and Master Driven Mode. Only the returned values in the Calculated Data array are different depending on the programmed mode of the Slave Coordinated System. When Event Distance is specified as a negative number, then the Event Distance calculation is skipped and a -1 is returned in the Calculated Data array for the specified Event Distance parameter. There is no limit on the dimension of either the Event Distance or Calculated Data arrays. However, only a maximum of 4 elements (the specified value and the next 3) of the Event Distance array will be processed. Note that special consideration for the rare case of an overshoot when a MCD or MCCD is done close to the moves endpoint. For this case, the Calculated Data will include the overshoot when the Event Distance is 0, since the master will have to traverse this amount for the move to finish. For other Event Distances, the overshoot will not be included. | Default = 0 (no Event Distance array) |
Output Parameters
This describes the output parameters.
Calculated Data
Data Type | Description | Valid and Default Values |
---|---|---|
REAL
ARRAY or 0 | This is the Master Distance(s) (or time) needed for the Slave Coordinated System to travel from the beginning of the move to the Event Distance point. The returned Calculated Data value is dependent on:
To understand the Calculated Data concept, it's important to understand that the Motion Start Point (MSP) for a coordinated move is defined as the last time that:
If there was a dwell programmed in the queue, then the calculated data includes the time of the dwell. Note that the MSP could have occurred several moves prior to the move in which the Event Distance was specified. The Logix Designer application Motion Planner processes and calculates output data and places the result in the Calculated Data array as supplied in the instruction. The number of calculated array elements stored in the Calculated Data array is based on the follow conditions:
A -1 will be returned in the Calculated Data array for each negative value in the Event Distance array. No Event Distance calculation is made for these array elements. You can change the Event Distance array elements dynamically in the program. However, if the Event Distance is changed after the instruction has been initiated (that is, the IP bit has been set), then the change is ignored. An error is generated if the size of the Calculated Data array is smaller than the Event Distance array. If the Event Distance is greater than the move length internally (vector length for MCLM, arc length for MCCM), it will be forced to equal the move length. If a MCD or MCCD is executed (indicated by status bit going IP), the CalculatedDataAvailable (CDA) bit will be cleared. The Calculated Data for the move will be recomputed using the new dynamics parameters. Only those items of the Calculated Data array whose Event Distance hasn’t been reached yet are recomputed; other items are left as they are. Consequently, all Calculated Data array items contain valid information after the move is completed. The CDA bit will be set again when computations are complete, The Calculated Data that is recomputed will be measured from the original MSP to the Event Distance point using the new dynamics parameters as changed by the MCD or MCCD instruction, not from the point of the MCD or MCCD. Note that if the MCD changes the speed to 0, the Event Distance will not be recomputed; the CDA bit will be cleared and stay cleared. The Event Distance will however be recomputed if a second MCD or MCCD is issued to restart the motion. The recomputed Calculated Data will include the duration of the stopped motion. If the Event Distance is set to 0, the Calculated Data will be set equal to the position that equals the length of the move. This may be one or two coarse update periods before the PC bit is set because of an internal delay. The end position is typically achieved in the middle of a coarse update period that adds up to one additional coarse update period to the delay. Therefore, if the master is moved a distance equal to the Calculated Data, you must wait up to 2 iterations more for the PC bit of the slave move to be set. Note that there is a special consideration for the rare case of an overshoot when an MCD or MCCD is done close to the moves endpoint. For this case, when the Event Distance is 0, the returned Calculated Data will include the overshoot distance traveled, since the master will have to traverse this amount for the move to finish. For non-zero Event Distances, the overshoot distance will not be included. A status bit (CalculatedDataAvailable) in the existing motion instruction status word has been defined to indicate that all of the requested data for the specified Event Distance array elements has been returned in the corresponding Calculated Data array elements. Only one status bit is used to indicate all Calculated Data is available. Once set, this bit may later be cleared based on a number of different conditions including, but not limited to, an MAS, MCS being executed Note that Calculated Data is only set once in the instruction queue or planning process. It is not updated as the move occurs to reflect distance to go. It is updated for a change dynamics, however. For coordinated moves, the CDA status bit is set when the Calculated Data is available. In general, for a blending termination type (TT2, 3, 6) or follow contour termination type (TT4, 5) you will not see CDA for move N until move N+1 is put in the queue. For a non-blended termination type (TT0, 1), the CDA will be seen right after the move is put into the queue. You will not see the CDA bit if a move sequence is terminated by a blending or follow contour termination type. That is, you must terminate a blending sequence by a TT0 or TT1. The TT0 or TT1 has to be in the motion sequence, but does not have to be in the queue together with a blending sequence. The move with a TT0 or TT1 can be placed in the queue when space becomes available after the last blended move. The CDA bit will not be set for any move that Event Distance is not specified, that is, where the Event Distance parameter in the instruction is zero. The default value for versions when bringing old systems forward (earlier than v20) is 0, signifying that there is no Event Distance array. | Default = 0 (no Calculated Data array) or a REAL array tag |
Calculated Data Example 1
Event Distance array = [11, 22, -5, 23, 44]
Calculated Data array = [f(11), f(22), -1 ,f(23)]
Where f is the calculated data function.
TIP:
- Tip: The 44 is ignored because it is the fifth element in the Event Distance array. Nothing is returned in the corresponding 5th array element of Calculated Data array.
- A -1 is returned in the third element of the Calculated Data array because the corresponding Event Data Array element is negative.
Calculated Data Example 2
Assume that the master axis is at a position of 2.0. The slave is programmed to an incremental value of 15.0 with a
Master Lock Position at 8.0. The Event Distance is set to 0.0, which means that we want the total
Master Distance (X in the diagram) needed for the slave to move 15.0 units starting when the Master is locked at a
position at 8.0. The incremental value of X is returned in the Calculated Data parameter.
Calculated Data Example 3
This example illustrates using Event Distance and Calculated Data.
Note that the MSP for all event distances is point P0. The MSP is where the Slave is locked to the
Master and starts moving along the programmed path.
5 Move Segments are specified
Event Distance = ED
Command Tolerance = CT
- MCLM1 Y100; TT2 ED=50 CT=100
- MCLM2 X200; TT2 ED=100 CT=20
- MCLM3 Y-100; TT1 ED=100 CT=20
- MCLM4 X200; TT2 ED=100 CT=20
- MCLM5 Y100; TT2 ED=100 CT=20
The calculated data for MCLM1 is returned when MCLM2 is added to the queue and planned.
This will be at point P1 above. Master Distance is Measured from point P0.
The calculated data for MCLM2 is returned when MCLM3 is added to the queue and planned.
This will be at Point P2 above. Master Distance is Measured from point P0.
The calculated data for MCLM3 is returned when MCLM3 is added to the queue and planned.
This will be at point P3 above. Master Distance is Measured from point P0.
The calculated data for MCLM4 is returned when MCLM5 is added to the queue and planned.
This will be at point P10 above. Master Distance is Measured from point P10.
The calculated data for MCLM5 is never returned because MCLM5 is terminated with TT2 and it is
the last move in the queue. You should use TT0 or TT1 instead.
All Calculated Data is the master distance or time from the last MSP point.
That is, it is where the slave is at rest, which is point P0 and point P10 above.
Provide Feedback