Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Socket Control in a Web Form using Visual Basic 2008

Hello,
 
I have recently installed Microsoft Visual Studio 2008 on my Windows XP platform. I have then installed the recently purchased Measurement Studio 8.1 and followed on-line directions to integrate into Visual Studio. This appears to have been successful, however the DataSocket, DataSocketServer, and DataSocket Source controls are greyed out and are not available for insertion into a web Form (other NI controls are available).
 
I am trying (learning) to develop a Web application to deploy to a Web Server so users simply can access the app through a web browser. The application is intended to communicate with an OPC Server located on the same machine (Web Server). The application will require that OPC data be both read and written and also present this data to the user.
 
I have set this up in the past using VB6 as a Windows Application using DataSockets and we are trying to migrate to the Web using VB 2008 which is new to me.
 
I am looking for assistance in getting the DataSocket control into a Web Form. Is this possible?
 
My project is set up as a Web Application, Why are the DataSocket controls not active in the VB IDE?
 
Links to specific examples would be helpfull
 
Thanks
0 Kudos
Message 1 of 4
(7,288 Views)

Hi Snord,

Based off of your description, it sounds like you are trying to use the DataSocket ActiveX control in an ASP.NET web application.  ASP.NET (in general) doesn't allow you to drag-and-drop ActiveX controls onto the form.  In order to use ActiveX controls in ASP.NET, you have to actually instantiate the control through the HTML page view. This is discussed in the How Do I Embed an Measurement Studio ActiveX Control in ASP.NET? KnowledgeBase.

To be honest, your best option is to switch over to using Network Variables instead of DataSocket which is our newest technology available for data transfer. Network Variables are fully supported in ASP.NET and we even have a drag-and-drop UI control that you can use to setup your network variables call the Network Variable Data Source.   I would refer you to the following help topics found in the NI Measurement Studio Help:

- Migrating to Measurement Studio Network Variable from DataSocket
- Using OPC with the Measurement Studio Network Variable Class Library
- Key Measurement Studio Network Variable .NET Library Features
- Using the Measurement Studio Network Variable Data Source in Web Forms.


Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 4
(7,262 Views)

Thank you for your assistance Johnathan,

This certainly does clear the water a bit for me.

One question thou,

To use the Network Variable approach, do I need to install the NI DSC Run-Time system? I don't believe we have purchased a copy of this.

 

 

0 Kudos
Message 3 of 4
(7,246 Views)
Hi Snord,

If you are going to use the NetworkVariable with an OPC server, you will need the LabVIEW DSC Run-Time System. Steps for this are documentated in the Using OPC with the Measurement Studio Network Variable Class Library help topic.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 4
(7,241 Views)