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.

Help with Reading Yokogawa DCS OPC Items in OSIsoft PI System

More
04 Nov 2022 14:14 #11187 by Wigweh
Thank you so very much, and sorry for just acknowledging the response - didn't see it until yesterday. I must confess I'm a novice at how QuickOPC works, and there are a few details I need to find out about the applications involved in our use case, too. Let me please get back in a short while.

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

More
31 Oct 2022 16:20 #11182 by support
Hello.
I am confused as what it is you are trying to achieve. Or maybe it is not clear to you what QuickOPC can do and how.

Here are my observations:

A. QuickOPC can be used from VBScript, and VBScript can be hosted in many environments. There are at least four hosts that come with Windows, but there are also other applications that use VBScript as their scripting language. Those that come with Windows are: 1) console-based CScript, 2) GUI-based WScript, 3) ability to run VBScript inside Internet Explorer ("client side"), and 4) ability to use VBScript to generate Web pages (ASP, "server-side" scripting). It looks like that you are trying to use (3), which is only good in very specific scenarios. Usually, it is not the right choice.

It should be noted that in all cases, QuickOPC must be installed on the computer where the VBScript runs, and it is from that computer that is accesses the OPC servers. This means scenario (3) above is not feasible for any normal WWW usage where the client only has the browser. Moreover, I do not think that VBScript is supported in later MS browsers (Edge).

B. If you really wanted to do some kind of "local HMI" with QuickOPC, then it is possible (with IE), and we are distributing an example with QuickOPC which looks like this (extra dashes like t-itle, s-cript and v-bscript were added by the forums app, probably to prevent mixup with HTML page rendering, but they do not belong to the code, remove them):
<html>
<head>
<t-itle>ReadAndDisplayValue_VBScript.htm</title></head>
<body>
<s-cript type="text/v-bscript" language="VBScript">
    Option Explicit
 
    ' Create EasyOPC-DA component
    Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
 
    ' Read item value and display it
    ' Note: An exception can be thrown from the statement below in case of failure. See other examples for proper error 
    ' handling  practices!
    Document.write Client.ReadItemValue("", "OPCLabs.KitServer", "Demo.Single")
</script>
</body>
</html>

C. With the code in my example, or a code similar to your example, there is no need to add references to the QuickOPC library. Therefore the particular error message you are asking about cannot appear at all.

D. If you wanted the code to run inside the browser, it needs to go under the <body> and <s-cript type="text/v-bscript" language="VBScript"> as in the example I posted, and not as plain text under <head>.

E. If you want the code to run inside the browser, it doe snot have access to host-provided WScript object (that one is available when you run using CScript or WScript). On the other hand, you have other objects available - such as the Document - which is what my example uses.

F. Given the limitations I explained for what you seem to be trying to do ((3)), I should note that it would probably be more suitable, and certainly much more common, to use VBScript to generate the HTML on server side (ASP, under IIS). An example for that (under the ASP subfolder) also comes with QuickOPC and looks like this (the ReadAndDisplayValue_VBScript.asp file):
<%@ LANGUAGE="VBSCRIPT" %>
<html><head><t-itle>ReadAndDisplayValue_VBScript.asp</title></head>
<body>
<%
    ' Create EasyOPC-DA component 
    Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
 
    ' Read item value and display it
    ' Note: An exception can be thrown from the statement below in case of failure. See other examples for proper error 
    ' handling  practices!
    Response.Write Client.ReadItemValue("", "OPCLabs.KitServer", "Demo.Single")
%>
</body>
</html>

Regards

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

More
31 Oct 2022 15:19 #11181 by Wigweh
Dear Team/Administrator,

Could you please take a look at the attached and help advise what to do here?

File Attachment:

File Name: Errormss.docx
File Size:226 KB
.

Regards,
Attachments:

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

More
21 Oct 2022 14:50 #11164 by Wigweh
Thank you so very much for the response. My team and I have installed the trial and are looking to see it goes. Will get back with updates as we go. Thank you.

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

More
20 Oct 2022 18:07 #11162 by support
Hello,
what you described should be well doable.

You are looking on the examples on the product site. They are there just to show that QuickOPC can work with VBScript. There are many more example in the product documentation, and installed with the product itself.

Please download and install the trial version from the Web site, and do not forget to include "COM development" on the seconds page of the Setup wizard.
In the Launcher application, you will a shortcut to the directory where all VBScript examples reside.

And, here are some links to the documentation that you may find helpful:

- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...e%20to%20multiple%20items.html (switch to the VBScript tab)

- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ples%20(ASP,%20IE,%20WSH).html

- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...o%20OPC%20Classic%20Items.html

Post here if you have more to ask.

Best regards

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

More
20 Oct 2022 15:09 #11161 by Wigweh
Hello Everyone,

My team is hoping to use QuickOPC Lab to read Yokogawa DCS data in a case where there is no OPC server, just HMI and Operator Workstations.

I understand I could use a VBScript. On the OPCLab website, there are VBScript examples on reading OPC items but not sure how to script out to allow for continuous update reads from these OPC items. Also, in our situation, we have about a thousand or more data points, updating at an average rate of say 2minutes.

Our goal is to have this data read in the OSIsoft PI system application. OSIsoft however has an OPC Interface application but we are uncertain if this application would work in reading data pointing to an ordinary HMI or workstation which isn't an OPC Server. OSIsoft recommendation is to usually read from an OPC Server.

Any pointer, use case example or advice would be greatly appreciated.

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

Moderators: support
Time to create page: 0.110 seconds