Cj - commence jogging, Command details, Examples – Applied Motion RS-232 User Manual

Page 53

Advertising
background image

53

920-0002 Rev. I

2/2013

Host Command Reference

CJ - Commence Jogging

Compatibility: All drives
See also:

JS, JA, JL, SJ, CS and DI commands.

Starts the motor jogging. The motor accelerates up to the jog speed (JS) at a rate defined by the jog accel (JA)
command, then runs continuously until stopped. To stop jogging, use the SJ (Stop Jogging) command for a
controlled decel rate (decel rate set by JL command). For a faster stop, use the ST command (decel rate set by
AM command), but beware that if the speed or load inertia is high, the drive may miss steps, stall, or fault. The
jogging direction is set by the last DI command. Use the CS command to change jog speed and direction while
already jogging. CS does not affect JS.

Use in Q Programs (Q drives only)

Within a stored Q program jog moves are most commonly initiated with the CJ command. However, because
the SJ and ST commands are immediate type they cannot be used within a Q program to stop the jog move. So
the procedure to stop a jog move within a Q program involves both the MT (Multi-tasking) and SM (Stop Move)
commands. See Examples below for a sample command sequence.

Command Details:

Structure

CJ

Type

BUFFERED

Usage

WRITE ONLY

Non-Volatile

NO

Register Access

None

Examples:

Command

Drive sends

Notes

JA10

-

Set jog accel to 10 rps/s

JL25

-

Set jog decel to 25 rps/s

JS1

-

Set jog speed to 1 rps

CJ

-

Start jogging with speed set by last JS command

CS10

-

Change jog speed to 10 rps

SJ

-

Stop jogging using decel rate set by last JL command

The following example changes the jog speed during program execution by directly loading a value into the “J”
register. This method allows for dynamically calculated jog speeds, and does not affect the original JS or DI
setting. CJ always starts a jog move using JS and DI, so this is the recommended method of changing speed
dynamically during program execution.

Sample Q program sequence
MT1

Turn Multi-tasking ON

FI58

Filter input X5 for 8 processor ticks (2 msec)

WIX5L

Wait for input X5 low

CJ

Commence jogging

RLJ480

Change speed to 2 rev/sec by directly loading the J register. Note, units are 0.25rpm.

WIX5H

Wait for input X5 high

SMD

Stop Move using the decel ramp set by JL

Advertising
This manual is related to the following products: