Serial Communication with a Siemens S7-1200 PLC

Siemens CB 1241 RS485 Serial Adapter


DMC programmed a Siemens S7-1200 PLC to communicate with servo controllers, using a serial interface. The serial communication was used to allow the operators to change the servo setpoints from a remote HMI.

Customer Benefits

  • Reduced operator downtime
  • Configurable system can accommodate up to 99 servo controllers
  • Communication parameters can be expanded to encompass additional servo commands


  • Siemens S7-1200 PLC
  • Siemens TP700 Comfort Panel
  • TIA Portal
  • Siemens CB 1241 RS485 Serial Interface
  • Contrex CX-1010 Servo Controller


DMC worked with our client to develop a means of changing servo setpoints from a remote HMI. The system consisted of two servos controlled with Contrex CX-1010 servo controllers, which were located on the side of the machine opposite the operator. The servo setpoints must be changed with each product changeover, requiring the operators to walk around the machine and enter the setpoints on the control panel. To solve this problem, a Siemens TP-700 Comfort Panel was installed on the operator side, and was used to send setpoints to a Siemens S7-1200 PLC.

The PLC communicated to the servo controllers using a serial connection through a Siemens CB 1241 RS485 serial interface. Each serial message consisted of several parts: a start signal, a device address, a function command, an error field, the results of the function, an end signal, and a checksum. The PLC would take the setpoint from the HMI and format it as a serial message to the correct drive. It would send the message over the serial port, wait for a response, and process the response into the correct data. All serial messages were sent and received using standard Siemens instructions. Any communication errors would trigger a warning on the HMI to notify the operator.

The serial architecture was set up with the PLC as the master, and the controllers as the slaves. As a result, the controllers would not send data until the PLC asked for it This eliminated the need for monitoring the serial channel, streamlining the communications. However, this setup does require the PLC to send data to one controller and wait for a response before sending data to the next controller. This might render a larger system may susceptible to communication delays, but the effects were negligible in this system with only two controllers.

Posted in Manufacturing Automation and Intelligence, PLC Programming, Printing, Siemens S7 PLC Programming

DMC Chicago • 2222 N. Elston Ave Suite 200 • Chicago, IL 60614 • (312) 255-8757

DMC Boston • 20 Holland St Suite 408 • Somerville, MA 02144 • (617) 758-8517

DMC Dallas • 1920 McKinney Ave 7th Floor • Dallas TX, 75201 • (972) 432-5536

DMC Denver • 1860 Blake St Suite 410 • Denver, CO 80202 • (303) 223-1801

DMC Houston • 3311 Richmond Ave Suite 209 • Houston, TX 77098 • (713) 322-9192

DMC New York • 141 W 36th St Suite 20N • New York, NY 10018 • (917) 473-0030

DMC Reno • 316 California Ave #691 • Reno, NV 89509 • (775) 300-6804

DMC Seattle • 506 2nd Ave Suite 910 • Seattle, WA 98104 • (206) 388-5186

DMC St. Louis • 1034 S Brentwood Blvd • St. Louis, MO 63117 • (314) 627-5427 • (888) DMC-4400