01-18-2012 02:01 PM
I am trying to control a temperature chamber using C# application via National Instrument .NET assemblies. My obversations are:
1. Development Computer - Works PERFECTLY with Instrument.
2. Deployment Computer - (Installed NI488.2 + NIVISA drivers) - Throws an exception (see below) when executing my C# application
3. Deployment Computer - (Using NIMAX - Instrument works perfectly) - I also double checked the port settings.
Versions used in Development Computer - NI488.2 (8.9.35.104)
Versions used in Deployement Computer - NI-488.2 2.24 + NI-VISA 4.1 + NI-VISA Runtime 5.0.2
Help please!!
Error:
1/18/2012 2:17:22 PM: The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception.
1/18/2012 2:17:22 PM: NationalInstruments.NI4882
1/18/2012 2:17:22 PM: at NationalInstruments.NI4882.Internal.GpibDll.ibdev(Int32 boardID, Int32 pad, Int32 sad, Int32 tmo, Int32 eot, Int32 eos)
at NationalInstruments.NI4882.Internal.DeviceImpl..ctor(Int32 boardNumber, Byte primaryAddress, Byte secondaryAddress, TimeoutValue timeoutValue, Boolean setEndOnWrite, Boolean endOfStringCharacterUsedOnRead, Object sender)
at NationalInstruments.NI4882.Internal.DeviceImpl..ctor(Int32 boardNumber, Address address, Object sender)
at NationalInstruments.NI4882.Device..ctor(Int32 boardNumber, Address address)
at BaseBandTester.TempChamber.setup_GPIB(Byte primaryAddr, Byte secondayAddr, Int32 boardNum)
HELP PLEASE!!!
01-19-2012 05:48 PM
Hi there, it is clear that you are having troubles with your program. Have you check the examples that comes with the drivers? In case you skip the step during the installation check the picture attach. Simply select your target framework and after the installation click on start then go to the national instruments folder, look for the driver, under it should be a Text-based Code Support folder with examples that you can use as reference to debug your code. I Hope this helps
01-20-2012 12:15 PM
According to the picture , shall I just install NI-VISA or both NI-VISA + NI-488.2 drivers?
01-23-2012 01:15 PM
I would do both to have the reference for future applications, but the one need is the NI-488.2 since that's the driver that you are calling in your application.
03-16-2012 07:28 AM
Hi Alejandro
I'm having similar problems - could you re-post the image as I only see untitled.jpg and I get a 404 page error when I try the link.
I'm using runtime version v4.0.30319 of NI4882 in my code. Have also tried the SimpleReadWrite.2010 (same runtime version) and that fails on the target system with the "type initializer" error message. Both my code and the SimpleReadWrite example are targetted at .NET Framework 4.
Target system works ok with an old VB6 version of software (using the LangInt.dll I believe).
Thanks in advance for your help on this.
James T
03-16-2012 11:15 AM