LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

niFgen_init returns -1074134994 error

I am using Labwindows/CVI 8.1

 

We have an application that runs many tests on our assembly floor. One of our workstations that has been running with no problems for years, is now failing because it cannot initialize the internal waveform generator.

 

char resourceName_541x[50] = {"DAQ::1"};

ViSession arb_handle;
ViInt32 deviceCount;

 

  vistatus = niModInst_OpenInstalledDevicesSession (resourceName_541x, &arb_handle, &deviceCount);
  CheckError( vistatus, "niFgen_init()" ); 

 

vistatus is returning -1074134994 which I cannot find the definition anywhere, but after looking at some posts on the forum it looks like it is a "Initialization failed in driver DLL"

 

I go into Measurements and Automation Explorer and the NI PCI-5412 "1" is present under NI-DAQmx Devices. I run a self test on it and it passes. I bring up the test panel and it works fine.

 

I went as far as removing the NI software and reinstalling 8.1 but the error still happens.

 

Where do I go from here?

 

Thanks!

John W.

 

0 Kudos
Message 1 of 6
(3,381 Views)

Correction on the Function call.

 

vistatus = niFgen_init( resourceName_541x, VI_TRUE, VI_TRUE, &arb_handle );

 

Is returning the error -1074134994

 

Thanks

John W.

 

0 Kudos
Message 2 of 6
(3,368 Views)

Hi John,

 

Are you using any IVI drivers or NI Switch Executive?

 

This is what I am finding about this error:

 

If you are using NI-Switch Executive:

 

http://digital.ni.com/public.nsf/allkb/B376828599B6BCC9862575AD00571D3A

 

If you are using an IVI Instrument-specific Driver:

 

This error occurs when VISA cannot find the path to the driver modules, which are located in the C:\VXIPNP\WinXX\Bin\ directory. You should check your autoexec.bat file (in your C:\ directory) and make sure that the PATH variable is set to search in the VXIPNP directory. The file should contain the two lines that look similar to this: SET PATH=%PATH%;C:\VXIPNP\WIN95\BIN SET VXIPNPPATH=C:\VXIPNP The actual path may vary on your system, depending on the version of Windows you have.

 

Regards,

Kaitlin N.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 6
(3,357 Views)

Hi Kaitlin,

 

Thanks for the response.

 

I went to the AUTOEXEC.BAT file in the C:\directory and it is empty (0 bytes). This is the same on all our working workstations (All Windows XP).

Is there another file I should be looking for to ensure the path to the VXIPNP directory is valid?

 

Thanks!

John W.

 

0 Kudos
Message 4 of 6
(3,353 Views)

Hi John,

 

Can you tell me if anything else has changed since the program was working. Has the code changed at all? Can you post the full code so that I can take a look at it? 

 

Also, see this other forum post on the same issue:

 

http://forums.ni.com/ni/board/crawl_message?board.id=270&message.id=4766

 

They say to use the niModInst_OpenInstalledDevicesSession before the niFgen_init function. I would also like to double-check that you have declared vistatus as the ViStatus type. 

 

Can you also please send a screenshot of your Measurement and Automation Explorer showing the name of the device. 

 

Thanks,

 

 

Kaitlin N.
National Instruments
Applications Engineer
0 Kudos
Message 5 of 6
(3,343 Views)

Hi Kaitlin,

 

Thanks for the response.

 

To my knowledge nothing has changed since the program was working on the workstation. Only myself and another Engineer does any work on the software or the workstation and neither of us did anything. the Application was working fine for a long time and then on Monday it just would not initialize the Waveform generator board. I can't post the code, it's a huge project. I can post bits and pieces.

 

I did try to use the niModInst_OpenInstalledDevicesSession before the niFgen_init function and it still failed. 

 

The vistatus is declared as the VIStatus type.

 

Attached is a screen shot of the Measurements & Automation Explorer with the Waveform Generator selected.

 

One strange thing happened. The other engineer swapped the waveform generator board causing the problem with a known good board. It still failed. When he put the good board back in the original workstation, now that workstation no long will initialize the wavefrom generator. Now we have 2 workstations down. I might try to load Labwindows and the wavefrom board on a new computer and see what happens. Not sure what else to do.

 

Thanks!
John W.

 

0 Kudos
Message 6 of 6
(3,337 Views)