Dear community,
I'm relatively new to NI and it Python API, so bare with me. I'm working on the control of a tank system. In the pas,t I used a NI card in the computer and on demand measuring to get the data I needed.
Now, we switched to NI 9202 and NI9264. When setting up the program, I wanted to use:
.read_one_sample() as I did before, but got the following error message:
DaqError: Task contains physical channels on one or more devices that require you to specify the Sample Clock rate. Use the Sample Clock Timing function/VI to specify a Sample Clock rate.
You cannot specify a Sample Clock rate if Mode is set to On Demand.Based on that I switched the mode to sample rate and set it to 2 samples per channel. I call .read_one_sample() twice to get the newest data. It's working although I'm aware that it's not a nice solution. Furthermore, I realized that my controller loop is much slower now. I guess it wouldn't be a slow network problem. How can I set up a measurement method that is similar to on_demand while using a sample clock which seems to be needed by my hardware.
Regards,
Tim