omron — DURATION program instruction

DURATION program instruction Details This instruction sets the minimum execution time for subsequent robot motions. For any motion, the time specified by the DURATION instruction has no effect if the duration setting is less than the time computed by the eV+ robot-motion trajectory generator (considering the current motion speed and acceleration settings). However, if the duration is longer than the time computed by the trajectory generator, the motion is slowed so that its elapsed time corresponds approximately to the specified duration. NOTE: Actual motion times may differ slightly from the duration setting due to quantization effects and due to acceleration and deceleration profiling.

The duration instruction does not specify the duration of an entire motion but instead specifies the minimum time of the constant-velocity segment plus one-half the acceleration and deceleration segments. In this way, continuous-path motions (in which individual motions are blended together) get the correct duration, but a single motion takes longer than the specified duration. In other words, the time of motion is primarily defined either by the value of DURATION or SPEED, using whichever value gives the longer time. This instruction is very useful.

Consider, for example, a situation where the value of a periodic, external signal is employed to continuously correct the path of the robot while the robot is moving. The DURATION instruction can be used to match the motion execution time to the sensor sampling rate and processing time. This ensures that the robot is kept in motion while new information is being processed. A sample program of this type is shown later. Example The following example reads an external sensor and moves to the computed robot location. This sequence is repeated 20 times at intervals of 96 milliseconds (6/TPS seconds). This assumes the default period (tick) of 16 milliseconds for the eV+ trajectory generator.

Note that the motion speed is set to a very large value to make sure the motion is paced by the duration setting. DURATION 6/TPS ALWAYS ;Each motion to be 6 ticks long SPEED 200 ALWAYS ;Motion time determined primarily ;by DURATION, not SPEED FOR i = 1 TO 20 ;Repeat 20 times... CALL read.signal(loc) ;Get new step from sensor MOVE loc ;Move to the location END Related Keywords ACCEL program instruction DELAY program instruction DURATION real-valued function eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 190