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-da to quickopc-ua conversion

More
21 Jul 2021 18:59 #10028 by support
Thank you - I see - yes, in the part that you have now posted, "DataSource = 2" does the right thing.

In OPC UA, to achieve roughly the same thing: Inside the UAReadArguments (which you are already creating), there is a ReadParameters property (of type UAReadParameters). And inside it, there is a MaximumAge property. And you need to set it to zero. That's it. I do not have the actually verified syntax in PowerBuilder for you, but I suppose you will be able to figure it out with this in hand. If not, let me know and we will together on that.

Best regards
The following user(s) said Thank You: spaxman

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

More
21 Jul 2021 17:31 #10027 by spaxman
Sorry you are correct it was down on the next object level where I am specifying to device.
the easydaclient settings
opc_struc.item_list[ll_idx] = CREATE OLEObject
opc_struc.item_list[ll_idx].ConnectToNewObject("OpcLabs.EasyOpc.DataAccess.OperationModel.DAReadItemArguments")
opc_struc.item_list[ll_idx].ServerDescriptor.ServerClass = g_opc_server
opc_struc.item_list[ll_idx].ItemDescriptor.ItemID = opc_struc.item_ids[ll_idx]
opc_struc.item_list[ll_idx].ReadParameters.DataSource = 2 // read to device
opc_struc.msg_opclabs_handles.Add(opc_struc.item_list[ll_idx]) // add to vector

the easyuaclient settings
opc_struc.item_list[ll_idx] = CREATE OLEObject
opc_struc.item_list[ll_idx].ConnectToNewObject("OpcLabs.EasyOpc.UA.OperationModel.UAReadArguments")
opc_struc.item_list[ll_idx].EndpointDescriptor.UrlString = gs_opc_ua_server
opc_struc.item_list[ll_idx].NodeDescriptor.NodeId.ExpandedText = ls_ns +opc_struc.item_ids[ll_idx]
opc_struc.msg_opclabs_handles.Add(opc_struc.item_list[ll_idx]) // add to vector


the read methods used are
easydacliient
valueResultList = g_opclabs.ReadItemValueList(opc_struc.msg_opclabs_handles)

easyuaclient
valueResultList = g_opclabs.ReadList(g_msg100_send.msg_opclabs_handles)

everthing seems to be working but I need the easyuaclient to always get the data from the device like the ReadParameters.DataSource = 2 setting on the da client.

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

More
21 Jul 2021 16:35 #10025 by support
Hello,

the answer would be easier for me if you send me the piece(s) of code that constructs the arguments to the ReadList method (msg_opclabs_handles), because that's where the settings would go.

I should note that a) you might be confusing what "synchronous read" and "reading from device" are doing, and b) the settings you have listed for OPC DA actually do not assure reading from the device, they just assure sync read.

Best regards

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

More
21 Jul 2021 16:14 #10024 by spaxman
I am new to opc-ua... I have been using the Easydaclient for about 2 years with good success. We now are migrating to a new OPC server (Ignition) that only supports opc-ua. I have modified my code (powerbuilder) to connect and use the easyUAclient. My question is I had many settings on the EasyDaclient that made sure I was do syncrounsu reads to the device. Below you can see my settings.

g_opclabs.ConnectToNewObject("OpcLabs.EasyOpc.DataAccess.EasyDAClient")
g_opclabs.Isolated = true
g_opclabs.InstanceParameters.Mode.AllowAsynchronousMethod = false // only do sync reds
g_opclabs.InstanceParameters.Mode.AllowSynchronousMethod= true
g_opclabs.InstanceParameters.Mode.DesiredMethod = 0
g_opclabs.InstanceParameters.UpdateRates.ReadAutomatic = -1 //System.Threading.Timeout.Infinite
g_opclabs.InstanceParameters.UpdateRates.WriteAutomatic = -1 //System.Threading.Timeout.Infinite
g_opclabs.InstanceParameters.HoldPeriods.TopicRead = 600000 //keep tags active for 10 MIN after each read
g_opclabs.InstanceParameters.HoldPeriods.TopicWrite = 600000 ////keep tags active for 10 MIN after each write

for the easyUAclient I only have isolated setting
g_opclabs.ConnectToNewObject("OpcLabs.EasyOpc.UA.EasyUAClient")
g_opclabs.Isolated = true

I need to get the data from the device on every read. Is there a setting to make sure this is occurring.

I am using the g_opclabs.ReadList(g_msg100_send.msg_opclabs_handles) method and it is working. I just want to make sure I am always ( this is critical) getting the data from the device and not the server.

Thanks.

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

Moderators: support
Time to create page: 0.057 seconds