Sign in to follow this  
Followers 0
93lt1

I need an alarm reporting solution.

13 posts in this topic

Here's what I have: 2 somewhat identical metalforming machines, each is controlled by 2 AB Controllogix processors with 9 Panelviews. All I/O and PV's are on Controlnet.Each machine has a PC with RSLogix 5000 for troubleshooting and a small VB program for operator interface; however the 2 machines are not connected in any way. Here's what I want to do: I have a PC with RSLinx Gateway software. I want to add an Ethernet card to each machine, add a ethernet switch, and connect my PC and do some data collection, as well as provide means for remote online connectivity (via Linx gateway). For the data collection, I want part counts, hourly uptime vs. downtime and percentage of uptime both hourly and daily (per shift). All is good so far. As is now in the above set-up, all of a particular station's alarms are reported through it's Panelview. I have been asked to have a compilation of alarm history with time and date stamp, presented in my PC. Collectively there are about 1200 alarms in the PV's for each machine. Another challenging thing I will need to be able to do is allow the operator to add comments hourly for downtime reasons and a possible future expansion to this project to keep records of scrap & rejects, and of course operator comments associated with this. So.......... My question is, what are my options without going with an expensive MMI software package (RSView, Wonderware)? How can I get this info from the PLC to the PC and associate the appropiate text when the alarm bit goes high? (without sending ascii from the PLC) Can I compile the alarms into 1 PV and collect the data from its printer port, and instead of printing send the ascii strings via RS-232 to ethernet convertor to my PC, and somehow extract them into Excel, Access, or something else?? I have access to a good VB programmer that I havent yet discussed this with, so I can use this resource, but I would like to tackle this one on my own. Please give me any ideas.......... Also check: http://www.plcs.net/dcforum/DCForumID1/2340.html

Share this post


Link to post
Share on other sites
Awesome project! I wish I could do it. I think you are on the right track for "inexpensive" using Excel or something like that... These 1200 records or alarms stored in the panelview. These are PRE-SET alarms? Or did you mean you have a history NOW of 1200+ alarms. If it was me, I would look at maybe using DDE to get the alarm history out of the PLC into an Excel or Access. Does your operator have to add comments at the Panel Views? Is there anything wrong with setting a PC out there, maybe the same one with all the DDE interface that they could type text into the PC rather than the panelview? Is there anything way to DUP the alarms in Excel, and use BITS to remap all your alarms from the PLC to Excel rather than sending ASCII? Use Excel to Time and Date stamp with the NOW() function in Excel. DDE to excel works pretty good for me in the past. It's kinda of SLOW to use EXCEL as an operator interface, which I have done before for a few manual functions, but I have had no trouble with DDE logging and storing data from the PLC on a FOUR SECOND cycle machine. It's real easy to get data out of the PLC. 'tell it weere to read the data from data = DDERequest(RSIchan, "F8:10") 'tell it were to write the data to which cell Cells(lngRow, 1).Value = data Time stamp the message with the following: 'writes the time and date to any cell you tell it too Cells(lngRow, 12).Value = Now() lngRow ofcourse is a varible...but you can hard code a ROW in any cell of Excel. Make sure you close your "COLD" DDE link DDETerminate (RSIchan) Keep us posted.

Share this post


Link to post
Share on other sites
Yes, I think most of the work could be done "behind the scenes" in Excel and write a small VB program to allow operator interface(comments).

Share this post


Link to post
Share on other sites
oops......still learning about this board!! Thanks that will help me very much!

Share this post


Link to post
Share on other sites
I don't know of a tutorial, but there is a DDE Excel Sheet in the downloads page of MrPLC.com in the EXCEL section. When you open it up, go to TOOLS, MACROS, VB EDITOR to see the vb and dde code. You'll need either FULL VERSION of RS LINX or SINGLE NODE RS LINX to do DDE. I recommend SINGLE NODE, if you only have ONE SLC and a PC talking to each other, but if you want to get data from the Panel View and the SLC, you better get a copy of RS LINX FULL version. There might be a cheaper package. Maybe Ken Roach can comment on the different RS LINX packages and what they can handle. I'll also comment on a kewl tip I learned. If you have RS LINX running, (Full version) that is. And you have a DDE topic created in RS Linx to poll your SLC. Then you can open up a blank Excel sheet. Fire up RS Logix 500. Open ANY DATA TABLE, be it a WORD VALUE or BIT VALUE. Highlight the VALUE, do a "COPY", then task over to EXCEL. Do a "PASTE". A DDE "HOT" Link will be established. When the value changes in the PLC, the and you have Excel Open, the value in the Excel changes in REALTIME as the PLC values change. That's the EASY way to get information from SLC to Excel. But that is making a DDE "Hot" link. You might want to do "Cold" links. Where you open a DDE request, read the SLC value you want, then write that value to an EXCEL cell, once finished, close the DDE link.

