Unsolicited messages generated by controller, Galil software tools and libraries – Galil DMC-2X00 User Manual

Page 70

Advertising
background image

For instructions that return data, such as Tell Position (TP), the DMC-2x00 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-2x00 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 USB
port (DMC-2000), main RS-232 port, or Ethernet ports (DMC-2100/2200). This response could be
generated as a result of messages using the MG or IN 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 MG and IN
commands described in the Command Reference. If the port is not explicitly given, unsolicited
messages will be sent to the default port. The default port is determined by the state of the
USB/Ethernet dip switch when the system is reset.

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. This size of the
USB buffer is 64 bytes and the size of the RS-232 buffer is 128 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.

Galil Software Tools and Libraries

API (Application Programming Interface) software is available from Galil. The API software is
written in C and is included in the Galil CD-ROM. They can be used for development under
Windows environments. With the API's, the user can incorporate already existing library functions
directly into a C program.

Galil has also developed a Visual Basic Toolkit. This provides 32-bit OCXs for handling all of the
DMC-2x00 communications including support of interrupts. These objects install directly into Visual
Basic and are part of the run-time environment.

Galil also has an Active-X Tool Kit to allow developers to rapidly develop their own user applications.
For more information, contact Galil.

60

Chapter 4 Communication

DMC-2X00

Advertising