Motion MMI-8S User Manual

Page 9

Advertising
background image

WRITE MODE
In general, SR4 mode commands are prefixed to SMC motion commands which are then "passed
through" to the motion systems. Only two mode commands are used in this system, the write
(W) and the read (R). A write command consists of a mode character (W), an ID number (two hex
characters), a command string (motion system data string), and a terminator (carriage return).
The ID number consists of two characters; the first or high byte is the system ID. This identifies
an MMI net controller card. The system ID of a card is selected with the jumper switches located
on the controller card. Valid ID numbers are from 0 to F hex (1 to 16 net controllers). The second
or low byte selects any combination of the four channels within a controller. Valid channel
numbers are from 0 to F hex. Note that F selects no motor channels and is used only to send the
Status request to the CY233 and not the motion systems.

A typical example of a message to a SMC axes would be: W0Ep 1000<. This example directs
SMC axis E (motor #1) of SR4 #0 to move to position 1000.

The write command is also used to request information (query) from the motion systems. Only
one motion channel can be requested to return information at a time. In a typical motion system,
with a CY545 motion controller, the question mark (?) command is used to query the system. Do
not program the motion system EEPROMS to respond with information without a query command
first (slave mode only).

A typical command would be: W0E? p<. This requests motor 1 to return its current position.

READ MODE
A read command consists only of a mode character (R), the ID number (two hex characters; note
that the second character is always F), and a terminator (carriage return). The read command is
only used to read the status of the SMC motion systems from the SR4 net controller.

STATUS
When a motion system is busy, it can not respond, normally, to the host computer. The BUSY
(also refered to as the CTS or cleared-to-send) signal is used to hold off the host until, for
example, a motion is completed. In the MMI system, the status of all four CTS signals is available
as a single ASCII character. This character is equal to a binary number consisting of two bytes.
The high byte is always 0010 (4 hex); the low byte consists of four bits; each bit indicates the
status of a channel's CTS signal. Remember that the motion system MUST be in the Hand-Shake
Mode (o 0a0h; lower case only) for the status function to be valid.

A typical command would be: R0F<; if the response was N, the binary value would be 0010 (fixed)
1110. Refer to Code Table.

Advertising