Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

MIG software error 229771 in C#

Solved!
Go to solution

Hi

 

I am using an NI USB-6009 DAQ.

I am having trouble creating a task using C# I keep getting an MIG software error 229771 when I try to instantiate it with "Task myTask1 = new Task();" or "Task myTask1 = DaqSystem.Local.LoadTask("D00");" but not when I create a reference "Task myTask1;".

I don't get any errors when I run the sample projects or when I use Measurement and Automation Explorer.

 

I have added the following references to my project both have a runtime version v2.0.50727:

  1. "C:\Program Files\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\Current\NationalInstruments.DAQmx.dll" Version 9.2.35.32
  2. "C:\Program Files\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies\Current\NationalInstruments.Common.dll" Version 8.9.35.302

these references appear to be the same as the ones used in the sample projects as far as I can tell.

As in the sample projects I have added the NationalInstruments.DAQmx to the using statements.

 

I have updated my software to the "NIDAQ921f0" version.

I am using the Visual Studio Professional 2010 and I am targeting the .NET 3.5 framework.

I am using Windows7 Professional 32Bit with Admit rights.

I don't have LabView or Measurement Studio.

 

I have read the posts for the error message and taken the following actions:

  1. I have repaired/reinstalled the software.
  2. I have confirmed that the services mentioned in the posts are running.

My .NET framework helpfiles located through the start menu are missing and I have not used C# for controlling the DAQ before so I might be missing something basic.

 

Any suggestions would be appreciated.

Thanks.

0 Kudos
Message 1 of 4
(3,925 Views)
Solution
Accepted by George101

Hi George,

 

Thanks for detailing the steps you've already taken, when you say the examples work fine do they call the DAQmx start task in the same way as you're attempting to from your project? Additionally you mention you're not using Measurement Studio yet your references in the project come from a MeasurementStudio path?

 

The only other reason for such an error occurring that I could find was regarding security issues, do you run McAfee or NOD32 anti virus software, could you try the program with this disabled to see if some third party hardware is causing conflicts with the task start method?

 

Kind Regards,

Applications Engineer
0 Kudos
Message 2 of 4
(3,890 Views)

Hi

 

I tried to create a task the way the examples did after mine didn't work but it didn't make a difference.

I am using the DAQmx .NET library's they seem to be installed in a folder for measurement studio.

 

I found the problem.

My project was located in my workspace on the server and this seems to have caused it to throw errors when creating a Task.

When I tried running the samples from my workspace they threw errors to.

When I moved my project to my C drive it started to work correctly.

 

Maybe I didn't have high enough permissions on the server?

I have a Default user account on the server and can't get my permissions upgraded.

I don't know what antivirus is on the server but my computer uses something called eTrust which I didn't need to turn off.

 

Im so used to building and running my projects from my server workspace that I forgot about it.

I don't need to run the program from the server so I guess my problems fixed?

 

Thanks for the help

0 Kudos
Message 3 of 4
(3,880 Views)

Hi George,

 

Sounds like a permissions error in that case for the references from the program, I'm glad moving it to c$ solved the problem thanks for letting me know.

 

All the best with your application,

 

Kind Regards,

Applications Engineer
0 Kudos
Message 4 of 4
(3,878 Views)