Support

GM215 Miscellaneous Commands

______________________________________________________________________________________________________________

OUTPUT MISCELLANEOUS COMMAND

Syntax: a OUT n c <ENTER>

Operands: a = X or Y or Z or W axis name

n = 1 or 2 or 3

c = ON, OFF, BR, RS, ER

Operation: Outputs OUT1 or OUT2 or OUT3

Dependence: None

Type: The command value is local.

Description: Turns a hardware output ON or OFF

Examples:

X OUT 3 ON <ENTER>

X means the X axis is selected.

OUT is the output command.

3 is the hardware output number 3.

ON means turn this output ON.

<ENTER> means the command entry is complete.

Y OUT 1 BR <ENTER>

BR is Busy/Ready status.

Output1 of Y axis is set to reflect Busy/Ready status.

Z OUT 2 RS <ENTER>

RS is the R/S status.

Output2 of Z axis is set to reflect R/S status.

W OUT 3 ER <ENTER>

ER is the Error status.

Output3 of W axis is set to reflect ER status.

_______________________________________________________________________________________________________________

COMPARE MISCELLANEOUS COMMAND

Syntax: a COMPARE VALUE n <ENTER>

Operands: a = X or Y or Z or W axis name

0 =< n <= 16,777,215

Operation: Stores the value n to the COMPARE register

Dependence: None

Type: The command value is global.

Description: This command is used in conjunction with the IF-THEN-ELSE command when a variable has to be compared against a stored COMPARE value

Example:

X COMPARE VALUE 32767 <ENTER>

X means the X axis is selected.

COMPARE VALUE is the COMPARE command.

32767 is the value to be stored in the COMPARE register.

<ENTER> means the command entry is complete.

EXAMPLE CODE:

EXAMPLE0: MOVE A MOTOR

x configure: 1 amps, idle at 50% after 1 seconds

x limit cw 100000

x offset 1000

analog inputs to {0} ; NO AXIS USING ANALOG

vector axis are {0} ; NO AXIS USING VECTOR

x acceleration 64 ; RUN ACCELERATION

x velocity 200 ; RUN VELOCITY

motion:

x+1000

x-1000

goto motion ; REPEAT. INFINITE LOOP

EXAMPLE1: BASIC POINT TO POINT MOTION

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

y_config:

y configure: 1.5 amps, idle at 71% after 2.5 seconds

y limit cw 12000000

y offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

y acceleration 512

y velocity 1000

home x, y ; X & Y GO HOME SIMULTANEOUSLY

analog inputs to {0} ; NO AXIS USING ANALOG

vector axis are {0} ; NO AXIS USING VECTOR

x acceleration 128 ; RUN ACCELERATION

x velocity 8000 ; RUN VELOCITY

y acceleration 128

y velocity 8000

motion1:

x+10000, y+10000

x-10000, y-10000

goto motion1 ; REPEAT. INFINITE LOOP

EXAMPLE2: BASIC VECTOR MOTION

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

y_config:

y configure: 1.5 amps, idle at 71% after 2.5 seconds

y limit cw 12000000

y offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

y acceleration 512

y velocity 1000

home x, y ; X & Y GO HOME SIMULTANEOUSLY

vector axis are x, y ; X & Y AXIS VECTOR MOTION

x acceleration 128

y acceleration 128

x velocity 8000 ; SET DIFFERENT VELOCITY FOR TESTING

y velocity 4000

motion1:

x+10000, y+10000

x-10000, y-10000

goto motion1 ; INFINITE LOOP

EXAMPLE3: POINT TO POINT MOTION, SPEED CONTROLLED BY TRIM POT(ANALOG)

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

y_config:

y configure: 1.5 amps, idle at 71% after 2.5 seconds

y limit cw 12000000

y offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

y acceleration 512

y velocity 1000

home x, y ; X & Y GO HOME SIMULTANEOUSLY

analog inputs to x, y ; X & Y AXIS USING ANALOG CONTROL

vector axis are {0} ; NO AXIS USING VECTOR

motion1:

x+10000, y+10000 ;

x-10000, y-10000

goto motion1 ; INFINITE LOOP

EXAMPLE4: RUN MOTION UNDER ABSOLUTE POSITION SYSTEM

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

y_config:

y configure: 1.5 amps, idle at 71% after 2.5 seconds

y limit cw 12000000

y offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

y acceleration 512

y velocity 1000

home x, y ; X & Y GO HOME SIMULTANEOUSLY

vector axis are x, y ; X & Y AXIS VECTOR MOTION

x acceleration 128 ; RUN ACCELERATION

y acceleration 128

x velocity 8000 ; RUN VELOCITY

y velocity 8000

motion1:

x 2000, y 2000 ; ABS POSITION. USEFUL FOR DRAWING, CUTTING, ETC.

x 1500, y 2500

x 2500, y 1500

x 2000, y 2000

x 0, y 0

goto motion1 ; INFINITE LOOP

EXAMPLE5: USING JOG COMMAND

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

home x ; X AXIS GO HOME

x acceleration 128 ; RUN ACCELERATION

x velocity 8000 ; RUN VELOCITY

jog x ; JOG MODE. NEED HARDWARE LOGIC TO EXIT

goto start ; INFINITE LOOP

EXAMPLE 6: USING SPD CONTROL COMMAND

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

x acceleration 128

x velocity 8000

x speed control +1000 ; SPEED CONTROL MODE. NEED HARDWARE LOGIC TO EXIT

end:

goto end ; INFINITE LOOP

EXAMPLE 7: USING SPD CONTROL COMMAND (ANALOG)

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

x acceleration 128

x velocity 8000

analog inputs to x ; X AXIS ANALOG. TRIM4 &TRIM5 CAN CHANGE SPD

x speed control +1000 ; SPEED CONTROL MODE. NEED HARDWARE LOGIC TO EXIT

end:

goto end ; INFINITE LOOP

EXAMPLE8: USING POSITION ADJUST COMMAND

x_config:

x configure: 1 amps, idle at 71% after 2.5 seconds

x limit cw 12000000

x offset 1000

start:

x acceleration 512 ; GO HOME ACCELERATION

x velocity 1000 ; GO HOME VELOCITY

home x ; X AXIS GO HOME

x acceleration 128 ; RUN ACCELERATION

x velocity 8000 ; RUN VELOCITY

x+3000

x position adjust +/-2000 ; TRIM5 CAN CHANGE MOTOR POSITION

end:

goto end ; INFINITE LOOP

Categories: Motor Control Manuals Stepper Drives