Difference between revisions of "Basic Motion Elements"

From SoftMC-Wiki
Jump to: navigation, search
Line 414: Line 414:
 
{| style="border-spacing:0;"
 
{| style="border-spacing:0;"
 
| style="border:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;"| The continuous path method ('''CP''') blends where continuity and velocity smoothness are required (gluing, dispensing, …). It is less useful for high-speed pick and place applications where cycle time is the main quality measurement. Using this blending method, you ensure that maximum space velocities are never exceeded and the original path is always followed. The segment's middle point is always part of the blended path. Only two consecutive motions can be blended together.
 
| style="border:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;"| The continuous path method ('''CP''') blends where continuity and velocity smoothness are required (gluing, dispensing, …). It is less useful for high-speed pick and place applications where cycle time is the main quality measurement. Using this blending method, you ensure that maximum space velocities are never exceeded and the original path is always followed. The segment's middle point is always part of the blended path. Only two consecutive motions can be blended together.
| style="border:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;"| [[Image:Axsystem;UserManual-1-Blending.png|caption|250px]]
+
| style="border:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.191cm;padding-right:0.191cm;"| [[Image:Axsystems;UserManual-1-Blending.png|caption|250px]]
  
 
|}
 
|}
 
When the second motion is completed before the first one, the system does not blend the first and the third motions together. The main parameter in this type of blending '''CP'''. It specifies the distance from the target point on which the blending (second motion) begins. '''CP''' is dimensional. It is expressed in group position units. The system automatically limits this value to half the segments length.
 
When the second motion is completed before the first one, the system does not blend the first and the third motions together. The main parameter in this type of blending '''CP'''. It specifies the distance from the target point on which the blending (second motion) begins. '''CP''' is dimensional. It is expressed in group position units. The system automatically limits this value to half the segments length.
  
[[Image:Axsystem;UserManual-2-Blending.png|caption|600px]]
+
[[Image:Axsystems;UserManual-2-Blending.png|caption|600px]]
  
 
When the second movement is received too late (during the deceleration phase) or when the current motion causes excessive values of acceleration and velocity, blending between two movements is ignored.
 
When the second movement is received too late (during the deceleration phase) or when the current motion causes excessive values of acceleration and velocity, blending between two movements is ignored.
Line 474: Line 474:
 
results in the following profile:
 
results in the following profile:
  
[[Image:Axsystem;UserManual-3-superposition.png|caption|600px]]
+
[[Image:Axsystems;UserManual-3-superposition.png|caption|600px]]
  
 
The following are blending limitations:
 
The following are blending limitations:

Revision as of 14:17, 23 May 2011

Groups allow you to control multiple axes as a single mechanism. With groups, the position command and feedback signals are no longer single values, but instead, are vectors with two or three elements. Velocity and acceleration no longer apply to a motor, but instead, apply to the combination of two or three motors moving in concert.

Set Up

Groups are combinations of axes. These axes must be orthogonal if their scalar properties (velocity) are to be correct. For example, a group can be used to drive an x-y table. Groups are supported for two- and three-axis machines. In fact, any number of axes can be added to a group.

To set up a group, first set up each of the axes that will be in the group. Then, use Common Shared to form the group:

Common Shared MyGroup as Group AxisName = xAxis AxisName = yAxis

There is no limitation to the number of axes in a group. All axes in the system (including simulated axes) may be part of one group.

It is necessary to set VELOCITYFACTOR, ACCELERATIONFACTOR, and JERKFACTOR for the group. As a first approximation, set <group>.VFAC = 1/1000, set AFAC=VFAC/1000, and set JFAC=AFAC/1000.

DeleteGroup

DELETEGROUP deletes the specified group. The participating axes thereafter function only as independant axes. They must not be moving. No tasks may be loaded.

DeleteGroup MyGroup

Acceleration Profiles

As with single axes, the MC provides controlled acceleration profiles for groups. This reduces vibration and wear on the machine, and allows the highest acceleration rates. You can independently control the acceleration and deceleration rates.

Acceleration and Deceleration

<group>.ACCELERATION and <group>.DECELERATION control the acceleration rates of the group mechanism. For example, the following lines change the acceleration rates for MyGroup:

MyGroup.Acceleration = 1000

MyGroup.Deceleration = 1000

<group>.ACCELERATION and <group>.DECELERATION apply to the combined motion of the individual axes. For example, if MyGroup is a three-axis group formed with Axis1, Axis2, and Axis3, then:

MyGroup.Acc = (Axis<sup>1</sup>.Accel<sup>2</sup> + Axis2.Accel<sup>2</sup> + Axis3.Accel<sup>2</sup>) ½

Group acceleration is the orthogonal combination of the axes' acceleration. Group acceleration and deceleration are limited according to the axes‘ values.You can impose limits to constrain the time during which group acceleration and deceleration occurs. <group>.TIMEACCELERATION and <group>.TIMEDECELERATION define the duration of the acceleration phase.

Position

Group position differs from axis position in that a single property must represent the position of multiple axes. In some cases, the individual axis properties are maintained so that the property becomes a vector with two or three entries. This is the case for POSITIONFEEDBACK or POSITIONCOMMAND. In other cases, the position from multiple axes are combined using the square root of the sum of the squares, as for POSITIONERRORMAX.

Vector

With groups, three position properties are vectors: the position command, position feedback, and position final. In each case, the quantities in the vector are equivalent to the individual axis properties. For example, you can set POSITIONFINAL as part of a MOVE:

Move MyGroup {5.5, 6.5}

This sets PFINAL of the first axis to 5.5 and the second to 6.5. Querying the position feedback from a two-axis group from the terminal also returns a vector. For example:

? MyGroup.PFb

returns:

(5.600443e+003, 6.422422e+003)

The positions in these vectors are ordered according to the way the group was created with Common…As Group. The first axis declared occupies the first position in the vector, the second occupies the second, etc.

Scalar

Other group position properties are scalar. These properties are the orthogonal combination of the axis properties. These properties include:

POSITIONERROR

POSITIONERRORMAX

POSITIONERRORSETTLE

POSITIONTOGO

If MyGroup is formed with Axis1 and Axis2, and AXIS1.POSITIONTOGO = 1 and AXIS2.POSITIONTOGO=1, MYGROUP.POSITIONTOGO = 1.414, the orthogonal combination of the two axes' POSITIONTOGO. Similarly, when you set POSITIONERRORMAX or POSITIONERRORSETTLE, the position error they are compared to is the orthogonal combination of the axes' POSITIONERROR.

Velocity

A group’s scalar velocity properties are always the orthogonal combination of the respective axes' velocity properties. Group velocity properties include:


VELOCITYCOMMAND vector property
VELOCITYFEEDBACK vector property
VELOCITYCRUISE scalar property
VELOCITYFINAL scalar property
VELOCITYMAX scalar property
VELOCITYOVERRIDE scalar property

Each of these properties operates as its axis equivalent and are clearly defined in the MC Reference Manual.

Limits

Group limits are similar to limits placed on axes. Limits can be imposed in two ways: they can be checked realtime, or they can be checked only for subsequent actions.

Generator

Generator limits affect subsequent commands to the motion generator. For example, if you change an acceleration limit, this affects subsequent motion commands but has no effect on the current motion.

Realtime

The MC checks realtime limits each SERCOS update cycle. For example, exiting position error of every axis is monitored each SERCOS cycle.

Position

Position limits are imposed solely by the axes and are checked at the beginning of every movement. If one of the target’s points exceeds its limit, the whole movement is rejected. There are no group position limits. There are also several limits in the MC related to position:

Set POSITIONERRORMAX (PEMAX) to the total position error the system can tolerate during operation (maximum square root of the sum of squares):

MyGroup.PEMax = 1.0

Set POSITIONERRORSETTLE to the total position error the system can tolerate to be considered in position.

MyGroup.PositionErrorSettle = 1.0

TIMESETTLE (TSETTLE) is the amount of time required before an axis is considered settled (POSITIONERROR<POSITIONERRORSETTLE). After a MOVE/CIRCLE profile is complete, the MC waits for POSITIONERROR < POSITIONERRORSETTLE for TIMESETTLE milliseconds before setting ISSETTLED.

TIMESETTLEMAX (TSETTLEMAX) defines the amount of time allowed for settling after a move has been commanded. After the MOVE/CIRCLE profile is complete, the MC waits TIMESETTLEMAX milliseconds for settling. If the position error remains above PESETTLE, an error is generated.

