Jump to content
OMRON Forums

timing of linear moves


Recommended Posts

I am using motor programed for a linear TM move profile that is synchronized to an external camera/trigger and I came across some timing issues that I don't quite understand. I'm stepping my stage by a fixed step size, dwell for some time, step, dwell,...

In tuning mode the motor would happily move the chosen step size in about 100ms (TA=50 and TS=0).


My motion program would start with a zero move for dwelling


X(absPos) TM(dwellTime) TA(0) TD(0) TS(0)


then do the following absolute linear moves in a loop where the absPos would increase by the fixe step size.


X(absPos) TM(100) TA(50) TD(50) TS(0)


this is then followed by a zero move for dwelling


X(absPos) TM(dwellTime) TA(0) TD(0) TS(0)


I'm also using a separate plc to measure the move times of the stage. This is defined as the motor not moving anymore and the position error smaller than a threshold.


if (Motor[motornum].DesVelZero == 1 && abs(Motor[motornum].PosError) <= feThresh )


These moves as monitored would take a total of about 190ms which is slower than expected. And here are the things I don't understand.


1. I noticed some stable offset in my timing which can only be caused by the first zero move dwell. For tests I replaced this by a dwell(dwellTime) and my offset would move. Does a zero move actually require time with TM=TA=TS=0?


2. Does a zero move set .DesVelZero to 0? This together with with the first point could explain why the move takes longer than expected.


3. The actual move time is also not entirely clear. At some point I found that .InvAmax and .InvDmax could limit my acceleration for a linear move and that helped some. From the step response tuning I know the stage can complete the move fast. If I use my linear move with TM=0

X(absPos) TM(0) TA(50) TD(50) TS(0)

then this would take about 160ms.

The step size for my moves is such that I should end up in a triangular profile (stepSize


4. Later I am planing on increasing the step size and should end up in a trapezoidal regime. For this timing/synchronization I was calculation a total move time of Ta/2 + Td/2 + TM where TM = stepSize/maxVelocity. Will I find timing differences with this as well?


Thanks for the help in advance

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

You might want to try using the dwell command for your dwells. To dwell for N msec, use "Dwell N".


For checking that the motor is stopped moving and within a threshold distance, you might want to use the in position bit. Motor[x].InPos will be true if the motor has been zero desired velocity and within Motor[x].InPosBand motor units for at least Motor[x].InPosTime servo cycles.


What is your value of Coord[x].SegMoveTime? If it is greater than 0, all moves are broken into segments that long which may be relevant.


It is also possible your move was slowed down to observe Motor[x].MaxSpeed and Motor[x].InvAMax/InvDMax/InvJMax


Please try plotting commanded acceleration for this move. It will make it easier to tell what sections of the move start and end when. Diagonal line means jerk or s curve, horiztonal line means constant acceleration, zero means constant velocity.

Link to comment
Share on other sites

Eric, thanks for the pointers. I found that blended moves were enabled for this coordinate system. Attached are the two profiles with blending enabled and disabled. When disabled my timing calculations, submitted move times and Motor[].Desired.Time would finally match.


Here comes the big however, we are running this with an external time base to synchronize to a master clock that also defines our camera triggers. From the reference manual I get that disabling blending is doing the same as a dwell 0 in which case I lose synchronization to the external time base? By doing this I do in fact see a drift of about 2ms from one move to the next relative to my camera trigger.


I guess I'll have to go back to blended moves. Is there any guidance on how to calculate the TMs for my moves and zero moves so that they fit inside a fixed time interval P? My motion program structure looks like this:


/ dwell at the start position for P

X(currentPos) TM(P) TA(0) TD(0) TS(0)


while(steps left)

rtState == 0;

X(currentPos+stepSize) TM(50) TA(50) TD(50) TS(0)

rtState == 1;


// now dwell for the rest of P

X((currentPos) TM(P-100) TA(0) TD(0) TS(0)



Link to comment
Share on other sites

I am not quite sure what the purpose of the "dwell" is. If it is necessary, I am suspicious of the TA and TS of 0.


You might want to try the delay command. It isn't quite the same thing as the dwell. It is actually a zero distance move which observes TA and TS as well as blending with other moves. The delay will work with time base. If you issues %50, then a delay will take twice as long.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...