I’ll be the first to admit it, serial communications (RS-232) is so 1980’s.  However, it is also relatively easy to install and support and for many legacy devices it is the only communication option available.  So, if you are migrating to newer controllers, but would like to keep your existing RS-232 peripherals (such as a bar code scanner, weight scale, or LED sign) what are your options?  Although a Google search will offer dozens of potential solutions, each with their own pros and cons, I’ll offer my preferred solution in this article.

RS-232-to-Ethernet Serial Servers

There is a wide range of these devices available; however, most communicate using the TCP/IP protocol which isn’t widely supported by Allen-Bradley controllers.  This is where the Digi One IAP shines as it supports the Ethernet/IP protocol and Allen-Bradley MSG instructions when configured in ASCII Import mode.

Digi One IAP – Using ASCII Import Mode

Our application previously utilized Allen Bradley Basic Modules (1771-DB) to receive and parse data from an ASCII string, so we will use the ASCII Import Mode of the Digi One IAP but will perform the data parsing in Structured Text in the ControlLogix controller.

kevin-hurley-serial1

Application:  Read incoming ASCII strings from two RS-232 devices over Ethernet/IP to one or two Allen-Bradley ControlLogix PLC’s.

Configuration of the DigiOne IAP:

Step 1) Connect the Digione IAP to your computer’s network port using a crossover cable.  Run the Digi Device Discovery Tool (dgdiscvr.exe – downloadable from Digi website) to configure the IP address.

Simply select the correct DigiOne IAP from the list (if you are unsure check the MAC address printed on the device) then click “Configure Network Settings” in the menu on the left.

Enter your desired IP address and click “Save”.

kevin-hurley-serial2

Step 2)  Open your favorite web browser and enter the IP address of your DigiOne IAP, in this example it is http://172.26.5.111  or you can click the Open Web Interface link in the Digi Device Discovery Tool.

You will be prompted to login:

Default User name: root
Default Password: dbps

Step 3)  For this example, we set the Serial Slave Configuration as follows:

Industrial Automation > Serial Slaves > Port 1

“Port Settings”
Protocol needs to be set to ASCII Import and baud rate, Data Size, Parity, Stop Bits, Flow Control need to match the connected serial device.

kevin-hurley-serial3

“Protocol Settings”

These settings will depend on your application.

kevin-hurley-serial4

“Advanced Settings”

Default settings should work for most applications.

kevin-hurley-serial5

Step 4)  Next, we need to configure the Packet Routing

Industrial Automation > Serial Slaves > Destination Tables (Packet Routing)

The address configured here will be used as the “Destination Node” in our ControlLogix MSG.

kevin-hurley-serial6

Set the address by clicking on both Index 1 and Index 2 or using the “Add” button as required.

kevin-hurley-serial7

kevin-hurley-serial7b

Step 5) Add your ControlLogix ladder logic and configure the MSG instruction.

This logic will check for data every 2 seconds and copy into tag “String_In_Buffer” when new data is present.

kevin-hurley-serial8

MSG_To_DigiOne Configuration:

kevin-hurley-serial9a

kevin-hurley-serial9b

Step 6)  Now you can parse the data using Structured Text or Ladder Logic.

kevin-hurley-serial10

Questions, comments or suggestions? Feel free to leave them here by clicking on the “comment” link at the very bottom of this page.

Kevin Hurley
Electrical Engineering Technologist
www.linkedin.com/in/kevin-hurley-38927b3

About the Author:

The author has 15 years of experience in heavy industry, primarily providing engineering and maintenance support for Allen-Bradley automation equipment.

Specialties: Allen-Bradley PLC’s including PLC-3, PLC-5, SLC, CompactLogix, and ControlLogix. Human-Machine-Interfaces including Wonderware, RSView, and Allen Bradley Panelview products. Control networks including Remote I/O, Data Highway Plus, ControlNet, EthernetIP and RS-232.

LEAVE A REPLY

Please enter your comment!
Please enter your name here