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.

ReadMulitpleItems via opda classic (PowerBuilder)

More
27 Oct 2018 16:42 - 27 Oct 2018 16:42 #6798 by support
Hello - I am excited to see that somebody is using our components from PowerBuilder. We are no PowerBuilder expert here, but I have always planned on providing some examples in PowerBuilder too.

Cannot this be related to the fact that arrays in PowerBuilder have by default lower bound of 1? Zero is the expected lower bound, and I do not know what happens with the array when PowerBuilder passes it to COM.

According to infocenter-archive.sybase.com/help/index.jsp?topic=/com.syba...1_1150/html/psref/CCJCHBEC.htm , it should be possible top specify the lower bound, with notation such as
Any la_return[0 to 0], la_args[0 to 0]
(and then, of course, using index 0 instead of 1).
Can you try it out?

If it does not help, please provide the precise error text&details.

Note: I assume this is just test - normally you would actually use *more* elements in the array when you call ReadMultipleItemValues.

Best regards
Last edit: 27 Oct 2018 16:42 by support.

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

More
26 Oct 2018 20:06 #6797 by scottpaxman
I am using Powerbuilder which allow me to connect to .net assemblies via COM. I am able to connect to the easydaclient and do single reads but as soon as I try to do a multiple read I get and error. This may be an issue in powerbuilder but any suggestion woud be arrpecitaed. Below you can see what I am trying to do.

-- create easy da clinet works fine
oleobject g_opcblabs
g_opclabs = CREATE OLEObject
g_opclabs.ConnectToNewObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")


-- the any type is equivalent to the variant in .net
Any la_return[], la_args[]
-- the oleobject is what powerbuilder used to connect to com objects
oleobject readargs

-- I have no problem with the following. So I belive I am creating the read arg object just fine
readargs = CREATE OLEObject
readargs.ConnectToNewObject("OpcLabs.EasyOpc.DataAccess.OperationModel.DAReadItemArguments")
readargs.ServerDescriptor.ServerClass = "KEPware.KEPServerEx.V4"
readargs.ItemDescriptor.ItemID = g_msg_handler_out.item_ids[1]
readargs.ReadParameters.DataSource = 2

-- dump the readargs into an array
la_args[1] = readargs

-- this line blow up with Invlaid parmeter type calling exteranl object function
la_return = g_opclabs.ReadMultipleItemValues( la_args)

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

Moderators: support
Time to create page: 0.054 seconds