Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

ANSI C example : "DAQmx Error: No device by the given name was found."

Solved!
Go to solution

Hi everybody,

 

I'm trying to build and run a DAQmx ANSI C example, which is "/Analog Out/Generate Voltage/Cont Gen Volt Wfm-Ext Clk" (Windows 7 Pro, NI-DAQmx 17.1.0, NI-MAX 17.0.0).

 

I modify it to correspond to my PXIe-6361 virtual card and to build and run it without Visual Studio but just with gcc on Cygwin.

Here is attached the modified code and a screenshot of my virtual card configurations on MAX.

 

It builds but when I run it, it says : "No device by the given name was found" without any error code.

Nano@Nano-PC ..Gen Volt Wfm-Ext Clk-old $make && ./ContGen-ExtClk.exe
gcc.exe -g   -c -o ContGen-ExtClk.o ContGen-ExtClk.c
gcc.exe -g -o ContGen-ExtClk ContGen-ExtClk.o -lnidaqmx
TEST1
DAQmx Error: No device by the given name was found.
Explanation:
No device by the given name was found.
End of program, press Enter key to quit

I think the problem occurred during this function "DAQmxWriteAnalogF64"; because my TEST2 is not printed.

 

I don't know what's the problem and I didn't find any solution on the internet for this error message.

Do you have any idea?

 

Thanks and have a nice day.

Download All
0 Kudos
Message 1 of 3
(3,687 Views)
Solution
Accepted by topic author morgane

Hello Morgane,

 

I believe you have forgotten to change the interface name at some places :

Capture.PNG

 

Thanks

Junior

Message 2 of 3
(3,639 Views)

Thank you, it was the problem. I didn't notice it. I change it to "/PXI1Slot4/PFI0" and now it build and run.

 

Do you have any idea how can I check if the voltage generation is actually working on a virtual card when I run the example program?

 

Thanks again!

Morgane

0 Kudos
Message 3 of 3
(3,622 Views)