ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
441 stars 154 forks source link

Changing Sampling Rate/Effective Sampling Rate #202

Closed jmdelahanty closed 1 year ago

jmdelahanty commented 1 year ago

Hello nidaqmx-python developers!

I'm currently messing around with a little NIDAQ box and trying to measure when pins are high and low from an Arduino. My goal is to both sample at a rate of 1kHz (the signals I need to measure are quite slow) and write those to a file and then simultaneously write the timestamps when a rising edge is detected to a different file.

Thus far, I've successfully written data from the pins to a file at the DAQ's native sampling rate which seems to be quite fast. I've seen that you can have the software do something after every x samples which is a start, but I'm not sure what to do once I have all of those samples at once.

I've been trying in the evenings after work for a while to do this successfully and can't quite seem to get it right. So I figured I would ask for some help here since you seem responsive on your issues page! I'm pretty new to data acquisition implementations but think it would be cool to offer some examples of a threaded application for doing something simple like this.

zhindes commented 1 year ago

The ni.com Multifunction DAQ forum is the best place to get help for application-specific questions like this.