Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxBaseReadAnalogF64 hangs forever without a trigger

I specified 60.1 (double).  A timeout of 10.1 will exit fine, but 60.1 hangs forever.

 

Attached is a modified version of the example code provided in the NI distribtution.

 

Invoked with no arguments, it will specify a timeout of 10.1 seconds and will timeout.  Called with an argument (any will do), it will specify a timeout of 60.1 seconds ... and will never timeout.

 

$ ./a.out                                                      
timeout is 10.100000
DAQmxBase Error: <err>Some or all of the samples requested have not yet been acquired.

To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate.
$ ./a.out fail
timeout is 60.100000

.

.

.

 

 

0 Kudos
Message 11 of 17
(1,277 Views)

Is the DAQmxBaseReadAnalogF64 function returning any error?

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 12 of 17
(1,252 Views)

It never returns; as the subject says it "hangs forever without a trigger".  The demo program only ends if I kill it (e.g., control C from the command line).

Quote

Have you been able to successfully run it?

 

Jeff

 

0 Kudos
Message 13 of 17
(1,248 Views)

Hi Jeff,

 

I did try to replicate this issue using DAQmx Base on a Windows XP machine that I had at hand, but I was not able to observe this problem. I did get a timeout message without a trigger. Can you please tell me which version of DAQmx Base are you using? I need to sort out wether this problem is specifc to a version of DAQmx Base or specific to an operating system.

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 14 of 17
(1,192 Views)

You need to try it on linux -- as NI has repeatedly told us, the Linux version is completely different from the windows version.

 

Use a 2.6 kernel and DAQmxbase 3.1.

 

Jeff

0 Kudos
Message 15 of 17
(1,186 Views)

Hi Jeff,

 

I tried to reproduce this issue using RedHat 5 Enterprise kernel 2.6 and DAQmxBase 3.1. I varied the timeout between 10 and 60 seconds. Unfortunately, I was not able to reproduce this issue. I consistently got a timeout for all the different scenarios. After speaking with R&D, we concluded that there might be an inconsistency with the Linux distribution that you are using. Is there anyway that we can try to reproduce this issue using a different Linux distribution?

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.
0 Kudos
Message 16 of 17
(1,067 Views)

I'm confused-- there are only two possibilities with the test program I included: a timeout of 10.1 seconds and a timeout of 60.1 seconds.  Did you use the test program I included in the previous post or something else?   Please try that program and confirm the behavior or include the source for your test program so that we can be sure we're testing the same thing.

 

Thanks,

Jeff

0 Kudos
Message 17 of 17
(1,061 Views)