SmartMotor Communications and Interoperability

Submitted by Automation Engineering Staff

What are the maximum recommended distance between SmartMotor and the computer/controller for communication through RS232, RS485, AniLink, and I/O connector?

This question is difficult to answer because so many factors are involved. In most instances, we quote 30 feet (10 meters) for RS232, 1000 feet for RS485, 10 feet (3 metres) for AniLink, and 3 feet for I/O connector. (The 10PWR105 used for powering AniLink devices allows the addition of multiple motors to the network but does not increase separation.)

I keep getting junk on my screen while polling with the monitor status window, what's wrong?

There could be a print statement in your program. Make sure that ECHO is off. There is a chance that the memory module is corrupt.

What makes the SmartMotor more capable than other products in handling multi-axis, co-ordinated motion?

Since each SmartMotor incorporates its own integrated closed loop controller, the Central Host is released of the task of closing the loop. Instead, the host streams real-time data to each motor and only deals with error checking and I/O control as needed. This results in a faster throughput. Abbreviated command sets and efficient, abbreviated addressing minimizes the data load.

What is the communications rate through the RS232?

The SmartMotor is designed for RS232 communications at the following user select-able baud rates:
38,400     /      19,200     /     9,600 - Default      /     4,800      /     2,400

Will the SmartMotor operate with Labview commands?

Labview has the ability to communicate ASCII protocol via RS232 as a driver so the interface is compatible. The User can readily send down code strings in SmartMotor compatible commands.

I have a system based on DEVICENET; how can the SmartMotor be used with such a system?

Background: DEVICENET is a controller area network (CAN) protocol, high speed communications link for industrial devices developed in the early 1980's by Allen Bradley. Many designers choose DEVICENET for its interchangeability (many vendors and products available), advanced diagnostics, and its compatibility with distributed power networks.  Animatics Corp. provides Devicenet Gateway options for the 23 and 34 frame series SmartMotors.

What host communication relationships will the SmartMotor support?

The following common communications relationships are supported by the SmartMotor:
Host / Slave
Host / Interactive
Host / Independent
Stand-Alone

In a Host / Slave relationship, the PC host transmits commands over the RS232 one at a time for immediate execution by the SmartMotor. In this relationship, the host assumes all of the timing functions for the application. It is also clear that certain SmartMotor commands don't work in this relationship, for example the WHILE command.  In Host / Interactive relationships, the host program and the SmartMotor program interact. There are two basic sub-categories of this relationship.  In one, the host interacts with a running program through RS232 messaging or I/O level signaling. The SmartMotor may or may not be sending messages back to the host by similar methods.

In another, the host sends preparatory (program configuration) data to the SmartMotor, then issues a RUN command. The SmartMotor executes its independent program, which may or may not include messaging and host signaling. Upon program termination, the SmartMotor simply waits for further host instruction. This special category of host / slave relationships is called Host / Independent relationships: Entire programs are downloaded from the host to the SmartMotor. RUN may be initiated by either the host or by external hardware input. One main feature of this type of relationship is the relative autonomy of the individual motors: here the motors may signal the host at appropriate times, but in general, host intervention is not expected.

Critical product features to the Host / Interactive relationship are:

The priority of host communications over the execution stored program code: This allows the SmartMotor to stop execution of stored code in an orderly manner, and begin execution of incoming serial code as soon as the one byte serial buffer is filled. Execution of the stored program resumes as soon one of the two following conditions is met:

1. A valid command is executed
2. An incoming command is determined to be invalid and is dumped.

The non-interrupt-ability of the busy/search (code scan) state of the SmartMotor. A busy/searching state occurs whenever the SmartMotor is searching for an address in memory at which it can resume code execution. This address search occurs during the negative evaluation of an IF statement. It also occurs during a WHILE statement during a period after the last executable command of the LOOP block and the execution of the WHILE's argument expression. The relative freedom of action provided by the SmartMotor's change-on-the-fly capability. Operational modes and trajectories can be changed on the fly.

While it is possible for a supervisory host to interrupt the execution a well-structured stored program, taking direct command of the application during critical periods, the relative independence of each SmartMotor relieves the host of the direct processing burden of each axes control, and reduces the required band-width of the serial communications channel.

In stand alone applications, the SmartMotor relies entirely on its EEPROM memory for user program storage. The SmartMotor can handle I/O from an outside source if desired, can communicate through RS232 or other mechanisms. RS232 communications retain their execution priority regardless of system design. Multi-axis stand alone applications which use one SmartMotor as a host platform have been implemented and are currently operating in the field.

What is the 8-N-1 ASCII protocol mentioned in the manual?

The SmartMotor uses an asynchronous serial interface often described as a "three wire implementation of RS232. "Asynchronous communications require a stable environment: if any bit of a transmission is lost, there is a high probability that the remainder of any transmitted message will be misunderstood. It is therefore necessary to carefully define the structure of the transmission. A serial bit is a defined period of time, and the state of the bit can either be a 1 or a 0, depending on the voltage state of the transmit line during the duration of the serial bit. When the RS232 is in the idle state (waiting to transmit a message) it rests in the high (on) state. When a character is to be transmitted the TxD line is brought low for a carefully defined period of time, the time period of the start bit is a function of the BAUD rate. This low state is called the start bit. Immediately following the start bit are a number of data bits. The SmartMotor must use 8 data bits, and this is the meaning of the "8" in the string "8-N-1."

Following the data bits in the is an optional parity bit. The parity bit used in some transmission schemes to check the validity of received characters on a byte-by-byte basis. Since this is an optional process which slows down communications, it is not implemented in the SmartMotor. The "N" in "8-N-1" stands for no parity bit. Following the optional parity bit is a bit called the stop bit. On ancient teletypes and other old machinery, a delay was required to ensure that the received character could be handled before the next character arrived. For this reason a stop bit was added at the end of every transmitted character. Depending on the delay needed, either one, one-and-a-half or two stop bits are added. The SmartMotor uses the minimum required period, 1 stop bit (8-N-1).

Following the above description, the SmartMotor uses 10 bit data structure to transmit an eight bit ASCII character. The SmartMotor requires a maximum of one signal change to transmit one bit, and since the baud rate is defined as the number of signal changes per second, this means that the data transmission rate is (BAUDRATE) /10 = characters per second.

Baud Rate               Characters per Second  

2400                                        240 
4800                                        480 
9600                                        960 
19800                                      1980 
38400                                      3840