ControlLogix to read in Serial Data over RS232

blanchsb1

Member
Join Date
Oct 2015
Location
Tx
Posts
9
I am using an Allen Bradley ControlLogix PLC (Logix5561) RSLOGIX5000 version 20.04.

I would like to communicate with a Paroscientific Met4A weather station and store the requested read data in an array in the PLC.
The links to the 2 user manuals are provided here on Paroscientific's website:
http://paroscientific.com/pdf/8819-001_Digiquartz_Operations_Manual_for_RS_485_RS_232_Products_715_Display.pdf

http://paroscientific.com/pdf/8008-001_Manual_for_MET4_and_MET4A_Meteorological_Measurement_Systems.pdf

The Met4A allows for communication on RS232 or RS485. I already have a cable and adapter to communicate over RS232 set up that also powers the Met4A device and has a 9 pin connector (DB9)

Based on what I have read from the manual. It looks like this is serial communication using ASCII Serial Protocol. Is this the same as Modbus ASCII protocol? The commands and responses are different than how I understand doing modbus comms using Modbus RTU.

Example from the Manual on how to read a parametr's value of a tag named UN:
Command:
*0100UNCrLf
Response:
*0001UN=1CrLf

Is it possible to communicate with this using Prosoft's Modbus Module? Currently I have a Prosoft MVI56-MCM module for Serial Modbus RS232/RS422/RS485.

I am just unsure about the mapping and how I go about requesting to read the data.

I am novice at modbus comms, but I have gotten Modbus RTU comms to work using modbus RTU in RSLOGIX and the Prosoft AddOn import logic for talking with other hardware. But I am not as familiar with ASCII and whether this can be done with my PLC and Prosoft module.

Or do I need additional hardware?

At the end of the day I want to get this Met4A data into my PLC and I don't really care how. My company can buy another module or other hardware to read it in if I can prove it works.

Thanks in advance.
 
That looks like a simple ASCII protocol. It's not Modbus RTU or Modbus ASCII.

Since you have a 1756-L61, it has an RS-232 port on the front, so the simple thing to do is use the ASCII port control and string handling instructions to send out and receive Strings.

How far from the PLC is the weather station ? Is it at risk of lightning strikes or other interference ? Sometimes a serial isolator is a good practical choice, especially when interfacing with an expensive thing like a ControlLogix CPU.

There are a wide variety of ASCII interfaces and gateways that could be put on an Ethernet network if you wanted to keep the CPU serial port clear; various A-B POINT I/O, Red Lion, Spectrum Controls, Prosoft, HMS Fieldbus, and Real Time Automation devices could all be used, depending on your needs for cost, flexibility, and ease-of-use.
 
Interesting Ken. Thanks for the quick response. I guess your question brings up some more questions for me that I would like to ask.

Yeah these things are out in the elements with no protection really. They are on top of 50 ft buildings so lightning strikes is somewhat of a concern but we have Turbine Exhaust stacks that stick up higher than this thing is so it's likely-hood of happening is less. The distance to these things is probably less than 50ft but I can make it work with RS485 as well if we find that distance becomes an issue in the future.
The Met4A is currently connected to a PC and using labview (i did not write this program or know how it was coded, it is a black box to me at this point) and a usb adapter so the cable isn't too long otherwise we wouldn't be able to use the RS-232 connection that we already have established here. The combination of intermittent usb disconnection on this PC and our corporate IT forcing reboots multiple times a week is having us look for another PLC related option for having a better streaming service of the data. We are using it for engine testing ambient condition reference and really need better access to this data. Plus doing it in the PLC means we will know how to grab the data we want rather than relying on another department who wrote the labview program.

Option 1 I want to try first: I'm interested in using the serial port on the front of the PLC. Lightning protection is a concern of mine but no one else here at my plant is probably going to care haha. I have a spare Met4A weather station in our calibration lab that I would like to get connected with then we will install it on our other ones.

I want to store the data in a REAL array to easily be picked up by our other systems that pull data from our PLC's but I am unfamiliar with ASCII port control and string handling instructions. Can you recommend a place where I can go to research getting this to work? I am pretty decent at ladder logic and programming in general and can figure most stuff out after seeing an example that is relevant.

I guess let's start with this and see how far I get before my team decides to buy another module.

Option 2: If we do go that route: what ones will work easily with RSLogix5000? My company has a decent working relationship with ProSoft I know. I don't really know any of the other manufacturers to be honest. Most of our stuff is Allen Bradley and Rockwell Automation. Whatever is easiest to use and easy to get replacements in a hurry is where I'd like to purchase from.
 
I have a couple of weather station Met4As and it looks like the other PLC in our other building is an Allen-Bradley 1756-L73 ControlLogix Logix (Logix5573) module. Those have the USB-B port on the front (no 9 pin connector).

I'm going to try and research if I can connect RS232/485 via that way as well....
 
I am using an Allen Bradley ControlLogix PLC (Logix5561) RSLOGIX5000 version 20.04.

I would like to communicate with a Paroscientific Met4A weather station and store the requested read data in an array in the PLC.


https://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm013_-en-p.pdf


I am new to PLCs and I thought this was going to be complicated, but the guts of it should be simple: for your Met4A's CRLF-terminated line data, the ARL (ASCII Read Line) instruction is similar to a timer or a counter; ARL has a DN (Done) bit and all. Then the STOR instruction takes you from string to real, after you cut off the leading *0100 and the trailing CRLF. I suspect the meat of the program will be less than half a dozen rungs.



If you set up the Met4A (externally via PC) to continually output data with the desired sample period, you would not even have to program the PLC to write anything.