Share this post


Link to post
Share on other sites
Yes, I already have RSLinx Gateway......as well as collecting data I will be using this PC as a link for online connectivity, which will bring me to my next set of questions.....Can I dial the modem in this local PC from my PC? any comments on this would be greatly appreciated!!! And by the way.....I have a total of 4 Controllogix processors on Controlnet.

Share this post


Link to post
Share on other sites
Although DDE will get data out of a PLC, it is not always the quickest or most reliable for alarm detection and logging.  I am a PC programmer and have done several projects just like this, even from a Control Logix 5550.  Since you have RSLinx, I recommend using OPC (OLE for Process Control).  It is much more reliable and quicker that DDE.  This includes timestamps, quality stamps, and effecient communications with the PLC.  I don't know if your PC programmer has experience with using the OPC standard.  There is information at the OPC Foundation web site (www.opcfoundation.org).  Using this method, it is relatively easy to write a VB program to monitor and log each of alarm very quickly.  If you have more questions, let me know @ kkarr@cdi-mi.com.

Share this post


Link to post
Share on other sites
Is it possible that you could post a sample VB code that shows OPC to PLC? Does this require RS LINUX full version to run OPC? :D

Share this post


Link to post
Share on other sites
I don't remember if RSLinx Lite works with an OPC Client.  I do know that RSLinx Professional supports local (same computer) clients and RSLinx Gateway supports local and remote (another computer) OPC Clients.  OPC is an open standard, so you may want to order (for free) the OPC Standards CD from www.opcfoundation.org.  This will have a tech manual for using the VB interface.  Also more specifically for Rockwell, they have code samples here:  http://domino.automation.rockwell.com/applica....ocument If you need another OPC Server, another big supplier is Kepware (www.kepware.com) they have OPC Servers for many PLC's.  You can also download a 30 day, fully functional trial version. My first OPC Client program was fairly complex (10 clients. a lot of alarms, and a lot of data interaction.)  I had a bit of a learning curve for some of the stuff I did, but it was worth the time. For a cursory explaination of OPC look at http://www.cdi-mi.com/opc.htm

Share this post


Link to post
Share on other sites
I agree with kkarr for 1200 alarms you need OPC.  DDE will just frustrate you and waste your time.  You will have to go back and change it to get any speed whatsoever.  You already have Linx gateway (Not Linux, chakorules??) which already has OPC as part of it, plus it has dial up capabilities, slick as snot! Enter a number in your dial up networking, password, bing bang boom you are on line with all PLC's.  Of cource you have to set up the remote PC for that dial up, but all that comes with the standard operating system (Microsoft NT, 2000, XP)

Share this post


Link to post
Share on other sites
RSchuiling, Yeah, I got LINUX on the brain sorry about that.   I try not to mention that to keep an unbiased opinion type environment. Kim, You rock! Thanks for the excellent inside on OPC and the great links your provided. This is something I need to check into, (OPC). You've been a great asset to MrPLC.com. I hope you stick around awhile.

Share this post


Link to post
Share on other sites
Chris, Thanks for the ego boost.  I'm completely sold on OPC.  It's well worth any learning curve and actually it's not that hard to understand once you know it.  What makes it tricky when you're new is that there are few good tutorials.  (I've considered doing one).  Anyway, this forum has been interesting. Oh, I know what you mean about Linux.  I've got that at home.

Share this post


Link to post
Share on other sites
I can help you if you wish. I wrote a Microsoft Access Application that executes a DDE call to RSLinx. It also compares the value that comes back to a target ( ex. If the tank temperature is greater than 120, then ...) If the alarm conditions are triggered, I have the application executing Outlook and sending an Email to my cell phone. All cool, all neat, and I'll bet that you already have Access. I can send you the application by Email. Drop me a line at Richard@RASchmidtAutomation.com. More Information ... Rich Schmidt

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