Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

the value of tag doesn't change

More
25 May 2023 09:11 #11763 by support
Hello.

What I am suggesting is a an attempt to workaround the problem. It may or it may not work. It is based on what you wrote : "If I keep UAExpert open in variable display the value changes on UAExpert and also on the two other programs.". From that, it seems that simply having the subscription can resolve the problem with the reads.

You are already doing the Read-s. You will not change that code. You will simply add the call to SubscribeDataChange (for the same item) somewhere at the beginning of your program, and keep it subscribed.

Regards

Please Log in or Create an account to join the conversation.

More
25 May 2023 08:03 #11762 by balleri
Hy,
As I wrote below we bought OpcLabs.EasyOpc.UA.EasyUAClient.
Are there required functions in this library?
How can I read the value of the variable once the subscribing is done without using the sub EasyUADataChangeNotificationEventArgs?

Best regard,
Sandro Balleri.

Please Log in or Create an account to join the conversation.

More
24 May 2023 16:19 #11757 by support
Hello.

If you are using VB6, you need to make sure the appropriate type library form QuickOPC is imported in project settings. In FoxPro, I do not not know how this is done.
But, it may not be necessary to do, because the part that uses EasyUADataChangeNotificationEventArgs is the event handler for data change notification event. But my suggestion was just to make a subscription, in hope that it will work around the "value does not change" problem. You do not actually need to handle the data change events, nor do you need to set up an event handler for it. So you can simply remove these parts of the sample code.

We do not offer any paid support or consulting.

And, as I explained, the "value does not change" problem should primarily be handled by fixing the server.

Best regards

Please Log in or Create an account to join the conversation.

More
24 May 2023 15:23 #11756 by balleri
we can't solve the problem. The visual basic code you indicated does not run.
It gives us an error running because it can't find the type EasyUADataChangeNotificationEventArgs.

Public Sub Client1_DataChangeNotification(ByVal sender As Variant, ByVal eventArgs As EasyUADataChangeNotificationEventArgs)

The OpcLabs.EasyOpc.UA.EasyUAClient which we have is right to use this code?
At this point we believe that if it were possible to have your advice online, obviously for a fee, we could arrive at a solution.

Best regard,
Sandro Balleri.

Please Log in or Create an account to join the conversation.

More
24 May 2023 08:21 #11753 by balleri
Hy,
as I think you have understood by now bob we are experts on the subject and we cannot solve the problem.
The examples you have indicated refer to EasyDA as opposed to what we have used up to now which is EasyOpc.UA.
Is it possible to have an example in VisualFoxpro or Visual Basic of subscribing and reading a single item?
Thanks again for your patience and availability.

Best regard,
Sandro Balleri.

Please Log in or Create an account to join the conversation.

More
More
22 May 2023 08:09 #11741 by balleri
Hy ,
Is it possible to have the example done above, in Visual Basic with multiple reading, integrated with the subscribing?

Best regard.
Sandro Balleri.

Please Log in or Create an account to join the conversation.

More
17 May 2023 14:29 #11738 by support
Hello.

If using one client (UAExpert) in this way influences the values that are provided to two other clients, the server is faulty. And you should resolve it with the server vendor.

However, it can be guessed that the reason UAExpert works (and makes other programs work) is because it is using subscriptions, while your program is using repeated Reads (and I do not know what Prosys does).

As a workaround, you can try to set up a subscription from your program too.

Best regards

Please Log in or Create an account to join the conversation.

More
17 May 2023 12:51 #11737 by balleri
Hy,
with the solution explained above we solved the problem on two customers. However, there remains a third who present an even different case.
The variable always remains out of date, with my program and with the Prosys OPCUA program.
If I use UAExpert to view the variable, the value of the variable is correct and at that point I see it correctly also on my program and on Prosys.
If I keep UAExpert open in variable display the value changes on UAExpert and also on the two other programs.
If I close UAExpert the value doesn't change anymore, it remains the one of the last visualization on UAExpert.
Every evening the OPCUA server is shut down and the next morning I see a zero value until I reopen UAExpert.
I attach the UAExpert log.

