From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PLC communication

Solved!
Go to solution

Hello everyone,

 

I have succesfully established a connection between Siemens PLC with OPC server. In OPC quick client also the tags values are updating. 

 

But enable to update the values of tags in VI which is created in a project. The deployment of tags are also successfully done.

 

Please help me with my problem or tell me where I am going wrong.

 

Thanks & Regards,

Manisha

0 Kudos
Message 1 of 14
(4,027 Views)

Hi Manisha,

 

I didn't understand what is your problem. Tags are not being updated in your software? How did you bring the tags you created in OPC Server to LV?

 

Which PLC are you using and which OPC Server version?

 

Mariana.

0 Kudos
Message 2 of 14
(4,014 Views)

Hii Mariana,

 

I am using Siemens PLC, CPU 300 using ethernet communication. I have LabVIEW 2011 and OPC Server Version 4.5. 

 

I have followed the same steps given in webcast of "Connecting LabVIEW to any PLC". In OPC sever I have created a new channel, added new device with the procedure given in the webcast. Then three tags are added. In OPC quick client am able to see the changes in status in boolean state (0,1) which am changing from hardware (i.e. from PLC IO module). 

 

Then I have created a new project in which I have added IO server, created three variables with the same name of tags which are created in OPC server. And then after dragging those variables on blank VI there is no change in their states. There is no error in deployment also.

 

I hope this time am clear with my problem. 

 

Thanks & Regards,

Manisha

0 Kudos
Message 3 of 14
(3,999 Views)

Hey, I have repeat the whole procrdure of creating OPC Server as well as a project. After a successful deployment, on VI am getting one error which am posting now. 

 

Please explain me this error & suggest some solution.

0 Kudos
Message 4 of 14
(3,988 Views)

Hi Manisha,

 

The red led means OPC Server is not active/connected. Sometimes we shut down OPC Server without noticing, and this could cause the red led too.

 

When you created the shared variable, have you adressed it correcty in "Enable Aliasing"? Creating a variable with the same name doesn't mean it is linked with OPC. In fact, if you link them correctly, you can name the variables differently from the tags you've created in OPC server.

 

 

 

 

0 Kudos
Message 5 of 14
(3,985 Views)

Hello Mariana,

 

I have cross checked that, OPC server is active and at the same time quick client changing the status also. 

 

I have tried one new thing, in that after creating a library in project, right click on it & created bound variables. Bound variables are created for sharing the data for application as I have read that. After that am getting error. Am posting screenshot of this. Am I doing right things? Please give me some solution.

 

Thanks & Regards,

Manisha

0 Kudos
Message 6 of 14
(3,982 Views)

Hi Manisha,

 

You are pointing the variable to itself, instead of pointing it to a CLP tag. I usually use network-published variables for this. You can do as below:

 

 

 

NewOPCVariable.png

0 Kudos
Message 7 of 14
(3,975 Views)

 

Hey Mariana, I have done the same thing which you have explained in the post. To try something else I had created those bound variables. But still the problem remains the same. That red Sign is continuously there. 

 

Please help me out with this.

 

Thanks & Regards,

Manisha

0 Kudos
Message 8 of 14
(3,956 Views)

Make sure the OPC Server is running with the device you've created, sometimes it starts with a simulated server.

 

Besides that, I can't think of anything else. If problem persists, you should call NI support for help.

 

Mariana

0 Kudos
Message 9 of 14
(3,953 Views)

Dear, if it is in simulated mode then how it is responding when am giving input from IO module of PLC?

 

Thanks you so much for your help. Now I will contact NI for further assistance.

 

Thnaks & Regards,

Manisha

0 Kudos
Message 10 of 14
(3,951 Views)