Programming

The software program used with the MMI/SR4/SMC system is only a "Serial Driver" routine. The main purpose of the program is to send and receive commands between the host and the MMI microprocessors. The motion control software (firmware command set) is contained only in the CY545. The QBASIC serial driver contain examples of typical operations required by the host computer software, such as: opening the comm (serial) port, sending/receiving characters, loading the 545 memory, handling the Busy status, and diagnostic capability. Included in the sample program are routines of 545 commands which exercise the motion system during manufacturing tests. Two types of routines are demonstrated; (1) downloading a string of commands from a keyboard file and (2) loading a string of commands to EEprom memory.

The sample listing is commented and contains information about how to operate a 545 system. It

is helpful to "read the listing" even for non-computer types.

Line 0-20 defines the variables and create symbols for control characters.

Line 30-100 assigns the Basic function keys for common functions.

Line 120 creates the time delay used between characters so that fast computers do not get ahead of the serial card and the MMI.

Line 130 defines the serial port as the ACTIVE device; PRINT #ACTIVE sends characters to the active port.

Line 200-400 creates the introduction screen display

Line 500-999 is the down-load test routine which is sent to the 545 when this program is first run.

Line 1010-1410 is the Self-Test program. The GOSUB 2500 is the time delay for the write cycle of the EEprom memory.

Line 1500-1800 is a sample homing routine with a limited number of re-tries; loop counter, input test, and message transmission are demonstrated in this program.

Page 24
Image 24
Motion MMI-8S installation manual