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-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- QuickOPC VBScript ASP example script not returning value
QuickOPC VBScript ASP example script not returning value
Please Log in or Create an account to join the conversation.
- Kyle.Oshima@caltrol.com
- Topic Author
- Offline
- Platinum Member
- Posts: 35
- Thank you received: 1
Article states "...We at OPC Labs have decided to support OPC URLs, but at the same time, we provide means to specify the OPC connections in a traditional way. You can pick whatever suits you better."
Can you provide example how to specify OPC URL connection syntax to explicitly specify local machine host OPC client is to connect?
Please Log in or Create an account to join the conversation.
thank you for your effort and the answers.
Unfortunately, this gave no further clues. I cannot think of anything else to try. In my view this is most likely a problem in the OPC server, which other OPC clients would get too *if they ran from inside IIS*, but I cannot prove it.
I am sorry but I cannot help further here.
Best regards
Please Log in or Create an account to join the conversation.
- Kyle.Oshima@caltrol.com
- Topic Author
- Offline
- Platinum Member
- Posts: 35
- Thank you received: 1
re: Test.1, revised "ReadAndDisplayValue_VBScript.asp" example file still returns timestamp and quality but not value (see screenshot below)
re: Test.2, revised "ReadAndDisplayValue_VBScript.asp" example file still returns timestamp and quality but not value (see screenshot below)
re: Test.3, revised "ReadAndDisplayValue_VBScript.asp" example file returns different result, but still returns timestamp and quality but not value (see screenshot below)
To confirm no effect due to rebooting/restarting IIS, reran prior "ReadAndDisplayValue_VBScript.asp" example file before aforementioned edits, which still returns timestamp and quality but not value (see screenshot below)
Also reran QuickOPC demo from default product install (C:\Program Files (x86)\OPC Labs OPC Studio 2024.1\Demos-COM\EasyOPCDADemo.exe) which returns correct "ADMIN" value as expected (see screenshot below)
Attachments:
Please Log in or Create an account to join the conversation.
As perhaps a last attempt, please try the following three experiments (without OPC Analyzer). Always just one of them, do not combine them. And, make sure the IIS (or at least the App Pool's working process) is restarted between the tests.
1. Place this code at the very beginning of your ASP script, before any QuickOPC operation:
Dim ComManagement: Set ComManagement = CreateObject("OpcLabs.BaseLib.Runtime.InteropServices.ComManagement")
ComManagement.Configuration.InstantiationParameters.OverrideDefaultSecurity = False
2. Place this code at the very beginning of your ASP script, before any QuickOPC operation:
Dim ComManagement: Set ComManagement = CreateObject("OpcLabs.BaseLib.Runtime.InteropServices.ComManagement")
ComManagement.Configuration.InstantiationParameters.TurnOffActivationSecurity = True
Dim ClientManagement: Set ClientManagement = CreateObject("OpcLabs.EasyOpc.DataAccess.EasyDAClientManagement")
ClientManagement.SharedParameters.ClientParameters.ComInstantiationParameters.TurnOffActivationSecurity = True
3. Change your EasyDAClient object instantiation to look like this (with possibly different variable name for 'Client', that's up to you):
Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
Client.InstanceParameters.EnableNativeClient = False
Thank you
Please Log in or Create an account to join the conversation.
Because the symptoms have changed with the Analyzer, we cannot directly conclude anything. In addition, the trace from the "Bad" scenario is empty - it does not contain any requests/responses.
However, in my experience, this again points to the same suspicion: A new, different instance of the target server is being started, when the client is in ASP/IIS.It is clear that some OPC communication has been taking place in the "Bad" scenario with the Analyzer. Yet the analyzer trace you saved is empty. Since the error returned was "The item definition doesn't conform to the server's syntax", it looks like that ASP/IIS was again communication with a different, hidden instance of OPC Analyzer - and this one was not (could not be) configured with any target server, and that's why it is returning an error.
Every time I saw this before, it was before the COM/DCOM somehow perceived that the client in IIS/ASP needs a new instance of the server - and it was because of security (user account).
(I do not have an explanation as to why you have not actually observed the second instance, but it might be an issue on your side, sorry).
I will follow up with a post where I will suggest to experiment with some more QuickOPC settings. But this would really more of a last desperate attempt, without firm base in reasoning.
Regards
Please Log in or Create an account to join the conversation.
- Kyle.Oshima@caltrol.com
- Topic Author
- Offline
- Platinum Member
- Posts: 35
- Thank you received: 1
re: Can you please try to collect OPC Analyzer traces from the "good" and "bad" scenario (and observe whether the use of the analyzer does not change the behavior) --
For "good" scenario, using console script from reply #13039 as instructed only changing ReadItemArguments1.ServerDescriptor.ServerClass = "OpcTestLab.OpcAnalyzer.1" appears QuickOPC OPC DA object call thru console is returning the correct "ADMIN" value as expected as shown in reply #13039 -- see attached OPC Analyzer trace file
For "bad" scenario, using ASP script from reply #13039 as instructed only changing ReadItemArguments1.ServerDescriptor.ServerClass = "OpcTestLab.OpcAnalyzer.1" script returns new error (see screenshot below) -- see attached OPC Analyzer trace file
Attachments:
Please Log in or Create an account to join the conversation.
It appears that the OPC server only supports OPC DA 1.0. But the OPC Analyzer only supports OPC DA 2.0 and 3.0. So, we cannot it.
With this, my options are exhausted. I still believe this is a problem in the OPC server (and with the analyzer we might have been able to decide this, or find a workaround).
Regards
Please Log in or Create an account to join the conversation.
- Kyle.Oshima@caltrol.com
- Topic Author
- Offline
- Platinum Member
- Posts: 35
- Thank you received: 1
Attachments:
Please Log in or Create an account to join the conversation.
Attachments:
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- QuickOPC VBScript ASP example script not returning value