ISSETTLED is a binary (ON or OFF) property that indicates if the group is settled. To be settled, the motion profile must be complete and the orthogonal combination of axis position errors must be below POSITIONERRORSETTLE. The time condition must also be satisfied.

Velocity

There is one group limit in the MC related to velocity: VELOCITYMAX (VMAX) sets the maximum speed the motion generator can command the group. This property is checked at the beginning of each move. For example:

Group.VelocityMax = 5000

The actual executing velocity is also limited according to the group’s axes velocity limitations. The maximum allowed axes velocity is initialize group velocity. In this case a note is returned and can be seen only if SYS.MOTIONASSISTANCE is on.

Acceleration

Three limits control acceleration, deceleration, and jerk, which limit the velocity transients on acceleration profiles.

ACCELERATIONMAX is the upper limit for acceleration in MC acceleration units.

DECELERATIONMAX is the upper limit for deceleration in MC acceleration units.

The actual executing acceleration and deceleration are limited also according to the group’s axes limitations. The maximum allowed axes of those parameters initialize the group’s values. In this case, a note is returned and can be seen only if SYS.MOTION ASSISTANCE is on.

The jerk properties, JERK, JERKFACTOR, JERKMAX, and SMOOTHFACTOR are applicable in group motion to obtain smooth motion control.

VELOCITY, ACCELERATION, DECELERATION AND JERK RATES

GROUP.VELOCITYRATE defines the group velocity maximum scaling factor from 0.1 to 100 independent of acceleration, deceleration or jerk. GROUP.VELOCITYRATE may be modal or nodal.

GROUP.ACCELERATIONRATE defines the group acceleration maximum scaling factor from 0.1 to 100 independent of velocity, deceleration or jerk. GROUP.ACCELERATIONRATE may be modal or nodal.

GROUP.DECELERATIONRATE defines the group deceleration maximum scaling factor from 0.1 to 100 independent of velocity, acceleration or jerk. GROUP.DECELERATIONRATE may be modal or nodal.

GROUP.JERKRATE defines the group maximum Jerk scaling factor from 0.1 to 100 independent of velocity, acceleration or deceleration. GROUP.JERKRATE may be modal or nodal.

For example:

Common Shared Gr1 as Group AxisName=A1 AxisName=A2

Gr1.VRate = 50 ‘ VelocityRate 50%

Gr1.ARate = 70 ‘ AccelerationRate 70%

Gr1.DRate = 80 ‘ AccelerationRate 80%

Gr1.JRate = 60 ‘ JerkRate 60%

Motion

A group is controlled by the motion generator. This software device receives commands from MC tasks and produces position and velocity commands for each drive in the group every SERVO cycle. The two group motion commands are MOVE and CIRCLE. The MC also provides synchronization of the execution of motion commands as well as changing motion profiles on-the-fly and blending a followed movement. In addition, the MC provides multiple modes for starting and stopping motion. Several conditions must be met before the MC generates group motion:

  1. The controlling task must ATTACH to the controlled group.
  2. All axes in the group must be ENABLEd.
  3. The system and axis motion flags must be ENABLEd.

You can declare a group from every context. However, using Config.prg in most applications requires this to only be done once.

A1.Name = xAxis

A2.Name = yAxis

Common Shared xyTable as Group AxisName = xAxis AxisName = yAxis

Attach Task and Axis

Before a task can send motion commands to a group, the group must be attached to the task. This prevents other tasks from attempting to control the group. To attach a group, issue an ATTACH from the controlling task:

Attach MyGroup

If no other task is attached to the group and no axis from the group is attached, the group is immediately attached. Otherwise, an error is generated.

As long as the task has the group attached, no other task can control the group or axes within the group. The axes belonging to the group cannot be controlled independently from other tasks. When a task is finished with a group, it should detach the group:

Detach MyGroup

If a task ends, all attached groups and axes are automatically detached. One exception for the requirement that a group be attached is if the motion command is issued from the terminal window. In this case, assuming the group is not attached by any other task, the group is automatically attached to the terminal window for the duration of the motion.

ENABLE

Now, enable the drives by typing the following in the terminal window:

System.Enable = ON

MyGroup.Enable = ON

Motion Flags

The last step in preparing a system for motion is to turn the motion flags ON. There are two motion flags: the system motion flag and the motion flags of each axis within the group. For example:

System.Motion = ON

A1.Motion = ON

A2.Motion = ON

A3.Motion = ON

