Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Log events

Dear Forum members,

 

We are using a custom build setup that drives behavioural experiment paired to a microscope. We created a driving program using the NIDAQmx C driver. The program runs an event-driven state machine which reads digital inputs and reacts accordingly with generating digital outputs to drive some instruments (e.g. microscope scanner, water pumps, playing of audio files etc.). The NI card we are using is NI PCIe 6321 X-series.

We seek advice on how we configure the logging of events (either DI or DO change of line). By logging we understand that the system runs a monotonous hardware clock, that has the fastest frequency from the whole system and we would like to log to file the clock step upon event. 

Here are the options we came up with:

1.) The card has 2 clocks, should we use one of them as a master clock from the system and read it upon an event?

2.) Should we use DAQmxRegisterSignalEvent on a task and create a CVICALLBACK function to read time upon an even? But is there a way to retrieve event time from task directly?

3.) What about DAQmxConfigureLogging? We could not find a proper example of its functionality. Is it designed with the same purpose?

 

Any suggestion or helpful advice will be highly appreciated!

Thank you in advance!

G.

0 Kudos
Message 1 of 2
(2,303 Views)

HI go9kata

your ideas seem good to me, but i dont really get your challenge. Please clarify your specific problem.

 

0 Kudos
Message 2 of 2
(2,245 Views)