I would almost pay money to do this for the learning experience if I had the hardware; all I have is a MicroLogix 1100 L16BBB; I could easily write an emulator of the Met4A for testing; I have worked with a lot of serial protocols so that part is easy.
 
I have a couple of weather station Met4As and it looks like the other PLC in our other building is an Allen-Bradley 1756-L73 ControlLogix Logix (Logix5573) module. Those have the USB-B port on the front (no 9 pin connector).

I'm going to try and research if I can connect RS232/485 via that way as well....

The USB port on pretty much all (if not all) Allen Bradley PLC's is a programming port only. It does not support PLC to PLC/PC communications.
 
Have a look at this thinly-tested example of using AWA and ARL instructions to send and receive basic ASCII strings, then find the relevant data in the response and convert it into a DINT.

This will work on an L1/L55/L6x controller with a serial port.

File attached.
 
Firejo: You are correct. According to Allen Bradley that port on the 1765-L73 is not for serial. (I even checked within the RSLogix .ACD file for that PLC we have and there is no Serial Port tab in the Controller Properties).

Ken: That thinly-tested example worked right out of the box! I had a bad spare Met4A (and didn't know it) and spent a while trying to get comms working but I think the motherboard on that one may have some issue (Rx lights up on the device but the Tx does not respond, all attempts at comms and changing the baud rate failed thus far). I plugged into our other active Met4A weatherstation and it communicated without a hiccup.

I need to review the commentary a little more and review the pdf by drbitboy (thanks for the link!) and then modify it for what I want.
I will post back with some updates regarding my progress. Thanks so much for making that up. I didn't expect that kind of effort and am quite impressed.

As for as my 1756-L73 PLC I found a ProSoft module MVI56E-GSC (says it works for ASCII communication). I got a quote from them at around $2k. It looks like this will work, right?
 
The MVI56E-GSC is a good choice for this application. While there are cheaper networked devices, Prosoft integrates easily with Logix 5000 and has decades of reliability in their design.

MVI56E means "Multi Vendor Interface family, 1756 backplane interface, "Enhanced" (2nd generation)". "GSC" is "Generic Serial Communications", i.e. ASCII.

In general with those modules you will move the .DATA[x] elements from a String to the Output data table, move the length of bytes to be sent to another register, then increment the Tx counter.

When the reply is received, the Rx counter will increment, you will see the received length and the received bytes in the Input data table.

In general, I think that's easier to program than ASCII port instructions in the ControlLogix.
 
The RTA unit is at the top of the list for ease-of-use and speed of setup.

The Prosoft remains my favorite for integration into RSLogix 5000 (literally no external configuration or utility or steps). It's got more power and ports than the POINT I/O -232ASC or -485ASC too.

Red Lion DataStation for flexibility, HMS for network consistency, Hilscher for a challenge.
 
WeatherStation Subroutine V1

Okay as promised I have finished successfully creating my WeatherStation subroutine and am ready to share it. Thanks everyone for the assistance.

I can confirm that it works using the 9 Pin Port on the front of the 1756-L61 PLC.

I have definitely deviated a little from the basics of V0 but I wanted to share what I created regardless. The Met4A uses a P9 command that allows a device to read all of it's parameters upon request. I had to add a timer between request and response because the Met4A has to take a pressure sample and without that delay the data gets lopped off in the beginning. That was an interesting troubleshooting session haha.

Let me know what you think as far as structure goes. It works really well but it is my first time parsing string data and I wanted to have everything laid out for ease of troubleshooting (which actually came in really handy when I was figuring out the timing for the reply). I am sure it can be condensed a lot and do the same thing. If there are programming issues/bad-practices with how I did things I would like to know how to improve it.

I heavily commented the rungs to explain as much as I could but are not needed if they clutter up the workspace.

Just about every tag is prefaced with "WX_" to signify it is a WeatherStation tag since I am using other comm methods in my program (such as Serial Modbus and Modbus TCP/IP).


P.S. Looks like I got pushback on the ProSoft ASCII modules and my group wants to try a different device first. It was ordered by someone in my group and I will probably be coming back to ask a little help with it haha. Will basically try to send commands though our 1756-ENBTXT module through an RS-232 to Ethernet Adapter made by LCom. But I don't have the Model number handy.

Can I continue this threat if I have questions with how to communicate from PLC over to the Met4A with that new device?
 
Last edited:
Thank you! My brother converted it to a PDF and I am reading it.


It is quite the Magnum Opus.


I have one question (so far;)) about that TOF delay before the read: how is putting the 2s of delay before the read any different, functionally, from adding 2s to the timeout after the read?
 
If there's an "XT" on the end of the part number it's probably a 1756-EN2TXT; those are just extended temperature range models with enormous heatsinks.

While the 1756-EN2T does support open sockets, I would very strongly recommend an EtherNet/IP to Serial device (like the ones mentioned earlier in the thread) that is easier to use and natively supports the Rockwell "EtherNet/IP" protocol. For a handful of units, the time and labor costs are much greater than the hardware cost.

If you choose to pursue one of those, I recommend creating a new thread and posting a link at the beginning so folks can understand your project history but not have to find the part where you switched to different hardware.
 

Similar Topics

Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
140
Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
115
This seems to be a very simple thing to do, but I keep getting an 16#0005 Error message "Class or instance not supported". I'm trying to read a...
Replies
0
Views
471
Hello, is it possible to read a message using a controllogix L61, from a SLC, that is connected to a PLC-5 that already is sending data to the...
Replies
7
Views
2,111
Hello, I inherited a control system one of my predecessors thought it was a good idea to put logic for cant optimization and Kinetix motion...
Replies
15
Views
3,455
Back
Top Bottom