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.NET + Windows Services?

More
04 Jun 2012 18:13 #881 by jeancg
Hi

Sorry if the description of my problem was not well explained. I'm thinking of a DataLogger running as a windows service so it can boot without the need to manually launch the application. I'm based on this service in the example proposed that uses LogAsStringToSql SubscribeMultipleItems for OPC items. I believe this service will only need to pass the methods OnStart and OnStop only for starting and stopping service, was in doubt OnStop method using the method UnsubscribeMultipleItems could have some restraint.

I'll try this way.

Thank you.

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

More
03 Jun 2012 09:23 #878 by support
Hello.
The answer really depends on what the particular needs of the service are, i.e. what is the proper time to subscribe and unsubscribe as seen from what is appropriate for the application.I think that the way you propose (with OnStart and OnStop) is a good way as long as you have all the information already available in OnStart, and your service needs the subscription active for as long as the service is running. No problem here.
Just as a note, the subscriptions created in EasyDAClient "survive" any communication disruptions or disconnections from the target OPC server, so you do not have to (and should) attempt to put in a logic for recovery actions. The component does the recovery automatically, and there are configurable recovery periods for various reasons of disconnection.
Best regards

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

More
01 Jun 2012 16:49 #877 by jeancg
Would like some recommendations on how to work with windows services and QuickOPC.NET, I am instantiating my items using the OPC EasyDAClient.DefaultInstance.SubscribeMultipleItems in my OnStart method, I can use in method UnsubscribeMultipleItems OnStop, what better way to initialize and close these connections in this case?

I know that doubt is a simple, but as I did not find in the documentation explaining how to work with windows services came to me some doubts.
Thank you.

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

Moderators: support
Time to create page: 0.053 seconds