Jump to content

OPC connection active but LabView does not see variable changes


krzych07

Recommended Posts

I have OPC server on CodeSys. I am trying to read variables using LabView.

I have tried two options:

  • using DataBinding to OPC Variables in controls
  • using DataSocket Open, Read, Write, Close VI

LabView returns no error. When I use data binding control it is green and the message is "Active: Connected to OPC server".

lvopc.png

Unfortunately when I force variables in CodeSys i see no changes in LabView.

Edited by krzych07
Link to comment

If you use the DataSocket API to open a connection, write some non-default value, and then read the data back, what do you receive back?

If you receive back the data you previously wrote, I ran into an issue with a Siemens simulated device on an OPC server where the item's memory map was based on the group update rate meaning that forcing the value in one place would not update the value for the DataSocket client unless the two update rates were the same. I had to use the OPC diagnostics log on Kepserver to figure out what the DataSocket update rate was (100ms for me) but once the two matched everything started working. The CODESYS driver for Kepware seems to do the same thing (page 13 of link) so it might be just a Kepserver thing but also might be worth trying or giving CODESYS a call.

https://www.kepware.com/en-us/products/kepserverex/drivers/codesys-ethernet/documents/codesys-ethernet-product-manual/

Link to comment

Thank you for answers.

The problem is solved. Poor diagnostics of LabView Data Socket mechanism was really confusing in this case. The icon shown that variable is "Active: Connected to OPC Server" while it was not.

I have used Server Explorer from http://www.opcconnect.com/freecli.php and then reconfigured everything in CodeSys OPC Server configuration and firewall.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.