Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Crash in mxsout.dll after powering up cDAQ

Yes, it is idling. Like I mentioned, my code is doing nothing as soon as it started and did not detect the DAQ presence, User can perform certain UI-related tasks, but there is no communications to hardware. The program crashes though as soon as the cDAQ is powered up. I realize the idea behind the "best practice" statement, but having the external devices available you cannot force end users to have devices powered up (or at all connected) in advance.
So far the problem looks like a bug somewhere in the NI libraries, What I would like to know is:

1. What is that the NI software is doing upon powering the cDAQ up, which can cause the crash inside the mxsout.dll?

2. How (if at all) would it be possible to force the mxs.dll & Co unloading when I do not need them so that they will be reloaded again when necessary?

Thank you,

Mike

 

0 Kudos
Message 11 of 15
(1,920 Views)

Hi Mike,

 

Have you tried using the FreeLibrary function to unload these specific DLLs?

There is also something that I don’t completely understand from your description, are you powering up the device programmatically from your code? If so, what kind of command and mechanism are you using?

 

Regards

AGJ

0 Kudos
Message 12 of 15
(1,901 Views)

Hi AGJ,

thanks for your interest.

First of all, even though I load the NI driver dynamically, I do not explicitly load mxs*.dll's family - it is loaded automatically, Therefore I never tried to free those. I considered that option, but still did not have a chance to do it.

The next answer would be "both ways". I have a "Power" button on my hardware, as well as I have another (always powered up) device, which has a DO line that - when commanded - switches on the power for the rest of the system.

Best,

Mike

0 Kudos
Message 13 of 15
(1,897 Views)

Hi Mike,

 

As AGJ mentioned I think it should be useful to try unloading the DLL using the FreeLibrary function at the end of your code, the following liks may be helpful for you to make reference to that function.

 

http://www.ni.com/white-paper/3517/en/  (Section 4 )

 

http://www.ni.com/white-paper/5719/en/  (Section 2)

 

I hope it may help you with the issue

 

Regards,

Regards,

Sil.VI
0 Kudos
Message 14 of 15
(1,878 Views)

Hi (Ms? Mr?) S. Jimenez,

 

thanks for your insight. In fact I tried unloading those libraries (since I didn't have much time I unloaded all 3: mxs.dll, mxsutils.dll, and mxsout.dll) - just to have the whole appplication crashed miserably as soon as I did that...

Thanks for the links: I will try to figure if I can use some of those ideas.

Best regards,

 

Mike

0 Kudos
Message 15 of 15
(1,874 Views)