06-24-2010 05:19 AM
Hello everyone,
I am writing and reading values in OPC Server through data socket. What is the purpose of open/close connection data socket when writing /reading a value? Without the open/close connection element, it still work correctly. I am writing values in the server thru event stucture.I do not need any buffered reading or writing. What will happen if I didnt not use the open/close connection? Maybe it may cause some problems in my program which i didnt realise?
And I have attached an example of my program. Thanks
Yehchia
06-25-2010 07:15 AM
Hi Yehchia,
That's right, if you read/write a single value it makes no difference.
But when reading/writing thousands of them it's better to open the connection before and close it afterwords.
Christian
06-25-2010 07:22 AM
Hello,
I am writing and reading multiple of signals. And I am using the open /close function. I would like to know what will happen if i didnt have it?
Thank You
YehChia
06-25-2010 07:36 AM
Hi YehChia,
I was talking about something like that:
1. Not good. since with every iteration the DS connection needs to be opened and closed.
2. Good. Since you open the connection only once then do the reads and close it afterwords.
Christian
06-25-2010 07:50 AM
I see.. Thanks a lot for your information