STEPMOVE ch, count, r

Purpose

To activate the PLC's built-in stepper motor pulse generator channel #ch to output count number of pulses. The speed and acceleration parameters for the motion is defined by the STEPSPEED statement on the same channel # ch, which must be executed at least once before the first STEPMOVE command is issued. After executing the STEPMOVE command the PLC hardware will take over the actual pulse generation operation. The user’s program will continue to execute even though the pulse generation is not yet completed. The internal relay #r can be used to signal to the other parts of the ladder program regarding the status of pulse generation, as follow:

When STEPMOVE command is first executed, the internal relay #r will be cleared before the first pulse is sent. After the completion of the movement (i.e. when all the pulses have already been sent), the relay #r will be set.

ch should be between 1 and 8. Count is a 32-bit integer number which allows you to program the stepper motor to move from 1 to +231 .(i.e. 2,147,483,647) steps. Count can also be an integer variable A-Z. However, If you use a 16-bit variable such as DM[n] for count then the range of movement can only be between 1 to 32,767.

stepmove.gif (3313 bytes)

Pulse generation can be interrupted by issuing a STEPSTOP command in another CusFn, which may occur say, in cases when the hardware hits a limit-switch and must stop the motor immediately.

Important: When a stepper channel is already activated (i.e. mid-way through its pulse generation) repeat execution of STEPMOVE command on the same channel will be ignored by the PLC. Re-execution of the STEPMOVE command on this channel can only take effect after the channel’s pulsing operation has been completed by itself or aborted by the STEPSTOP command.

When in TRiLOGI simulation mode, execution of the STEPMOVE command will bring up a pop-up window which displays all the parameters of the motion path.

Examples STEPMOVE 1,5000,10
Comments: Send out 5000 pulses on channel 1 and at the end of motion turn ON relay #10.
See Also STEPMOVEABS, STEPCOUNT( )STEPCOUNTABS( ),
STEPSPEED, STEPSTOP, STEPHOME

backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual