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
04 Sep 2024 01:00 #13101 by Kyle.Oshima@caltrol.com
Following instructions below for running the OPC Analyzer tool, fourth paragraph states "...[a]fter installing, run the OPC Analyzer, and enter any necessary information in the Category Filter and Remote Machine Name fields, and press the Refresh button. Then, select your target OPC server from the Server drop-down..." however the Server drop-down does not list the target OPC server (see screenshot below)

Please advise what if anything may be mis-configured with tool.

Attachments:

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

More
01 Sep 2024 09:27 #13093 by support
Thank you.
This means that what I have suspected (double-invocation of the server) is *not* causing the problem.

At this point there are hardly any options left. About the last thing we can try is the OPC Analyzer. I do not have much hope, though.

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).
Instructions are here: kb.opclabs.com/How_to_use_OPC_Analyzer .

I will send you a download link by email.

Best regards

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

More
29 Aug 2024 17:00 #13074 by Kyle.Oshima@caltrol.com
re: How many processes named DVSYS.exe do you see at this point? Zero, one, or more? -- zero

re: What happens with regard to the DVSYS.exe processes? Is there any change, even temporary? -- after browser opens ASP file, one and only one DVSYS.exe process appears for several seconds then disappears

re: Isn't there a moment in which two such processes run at the same time? -- no

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

More
29 Aug 2024 10:33 #13070 by support
Hello,
I have received the exported registry files by email, thank you (note the info they contain could be made public, there is nothing confidential in it).

From it, i can see that the OPC server is registered as "Local server" (as opposed to "Local service"). With servers registered in this way, (D)COM sometimes starts multiple instances of the server, which then causes various issues such as that the 2nd invocation does not work well. I want to rule out that multiple instances are being started (or to confirm it...).

Can you please:

1. Start Windows Task Manager.
2. Switch to the Details view, and sort the tasks by Name.
3. Verify that you are seeing processes for all users (not just you) - there should be "User name" column, and there should be users other you (e.g. SYSTEM, LOCAL SERVICE) with some processes.
4. How many processes named DVSYS.exe do you see at this point? Zero, one, or more?
5. Perform the "failing" test from your ASP script.
6. While running the test, observe the Task manager closely. What happens with regard to the DVSYS.exe processes? Is there any change, even temporary? Isn't there a moment in which two such processes run at the same time?

Thank you

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

More
28 Aug 2024 08:23 #13068 by support
Hello.
Thank you for the tests and explanations, it helps to understand your system and narrow down the possibilities.

I have some idea what can be causing this, for it I need to inspect how the OPC server is registered. Can you please provide me with .REG exported files according to the following article: kb.opclabs.com/How_to_obtain_OPC_Classic_server_registration_information ?

This would be for ProgId "DeltaV.DVSYSsvr.1" .

Many thanks

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

More
26 Aug 2024 20:45 #13063 by Kyle.Oshima@caltrol.com
re: Is the "ADMIN" user of the AppPool the same as the interactive user that is logged in when you made the tests from the console? -- yes, as noted in reply #13047 the IIS AppPool is connecting as Windows user "Admin"; and per Windows command line whoami, console is also running under Windows user "admin" (see screenshot below)

To eliminate any difference in username specification, as console returns UPN format username (e.g., domain\username) revised IIS credentials explicitly specifying domain\username to match (although IIS successfully authenticates both formats) -- however revised "ReadAndDisplayValue_VBScript.asp" example file still returns same incorrect value of not "ADMIN".

To clarify, the USERNAME tag has nothing to do with the Windows user; that OPC tag simply posts the DCS user logged on to the DCS -- as noted in reply #13047 the DCS has application-level user definition completely separate from Windows OS user; user accounts may be the same for both the DCS and Windows but is not required. Per the DCS vendor, the USERNAME tag is made available mainly for display of the DCS user on its HMI graphics -- doubt its OPC server has capability to "decide[d] to deliver different results based on who is calling it." To eliminate any correlation between the DCS and Windows users, re-ran tests with the Windows user logged on as "Admin" but DCS user logged on as different user -- console is returning the correct "EMERSON" value as expected; however revised "ReadAndDisplayValue_VBScript.asp" example file still returns same incorrect value of not "EMERSON" (see screenshot below)

