All Articles / Application Notes

App Eng.

Have a Question?

Contact us for device selection, troubleshooting & more!

Response time promise: 1 business day

App Eng.

Have a Question?

Quick-Guide: Control Zaber Precision Motion Devices with an Allen-Bradley PLC

By Nathan Hendricks, Mechanical Engineering Team

Last updated on Sep. 03, 2025

Default image for https://www.zaber.com/articles/zaber-stage-control-using-allen-bradley-plc

This short guide demonstrates how to control Zaber precision motion devices with an Allen Bradley Micro800 series PLC. The connection is made by sending Zaber ASCII commands over RS232 serial communication, a capability commonly available in many Allen Bradley PLC’s. Below you’ll find the hardware requirements, software setup, and a downloadable code example. The code handles writing and reading basic Zaber ASCII commands from the PLC to the Zaber device.

Hardware Requirements

  • Any Zaber device + Zaber controller (either X-series integrated controller or X-MCC controller + axis)
  • 1X X-SDC cable which adapts the Zaber M8 previous connector to a standard DB-9 RS232 serial port connector.
  • Allen Bradley Micro800 PLC with ASCII over RS232 Serial Communication capabilities. The one used for the example written is a Micro820.

Default image for https://www.zaber.com/articles/zaber-stage-control-using-allen-bradley-plc

Figure 1: Connection Diagram for PLC ASCII Commands to Zaber Devices

If your model of PLC has terminal blocks rather than DB-9 serial connection, you may need to buy or make an adaptor like this: DB-9 to flying leads adaptor. In that case, the pinout for the DB-9 Connector is as follows:

Default image for https://www.zaber.com/articles/zaber-stage-control-using-allen-bradley-plc
  • Pin 2: Rx
  • Pin 3: Tx
  • Pin 5: GND
Figure 2: Zaber X-SDC DB-9 serial connection pinout

Software Requirements

  1. If not already installed, download and install Connected Components Workbench on your development computer.
    • Note: This guide is written using Version 22, but the program should open just fine on newer versions.
  2. Download this code example: File:Allen bradley zaber ascii.zip
  3. Open the project in CCW by selecting it with File -> Import Project
  4. Update the PLC in the project to match your model of Micro800 PLC, and download the project onto the PLC.

The attached program, Zaber_Rockwell_Ascii_Example.ccwsln, allows users to write ASCII strings and read replies from any Zaber device. It includes the following examples:

  1. A home command: "\1 home"
  2. A position querry: "\1 get pos" with a parsed reply
  3. A poll while moving command: "\1 move max" and poll the device status every second until it reports IDLE.

The ZaberSampleProgram sends the requested ASCII string to the state machine: ZABER_WRITE_READ_ASCII. The state machine then processes the string into the correct ASCII format and sends it over the serial port to the Zaber device. It then waits for the reply, extracts it from the buffer, parses it and returns the parsed reply. It handles timeouts and errors associated with PLC malfunctions, and will return any error ID's to the top level program. It also handles serial port control, with use of the global variable gSerialPortBusy, to avoid new commands being sent before the reply has returned. The ZaberSampleProgram can by modified or inserted into the users program to send a variety of commands to the Zaber device. See the Zaber’s ASCII protocol Manual for the full list of commands/queries available with your device.

Default image for https://www.zaber.com/articles/zaber-stage-control-using-allen-bradley-plc

Figure 3: Zaber Sample Program Logic

Limitations

The simple nature of the one request -> one reply format supported by this program lends itself to simple requirements. This program is not meant as a substitute for true Ethernet IP support. More complex commands where replies are split over multiple packets, such as "\1 get all" , are not supported. Additionally this approach will not scale well to synchronized motion across multiple axes. It's also important to make sure that Alerts are disabled by ensuring comm.alert = 0 so that there is no unexpected information passing on the serial channel between the query and the reply. For more complicated command sets, we recommend using either our Zaber Launcher Application or writing a script using Zaber Motion Library in any language of your choice. Finally, this program also doesn't make use of checksums so isn't suitable for applications that require thorough data integrity checks.

Common Issues

  1. Zaber devices need either 24 or 48V power. Most Allen Bradly PLC's require 24V power. Make sure they are both independently powered with their required power supplies.
  2. If the received reply isn't what was expected, make sure alerts are disabled by ensuring comm.alert = 0
  3. Make sure your Zaber command is copied exactly as stated in Zaber ASCII protocol Manual, including the “\” at the start of the command.
  4. Make sure your PLC and your Zaber device are configured for the same serial communication baud rate. Zaber’s default baud rate is 115200, but can be configured to match your plc with the comm.rs232.baud setting using Zaber Launcher.
  5. Zaber's RS232 communication typically uses 8 bits, 1 stop bit and no parity (see your specific device manual for details). The stop bit termination characters need to be configured on the PLC Serial Port as follows:

Default image for https://www.zaber.com/articles/zaber-stage-control-using-allen-bradley-plc

Figure 4: PLC protocol control for Zaber X-Series controllers