LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC UA Server - Multiple Item/Tags Creating

Hello everybody.

 

I am fairly new to LabVIEW and trying to accomplish some project in LabVIEW.

We have PLC controller that can communicate over Modbus/TCP interface. PLC generates a signal (temperature data), assigns the data into holding registered and pushes further.

 

My goal is to grab the readings from the PLC ( I have already created shared variables in DSC module) and map everything into OPC Tags to make the data available on the OPC UA client (see attached file). Attached vi works ok, but I am only working with 4 tags and 1 slave.

 

But according to requirements I need to generate at least 200 tags/items in LabVIEW and also be able to work with 12 slaves at the same time.

 

Would anybody be able to advise me on how can I do this in LabVIEW. I understand that I need to optimize my code, but how? If I am going to create 200 tags in that VI it will be unreadable by the user.

 

And also how to connect to another slave utilizing only 1 OPC server.

 

Thanks

0 Kudos
Message 1 of 4
(2,214 Views)

Hi!

 

So, you are writing your own OPC server here, which collects data from PLCs and publishes them in OPC UA.

Please note that an OPC server is more than just a simple data source.

  • Each item in an OPC server has a quality status. If the connection to your PLC is lost, the status of all items about this PLC in the server should change from GOOD to BAD_NOCONNECTION, so any client will see that there's a problem.
  • Each item in an OPC server has a timestamp of last change. Clients can check when a value was last changed. Further more, clients can subscribe to a value, and will be notified whenever it changes. If you write a value over and over again to the OPC server, the value itself might be the same, but the timestamp is updated every time, and the clients will be notified each time...
  • There's more, but this should be enough so far...

Typically, you should look for an OPC server software, either from the PLC manufacturer or from 3rd party. Configuration typically boils down to setting up the connection to the PLCs, loading the PLC programs into the server which then shows what data is available from the PLCs, selecting what data to publish in OPC, and that's all.

You should only write your own server if there is no other way around, or if labview itself has to provide some self generated data.

 

0 Kudos
Message 2 of 4
(2,166 Views)

Thanks, Sebastian for your reply!

 

I am a little confused right now. So, you are saying the better way to accomplish my task is utilizing specific OPC server software (I understand your point), but would you please clarify what is the application of OPC UA ToolKit. How this toolkit could be used and what types of application? Isn't it designed for OPC communication?

 

I was worried about LabVIEW too and its capability to handle all of these connections (PLC, Modbus, OPC Server). I am not sure how stable the connection would be due to a lack of experience with LabVIEW. Also, this need to generate so many registered and tags in LabVIEW seems an inefficient way to do that.

 

 

 

 

0 Kudos
Message 3 of 4
(2,161 Views)

Hi!

 

With the OPC UA toolkit, you can of course create your own OPC UA server. Either because your LV application generates some data on its own to be made available for other applications, or because you indeed have a LV application which acts as OPC UA server for the PLC.

My point is just that the latter is not economical it there already is such an OPC server available out there.

 

And you can use the OPC UA toolkit to create a client in LV. For example, if you found an OPC UA server for your PLC and have it up and running, you can then use LV to access the data of the PLC through OPC UA instead of writing your own Modbus interface.

 

Ah, and one important point: There is OPC and OPC UA.

OPC is quite old, available for Windows only, and runs within one computer (though, there are tricks)

OPC UA is a new generation, designed to work across networks, is available for all OS etc.

Don't get confused by the two, especially since people omit the "UA" part.

To my knowledge, LV has built in support for OPC, but I don't know much about it. The toolkit is all about OPC UA.

0 Kudos
Message 4 of 4
(2,142 Views)