Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

After RegisterEveryNSamplesEvent the Windows Explorer did not start

If I start a simple test program which generates an aquisition task and using the "RegisterEveryNSamplesEvent" function, the shortcut of the Windows Explorer in the task bar did not work. The task bar freezes until the test program is closed. After closing the test program the Explorer pops up.

 

To test this, the NI standard sample can be used:

C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Events\Every N Samples\Cont Acq-Int Clk-Every N Samples Event 

 

This happens on different computers, also on computers without VS2008 programming environment. All these computers are running under Windows XP SP3 with Core 2 Duo CPU and with NIDAQmx 8.9 (it happens also with NIDAQmx 8.8)

 

My system:

- test program compiled with VS2008 SP1

- Windows XP SP3

- Intel Core 2 Duo CPU

- NIDAQmx driver 8.8

 

Do anyone have the same strange behaviour?

Have anybody an idea and solution?

 

Thanks

0 Kudos
Message 1 of 3
(2,784 Views)

Hello Gz-stefan,

 

if you look into the code you see in line 112 the following

if( read>0 ) {
  printf("Acquired %d samples. Total %d\r",read,totalRead+=read);
  fflush(stdout);
}

The printf function will be performed as fast as your PC can do it, so all other Windows

will be blocked. Have you the same effect if you exclude the printf line?

 

best regards Alex

 

best regards
Alexander
0 Kudos
Message 2 of 3
(2,766 Views)

Hello Alexander,

thanks for replying.

 

That happens already before starting the measurement. It happens after the the Task is created in line 71.

So to comment the lines 113+114 out didn't have any effect.

 

0 Kudos
Message 3 of 3
(2,760 Views)