Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

non free running sample clock Problem

I'm interfacing micro-controller with PCIe-6536 using DAQmx in C++. External clock and data is fed by micro-controller. Data is being acquired smoothly as long as clock is free running but whenever I switch off the controller and on it after some time (while application is being run), data is not acquired most of the time but sometimes it works properly. So I've to close the application and then run it again, each time I switch off the controller.

Can someone help me in coping with this non-free running sample clock problem. Even I run the examples provided, same problem arises.  

 

Sameer

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

To clarify you sample clock for you data acquisition system is coming from your microcontroller?? If so, when you turn off the micro -controller your DAQ device will not acquire any samples on the hardware side of things.  You program will then poll the DAQmx Buffer over and over again until the given mnumber of samples you have specified are present in the buffer. If those samples are not present than you will get an error relating to a timeout error. saying that the samples requested have not been acquired yet.

 

If there are samples in the buffer at the time that you turn off the controller the samples will be pulled off the buffer by your program as though there was still a smaple clock because your program does care about the hardware all it cares about are the samples that are present in the buffer at the time that the DAQmx read is called. 

 

If my assumptions are wrong please reply and correct me.  Also please reply with any erros taht are occuring and maybe a bit more detailed description as to what happens when you  turn off the micro controller.

 

Charley Dahan

Global Account Manager
0 Kudos
Message 2 of 2
(3,174 Views)