LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting cRIO with Siemens S7-300 using OPC UA

Dear all,

 

I am looking for an example program (labview and siemens S7) to create a connection between a cRIO and a Siemens S7-300 PLC.

If an example program is not possible, some tips and tricks to set this up are also helpfull.

 

thanks

0 Kudos
Message 1 of 10
(5,880 Views)

Hello Poema,

 

Have you already taken a look at the OPC UA Server VIs (http://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/opcua_svr_pal/) that are installed together with the DSC Module?

 

If you install the DSC Module, then you should get several examples in your NI Example Finder.

One of them is called the OPC UA Demo.lvproj.

 

I would first take a look at this basic example and once this example is completely understood I would progress to implementing this in my own code.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 10
(5,841 Views)

Thanks for your answer,

I have tried those examples and they are working perfect between PC and compact RIO.

The problem is I don't know the correct settings to communicate with a siemens PLC and how to set up the PLC

 

Regards,

0 Kudos
Message 3 of 10
(5,834 Views)

Hello Poema,

 

Which things have you already tried?

What behavior do you see?

 

The first thing you'll have to make sure is that you can correctly connect with the PLC via an OPC Quick Client.

This will allow you to retrieve/derive most of the necessary information/settings in an easy way.

 

Are you familiar with OPC Quick Clients and/or OPC UA URL and how this usually works?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 10
(5,819 Views)

Hi,

 

There are 2 OPC systems , standard OPC and OPC UA. If I set up a standard OPC server on the PC and I create a connection with the PLC (using the internal siemens driver) then I can read and write information from the PLC using the Quick Client and also in labview program on the PC using the assigned Tags. (This is working as well as with an MPI connection or a Ethernet connection).

 

In our installation we want a direct connection between cRIO and the Siemens PLC. Therefore we had to use OPC UA because this is working on the cRIO. Todo this we had set up the OPC UA server (from the examples) on the PC (for testing first) and tried to connect this server with the siemens as client (siemens can not be used as server).

 

If I try to connect with the OPC UA server using an other testing program (on the PC) then it's ok. If we try to connect with the Siemens PLC it seems there is a connection but it is not possible to exchange some information.

 

So the problem is, what about the certificate file used on the server, how to inform the PLC which Endpoint URL must be used and how is the syntax to define a word (DBx-DBDx) in the PLC ( the same as we should do in the standard NI OPC Server)

 

regards,

 

0 Kudos
Message 5 of 10
(5,814 Views)

Hello Poema,

 

I am aware of the different OPC Standards that exist and have worked both with OPC DA and OPC UA.
The previous month I was even working on a demo that implements an OPC UA Server that appropriately taht automatically links the Shared Variable Engine variables to published items with appropriate quality statuses (eg. Open thermocouple detection.

 

I would suggest you first create an OPC UA server that doesn't require certificates and that we first focus on making that use case work.

This will be easier and afterwards you'll only have to add the certificates.

 

Can you tell me how you are at this moment seeing/determining that the connection has been made?

Do you have some more details on the "internal siemens driver" you are using?

 

Personally I'm not so familiar with Siemens OPCs (have only used them via OPC DA).

Therefore, I would like to ask you if you can refer me to a reference document concerning the "internal siemens driver" or configuration manager you are using (or can use) at your side.

I'm actually looking for a document similar to this one for another manufacturer: 

http://www.kepware.com/Support_Center/SupportDocuments/Help/opcuacm.pdf

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 10
(5,794 Views)

Hello,

 

Thanks for the effort, but we have solved the problem using a UI panel from Siemens. The panel in connecting as OPC UA client to the cRIO and he also read/write this information from/to the PLC.

So you may close this forum as solved.

 

Thanks,

0 Kudos
Message 7 of 10
(5,783 Views)

@poema

 

i am trying the things that u are talking about. and still having the same issues. will you please help me in finding out this.

0 Kudos
Message 8 of 10
(5,585 Views)

Hi,


This is how we did it:
We have a Siemens S7-300 PLC that is connected to a Siemens UI panel running Windows CE.

Our labview cRIO has a connection via Ethernet cable with the Siemens panel.
The labview cRIO is configured as OPC UA server and waiting for a client (the program we are using is based on the NI example).
On the Siemens side we configure the UI panel as OPC UA client based on the information provided by the server and create a continuous link between the variables on the panel and the plc.

 
As far as I known it is not possible to communicate directly with OPC between the PLC and cRIO or you have to use a Labview PC as interface. In our case we are using the Siemens panel as interface.

 

regards,

 

0 Kudos
Message 9 of 10
(5,579 Views)

Hello;

 

I want to connect a cRIO 9039 with a Siemens S-400 using OPC communication.

 

The idea is to configure the cRIO as OPC UA server and, as we need some interface between classic OPC and OPC UA, use the IBH Link UA.

fhttp://opcfoundation.org/opc-connect/wp-content/uploads/2015/06/Integrating-S5-and-S7-controllers-in...

 

Has anyone ever used this method?

 

The other option is to use a PC with Ni OPC server to use it as "bridge". It's a good idea?

 

Thanks

0 Kudos
Message 10 of 10
(4,779 Views)