Sign in to follow this  
Followers 0
Rmedrano

Getting Data From an AB PLC

13 posts in this topic

Howdy all Im currently working on impementing an electronic SPC(statistical Process Control) program across our plant. Most of the hookups are pretty simple. Going from a mitutoyo gage to a PC is easy because they make specific cables and interfaces to do it. What im running into now is this. We have 2 new production lines in our facility. Each line is run by a Allen Bradley 505 PLC (thats what the guy who built it told me) After talking with him, he didnt seem to have any ideas on how to get the PLC to pass the information to the SPC program. Especially using the serial port. I know that we can hook into the PLC via ethernet or Serial connection. I have had some experience with (thankfully to the people who helped over on the Omron forum) getting data from an Omron display panel to the SPC program via RS232. I had to send the Panel a command which i can set up the SPC program to do at a keypress, to send me back the particular information that I wanted. The SPC program then takes the string that the panel returns and uses a mask that i set up to only pull out the data I want to use Now the SPC program has other options for getting data other than serial... but I have no experience with these at all.. here are my choices. DEVICE TYPE Serial Text File DDE server OLE Automation Server OPC server ODBC Data source any suggestions on what would be easier? basically each line runs 6 tests on each part that goes through it, and we would like to capture 100% of that data for now to troubleshoot and get the bugs worked out. So 2 lines each performing 6 tests or measurements on each part that needs to be passed to a computer running the SPC program. From the searching and reading I did on this forum, it sounds like using the ethernet connection may be easier then the serial one. It also sounds like i need some sort of interface running on the PC to allow me to pull the data I want. Once we have the bugs worked out of the line.. the frequency of checking the parts will drop to a more standard interval like every 2 hours or hour. Anyone have any advice on where to start... there was a topic sort of on this back in 2002(i try to find as much posted info as possible before posting a new question) ....and someone told the poster that this is not exactly a beginner project. LOL nothing like jumping in the deep end to learn how to swim.

Share this post


Link to post
Share on other sites
Actually, this isn't as tough as it used to be. I would recommend using the OPC server option. I would suggest that you use the ethernet option. What you will need to do is to get the SLC configured for ethernet. Seeing as how you are using AB equipment, I would recommend that you use RSLinx Professional on the PC side. This will be your OPC server. Once this is installed, you will setup OPC topics in RSLinx that will "point" to your PLC(s) (all of this is done graphically). Then you will need to know the PLC data table address of the information that you are interested in. With that information, you should be able to configure your PC application to get the information that you need. (Actually, once configured, you can get a lot of PC applications to get information from the PLC. RSLinx also acts as a DDE server, so you can use apps like Excel to get info directly from the PLC.) Hope that helps!!!!

Share this post


Link to post
Share on other sites
Thanks, Hopefully I can convince them to spring for RSLinx Proffesional.

Share this post


Link to post
Share on other sites
If you want to see an example of the DDE to Excel as mentioned by Cal, you can download this Excel example: http://forums.mrplc.com/index.php?act=Downl...&CODE=02&id=134 Also since you have a 5/05 I would look into getting data out through Ethernet if at all possible. I would think your SPC software would need to support this however. What's the name of it? Here is a link to some KB docs to help you some more if you decide to look into Ethernet. 5/05 Limitation using Ethernet (how many connections etc) http://domino.automation.rockwell.com/appl...DE?OpenDocument The easiest would be OPC or DDE, but you gotta have that RS Linx Professional installed and running on the PC you want to get data to from the PLC. DDE is generally SLOW....so if you're moving alot of data in a short amount of time (less than one or two seconds) you might want to consider OPC instead. In my Excel example above, I was moving I think 10 floating point values every three seconds into the Excel spreeshet and DDE handled that ok, plus it was very easy to do. Practically COPY and PASTE. The conditions needed for copy and paste "hot linking" would be: Excel Installed on PC RS Logix 500 Installed on PC and running, online with PLC RS Linx Professional Installed on PC and running Go to any data memory area in the RS Logix 500 software while online with the PLC. Right click and COPY, then open up a blank Excel workbook, pick any cell, click PASTE. That cell in Excel becomes a "hot link". Anytime the PLC data changes, that cell in Excel will update and match the PLC data. Using Visual Basic scripting, you can manuplate this data any way you see fit, again see the above download link and review the "Macro" section which is Visual Basic Scripting or "VBA". There is also THIRD PARTY. Use at your own risk: http://www.softwaretoolbox.com/Prod_Servic...ommsoftware.asp Some people might make OPC drivers fro your SPC software already, the above link might be the case, since we don't know the name of your SPC software however you could check on google for third party resources...