re: is what you meant when you wrote about preventing "client-side browser effect" -- to clarify, as noted in reply #13047 to eliminate any possible html conversion issues (i.e., browser must convert ASP output to be displayed in browser window to html -- specifically how that is done may vary depending on browser) restructured vendor-supplied ASP example file using AJAX (which as acronym means allows server-side "Asynchronous JavaScript [And XML]" to be run outside the client-side browser scope) intercepting the QuickOPC output as-is returned from the object call before the browser's html representation -- however revised "ReadAndDisplayValue_VBScript.asp" example file still returns timestamp and quality but not value.

Attachments:

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

More
24 Aug 2024 07:45 #13050 by support
Thank you for your answers.

Re "What is unique about "results = Client.ReadMultipleItems(arguments)" such that "results(0).Vtq.ToString()" appears to return different results whether run from IIS or not?" That is a good question. it is the question I am trying to find the answer to. Currently I do not know the answer.

Re "From OPC client perspective, does the context of the string value matter?" Normally it does not. But in theory it can, if the server decided to deliver different results based on who is calling it. That is why I was asking.

Is the "ADMIN" user of the AppPool the same as the interactive user that is logged in when you made the tests from the console? If not, can you test setting the AppPool identity to that interactive user?

Also, the IIS should be set not to impersonate the Web app user - but I suppose you are aware of that, and that is what you meant when you wrote about preventing "client-side browser effect".

Regards

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

More
23 Aug 2024 21:30 #13047 by Kyle.Oshima@caltrol.com
re: It appears that the results do not depend on the code or settings in the code. They depend on whether the code is run from the console app, or inside IIS. -- from original code structure of the supplied ASP example file, ultimately the QuickOPC output must be converted to html (which may vary depending on browser) To remove any client-side browser effect, have restructured example code using AJAX isolating server-side QuickOPC calls outside the browser environment and intercepting the QuickOPC output as-is before html display in the browser -- however AJAX post still returns same incorrect value of not "ADMIN" (and incorrect "False" value)

What is unique about "results = Client.ReadMultipleItems(arguments)" such that "results(0).Vtq.ToString()" appears to return different results whether run from IIS or not?


re: What is the actual semantics of the "THISUSER/USERNAME.A_CV" tag? -- Not sure I follow your question of "actual semantics". As OPC tag name implies, USERNAME tag does post the DCS user account logged on to the DCS (NOT the Windows user account); in this case, correct "ADMIN" username happens to be the same for both the DCS and Windows but is not required. From OPC client perspective, does the context of the string value matter?

re: What is the user account under which the IIS AppPool runs your ASP script? -- as outlined in earlier post some months ago (see QuickOPC VBScript ASP example script not working ) the IIS AppPool is connecting as specific user "ADMIN"

re: Are the different results (between console app or other apps, and your ASP script) limited to just selected tags, or are they across *all* tags in the server? -- appears to affect all tags from the specified OPC DA server

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

More
23 Aug 2024 08:06 #13045 by support
Hello.
Thank you for the information.

It appears that the results do not depend on the code or settings in the code. They depend on whether the code is run from the console app, or inside IIS.

Which leads me to following questions:

1. What is the actual semantics of the "THISUSER/USERNAME.A_CV" tag? Isn't it somehow supposed to tell who is using the server?
2. What is the user account under which the IIS AppPool runs your ASP script?
3. Are the different results (between console app or other apps, and your ASP script) limited to just selected tags, or are they across *all* tags in the server? If they limited to some tags, what are they - is there some pattern in it?

Thank you

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

More
23 Aug 2024 07:15 #13044 by Kyle.Oshima@caltrol.com
Some additional test info to help troubleshoot...

Using the same revised "ReadAndDisplayValue_VBScript.asp" example file from reply #13039 except changing only ReadItemArguments1.ItemDescriptor.ItemID to OPC tag that posts only "True" or "False" values, the IIS/ASP version returns incorrect "False" value (see screenshot below)



Conversely, the same revised "ReadMultipleItems.DeviceSource.vbs" example file similarly changing only ReadItemArguments1.ItemDescriptor.ItemID to the same OPC tag, the console version returns correct "True" value (see screenshot below)

Attachments:

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

Moderators: support
Time to create page: 0.076 seconds