FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket SelectURL method fails with Measurement Studio and vista

The application uses the datasocket .SelectURL method to browse compact fieldpoint OPC items but the following error is raised:

 

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at NationalInstruments.Net.Internal.Win32.IAxDataSocket.SelectURL(Object startUrl, Object title, Object options, Object filters)
   at NationalInstruments.Net.DataSocket.SelectUrl(String startUrl, String title, SelectOptions options, String filter)
   at NationalInstruments.Net.DataSocket.SelectUrl()
   at DrillSense.Sensors.Sensor.SelectURL() in C:\DrillSense VS2005\DrillSense\cls_Sensor.vb:line 309

 

This method works with Windows XP Pro however.

 

The Development Environment includes:

 

MS Visual Studio 2008 with SP1

Measurement Studio 8.5.0 for VS 2008

Windows Vista Business

 

Is there a workaround to browse OPC items?

 

Thanks,

 

Barrett

0 Kudos
Message 1 of 12
(8,453 Views)

Hi Barrett,

 

I would like to verify that the PC with Vista installed can see the OPC item.  Do you have an alternative programming language which you can use to verify communication?  If not, you may try Measurement & Automation Explorer (MAX).  If you do not see the fieldpoint in MAX, I would try the suggestions outlined in this KnowledgeBase article.

How to Network FieldPoint to a Host Computer with Ethernet

It would also be helpful if you could provide a bit more information about your setup.  I'm particularly interested in what .NET language you are using within Visual Studio (C#, VB.NET, C++, etc.).  I may have to try and reproduce the behavior on my end, so if you could provide as much detail as possible it would be helpful.  Thanks Barrett! 

Rod T.
0 Kudos
Message 2 of 12
(8,431 Views)

RT4CY,

 

I can  browse the items in MAX with no problem and my application can connect to the datasockets and reads acquired data normally when I manually enter the correct data item OPC URL, it is just datasocket.SelectURL that raises the error and fails to function.

 

I am using Visual Basic 2008 with Visual Studio 2008 SP1 and Measurement Studio v. 8.5

 

NationalInstruments.Common version is 8.5.35.149

and the runtime version is 8.5.35.149

 

I installed the exact same software configuration on an XP pro computer and the SelectURL function works fine.

 

Please elt me know if I can be of further assistance.

 

Thanks,

 

Barrett
0 Kudos
Message 3 of 12
(8,409 Views)
The runtime version is v2.0.50727
0 Kudos
Message 4 of 12
(8,407 Views)

Hi Barrett,

 

I took another look at your original post and noticed something strange.

at DrillSense.Sensors.Sensor.SelectURL() in C:\DrillSense VS2005\DrillSense\cls_Sensor.vb:line 309

Coud you verify that this line of code is correct, or if you need to access a VS2008 folder instead?  Although you did mention that the same code/software works on an XP machine.  Do you have multiple versions of Visual Studio installed?  If you have Visual Studio 2005, could you try this environment on the Vista machine?  Thanks Barrett!

Rod T.
0 Kudos
Message 5 of 12
(8,399 Views)

RT4CY,

 

The VS2005 is just the folder name but everything was converted to 2008 several months ago but I did not change this folder name.  Every macjine is now using Visual Studio 2008.

 

Thanks,

 

Barrett

0 Kudos
Message 6 of 12
(8,397 Views)

Hi Barrett,

 

Thanks for the response.  I will find a test machine with Vista and try this out myself.  It may very well be a Vista compatibility bug that needs to be reported to R&D.  I'll let you know what I find.

Rod T.
0 Kudos
Message 7 of 12
(8,372 Views)

Hi Barrett,

 

We've tested this and confirmed it is a bug.  I apologize for this limitation, a Corrective Action Request (CAR) has been filed to R&D.  If you would like to track the CAR, the ID number is 135956 (check release notes of subsequent releases of Measurement Studio).  For now, the workaround is to manually pass the URL of the OPC item.  Again, I apologize for this bug and hopefully we get this corrected soon!

Rod T.
0 Kudos
Message 8 of 12
(8,341 Views)

Hello.  I just wanted to follow up on this OPC URL bug in Measurement Studio and Vista.  I just received an updated Measurement Studio 8.6.1 and the Select URL still causes an error accessing protected memory.  I also confirmed that the same error occurs in Windows 7 RC1.

0 Kudos
Message 9 of 12
(7,614 Views)

Hi Barrett,

 

I'm sorry that you are still receiving the error after upgrading Measurement Studio to 8.6.1.  In the readme there is a section for Bug Fixes in Measurement Studio 8.6, and I do not see the CAR ID.  It may be that R&D was not able to consistently reproduce the error.  I will look into this, and let you know what I find.  In the meantime, is it possible for you to try this on another computer? 

 

 

Regards,

 

Rod Taylor

Applications Engineering

National Instruments

Message Edited by RT4CY on 06-11-2009 04:35 PM
Rod T.
0 Kudos
Message 10 of 12
(7,603 Views)