Share this post


Link to post
Share on other sites
The name of the software is WinSPC made by Datanet Quality Systems. www.winspc.com Heres a quick screen shot of the setup page in the software. Edited by Rmedrano

Share this post


Link to post
Share on other sites
Ok so you have to have BOTH RSLogix and RSlinx Professional running on the PC to get data? I was under the impression that RS Linx Prof and my SPC program would be the only 2 programs that needed to be up and active. Im trying to keep the amount of Running and open apps to a minimum. Trying to keep the system as stable as possible. It can get quite hot on our shop floor in the summer months, and that usually leads to some Computer instability when the workload on them increases. But if thats what we need to do.. so be it. I just gotta convince em to spend the cash on the software. I think we have RSLinx OEM... whatever version came bundled with the RSLogix Programming Software. Im not familiar with these software packages at all really, so excuse my ignorance.

Share this post


Link to post
Share on other sites
(I decided to register on this web site, so the name has changed. This is Cal.) You don't need to RSLogix 500 software in order to do what you want. What chakorules was pointing out was that you could go online with a running PLC and cut and paste the data table address into Excel. DDE takes care of putting in all the information into the cell. Its just an easier way of getting it setup initially. You would still need to create an OPC topic, etc. Once the cut and paste was complete, you would no longer need RSLogix 500 running. In your SPC application, you would use the OPC server. As was mentioned, DDE is slower and I think there may be a limit to the number of connections on the PC side, but am not sure. To setup the OPC, given your screen shots, once you have RSLinx installed, you will be able to select it in the server drop-down box. That will get you talking to the OPC server, but you still need to set up a topic in the RSLinx software pointing to the PLC (this will be explained in help files). I am guessing that the next step would be to configure the SPC software to tell it exactly what information it is supposed to get (which data table addresses). This is usually done with an OPC Tag Browse function in the application. Hope this makes sense. Cal

Share this post


Link to post
Share on other sites
No, you don't need RSLogix 500 online with the controller in order to do OPC or DDE data access through RSLinx. It doesn't even need to be on the data collection PC. RSLinx OEM does support OPC data collection, so you do not need RSLinx Professional. Be aware, though, that RSLinx Lite (it's free) does not support DDE or OPC.

Share this post


Link to post
Share on other sites
One thing that I forgot to mention was the version of RSLinx. I see that someone has already pointed out that you don't need the Professional version, which is true. The OEM version will work, but you need to check to make sure that is what you have. Rockwell does some strange bundling of RSLinx with the RSLogix software. I have seen cases where one week you would get the Professional version and the next week get the OEM version. One of the differences between OEM and Professional is that OEM does not support FastDDE. Seeing as how your software supports OPC, this won't matter.

Share this post


Link to post
Share on other sites
Here's one from left field...you now have the Omron Serial protocol covered...why not replace the AB's with Omron PLCs.... :-p

Share this post


Link to post
Share on other sites
Heh actually, AB is supposed to be the standard in the plant.. and there is an actuall AB PLC in that gage with the omron panel.. but the PLC is just used to turn on and off a green or red light if the part is within spec, and to control the timing of the expanding mandrel.

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