GM215 Command Set
The GM215 works as a multiple-axis motion controller when 2 or more drives are connected via its RS-485 interface. When used this way, one GM215 must be named as the X drive (SW3 = ON, SW4 = ON) to make it the master drive. Each of other drives must be set to a unique axis name (Y, Z, or W) using SW3 and SW4.
Once connected and named, the other slaved drives automatically synchronize themselves to the X-drive's microprocessor clock via sync pulse sent over the RS-485 interface. The drives communicate with each other and behave as if they were a single, 4-axis motion controller. All the drive's Flash ROMs are programmed with same user's application program; each drive executes only those commands that match the drive's name. This simplifies programming, editing and program maintenance because the drives are interchangeable. A single .bin file sent from the GeckoMotion application is written to all drives' Flash ROMs simultaneously.
Once a user's program is debugged and flashed to the drives, the drives can be put into RUN mode (SW1 = OFF, SW2 = ON) and the PC interface can be disconnected. The drives will execute the user's program from its non-volatile memory without a PC connection.
The drive's Flash ROM stores up to 65,536 lines of commands and all commands have fixed 2-word (32-bit) length. Appendix A shows how these commands are coded to this 2-word binary format used by the GM215. This is to allow a user to write their own GUI if they wish to do so. The RS-485 uses a standard UART set to 115,200 baud, 8-bit data, no parity and 1 stop bit.
Commands can be entered and debugged while the GM215 is in the EDIT PROGRAM mode (SW1, SW2 OFF). The GM215 must be connected to PC via its RS-485 interface while in the EDIT PROGRAM mode and the PC must be running the GeckoMotion application.
The commands have 3 main groups; Configuration commands, Motion commands and Program Flow commands:
CONFIGURE AXIS Set the axis motor current and other parameters
ACCELERATION Set axis rate of acceleration
VELOCITY Set axis target velocity
ANALOG INPUTS Switch the axis between digital and analog inputs
VECTOR AXIS Combine 2 or more axis for vector motion
MOVING AVERAGE Filter the axis motion using a moving average filter
LIMIT CW Set the axis CW travel limit
MOVE Move axis to an absolute or relative destination
HOME Home the axis to a hardware switch location
JOG Move the axis using external inputs
SPEED CONTROL Operate the axis in velocity mode
POSITION ADJUST Adjust the axis position using external inputs
PROGRAM FLOW COMMANDS:
GOTO Go to a program-line, also Loop (4 nested loops allowed)
CALL Call a subroutine and return (4 nested calls allowed)
IF THEN ELSE If a condition is met then go to program-line 'n', else go to next program-line
WAIT Wait a period of time, then go to next program-line
OUTPUT Turn a hardware output ON or OFF
COMPARE Stores a variable used by the IF-THEN-ELSE command
CHANGE SCALE Change the motion coordinate scale (future)
ROTATE Rotate the axis coordinates by an angular value (future)
TANGENT Rotate an axis to point in the motion direction (future)
MIRROR Mirror the axis coordinates vertically or horizontally (future)
ENCODER Axis tracks a quadrature encoder (future)
The GeckoMotion host program uses labels for program flow commands. This greatly eases the burden of writing and debugging the user program:
00067 PREVIOUS COMMAND
00068 IF Z INPUT 2 IS OFF GOTO label_1 An IF command tests if the Z axis input 2 is off. If true, the program jumps to 'label_1:'
00069 NEXT COMMAND If false, the program goes to the next command
00235 SOME OTHER COMMAND Program jumped here because the Z axis input 2 is off.