There is a motion flag for the group that can be used to enable motion for all axes in the group. In many applications, a hardware switch should be tied to the motion flag. The MC does not have a hardware motion input, but you can use events to create this function. The following example demonstrates a task that uses external input SYSTEM.DIN.1 to control the system motion flag:

Program MotionSwitch

OnEvent MOTION_ON System.DIN.1 = ON System.Motion = ON End OnEvent


OnEvent MOTION_OFF System.DIN.1 = OFF System.Motion = OFF End OnEvent

End Program

STOP

STOP stops group motion in the motion buffer. In the command, you must specify the group:

Stop GroupA

Normally, STOP is set to stop motion immediately at the rate of DECELERATIONMAX. However, you can modify the effects of STOP with STOPTYPE. <group>.STOPTYPE can take four values:

STOPTYPE = IMMEDStop group immediately at DECELERATIONMAX on each axis. The current path of the n\movement is not preserved.

STOPTYPE = ENDMOTIONStop group at the end of the current motion.

STOPTYPE = ONPATHStop group immediately. Keep the stopping trajectory on the current motion path.

STOPTYPE = ABORTStop the current motion immediately without the ability to restore the stopped movements.

STOPTYPE defaults to IMMED. If STOPTYPE = ENDMOTION, the current move is completed before STOP is executed. If STOPTYPE = ONPATH, STOP is executed so the group stays on the path. Stopping is according to the current movement’s deceleration and not at maximum deceleration to remain on the path.

PROCEED

After a STOP, you must PROCEED to clear the motion buffer. You can use PROCEEDTYPE to specify which way the motion generator should continue:

PROCEEDTYPE = CONTINUEThe motion generator continues the stopped command until complete.

PROCEEDTYPE = NEXTMOTIONThe motion generator aborts the current move and goes directly to the stopped move in the motion buffer.

PROCEEDTYPE = CLEARMOTIONClears the motion buffer. No motion executes. Default value.

STOPTYPE = ABORTCurrent motion stops immediately but does not need a PROCEED to start the next motion. Only the current motion is stopped, the following commands are generated.

MOVE

MOVE for groups is almost identical to a MOVE for axes. There are two differences. First, POSITIONCOMMAND, POSITIONFEEDBACK, and PFINAL are group size vectors. Second, the profile, including ACCELERATION and DECELERATION, applies to all axes in the group. For example:

MyGroup.VCruise = 2000

Move MyGroup {100, 100}

moves to position (100, 100) with a cruise velocity of 2000.

You can override the following axis properties as part of a MOVE:

ABSOLUTE

STARTTYPE

ACCELERATION

ACCELERATIONRATE

DECELERATION

DECELERATIONRATE

SMOOTHFACTOR

VELOCITYCRUISE

VELOCITYRATE

JERK

JERKRATE

PFINAL (end of a move), is always specified in MOVE. However, the meaning of PFINAL depends on <group>.ABSOLUTE. This allows point-to-point moves to be specified two ways:

ABSOLUTE = TRUEFinal position is specified as actual group position at the end of the move. The final position equals PFINAL.INCREMENTAL.

ABSOLUTE = FALSEFinal position is referenced to the start position. The final position is the sum of PFINAL and PCMD at the start of the move. So:

xyTableGroup.Absolute = TRUE

Move xyTableGroup {100, 200}

moves xyTableGroup to position (100, 200).

On the other hand:

xyTableGroup.Absolute = FALSE

Move xyTableGroup {100, 200}

moves xyTableGroup a distance of (100, 200) units from the start position.

ABSOLUTE defaults to INCREMENTAL. You can change ABSOLUTE any time, although the effect does not take place until you issue the next MOVE.

CIRCLE

The MC supports 2-axis circular interpolation with CIRCLE. In CIRCLE, you specify:

Group name

Angle to rotate (in degrees, positive = counter-clockwise) along with Center of the circle (CIRCLECENTER or CTR).

Target point (TARGETPOINT) along with another point on the arc (CIRCLEPOINT).

Circle xyTable Angle=90 CircleCenter = {0,0}

or

Circle xyTable CirclePoint = {10,20} TargetPoint = {100,200}

A 2-axis circle is generated in a specified plane with incremental movement in the third axis. That generate a 3 axis circle movement but not helical.

Circle xyTable CirclePoint = {10,20,10} TargetPoint = {100,200,20} circleplane= xy

In the above example, the circle is implemented in the XY plane along with the incremental change of the Z axis. Optionally, you can override the following group properties with CIRCLE:

ABSOLUTE

ACCELERATION

ACCELERATIONRATE

DECELERATION

DECELERATIONRATE

JERK

JERKRATE

SMOOTHFACTOR

STARTTYPE

VELOCITYCRUISE

VELOCITYMAX

VELOCITYRATE

For example, you can enter the following absolute and incremental circular moves:

Circle xyTable Angle=90 CTR = {0,0} Absolute = False

The value of ANGLE is not limited to 360. Greater values are specified to turn the motor more than once. The sign of the angle determines the direction of the motion. The value of ANGLE is not permanent. It exists only in the context of the command in which it is specified. Consequently, you can not query the value of ANGLE.

The value of CIRCLECENTER is not permanent. It exists only in the context of the command in which it is specified. Consequently, you cannot query the value of CIRCLECENTER.

CIRCLETARGET is a group size array. It specifies the target point of the circle. This array is not queried. CIRCLE, defined using CIRCLETARGET, is limited to 360 degrees.

CIRCLEPOINT is a position array that specifies a point on the arc. The arc is calculated using the CIRCLETARGET and these points. This array is not queried.

In case of 3 dimensions circle the active CIRCLEPLANE defines which group axes participate in the circle movement. The third axis is moved linearly. There are 3 plans that can be chosen: XY, XZ and YZ.

Chain Commands

You can chain group MOVEs and CIRCLEs using <group>.STARTTYPE. The following program makes a series of moves.

A1.Name = xAxis

A2.Name = yAxis

Common Shared xyTable as Group AxisName = xAxis AxisName = yAxis

From another task named MoveCircProgram:

Attach xyTable

xyTable.Absolute = TRUE ‘Move to start position

xyTable.StartType = INPOS ‘Move to start and wait to settleMove xyTable {-3, -2}

While(xyTable.isSettled = False) ‘wait for settling

End While

‘Begin Pattern

xyTable.StartType = GCOM ‘Move smoothly from one move to the next

xyTable.Absolute = FALSE ‘Incremental moves 

Move xyTable {0, 4}

Circle xyTable Angle = -90 CircleCenter = {-2, 2}

Move xyTable {4, 0}

Circle xyTable Angle = -90 CircleCenter = { 2, 2}

Move xyTable {0,-4}

Circle xyTable Angle = -90 CircleCenter = { 2,-2}

Move xyTable {-4,0}

Circle xyTable Angle = -90 CircleCenter = {-2,-2}

While(xyTable.isSettled = False) ‘wait for settling

Detach xyTable

End Program

Blending

Two movements blend tighter to smooth connection points. There are two ways to blend the movements: preserving the movement’s path (CP) or superposition. Set the blending method's ID with BLENDINGMETHOD.


The continuous path method (CP) blends where continuity and velocity smoothness are required (gluing, dispensing, …). It is less useful for high-speed pick and place applications where cycle time is the main quality measurement. Using this blending method, you ensure that maximum space velocities are never exceeded and the original path is always followed. The segment's middle point is always part of the blended path. Only two consecutive motions can be blended together. 250px

When the second motion is completed before the first one, the system does not blend the first and the third motions together. The main parameter in this type of blending CP. It specifies the distance from the target point on which the blending (second motion) begins. CP is dimensional. It is expressed in group position units. The system automatically limits this value to half the segments length.

600px

When the second movement is received too late (during the deceleration phase) or when the current motion causes excessive values of acceleration and velocity, blending between two movements is ignored.

For Move-to-Move blending, use:

Pos = start + I direction + I direction

For Move-and-Circle blending, use:

Pos = start + I direction + (cos(I)-1) rot_start + sin(I) 

rot_normal

For Circle-and-Circle blending, use:

