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.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Powerbuilder writing using the same OpcLabs.BaseLib.Collections.ElasticVector
Powerbuilder writing using the same OpcLabs.BaseLib.Collections.ElasticVector
here are some suggestions for speed:
- If the use case allows it, use subscriptions instead of periodic reads.
- Always combine as many as possible OPC operations (the actual read/write/subscribe) into one call (use methods with "Multiple" in their name).
- The connection process can take some time. QuickOPC manages connections and connections automatically, so you need a bit of care here. By default, QuickOPC disconnects after cca 5 seconds if you are not using anything from the server. So, if you are subscribed to anything, or let's say you are doing a read each second, you are OK because QuickOPC won't disconnect at all. Otherwise, in order to prevent the slowdown caused by a re-connection, you'd need to increase the "hold period" parameter; or, if you are subscribe to anything, that would take care of it as well.
Best regards
Please Log in or Create an account to join the conversation.
Thanks for all your quick repsonses!!
Please Log in or Create an account to join the conversation.
We can fix that into the upcoming version (QuickOPC 2019.1); the release date is not set, and it would be several months from now for sure. That would be easier for us. Or, if you really depend on it right now, we can also make a patch/new build of the current QuckOPC 2018.3. But, as I wrote, it should be just as good to create new instances of the vector as needed. Let me know.
Best regards
Please Log in or Create an account to join the conversation.
I have now tested the ElasticVector.Clear method from VBScript and it indeed is not functioning.
I will need some time to investigate; will post here when I will know more.
BTW, I would not see it as a problem to create new instances of ElasticVector as needed. The performance impact is negligible compared to the actual OPC operations.
Best regards
Please Log in or Create an account to join the conversation.
In my local function of_model_list I did this..
ll_rowcount = g_msg94_recv.msg_opclabs_handles.count()
g_msg94_recv.msg_opclabs_handles.clear()
ll_rowcount = g_msg94_recv.msg_opclabs_handles.count()
the first time I call ll_rowcount = 0 before and after the clear.
Then I load up the vector with all the data and call count again
for ll_idx = 1 to ll_upper
// 02/27/0219 shp load the opc labs stuff -- load the values and put the objects up in the msg_opclabs_handles
g_msg94_recv.sta_data.opc_item_handle3[ll_idx].value = ls_model_nbr[ll_idx]
g_msg94_recv.sta_data.opc_item_handle[ll_idx].value = ls_model_id[ll_idx]
g_msg94_recv.sta_data.opc_item_handle4[ll_idx].value = len(ls_model_nbr[ll_idx])
g_msg94_recv.sta_data.opc_item_handle2[ll_idx ].value =len(ls_model_id[ll_idx] )
g_msg94_recv.msg_opclabs_handles.add(g_msg94_recv.sta_data.opc_item_handle3[ll_idx])
g_msg94_recv.msg_opclabs_handles.add(g_msg94_recv.sta_data.opc_item_handle[ll_idx])
g_msg94_recv.msg_opclabs_handles.add(g_msg94_recv.sta_data.opc_item_handle4[ll_idx])
g_msg94_recv.msg_opclabs_handles.add(g_msg94_recv.sta_data.opc_item_handle2[ll_idx])
check count
ll_rowcount = g_msg94_recv.msg_opclabs_handles.count()
ll_rowcount is now at 96 which is correct I want to write out 96 items
Call function that does the write
operationResultList = g_opclabs.WriteItemValueList(g_msg94_recv.msg_opclabs_handles)
works perfectly no issues.
Call my of_model_list function again
ll_rowcount = g_msg94_recv.msg_opclabs_handles.count()
g_msg94_recv.msg_opclabs_handles.clear()
ll_rowcount = g_msg94_recv.msg_opclabs_handles.count()
ll_rowcount = 96 before calling clear
call clear
ll_rowcount = 96 after calling clear .. It did not remove anything.
I then load the data gain which just adds onto the existing 96
and now i have 192 items after the call to count again but when I call
operationResultList = g_opclabs.WriteItemValueList(g_msg94_recv.msg_opclabs_handles)
it blows up... Here is everything powerbuilder allows me to capture
getmessage = Error calling external object function writeitemvaluelist at line 110 in function wf_opc_write of object w_plc_2_db.
text = Error calling external object function writeitemvaluelist at line 110 in function wf_opc_write of object w_plc_2_db.
description = Null element in argumentsArray.
helpfile = Null element in argumentsArray.
helpcontext = 0
number = 35
As far as I can tell the Clear method is not clearing the vector but is does something to the vector cause on my next call to write the data it blows up..
Please Log in or Create an account to join the conversation.
no, this is no related to the trial license.
In order to be able to help, I need
- the error you are getting
- the code
Best regards
Please Log in or Create an account to join the conversation.
Everything works great the first write. I then tried to call the clear() method on the vector to empty it out and load for the next time. This does not seem to work.
What should I do to send data back. I was trying for speed purposes not recreate everything every time.
FYI I am Still on the demo code. Is this why I can only do One write?
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Powerbuilder writing using the same OpcLabs.BaseLib.Collections.ElasticVector