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.

QuickOPC VBScript ASP example script not returning value

More
13 Sep 2024 06:48 #13165 by support
This is truly not related to the issue, so please start a new forum thread.

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

More
12 Sep 2024 20:00 #13162 by Kyle.Oshima@caltrol.com
Doing further research, found following article on OPC Labs' blog: A (Partial) Story of OPC URLs

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.

More
12 Sep 2024 04:58 #13161 by support
Hello,
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.

More
11 Sep 2024 00:15 #13160 by Kyle.Oshima@caltrol.com
See screenshots below for each test as directed in reply #13149 -- before each test run, the entire machine was rebooted to insure all IIS services were restarted

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.

More
07 Sep 2024 09:08 #13149 by support
Hello.

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.

More
06 Sep 2024 05:58 #13143 by support
Hello.

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.

More
05 Sep 2024 19:30 #13140 by Kyle.Oshima@caltrol.com
Seems may have mis-configured the OPC Analyzer tool as inquired in reply #13101 Appears third-party Matrikon OPC DA client tool sees OPC server as OPC DA 2.0 (see post #13020 screenshot) -- also have opened support call with DCS vendor to confirm. Anyway, found OPC Analyzer documentation on OPC Foundation website, and appears have gotten tool working with OPC server.

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




File Attachment:

File Name: Good_conso...ario.tra
File Size:6 KB


File Attachment:

File Name: Bad_ASP_scenario.tra
File Size:0 KB
Attachments:

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

More
05 Sep 2024 06:39 #13127 by support
Thank you.

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.

More
04 Sep 2024 21:00 #13125 by Kyle.Oshima@caltrol.com
re: does it have "OPC" key, similarly to the picture below? -- yes (see screenshot below)

Attachments:

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

More
04 Sep 2024 10:13 #13111 by support
Hello.

If you use REGEDIT and select the "HKEY_CLASSES_ROOT\DeltaV.DVSYSsvr" key (not HKEY_CLASSES_ROOT\DeltaV.DVSYSsvr.1" !), does it have "OPC" key, similarly to the picture below?



Thank you
Attachments:

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

Moderators: support
Time to create page: 0.131 seconds