Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB-USB-HS : function ibWait suddenly gives a EARG(4) Error after installation of only .Net Framework 4.5 on a windows 7 PC.

Solved!
Go to solution

I have (several)  .Net application using the NationalInstruments.NI4882.dll which works fine with

-  GPIB-USB-HS

-  Driver version 3.02

-  Windows 7

-  .Net Framework 4.0

 

However, If I only install  .Net Framework 4.5 (and nothing else has changed), the compiled program which previously worked fine, suddenly does not work anymore.

In the NI IO Trace it can be seen that only function IbWait does not work properly. It gives an EARG(4) error..

It seems to do an improper call   "ibwait (GPIB0, 0x91300000)"  instead of the normal "ibwait (GPIB0, 0x00000000)".

 

I have tried the latest driver version 3.1.2 also.. but it gives the same error.

 

Can any advise be given here ?

 

Greetings

Jos

 

0 Kudos
Message 1 of 6
(4,679 Views)

Hello Jos,

 

I want to make sure I get the whole situation right before making any assumptions.

 

You first install an application that contains:

-  GPIB-USB-HS

-  Driver version 3.02

-  Windows 7

-  .Net Framework 4.0

 

Then you only install .NET Framework 4.5 on top of it, without removing anything.

 

Is this correct?

Can you reproduce this behaviour on another pc?

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 6
(4,640 Views)

Hi Thierry,

 

That is a correct understanding. I did not simulate on another PC, but I can reproduce on my x64 bit windows PC.

 

I made my programs with VB Express 2010, and using .NET 4.0 as target framwork (eventhough 4.5 had been installed)

The error seems to be related to the function GetCurrentStatus within the class  NationalInstruments.NI4882.Board

(message = "Invalid argument to method")

 

I can reprodcude / eliminate the error when

-  After installing VS2013, and have the program compilled with "AnyCPU"   =>  Then I get the error in  "GetCurrentStatus"

-  After installing VS2013, and have the program compilled with "x64"           =>  Then I get the error in  "GetCurrentStatus"

-  After installing VS2013, and have the program compiled with "x86"            =>  Then all works fine

 

 

Does thi smakes sense to you ?

 

Gr

 

Jos

 

 

 

 

0 Kudos
Message 3 of 6
(4,575 Views)
Solution
Accepted by topic author JosNL

Hello Jos,

 

My apologies for the late reply.

I was out of office last week.

 

Can you try the steps explained in the following KB?

http://digital.ni.com/public.nsf/allkb/CD8163BBD26BAAF386257ADB007A16D8?OpenDocument

 

Please let me know what the result is.

 

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 4 of 6
(4,523 Views)

This indeed solves the issue with board.wait calls within .Net Framwork 4.5 on 64 Machines

 

Much appriciated

 

Regards

 

Jos

0 Kudos
Message 5 of 6
(4,486 Views)

Hello Jos,

 

If any other questions/issues would appear in the future, then don't hesitate to let us know.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 6
(4,467 Views)