Hi everyone ! I am a student and very new to this and am still getting familiar with the basics. I am working on a project with an electronic card.
I have to send some commands on the serial link of the card to activate and deactivate some I/O in order to measure different voltages on the card and to validate some tests. I want to automate these tests using python and the NI-DAQmx Python API.
Currently, I have 28 analog voltages to measure and 2 analog voltages to send that's why I am using the DAQ USB-6218 with its 32 analog inputs and its 2 analog outputs. Also, the input range of 10 V suits me perfectly due to the fact that most of my voltages are between 0 and 10 V.
I need also to measure a current of 241 mA, but it would be better to measure its duty cycle which is at a frequency of 5 kHz, Pulse width = 111 μs, Period = 199 μs, so duty cycle = Pulse width / Period = 111/199 = 0.56.
Even if I managed to code the acquisition of my analog voltages and to send the analog voltages I wanted, I am currently struggling for the duty cyle part ...
For the voltage acquisition I am currently using this sample which is working very well :
For the duty cycle acquisition, I tried this :
But I get this error ... :
I read on this link : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kHAPSA2&l=fr-FR that there are three new counter pulse measurements available in DAQmx 9.0 and later that are only supported on X Series devices, 661x devices and newer cDAQ devices. If you attempt to create these tasks with unsupported hardware, you will receive the above error.
I tried to use the Task Type : "CI Pulse Freq" with the resulting measurement values :" Frequency and Duty Cycle" by testing this example : https://github.com/ni/nidaqmx-python/blob/master/nidaqmx_examples/ci_pulse_freq.py, but I get the same error message ...
That's why I am wondering if I am using the good measurement type and if not, can you tell me which one should I use and how to program it please ...
Any help would be greatly appreciated!! Thank you.