Communication details – Applied Motion RS-232 User Manual

Page 243

Advertising
background image

243

920-0002 Rev. I

2/2013

Host Command Reference

At 9600 baud the space between characters is less then 1 bit space (0.0001 seconds). The host system must be
able to handle this speed. The space between characters can vary depending on the settings of the PR command
(see below).

Response packets are terminated by a Carriage Return (ASCII 13).
Protocol Settings (PR Command): The PR (Protocol) command offers users the ability to add various

features to the overall communications protocol, i.e. tailor the structure of command and response packets to best
fit the needs of the application. In general, when a host device sends a command packet to a drive, the drive will
either understand the command or not. If the drive understands the command the drive executes the command.
If the drive doesn’t understand the command it cannot execute the command. In most cases the host device will
want to know whether the drive has understood the command or not, and so the drive can be set to automatically
send an Acknowledge (understood) or Negative Acknowledge (not understand) response packet to the host for
every command packet received.

Along with Acknowledge/Negative Acknowledge (Ack/Nack), the PR command controls a number of other

protocol settings. See Appendix D for details on the PR command. Also, the PR command controls whether or
not the drive will respond with error codes in the response packet when communications errors occur.

Communication Details

Transmit Delay: (TD Command): The TD command allows users to define a dwell time in a drive, which is

used by the drive to delay the start of transmission of a response packet after the end of reception of a command
packet.

When using 2-wire RS-485 networks there are times when a drive’s response packet must be delayed until

the network is ready for the drive to transmit. Why is this necessary? The answer is because RS-485 networks
are by nature “half-duplex”, which means you cannot transmit and receive at the same time. Rather, a host must
first transmit, stop, then wait to receive. This is because the host and drive transmitters share the same pair
of wires. When transmitting, the device that has the transmission rights must assert its transmitter outputs and
therefore take control of the pair. At the same time all other devices on the network must de-assert, or open, their
transmitters so as not to interfere with the device that has the rights. Transmitters in this scenario have tri-state
outputs: the three states are transmit, open, and receive.

Some devices are not as quick in opening their transmitters as others. For this reason it may be necessary

for other, faster devices on the network to dwell some time while the slower devices open their transmitters.
Applied Motion drives de-assert their transmitters very quickly. Typically it is done within 100 microseconds (.0001
second) after the end of a packet transmission. However it is possible that the host device won’t be this fast, and
so the TD command allows users to set the time delay that an Applied Motion drive will delay after receiving a
command packet before sending a response packet.

Communications Packet: A Communications Packet, or packet for short, includes all the characters

required to complete a command or response transmission. This can vary depending on the settings of the PR
command. See Appendix D for more on the PR command. All packets are terminated by a Carriage Return
(ASCII 13).

Drive Startup: At power-up, all Applied Motion drives send out what is called the “power-up packet”. This

packet notifies a host of the drive’s presence. After sending the power-up packet the drive waits for a response
from the host. This is one of the rare instances in which a drive will initiate communications with the host. This
process is necessary for a number of Applied Motion software applications such as Quick Tuner and STAC6
Configurator. The power-up packet is an exception to the ASCII character rule in that all the characters in the
packet are binary value. Even if the character is printable its binary value is what is important. The power-up
packet consists of three binary characters with the first character being a binary 255 (255 is not a printable
ASCII character). This character designates to the software application that the packet is a power-up packet. The
following two characters are the firmware version number and the model number of the drive, respectively.

Power-Up Packet = (255)(F/W Version)(Model No.)

As an example, a BLuAC5-Si with f/w version 1.53 firmware will send out a power-up packet that looks

like this: (255)(53)(38). To an ASCII terminal this packet may look like “ÿ5&”. The (255) is the power-up packet
designator, the (53) actually stands for f/w version 1.53 (the “1” is implied), and the (38) is an internal model

Advertising
This manual is related to the following products: