Sign in to follow this  
Followers 0
cmoyer

Communicating with external devices

6 posts in this topic

Hello all, I need to get data from an Anton Paar density meter into a SLC 5/03. I am not new to PLCs but I am new to Allen Bradley and communicating with external devices. So before I spend a lot of time researching how to do this, I was wondering if anyone with more experience could tell me if its even possible. The density meter has a 9 pin RS 232 interface port with the following pinout Pin 2: TXD Pin 3: RXD Pin 4: DTR Pin 5: GND Pin 6: RTS The interface specs are: 7 data bits 1 parity bit, even parity 1 stop bit 9600 baud rate The manual for the density meter states that the output signal to a PC can be processed by standard terminal software. (Windows Terminal, Procomm, Hyper Terminal) What I'm trying to accomplish is to somehow get the density readings into the 5/03 memory, then compare that value to a table which lets the PLC know to add X amount of DI water and X amount of H2SO4 to the holding tank. I am confident I can get this working IF I can get the density reading from the meter into the PLC memory. Thanks in advance for any help offered! cmoyer

Share this post


Link to post
Share on other sites
Does the density meter put out? an ASCII protocol? If you can define what the meter can send out on a serial string, I am sure the forum can assist. Post more specifics about the meters serial protocol.

Share this post


Link to post
Share on other sites
Thanks for the reply Rod, I am not sure if the output of the meter is an ASCII string or something else. I will have to get in touch with tech support at Anton-Paar. Speaking hypothetically, lets say the output is an ASCII string (I think it is safe to assume this is so). The format of the data when it is downloaded to a PC or printer looks like this 1 23,3 34,6 2 24,3 34,8 3 23,6 34,6 First column is sample number, second column is temp and third column is density. The density numbers are the ones I want to get into the 5/03. On my last project I networked several 5/02's using the DH-485 protocol, so I know that the PLC's can communicate with other nodes on the network. So to be more specific about my problem, do I have to network the meter and 5/03 together on a DH1 with RSLinx for them to be able to communicate? Are there embedded drivers in RSlinx that can handle the interface I specified(again assuming that the output is an ASCII string) in my first post, or do I have to find someone to make a custom driver for me? Am I making any sense at all? The only other thing I can think of is to connect a PC to the 5/03, then dump the meter data to the PC, and finally download the data from the PC to the 5/03. Is this idea any more or less feasible than the above scenario? Once again, thanks in advance for any help offered! cmoyer

Share this post


Link to post
Share on other sites
Greetings cmoyer ... and welcome to the forum ... if you’ve never worked with ASCII commands before you’ve got a bit of a grind ahead of you ... I’ve never heard of Anton-Paar before ... the first thing to do is to ask their tech support if they already have any sample programs for the AB SLC-500 platform available ... cross your fingers when you ask ... if the answer is no, then consider the following ... if I understand your project correctly, you’ll have to program the SLC-5/03 to “watch” its serial port and wait for a string to come in from the Anton-Paar ... the string will PROBABLY be terminated with something like a “Carriage Return / Line Feed” combination ... (these are usually invisible/non-printable characters) ... this “CR/LF” pattern basically says: “I’m through sending you THIS string - so now do something with it” ... once the SLC sees the “CR/LF” pattern, it should store the data - and then get the serial port ready to receive the next string ... your SLC program will have to control this particular sequence of events ... you’ll also have to write your program to tell the SLC what to do with the stored data ... survival tip: consider your programming for the SLC as TWO separate projects ... (1) GET the data and store it ... (2) process and analyze the data ... it’s been quite awhile since I’ve done any ASCII programming - but I’ve probably got some example programs at home that would help if you need them ... (check with Anton-Paar first ... there’s no sense re-inventing this particular wheel if they’ve already got a sample program available) ... I’ll try to find time to check through my files tomorrow ... next thing ... hopefully you have a communications hookup to “talk” to the SLC-5/03 through its Channel 1 (DH-485 port) with RSLogix500 ... consider: you’re about to reconfigure the Channel 0 port and dedicate it as an ASCII port for the external device ... bad news: it won’t be a “programming” port anymore ... now there ARE (probably) ways to switch back and forth while you work with the programming - but trust me, you DON’T want to go that way ... having a separate path through the DH-485 port is worth whatever you have to pay for it ... hopefully you already have such a path ... to get started with this, I’d recommend that you read up on the ASCII instructions such as: ABL, ACB, ACI, ACL, AEX, ARD, ARL, and ASR ... those should get you started ... you might not need them all - but we won’t know for certain until we dig deeper ... side trip: this reminds of a poor guy I ran across years ago who was trying to learn PLCs on his own by studying the book ... he started working through the various instructions based on an ALPHABETICAL LIST in the book’s index ... ouch! ... he’d been slaving for almost six months trying to master the ASCII instructions (which he’d probably NEVER need) and still didn’t know diddly about XIC and XIO ... made me want to cry ... question: do you already have the Anton-Paar to experiment with? ... not having that available is really going to cramp your style ... note that we can probably use Windows HyperTerminal to “simulate” the transmissions - but that’s not usually as good as having the real thing ... hope this helps ... wish I had more time to play ... good luck with your project ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Ron has definitely covered the basics. Now if you are currently using the CH0 port to program and don't want to give it up, then look at the Prosoft Serial Cards designed for the SLC platform. The Prosoft cards can be a little tricky to set up, but their tech support is great and I've always liked the results.

Share this post


Link to post
Share on other sites
Thank you all for the responses, It is beginning to sound like this might actually be possible! A few updates: The meter HAS been ordered but it has not arrived yet so I can't play around with it at this time. Anton-Paar tech support has not returned any of my support requests yet so no love there either. I HAVE NOT ordered the 5/03 yet because I didn't want to fill out a PR for something I wasn't sure would work. I will probably order the 5/03 once the meter arrives and I am sure of how it operates. I have a 1747-UIC so I can use the DH-485 port to program and the other port for the communications. For a change my boss gave me a project with a decent timeline so I have some room for research and trial and error. Ron - thank you for your VERY helpful reply! I went to the ol' SLC 500 instruction set reference manual to research the ASCII commands you suggested. It looks like I can configure channel 0 on the 5/03 to match the interface of the meter. Hopefully this means I can just plug the meter directly into the 5/03 and get it to read the ASCII string from the meter by using a ARD command. That seems like the hard part! Once the data from the meter is in a string data file it will be a cakewalk from there. Once again thanks everyone for the help and I will update this thread as I make progress. cmoyer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0