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.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Installation, Deployment
- Incorrect behavior on production clients
Incorrect behavior on production clients
Thank you for the answers, I think that it is now clear to me what you are doing.
It is likely that there is an error during writing (and maybe during reading/subscriptions as well) in the production environment - you just do not see it, because you have not set up the application to handle it.
Please read this: opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...del%20in%20Live%20Binding.html . There are types of errors described (I / II / III) and how to handle them; however, in your case, the most likely cause is described in the (unnumbered) last paragraph. In order to visualize such errors, add some text box/text boxes to your screen, and bind them to the *same* OPC node as you are reading/writing, but this time setting the Kind to ErrorMessage (opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...rame.html#Mapping%20Kinds.html ). This will cause any error message associated with the operations to appear in the additional text box.
I should also say that in general, binding both directions (writes, and reads+subscriptions) with "All" to the same control is tempting, but has all kinds of issues related to it. Possibly even more so, if you specify the write event source as "ValueChange" on the same control. Every change (most keystrokes) in the control will then trigger the write, which will then - when successful, and with some delay - update the control again. This may result in "flickering" or other issues.
Please Log in or Create an account to join the conversation.
- Roccioletti
- Topic Author
- Offline
- Junior Member
- Posts: 3
- Thank you received: 0
1) C# application with VS2022 works as expected if running on the development machine
2) the same application does not run as expected on the production machine
3) the trivial application reads a counter from a PLC and writes a variable to the PLC
4) the counter is read by both machines simultaneously without problems.
5) I have to send a command to the PLC and write a variable, I read this same variable and subscribe to it. In the development machine I write the variable and the subsequent reading of the same confirms the writing in the PLC. The machine understands and starts working. In the production machine I write the same variable and the subsequent reading returns 0. I write 2 and read 0 and the machine does not start working.
For reading and writing I use the "Live binding" technique and I can't find a way to insert error checking. I attach an explanatory screenshot.
It is also true that it is the first time I have used this library and perhaps I am not making the best use of the product.
Thank you.
Attachments:
Please Log in or Create an account to join the conversation.
I do not quite understand your description (e.g. what do you mean by "value.... is deleted", "does not appear" - appear where?, "I ... see the value" - see where?). But for myself I have summarized as "you call the Write, but it does not happen, and there is no error reported". If I have incorrect understanding, please elaborate precisely on what you are doing and what is happening.
If my understanding is correct, then the first question actually is: If there *was* an error reported during the Write, would you know about it? That is, do you have th eproper error handling core around the calls to QuickOPC methods? For example, if you are using the EasyUAClient.WriteValue method, this method would thrown a UAException n case of a problem. Do you have a code to catch, handle, and report such exception? If so, can you post the skeleton of such code here?
Best regards
Please Log in or Create an account to join the conversation.
- Roccioletti
- Topic Author
- Offline
- Junior Member
- Posts: 3
- Thank you received: 0
I can somehow collect any errors that are generated during the execution of the program, errors which in this case do not appear on the screen. Clearly I am talking about errors in communication with the machine via OPC.
Thank you
Please Log in or Create an account to join the conversation.
If you are getting an error upon writing, please provide the full error message.
Best regards
Please Log in or Create an account to join the conversation.
- Roccioletti
- Topic Author
- Offline
- Junior Member
- Posts: 3
- Thank you received: 0
I detect a difference in the behavior of the application running on the development machine compared to the behavior on the target client.
The license is activated on the client using LMconsole.
Specifically in the production client I can read but not write. Could it be a problem with the license not being installed correctly? even if LMconsole does not detect any problems.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Installation, Deployment
- Incorrect behavior on production clients