Professional OPC
Development Tools


ReadMulitpleItems via opda classic (PowerBuilder)

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 , 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.

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

-- 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.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.183 seconds


 Recommend this on Google