Thursday, September 8, 2022

Python program for controlling NI-cDAQ device without LABView installation

  1.  Requires NI-MAX driver more than 17.0
  2. Lots of dependencies for nidaqmx python wrapper for the C API given by NI
  3. Plotting is using Matplotlib
  4. Use pip download option to download all the required dependencies as whl files on the computer with internet and then transfer the folder with whl files to the DAQ computer that is without internet
  5. Use pip install --find-links --no-index option to install the nidaqmx on the DAQ computer without internet
  6. The python program below generates signals used to excite the power amplifiers.Force from power amplifiers is measured via FX293 load cells via NI9205 input card.
  7. Generation and acquisition tasks must be committed before being used. Other wise there is big lag between start of generation task and start of acquisition tas
  8. See if you can use same clock source for both generation and acquisition to ensure synchronous use
  9. Trigger can be used on output task. Output tasks trigger is given by input task. input task should be committed before taking trigger from it.
  10. If you are using a task in a loop, always close the task for each loop use. Other wise the task will not read new data.
  11. Program below:

No comments:

Post a Comment