Pos = center + (cos(I) rot_start + sin(I) rot_normal + (cos(I)-1) rot_start + sin(I) rot_normal

Superposition

Superposition blends motions at any point of time starting from the initial point of the movement up to the target. This blending mode is not limited by the combined actions of the two motions. It is your responsibility not to blend together motions that, in combination, produce velocities or accelerations outside of allowable system limits. However, each individual motion is limited by the usual kinematics constrains (VMAX, AMAX, DMAX, JMAX). This blending method is also able to swap movements when the second is finished before the first. In this case, there is continuous blending of the first and the third movements. Although this is a feature, it must be taken into consideration when designing blending paths.

Using BLENDINGFACTOR, you define the beginning blending (second motion) point anywhere on the first movement path. It is dimensionless cy using a percentage of the path where the blending starts. A zero value of BLENDINGFACTOR designatess full blending, while 100 designates no blending.

For example.

Dim Shared blen_value As Long

Program

Attach xyTable

BlendingMethod = 2

BlendingFactor = 0

StartType = GCom

For blen_value = 100 To 80 Step -5

Move xyTable {0,10} Abs=1 Vcruise=100 BlendingFactor=blen_value

Move xyTable {10,20} Abs=1 Vcruise=100 BlendingFactor=blen_value

Move xyTable {20,10} Abs=1 Vcruise=100 BlendingFactor=blen_value

Move xyTable {10,0} Abs=1 Vcruise=100 BlendingFactor=blen_value

Next 

Detach xyTable 

End Program

results in the following profile:

caption

The following are blending limitations:

Blending type of the first movement defines the actual connection path, although the second movement has a different definition. The second movement can blend with the current movement, although its blending method was not defined. In this case, blending occurs according to the second movement.

Throughout the whole blending process, sine-acceleration or velocity trapeze profiles are used. However, mixing profile types is not allowed.

In the next example, no blending is ignored:

BlendingMethod = 0 CP = x BlendingFactor = x

BlendingMethod = 1 CP = 0 BlendingFactor = x

BlendingMethod = 2 CP = x BlendingFactor = 100

The Position Command Generator (PCG) has two working modes: single and double. When PCG is in single mode, only one profiler call per sample is allowed. This is identical to no blending. When PCG is in double mode, there are two profiler calls per sample that actually execute the motion superposition. If the profiler of the second motion is in Profiler Following mode, the profiler of the first movement leads both movements. Use DOUBLEMODE to detect double mode interpolation during blending.

Move Control

This section reviews options the MC provides for controlling group MOVEs and CIRCLEs.

Settling Time

The MC actively watches to determine if the groups are settled into position. In most applications, the group position feedback is slightly delayed from the position command. After a move is complete, some time is required for the actual position to settle out to the commanded position. This time is called settling time.

Ideally, settling time allows the group to move so that position error is zero . However, in real systems you must allow for the condition where the position error never quite reaches zero. On the MC, you specify how low you consider to be low enough with POSITIONERRORSETTLE or PESETTLE:

xyTableGroup.PESettle = 0.01

After the motion generator completes a move that ends with zero speed, it actively monitors the position error of the group (the orthogonal combination of the position error of each axis) to determine when it is between ±PESETTLE. If it is within this range, <group>.ISSETTLED is true (1). Otherwise, it is false.

In some applications, you must ensure that the position error remains below PESETTLE for a specified period of time before the group is considered settled. The MC allows you to specify this time period with the <group>.TIMESETTLE or <group>.TSETTLE (given in milliseconds). If the position error exceeds PESETTLE during this time, the timer is reset. If position error is within PESETTLE’s range for the time specified by TSETTLE, <group>.ISSETTLED is true (1). Otherwise, it is false. For example:

PESettle = 0.01

TimeSettle = 0.01 xyTableGroup.StartType = INPOSMove 

xyTableGroup {100 , 200}

Move xyTableGroup {200 , 400}

This example requires that after the motion generator completes the first move and xyTableGroup has position error at or below 0.01 for at least 10 ms before the group is settled. Since STARTTYPE is INPOS, the motion generator waits for these conditions before starting the second move.

Start Moves

When the motion buffer is empty, group moves begin immediately. If you need to delay the next motion, you have two options. You can either use DELAY to insert a fixed delay time or STARTTYPE to delay, depending on a condition.

Use DELAY to force the motion generator to wait a fixed period of time between moves. The motion element xyTableGroup must be specified in DELAY. For example:

Move xyTableGroup {100, -100}

Delay xyTableGroup 1000

Move xyTableGroup {200, 500}

forces a 1 second delay between the two moves. DELAY has units of milliseconds and must be greater than zero.

DELAY differs from SLEEP in that SLEEP delays program execution and DELAY delays only the motion generator. DELAY is forced to the STARTTYPE mode.

If you want to delay the start of a new move until a condition has been met, use <axis>.STARTTYPE. There are four choices:

StartType = GeneratorCompleted or GCOMWhen STARTTYPE=GCOM, the new move starts as soon as the motion generator completes the current move's motion.

StartType = InPosition or INPOSWhen STARTTYPE=INPOS, the motion generator delays executing the new motion until the current move completes and the position error settles to near zero.

StartType = Immediate (IMMED) or SuperImmediate (SIMM)When STARTTYPE=IMMED or SIMM, the new move overwrites the current move. This is used when making realtime changes to the profile, such as changing the end-point of the current move without bringing the system to rest. For example, registration applications frequently use this function.

StartType = SyncWhen STARTTYPE = SYNC, the motion is synchronized with SYNCSTART.

Chain Moves

When chaining multiple moves which all end at zero speed, you normally want STARTTYPE=INPOS. This forces the motion generator to wait for the position error to become small before starting the next move. If the position profile starts on the second move too soon, the motor may never come to rest. Normally, the desired performance is for the velocity to go to zero before the second move starts. This is the case where STARTTYPE = INPOS.

The ending speed of a MOVE defaults to zero. However, you can specify a speed other than zero as the end speed. To do this, <axis>.VELOCITYFINAL. For example:

MyGroup.VelocityCruise = 2000

Move MyGroup {1.5, -2.33} VelocityFinal = 1000

Move MyGroup {2.0, 4.2} 

When the final velocity is not specified, the movement terminates with zero velocity. If you specify a non-zero final velocity, the smoothness of the motion is your responsibility.

If there are no movement commands to chain, the system stops motion with automatic braking and displays a message.

Multi-Step Moves

Combining non-zero end-point moves in the motion buffer produces multi-step moves. For example:

REM First Step

MyGroup.VelocityCruise = 2000 Move MyGroup {100, 400} VelocityFinal = 1000 ‘Second Step

MyGroup.StartType = GCOM

MyGroup.VelocityCruise = 1000 Move MyGroup {200, 400}

MyGroup.StartType is set to GCOM. The second move begins after the first move is complete. You must use STARTTYPE=GCOM when chaining a move after non-zero velocity end- move. You cannot use STARTTYPE=IMMED or SIMM because the new move overrides the old move. When the movement ends with non-zero final velocity, the next movement is started at the endpoint of the first movement or immediately, if STARTTYPE of the next movement is IMMED or SIMM.

You can combine non-zero velocity end moves to produce profiles with as many steps as needed. However, there are a few restrictions:

STARTTYPE for all non-zero velocity end moves (that is, VELOCITYFINAL<>0) must be GCOM.

VELOCITYCRUISE and VELOCITYFINAL must be positive.

PFINAL of the succeeding move must be far enough in front of PFINAL of the current move so the profile is possible with the acceleration limits. An error is generated if this rule is violated.

The end position or the end velocity of a move in progress can be changed by setting STARTTYPE=IMMED and issuing the second move. This move command cancels the current move. For example issuing a move without changing the velocity:

MyGroup.StartType = IMMED

Move MyGroup {150, -400}

Sleep 3000

Move MyGroup {150, -800}

As a second example, if you wanted to change the cruise velocity without changing the end-position, you write:

MyGroup.StartType = IMMED

Move MyGroup {150, -400} abs=1

Sleep 3000

Move MyGroup {150, -400} abs=1 VCruise = 1500

You can change the final position, cruise velocity, and final velocity of any executing move. Observe a few rules:

STARTTYPE must be IMMED or SIMM.

New and old VELOCITYCRUISE and VELOCITYFINAL must be positive.

If the succeeding move changes PFINAL or VFINAL, it must remain possible to create the profile with the axis acceleration limits.

Synchronize Multiple Axes

The MC provides the ability to synchronize many single axis and group MOVEs so they all start simultaneously. This is useful when you have multiple axes with moves that are largely independent, but must start at the same time. It is also useful for coordinating a single axis with group.

Synchronization is controlled with <axis>.STARTTYPE, and SYNCSTART. The feature allows you to load the motion generator with a motion command, but delaying the generation of motion until SYNCSTART is issued.

For example:

Group1.StartType = SYNC

AuxAxis.StartType = SYNC

Move Group1 {500, 500} VCruise = 2000

Sleep 1000 ‘Program delayed between Move Commands

Move AuxAxis 100 VCruise = 1000

SyncStart Group1 AuxAxis

causes the two profiles to start at the same time.

<axis>.STARTTYPE is overridden inside move commands so the above example can be done more conveniently:

Move Group1 {500, 500} VCruise = 2000 StartType = SYNC

Move AuxAxis 100 VCruise = 1000 StartType = SYNC

SyncStart Group1 AuxAxis

You can synchronize as many groups and axes as you want, including simulated axes. Since each SYNCSTART specifies the groups and axes it synchronizes, you can independently synchronize multiple sets of groups and axes.

Clear A Pending Move

If you have loaded a synchronized move in the motion generator and need to delete it, use SYNCCLEAR. For example, if you entered the following command in the above sequence before issuing SYNCSTART:

SyncClear Group1

The Group1 move is deleted. Changing GROUP1.STARTTYPE only affects subsequent moves. You must use SYNCCLEAR to clear pending synchronized moves. SYNCCLEAR has no effect once the move is executing. In this case, you stop the move as you would a non-synchronized move.

Velocity Override

The MC provides the ability to speed up or slow down all motion commands. This can be applied to an entire machine at once, an entire group, or to individual axes independently. This capability is used extensively in machine development. You can adjust the entire machine speed with a single command. Because the command can be issued from the terminal, you can observe machine operation at a variety of speeds without modifying your program.

All axes on the MC are controlled with SYSTEM.VELOCITYOVERRIDE (SYS.VORD). For example:

Sys.VOSpd = 25

immediately (if the velocity is previously greater than 25) reduces the velocity of all currently executing MOVEs, CIRCLEs and JOGs, as well as any subsequently issued commands. Since, the velocities are controlled by VOSPD, the acceleration and jerk rates of all axes are proportionally adjusted. The final positions of MOVEs are not affected.

Use <group>.VELOCITYOVERRIDE (<group>.VORD) to override the velocity of a group rather than the entire machine. It is used similarly to SYS.VORD, except it applies only to the group. VORD can be applied to as many or as few groups as is desired and the amount of override specified for one axis is independent of the others.

If you use SYS.VORD and <group>.VORD simultaneously, the axis speed is reduced by the product of both override properties. For example:

Sys.VOrd = 66 ‘Reduce entire system to 2/3 speed

GroupB.VOrd = 50 ‘Reduce GroupB to 1/3 speed

You cannot override an axis in a group. Once an axis is part of a group, it cannot be controlled independently.

Motion Assignment

After assignment, a generic element can be used in all motion commands as a representative of another, usually “real”, motion element. All activities performed on the generic element identically affect the “real” element.

Common Shared Scara As Group AxNm = A1 AxNm = A2 AxNm = A3 AxNm = A4 Model = 4

Gen_Group = Scara

In Task1.Prg:

‘ Scara is attached to Task1.Prg through its generic representative Gen_Group

Attach Gen_Group

? “Scara is attached to “ Scara.AttachedTo

? “Initial position of Scara is “ Scara.PFb

‘ Scara is moved through its generic representative Gen_Group

Move Gen_Group {-300,-500,-40,0} absolute = 1

Sleep 200

? “Final position of Robot is “ Scara.PFb

…

Detach Gen_Group

--> Scara is attached to TASK1.PRG

--> Initial position of Scara is {0 , 0 , 0 , 0}

--> Final position of Scara is {-300 , -500 , -40 , 0}

Motion Properties

Through assignment, a generic element acquires all properties of the element being assigned to it. Properties of “real” elements can be queried through their generic representatives.

Gen_Axes_List[1] = A1

While Gen_Axes_List[1].IsMoving <> 0 

 Sleep 1

End While

Sys.Dout.1 = 1

Changes made in properties of generic elements identically affect the properties in the referenced “real” elements.

Print “Position Factor and Acceleration of A1 Before SetUp: “ A1.Pfac, A1.Acc

‘ Set A1’s properties through Gen_Axes_List[1]

Call AxisSetUp(Gen_Axes_List[1])

Print “Position Factor and Acceleration of A1 After SetUp: “ A1.Pfac, A1.Acc

--> Position Factor and Acceleration of A1 Before SetUp: 65536 1000

--> Position Factor and Acceleration of A1 After SetUp: 32768 1500