10:30:16.723 | UaExpert | | Loading plugins...
10:30:16.723 | UaExpert | | Loaded Devices Plugin (Static Plugin)
10:30:16.726 | UaExpert | | Loaded Attribute Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Reference Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Data Access Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded History Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Events Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Method Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Performance Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Image Viewer Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Server Diagnostic Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded Data Logger Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded GDS Push Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded File Transfer Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded XML Nodeset Export Plugin (Static Plugin)
10:30:16.729 | UaExpert | | Loaded PubSub Config Plugin (Static Plugin)
10:30:16.765 | UaExpert | | Loaded UaExpert's certificate.
10:30:16.771 | UaExpert | | UaExpert is ready to use.
10:30:29.054 | DiscoveryWidget | | Discovery FindServers on opc.tcp://localhost:4840 failed (BadTimeout)
10:30:48.807 | Server Node | PremiumHMI@HMI30 | Endpoint: 'opc.tcp://HMI30:63840'
10:30:48.807 | Server Node | PremiumHMI@HMI30 | Security policy: 'opcfoundation.org/UA/SecurityPolicy#None'
10:30:48.807 | Server Node | PremiumHMI@HMI30 | ApplicationUri: 'urn:HMI30:PremiumHMI OPCUA Server'
10:30:48.807 | Server Node | PremiumHMI@HMI30 | Used UserTokenType: Anonymous
10:30:48.934 | AddressSpaceModel | PremiumHMI@HMI30 | Registered for ModelChangeEvents
10:30:48.934 | Server Node | PremiumHMI@HMI30 | Connection status of server 'PremiumHMI@HMI30' changed to 'Connected'.
10:30:48.934 | Server Node | PremiumHMI@HMI30 | Revised values: SessionTimeout=1200000, SecureChannelLifetime=3600000
10:30:48.941 | AddressSpaceModel | PremiumHMI@HMI30 | Browse on node 'i=84' succeeded.
10:30:48.972 | AddressSpaceModel | PremiumHMI@HMI30 | Browse on node 'i=85' succeeded.
10:33:02.289 | AddressSpaceModel | PremiumHMI@HMI30 | Browse on node 'ns=2;s=Tags' succeeded.
10:33:03.622 | AddressSpaceModel | PremiumHMI@HMI30 | Browse on node 'ns=2;s=OPC.1' succeeded.
10:33:06.480 | Attribute Plugin | PremiumHMI@HMI30 | Read attributes of node 'NS2|String|N_StackLoaded' succeeded [ret = Good].
10:33:06.498 | Reference Plugin | PremiumHMI@HMI30 | Browse succeeded.
10:33:55.492 | AddressSpaceModel | PremiumHMI@HMI30 | QascAddressSpaceModel::mimeData
10:33:56.860 | DA Plugin | | QascDaModel::dropMimeData
10:33:56.860 | DA Plugin | PremiumHMI@HMI30 | No subscription available for ServerId 0
10:33:56.860 | DA Plugin | PremiumHMI@HMI30 | Creating new subscription: ClientHandle=0, PublishingEnable=1, LifeTimeCount=2400, MaxKeepAliveCount=10, Priority=0, PublishingInterval=500, MaxNotificationsPerPublish=0
10:33:56.866 | DA Plugin | PremiumHMI@HMI30 | CreateSubscription succeeded [ret = Good]
10:33:56.866 | DA Plugin | PremiumHMI@HMI30 | Revised values: LifeTimeCount=2400, MaxKeepAliveCount=10, Priority=0, PublishingInterval=500, SubscriptionId=746656260
10:33:56.866 | DA Plugin | PremiumHMI@HMI30 | Created subscription for ServerId 0
10:33:56.867 | DA Plugin | PremiumHMI@HMI30 | Item [NS2|String|N_StackLoaded]: SamplingInterval=250, QueueSize=1, DiscardOldest=1, ClientHandle=1
10:33:56.872 | DA Plugin | PremiumHMI@HMI30 | CreateMonitoredItems succeeded [ret = Good]
10:33:56.872 | DA Plugin | PremiumHMI@HMI30 | Item [NS2|String|N_StackLoaded] succeeded : RevisedSamplingInterval=250, RevisedQueueSize=1, MonitoredItemId=1 [ret = Good]
10:34:08.000 | Attribute Plugin | PremiumHMI@HMI30 | Read attributes of node 'NS2|String|N_StackLoaded' succeeded [ret = Good].

Best regard,
Sandro Balleri.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.076 seconds