Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Get_DAQ_Device_Info run-time error

I am using Get_DAQ_Device_info() in a cvi application. I created a stand-alone executable using cvi 7.0. And when I ran the application, I am getting a run-time error which says "runtime error R6025 - pure virtual function call " . If i remove the function call Get_DAQ_Device_Info() from the program, I don't get the run-time error. Can anyone pls help me on this issue...
0 Kudos
Message 1 of 6
(4,307 Views)
Hi!

What are the parameters you are passing in the function (Get_DAQ_Device_Info (deviceNumber, infoType, infoValue) ) ? Please make sure that the deviceNumber matches what is assigned in Measurement and Automation Explorer. Other people have exhibited your same problem - Please check out this forum.

Also, since this function call is for traditional DAQ, what hardware are you using? Are you using the exe with TestStand?
David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 6
(4,287 Views)

Hi. I am actually running this in a loop to find out if any DAQ instrument is there in my PXI chassis.

I am opening a visa session to all instruments and getting their PXI base address. I then compare the both the addresses to find out if it is a DAQ instrument.

for(Index = 1;Index < 18; Index++) // Index limit is 18 necause we are using a 18 slot PXI chassis 

{

       Get_DAQ_Device_Info (Index , ND_BASE_ADDRESS, &pxi_base_add);

       if(visa_pxi_add == pxi_base_add)

          bDaqInstrFound = true;

}

Hope this information is helpful

 

 

0 Kudos
Message 3 of 6
(4,283 Views)
That information is very helpful, thanks! Do you get any errors if you do not use the 'FOR' statement, and simply try to get the information for one known device? Can you get information for all devices independently and it is only when the 'FOR' statement is used that you get errors? When using the 'FOR' statement, is your chassis fully loaded? I have not personally tried this function, but am curious as to if you get an error when trying to get information for an invalid device / no device is in a slot.

Do you have CVI run-time engine 7.0 or above? This is necessary because you are using CVI 7.0. Also, the linked KB above mentions that removing previous RTE's may fix the problem.
David L.
Systems Engineering
National Instruments
0 Kudos
Message 4 of 6
(4,252 Views)
I am getting the error even without the for loop. Any other alternatives i can take to avoid this error???
0 Kudos
Message 5 of 6
(4,243 Views)
Hi,

Very interesting to see that the code still gives errors, even without the 'FOR' loop, but runs perfectly without the 'Get_DAQ_Device_Info' statement all together.

What hardware are you using, and what is it named under Traditional NI-DAQ (Legacy) Devices in Measurement and Automation (MAX) (Start » Programs » National Instruments ) ? I tested this with a PXI-5411, labeled "NI 5411 for PXI (Device 1)" in MAX, using the code below and did not receive any errors. One note is that the card is acutally in slot 6 of my PXI chassis, but since it is labeled 'Device 1' in MAX, I used  a '1' for Device Number in the function below.

int address;
Get_DAQ_Device_Info (1 , ND_BASE_ADDRESS, &address);

Lastly, what versions of the LabVIEW run-time engine are on your computer? You can find these in MAX, under the software folder. Does the linked forum above apply?

If you are still having problems, I would like to ask that you create a very simple snipet of code that reproduces the problem for you and post it here. I will take a look and see if I can reproduce the problem. Please include all files necessary for the code to run.

Message Edited by David L. on 02-15-2007 01:43 PM

David L.
Systems Engineering
National Instruments
0 Kudos
Message 6 of 6
(4,219 Views)