LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data on multiple Allen Bradley Controllogix PLC

Hi,

 

This question has been ask in many different ways in the past, but i couldn't find exactly what i am looking for using the search option.

 

I want to monitor several AB Controllogix 5000 PLC at the same time. More precisely, i want to be able to see on my screen the current speed of different machines.

 

I currently have a trial version of Labview 2009 that includes DSC (and more), and i want to know what is the simplest way to do it. (Please note that i will have to monitor Siemens PLC as well with the same program ideally, but for now i'll start with AB only).

 

I think i might handle the programming, but i am lost on how to start doing this. Could anyone point out to me a quick guideline (what program to use in what steps)?

 

Thank you very much,

0 Kudos
Message 1 of 29
(6,358 Views)

I must specify that it is a ControlLogix 5561

 

I am trying to input this in NI OPC Servers, can i just link the PLC to the computer , NI OPC, then LABVIEW to plot the data?

 

 

Thanks

0 Kudos
Message 2 of 29
(6,337 Views)

Yesterday i could connect to the PLC, and NI OPC retrieve all tags from the machine.

 

All these tags are automatically read/write...

 

I don't really understand once the tags are loaded if the connection is established or not, you do not see the values of the tags in NI OPC... and there are no connect/disconnect option.. Anyhow, i was wondering if i could delete all tags to force a tag regeneration from the machine to see if the connection is established? But since i do not really understand the "power" of NI OPC, i do not want to mess things up since this machine generates twice my montly salary every hour.

 

Anyhow, yesterday i could retrieve all tags, but today i keep getting things like that:

 

Date         Time       Level   User Name      Source                  Event                                                                                                
2011-06-16   09:33:54   0       Default User   NI OPC Servers          Device 'L16.Main' has been auto-promoted to determine if communications can be re-established.  
2011-06-16   09:33:54   1       Default User   ControlLogix Ethernet   Error occurred during a request to device 'Ligne 16.Main'.  [CIP Error=0x01, Ext. Error=0x0204].     
2011-06-16   09:36:28   1       Default User   ControlLogix Ethernet   Device 'L16.Main' is not responding.                                                            
2011-06-16   09:37:19   1       Default User   NI OPC Servers          Device 'L16.Main' has been auto-demoted.                                                        
2011-06-16   09:37:29   0       Default User   NI OPC Servers          Device 'L16.Main' has been auto-promoted to determine if communications can be re-established.  
2011-06-16   09:38:42   1       Default User   NI OPC Servers          Device 'L16.Main' has been auto-demoted.                                                        


Here are a couple of screenshots of my project and OPC screen, maybe it will help you understanding my problem.

 

Thanks for your help.

 

 

Download All
0 Kudos
Message 3 of 29
(6,325 Views)

[...]

Download All
0 Kudos
Message 4 of 29
(6,324 Views)

Chronik,

 

How did you import your tags into NI OPC Servers?  It looks like you were already able to get things set up, but I would recommend checking out this article to double check and make sure you didn't miss anything that would keep your tags from updating: http://zone.ni.com/devzone/cda/tut/p/id/7450

 

Have you ever been able to get the tags to update? It would be good to use the guide I linked and the OPC Quick Client to try and view the tags updating.

 

In LabVIEW, you have to deploy the library before you will see your variables update.  To do this, right click your library and select Deploy.  Then you can check that your I/O server and variables in LabVIEW are working using the Distributed System Manager in Tools » Distributed System Manager.

 

 

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 5 of 29
(6,307 Views)

Thank you for your time and help.

 

I will try again on monday and i will let you know,

 

Thanks again.

0 Kudos
Message 6 of 29
(6,305 Views)

I am about to try this, but i am still worried about something...

 

IN OPC, i do not want to manually set all the variables to Read only, is there a way to make sure that no matter what i do in OPC/labview, i do not interfere with the PLC?

 

Also, should I create a new variable and assign it to the variable i want to read, or should i just use the variable itself?

0 Kudos
Message 7 of 29
(6,275 Views)

Chronik,

 

I'm not sure what you mean by your last question.  Do you mean should you create a bound variable in LabVIEW to read the tags in your OPC Server?  If so, yes.  To do so, right click your OPC Server in LabVIEW and select create bound variables.  This will allow you to access your OPC tags in LabVIEW.  I'm not sure how else you meant to do it.

 

In LabVIEW, with DSC you have what is called the Multiple Variable Editor, which will allow you to edit the attributes of some or all or your shared variables at once.  You can set them all to read only here.  Keep in mind however, that this does not set the tags themselves to read only.  However, if you are only using the tags through the variables, this should be fine.

 

I hope this information helps, but let me know if you need clarification! 

 

 

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 8 of 29
(6,260 Views)

Thanks for your help.

 

 

My last question is simply to make sure that there is no way I mess/modify things with OPC. If i get it right, OPC only does the link between LabView and the PLC. I am worried about modifying values or deleting parameters with OPC, is that possible to do?

 

As for LabView, unless I use the "shared variable" as a control, there is no way to modify the values right? (if i use it as an indicator i am fine?)

 

Thanks!

0 Kudos
Message 9 of 29
(6,236 Views)

Chronik,

 

OPC can certainly update values on the PLC, if you instruct it to.  As you mentioned, you can set each tag to Read Only.  However, if you are using a bound indicator, you are simply displaying the value of the tag, so you are correct.

 

 

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 10 of 29
(6,216 Views)