Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Access violation when calling CWDAQTools::SetDAQDeviceInfo

The call I'm making is SetDAQDeviceInfo( 12, cwSetGPCTR0TransferMode, cwSetValueInterrupts )

Where Device 12 is defined in MAX as a PXI-6602.
0 Kudos
Message 1 of 6
(3,963 Views)
Hello,

I do not see anything wrong with the SetDAQDeviceInfo command you are issuing. Could you please provide further detail about the error you are receiving? Any error codes, memory addresses of the error, screen shots, etc. would be helpful to troubleshoot this further.

Regards
Justin Britten
0 Kudos
Message 2 of 6
(3,963 Views)
Here's what I'm seeing in the debugger. The first shot is a before pic, the next shot is after a single debugger step. As you can see, the result is 0 so there's no error message.
0 Kudos
Message 3 of 6
(3,963 Views)
I see now that you are receiving a "First Chance Exception" error from NI-DAQ.

This is a rare error that occurs on some systems, and deals with NI-DAQs memory space. When NI-DAQ loads, it attempts to occupy a specific location in memory. On some systems, Visual C++ and/or Visual Basic will take that memory space (usually due to third-party plug-ins), such that if either environment is open, NI-DAQ cannot initialize properly when called from within the same process. This is why the standalone executable that is run without the Visual C++ or Visual Basic IDEs open will not generate an error.

This error has been fixed in our latest NI-DAQ 7.0 driver. I recommend that you upgrade to our latest driver version to resolve this error.

Rega
rds,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,963 Views)
I'm already running Nidaq32.dll v. 7.0.1f4
0 Kudos
Message 5 of 6
(3,963 Views)
This appears to be a rare occurrence and I would like to discuss it further with you via our technical support channels. Could you please send an email to support@ni.com and resubmit your question. Please include my name in your email and I will continue to work with you to resolve this issue.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,963 Views)