12-26-2011 03:26 PM
Hello
I desperately looking for a simple example for making an OPC Server by Labwindows. Every examples discuss about make OPC client.
Please some one tell me first is it possible to make OPC server with Labwindows with datasocket lib? and if possible please give me a sample.
Thanks in advanced
12-27-2011 07:24 AM - edited 12-27-2011 07:25 AM
Have you checked out https://decibel.ni.com/content/docs/DOC-12583? Network Shared Variables are a very powerful tool and are,in themselves, an OPC server. There are many examples for NSV and the link I have included highlights the only issues we had and how we overcame them.
Kevin
CVI Certified
User for +10 years
12-27-2011 11:21 PM
Hi
Thanks for your reply. I'm a little confised. Could u please send me the data flow diagram of your application. I check NV in CVI help but I found nothing about OPC.
Do u happen to have any example for DS for OPC server?
12-28-2011 07:47 AM
I am afraid that I am not in front of a computer that has CVI on it. What you should be focusing on is the Network Shared Variable Manger (or what ever name they currently give it). This is a separate tool from CVI. This is the "OPC Server", you then need to use CVI to do what ever it is you are trying to do and communicate with the NSVs.
We were tasked to produce an OPC server for an LED light drive. Variables were set in the NSVM (these are the OPC tags) and can be input or output. A CVI application then communicated with the light drive, read settings in NSV and wrote results back into other NSV. An OPC client can then access the tags in the NSVM.
Kevin
12-28-2011 07:57 AM
In CVI 8.5 it was called Variable Manager, in my current CVI2010 it is called Distributed System Manager 2010 😉
Select Start»All Programs»National Instruments»Distributed System Manager to launch the System Manager. In its help, have a look at the sections 'Concepts' and 'How-to'.
12-28-2011 12:11 PM
Hi
Thanks guys your reply is really helpful for me. Also there are some examples in NI Example Finder ->Network Variable in CVI 2010. I'd like to know is it the same with Network share variables? Can I use them as reference examples?
12-29-2011 05:46 AM
As Wolfgang says the "Distributed System Manager" is the OPC server, no code is needed. You now need to use the CVI examples to understand how to read/write to the variables (or Tags in OPC speak). You can even create these dynamically from code.
Kevin
07-25-2019 02:31 AM
Hello,
I cannot find the OPC write example in NI example finder.
There are only examples to read from OPC
Regards,
Akshay