
question mark (?) if the instruction was not valid. For example, the controller will respond to commands which are
sent via the main RS-232 port back through the RS-232 port, and to commands which are sent via the Ethernet port
back through the Ethernet port.
For instructions that return data, such as Tell Position (TP), the DMC-40x0 will return the data followed by a
carriage return, line feed and : .
It is good practice to check for : after each command is sent to prevent errors. An echo function is provided to
enable associating the DMC-40x0 response with the data sent. The echo is enabled by sending the command EO 1
to the controller.
Unsolicited Messages Generated by Controller
When the controller is executing a program, it may generate responses which will be sent via the main RS-232 port
or Ethernet ports. This response could be generated as a result of messages using the MG command OR as a result
of a command error. These responses are known as unsolicited messages since they are not generated as the
direct response to a command.
Messages can be directed to a specific port using the specific Port arguments – see the MG and CF commands in
the Command Reference. If the port is not explicitly given or the default is not changed with the CF command,
unsolicited messages will be sent to the default port. The default port is the main serial port. When
communicating via an Ethernet connection, the unsolicited messages must be sent through a handle that is not the
main communication handle from the host. The GalilTools software automatically establishes this second
communication handle.
The controller has a special command, CW, which can affect the format of unsolicited messages. This command is
used by Galil Software to differentiate response from the command line and unsolicited messages. The command,
CW1 causes the controller to set the high bit of ASCII characters to 1 of all unsolicited characters. This may cause
characters to appear garbled to some terminals. This function can be disabled by issuing the command, CW2. For
more information, see the CW command in the Command Reference.
When handshaking is used (hardware and/or software handshaking) characters which are generated by the
controller are placed in a FIFO buffer before they are sent out of the controller. The size of the RS-232 buffer is 512
bytes. When this buffer becomes full, the controller must either stop executing commands or ignore additional
characters generated for output. The command CW,1 causes the controller to ignore all output from the controller
while the FIFO is full. The command, CW ,0 causes the controller to stop executing new commands until more
room is made available in the FIFO. This command can be very useful when hardware handshaking is being used
and the communication line between controller and terminal will be disconnected. In this case, characters will
continue to build up in the controller until the FIFO is full. For more information, see the CW command in the
Command Reference.
Serial Communication Ports
The RS-232 and RS-422 (optional) are located on the CMB (communication board) of the DMC-40x0. Note that the
auxiliary port is essentially the same as the main port except inputs and outputs are reversed.
RS-232 Configuration
The pin-outs for the RS-232 ports can be found on either A9 – CMB-41012 (-C012), pg 255 or A10 – CMB-41022 (-
C022), pg 259 depending on the CMB option ordered.
Chapter 4 Software Tools and Communication ▫ 51
DMC-40x0 User Manual