Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

niswitch_32.dll

I'm writing a Labview code using NISWITCH 3.8 drivers. When I try to open any vi from niSwitch.LLB I get an error message "Error loading niswitch_32.dll. A DLL initialization routine failed".

I've tried to repair the drivers, even uninstalled them and deleted niswitch_32.dll from the location it was residing (C:\Program Files\IVI Foundation\IVI\Bin), installed the NISWITCH 3.8 drivers anew, but that did not help.

 

Please, suggest what else could be done to solev the problem.

 

Regrads,

E Stoykova

0 Kudos
Message 1 of 12
(8,638 Views)

Hi E Stoykova,

 

To better assist you in discovering why niswitch_32.dll is failing to initialize, can you run Dependency Walker and save the file?  I've attached an example .dwi file.  Create a zip file to attach the .dwi file to a forum post.

 

1.  Download Dependency Walker from: http://dependencywalker.com/
2.  Run Depends.exe and select File->Open...

3.  Browse to C:\Program Files\IVI\Bin\niswitch_32.dll

4.  Save niswitch_32.dwi, zip, and post niswitch_32.zip

 

Thanks!

 

Chad Erickson

Switch Product Support Engineer

NI - USA

0 Kudos
Message 2 of 12
(8,629 Views)

Hi Chad, 

 

Here is the zipped dwi file.

 

Thanks,

 

E stoykova

0 Kudos
Message 3 of 12
(8,626 Views)

Hi E stoykova,

 

From what I can see, your installation went okay.  Let's see if we can find out the reason why you're getting the error when loading the DLL.

 

Next Step

1. From Dependency Walker, select File -> Open... C:\Program Files\National Instruments\LabVIEW x.x\LabVIEW.exe.

2. Select Profile -> Start Profiling...

3. Click OK.  When LabVIEW finishes opening, click Blank VI.

4. In LabVIEW, select an NI-Switch VI and drop it on the block diagram.  I'm expecting you'll get "Error loading niswitch_32.dll. A DLL initialization routine failed". 

5. In Dependency Walker, select Profile -> Stop Profiling

6. Save LabVIEW.dwi, zip, and post LabVIEW.zip

 

Thanks!

 

Chad Erickson

Switch Product Support Engineer

NI - USA

0 Kudos
Message 4 of 12
(8,623 Views)

Hi Chad,

 

Here is the LabVIEW.zip file.

 

Thanks,

 

Eli Stoykova

0 Kudos
Message 5 of 12
(8,620 Views)

Hi Eli,

 

Thank you for your continued assistance troubleshooting this issue.

 

It is possible that this issue is not niswitch_32.dll-specific.  Other Modular Instrument drivers could also be affected.  It will be easier to find the cause of the problem if we can determine the issue is niswitch_32.dll-specific.  To verify this, can you see if you get an error when dropping a VI from one of the following MI driver versions (listed below) on the LabVIEW block diagram?

 

NI-DCPower 1.3 (http://joule.ni.com/nidu/cds/view/p/id/1206/lang/en)

NI-DMM 2.9 (http://joule.ni.com/nidu/cds/view/p/id/1094/lang/en)

NI-SCOPE 3.5 (http://joule.ni.com/nidu/cds/view/p/id/1096/lang/en)

 

If you do not have these versions installed, you can install them from the links above.

 

For reference, can you note what driver versions you have installed now?  You can simply create and attach a MAX report (File->Create Report...).

 

Thanks again and best regards!

 

Chad Erickson

Switch Product Support Engineer

NI - USA

Message Edited by Chad PSE on 02-16-2009 04:51 PM
0 Kudos
Message 6 of 12
(8,614 Views)

Hi Chad,

 

Please, find the attached files - LabVIEW DMM. zip and max_report.html.

 

The application I'm working with uses both niswitch 3.8 and nidmm 2.9 drivers. I do not have any problems with the DMM drivers, only with the Switch drivers and only recently (I was working with them for about 2 months without any problems).

 

Please, let me know if I can give you any additional information that will help.

 

Thanks,

 

Eli

Download All
0 Kudos
Message 7 of 12
(8,610 Views)

Hi Eli,

 

It's interesting you were working with the drivers for 2 months with no issues.  Has anything changed on your system recently? 

 

I want to provide you a special version of the niswitch_32.dll that we can use for troubleshooting purposes.  Would you be willing to use this and send us a resultant log file?

 

Thanks!

 

Chad Erickson

Switch Product Support Engineer

NI - USA

0 Kudos
Message 8 of 12
(8,579 Views)

Hi Chad,

 

Yes, two things happened on the day that this problem occured. First, there was some remote patching and reboot done by the IT department on the computer that I'm working with. I'm not aware what exactly have changed, but this is a procedure which happens fairly often and never had caused any problems up to now. Second, immediately after the patching I tried to open an older version of the application I'm working on  - this older version was written on LabVIEW 7 and uses older versions of both DMM and SWITCH drivers. At that point I got the error message "Error loading niswitch_32.dll. A DLL initialization routine failed" for the first time. Then I started to get the same message even when I tried to use the most recent version of my application.

 

 Sure, please send me this specilal version of the niswitch_32.dll that we can use for troubleshooting. I'm willing to give it a try since I do not know what else could be done (besides uninstall/install LabVIEW again).

 

Oh, and one more thing, the file  niswitch_32.dll resides on my computer on C:\Program Files\IVI Foundation\IVI\Bin, not on C:\Program Files\\IVI\Bin.

 

Thanks,

Eli

0 Kudos
Message 9 of 12
(8,574 Views)

Eli,

 

have you established where the problem is: is it niSwitch_32.dll that cannot be loaded, or is it LabVIEW that can't load it for some reason?

Can you run any other application that uses niSwitch? What happens if you run the  NI SWITCH soft front panel? (Granted, it is developed in LabVIEW but it may shed some light on the problem if it works/does not work.) What happens when you try to self-test or reset the switch device from MAX? All these exercise the driver at different levels, and may help in troubleshooting.

 

Also, the location of your DLL  (IviFoundation or no IviFoundation) only depends on the IVI version first used on that system, and is irrelevant. You should be fine with the one you have, as long as you do not change it.

 

best regards,

0 Kudos
Message 10 of 12
(8,566 Views)