Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

-10240 Error when using Traditional NI-DAQ

I am using LabWindows 7.1 in conjunction with NI-DAQmx 7.1.0 (including Traditional NI-DAQ).  I am trying to get an analog output of 0V or 5V on my PCI-6025E card.  To achieve this I'm using AO_VWrite but am consistently getting a NON-FATAL RUN-TIME ERROR:

NON-FATAL RUN-TIME ERROR
    "AO Test.c", line 41, col 30, thread id 0x000001B0

    Function AO_VWrite: (return value == -10240 [0xffffd800])
    noDriverError: The driver interface could not locate or open the driver...


It is quite strange, though because when I first run my program (in debug) it will run fine.  Upon exit, I will be notified of a FATAL RUN-TIME ERROR:

FATAL RUN-TIME ERROR
    Unknown source position, thread id 0x00000FB4
    The program has caused an 'Unknown' fault at 001B:7C90EB74


If I then stop the program and attempt to run it will break and give me the -10240 error on the AO-VWrite command.  If I stop and break on error again then the 3rd time I run the program it will run no problem but again fail on exit.

All other issues that I have found on ni.com are for LabView and more specifically for release executables.  I have managed to repeat this on more than one machine and would like to know if anyone else has had this and if so, what did you do?  I have tried installing multiple NII-DAQ versions and am currently running Traditional NI-DAQ 7.4.1.  It's also worth mentioning that I have created the most simple program possible with a one-button interface to isolate the problem to this one function.  Are there any more initialisations I should be doing?  When I try using Init_DA_Brds, I get the same problem...

Many thanks,

Chris
0 Kudos
Message 1 of 4
(3,754 Views)

Greetings Chris,

This could be a problem with your DAQ installation, although it is very strange that you only get these errors intermittently.  To ensure that you have CVI support installed for NI-DAQ, please follow these directions:

  1. In Windows, go to Control Panel » Add/Remove Programs
  2. Highlight National Instruments Software and select Change
  3. A new window will open listing all of the National Instruments software installed on your computer. Highlight NI-DAQ 7.x, Traditional and click on the Modify button on the right.
  4. The NI-DAQ installer will launch (you will need the CD or a path to the installer). When the installer finishes loading, expand the Traditional NI-DAQ section and select to have CVI Support installed for Traditional NI-DAQ.
  5. Once this is done click Next and finish with the installation modification.
  6. After this completes, you should now be able to run your application without getting error -10240.

Please let me know if that fixes the errors, or if you are still having issues. 

Regards,

Nicholas B, National Instruments

0 Kudos
Message 2 of 4
(3,728 Views)

Thanks very much Nicholas,

I checked my NI-DAQ installation as you suggested but the Labwindows/CVI support registers as being installed locally, already.  The reason I am stumped at this point is that I am able to open all function panels and the program compiles without any problem, suggesting everything is installed ok.  If I reboot the machine and then run my program it will run fine until I exit and then I get the fatal error.  It would appear that this fatal error then causes the non-fatal errors. 

At this point I'm going to try uninstalling all NI software and re-installing from scratch, making sure I have all of the latest drivers.  Any other suggestions would be more than welcome.

Many thanks,

Chris

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

Hi Chris,

Hopefully you will find that an upgrade of the Traditional DAQ driver (make sure to install support for LabWindows/CVI) will solve the problem.  In case it doesn't, here are a couple of additional troubleshooting suggestions.

1)Run an analog output example (C:\Program Files\National Instruments\CVIxx\samples\daq\Ao).  Do you get the same error?  If not, compare differences between your code and the example.

2)Run test panels multiple times. Does this work?

3)This error is generally caused by a problem accessing the function in the dll.  Do you have administrative privileges?

What is your reasoning for working with the Traditional DAQ driver.  Is there anything preventing you from moving to DAQmx?

Regards,

Jennifer O.

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