September
1997, Issue 86
PC/104
Quarter:
Motion Control with PC/104
COMMUNICATION
"Embedded
control communications protocol" can mean designing
so that total computer control, part of it, or none
at all (nodes only) is onboard the main system.
While
communications plays a significant role in all of these
cases, in the first example, communications may be useful
only for loading or saving premade programs. But if
you have nodes only, communications becomes the heart
and soul of the control's capability.
A
node typically defines a small, compact computer since
a node takes instructions from a host at another location.
The degree or intensity of the communications, the interface
(e.g., Ethernet, RS-232, RS-485, etc.), and the communications
protocol must be selected so the system performs as
needed.
If,
when using node control, the ability to synchronize
axes is necessary, then an off-the-shelf protocol that
yields high-speed data transfer has a definite advantage.
When
using node control, you need to answer the following
questions:
- what's
the best way to format the data to allow the fastest
transfer of information?
- how
are very low data-transfer crash situations between
multiple modes maintained?
- how
much information needs to be transferred to maintain
good-to-superior axis control?
To
answer, you need to understand exactly how fast the
communications required by the embedded application
should be.
While
plotting might look like an intensive operation, the
real-time requirement is loose. If the plotter has to
wait while more data is transferred, no loss of integrity
is noted. The data-transfer rate can range from as low
as 300 bps to 9600 bps.
On
the other hand, a labeling unit at 1200' per minute
typically has a real-time requirement of less than 250
µs for I/O handling. Assuming 1.5" labels are needed,
it takes only 0.0085 s to produce each label. Using
a x10 rule to ensure all label data is appropriately
transferred, the maximum allowable data-transfer time
is 625 µs.
If
each label contains ten characters, the minimum transfer
rate is 160 kbps, yielding a new character every 62
µs. The data rate automatically eliminates the RS-232
protocol and requires a minimum of RS-485 or Ethernet
interfacing.
Wake
Up, Address, Command Byte, Bytes to Follow, Check Sum
A, or one-byte ACK or NAK are returned to the host,
verifying safe receipt of the message.
If
multiple axes are used, messages can be acknowledged
by pulling a common I/O line low (NAK) or leaving it
high (ACK). The line shift would occur in the same timing
frame as the ACK and NAK bytes, but all units might
respond at the same moment, increasing the band requirements.
While
this transfer mechanism isn't necessarily the most efficient,
it gives a high probability that the embedded controller's
messages are being transferred intact, which is exactly
what we're looking for.
Let's
consider how to invoke move from a remote host without
using up valuable time. The five basic types of move
are immediate, point-to-point, time, spline, and stop.