Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Software error occurred in MIG software.

I have 2 PCI-6225 installed in one PC using NI-DAQmx drivers v. 8.5.0f5.  I get the error:
"Software error occurred in MIG software.  Status Code: -229665."

This error only occurs when I place my application in the Windows Startup folder (Start->Programs->Startup) and the application automatically runs at startup.  If I stop the application, then restart it manually, it runs fine.  I have tried reinstalling the DAQmx drivers and the Measurement Studio for VS2005, but this did not fix the problem.  It is critical that I be able to automatically run this application when the system starts up.  Any help would be greatly appreciated.
0 Kudos
Message 1 of 23
(6,903 Views)

If you can send me the code/your project files I will have someone on my team (MIG) look into this.  Do you have full DAQmx installed or are you using a runtime?  Can you send us the debug version with pdb's (or your entire project would be much better)?  Are you using XP or Vista?  The way I am reading this the error only occurs on startup after a reboot correct?  Finally, (at least for now) what are the specs of your computer? 

 

StuartG

0 Kudos
Message 2 of 23
(6,891 Views)
I am using the full DAQmx driver, Windows XP Pro on a Dell Precison 390.
The problem only occurs when the PC is booted.  I placed my application in the Startup folder so that it runs automatically whenever the pc is rebooted.  This application will be running unattended for 5-10 years and must restart if power is lost.  I created 2 tasks in MAX which are loaded by my application.

I've found a work around for this problem by putting my application to sleep for 1 minute before loading the MAX tasks.  Since this seems to work, could it be that my application is trying to load the Tasks before MAX is fully initialized?  Is it better to created new DAQmx tasks in software, rather than loading predefined MAX tasks?  (The reason I used predefined MAX tasks is that it seemed easier to change the scaling on 160 channels using MAX).
0 Kudos
Message 3 of 23
(6,880 Views)
Based on your description I think your intuition is correct and you are trying to load your tasks before they are initialized.  I would NOT suggest changing your app around in order to workaround our issue.  Instead, if you are willing to upgrade we actually addressed this issue.  If you call one of the system or device properties first thing in your application we block on those waiting for the devices, channels, etc to be initialized.  We fixed this in 8.7.  Also, big disclaimer I only know this works in LabVIEW and haven't tried it in C.  However, the place in the code where we did fix it is not LabVIEW dependent so it should work unless I missed a special hook we have into LabVIEW.  If you are unwilling to upgrade then if you call device reset it should also block in the version of DAQ you are using.  Let me know if you have questions.  If you do upgrade and the suggestions still don't work (i.e. you still get the error) please let me know so we can investigate this.
 
Thanks
StuartG
0 Kudos
Message 4 of 23
(6,852 Views)
Hello,

I had the same problem with my USB 6525 and an application written in c# (VS 2005).

it was solved after installing the 8.7 DAQmx.

Karsten

0 Kudos
Message 5 of 23
(6,714 Views)

PhonoX

Can you let me know if you used one of the property nodes I mentioned to accomplish this or did simply upgrading to 8.7 solve the problem? 

Thx

StuartG

0 Kudos
Message 6 of 23
(6,690 Views)
Sorry...
 
I think I have to correct my post...
 
I installed the new DAQmx version yesterday and everything was fine.  
 
A few moments ago I changed my code at a location (I added texts on a windows form) which has nothing to do with the task-routine. After building a new version an Installing it on the PC, the Problem occured again. It also happens only in the Startup. If I start my program manually or with a delay of some seconds (the good old vbs-script :-)) - it works.
 
I'm using a normal PC, WinXP and the NI USB 6525.
 
The program is written in c#. When my Mainform is loaded, a backgroundworker is initialized to read the digital inputs frequently.
these are some lines of the used code (the error occurs between Log(creating task) and Log (starting...) )
 

// start read NI (in load_Form)

this.backgroundWorkerNIInput.RunWorkerAsync();

...

// Backgroundworker for NI Input

private void backgroundWorkerNIInput_DoWork(object sender, DoWorkEventArgs e)

{

// enable Bgw events

this.backgroundWorkerNIInput.WorkerReportsProgress = true;

try

{

Log(
"creating Task ... NI");

using (digitalReadTask = new Task()) 

{

Log(

"starting ... NI");

digitalReadTask.DIChannels.CreateChannel(m_NIReadDevice,

"",ChannelLineGrouping.OneChannelForAllLines);

bool[] dataArray = new bool[4];

DigitalSingleChannelReader reader = new DigitalSingleChannelReader(digitalReadTask.Stream);

....

0 Kudos
Message 7 of 23
(6,681 Views)

Can you try utilizing one of the DAQmx system properties in your code before you create the task?  Just do something like querying the devices in your system.  In theory this should block until all appropriate resources have been loaded properly upon startup.

 

StuartG

0 Kudos
Message 8 of 23
(6,661 Views)
Thanks for the tip, Stuart.  Querying the devices in the system solves this problem for me, too.  Regrettably DAQmx 8.7.1 doesn't solve this issue.
I use: DAQmx 8.7.1, LV 8.5, Vista Business (64 bit)
My NI hardware: one PCI-6514 and one PCIe-8231
Regards, Guenter
0 Kudos
Message 9 of 23
(6,585 Views)
As it points out now, Stuart's tip doesn't always work - but most of the time.
I just want to confirm that the problem still exists.
Regards, Guenter
0 Kudos
Message 10 of 23
(6,459 Views)