04-26-2010 06:17 AM
Not sure if this is a VB, Measurment Studio or iFix issue, you lot are generally cleverer though!!
I have two PC's on a network on running an iFix SCADA System and the other a VB program with measurement studio. I want to display variables which are calculated on the VB PC and display them on the SCADA PC and wondered how I could do this. You normally define variables in iFix and them point them to the device you are interested in.
I wondered if there was a way you could make the VB PC an OPC server and then the SCADA PC could just poll it as it does say a PLC. Can a VB program using measurement studio become an OPC server? Any tutorials, example script, link or anything would be lovely
Cheers
04-29-2010
06:02 AM
- last edited on
04-23-2024
10:17 AM
by
Content Cleaner
Hi there
Two sides of the sword to this. Measurement Studio itself does not provide the functionality to create an OPC server, however you can use the Measurement Studio DataSocket to use the OPC client but not the server. To be an OPC client with DataSocket, just use the ConnectTo function with a URL of "opc:\\\.
The Measurement Studio Network Variable can be used to exchange different types of data between Measurement Studio, LabVIEW, LabWindows/CVI, and other applications that support NI-Publish Subscribe Protocol (psp) and OLE for Process Control (opc) servers.
Exchanging data between Measurement Studio applications and OPC servers requires the LabVIEW DSC Run-Time System and NOT the LabVIEW DSC Development Module. Additionally, you need to install the LabVIEW DSC Run-Time System ONLY on the machine that will host the Network Variable Engine that you will use to host the OPC variables.
If the LabVIEW DSC Run-Time System is not an option, customers can still use the Measurement Studio DataSocket .NET class library to communicate with OPC servers. Even though the Network Variable .NET class library is intended to supersede the DataSocket .NET class library, we do not plan to remove the DataSocket .NET class library for compatibility reasons.
In general, the Network Variable .NET class library provides better performance and scalability, especially for a large number of connections and large amounts of data. Thus, this is why we are deprecating DataSocket in favor of the Network Variable. These performance differences are more of an issue with the native protocols (dstp and psp) than with OPC (opc).
Shared Variable functionality is very powerful and I believe would be the best way to get your system to use OPC. On the other hand, if you just use Datasocket, communication could be easily implemented in VB using Measurement Studio.