Sunday, October 16, 2022

DynCont#9 Simple Looped AI and AO using PXIe, nidaqmx, Python, Labview, NIMAX

  1. It took 3 days of poking, trial and error to get this python program working. This can only be run with hardware (PXIe system, with NI 6356 card. It has 8 diff analog inputs and 2 analog outputs
  2. No, you cannot use 8 differential as 16 ground referenced single ended channels. Pay more for that to Hungary.
  3.  LABVIEW not essential
  4. NIMAX drivers required for configuring connections, checking hardware using test panels
  5. nidaqmx python library used instead of labview.
  6. LABVIEW is a mind melting mixed veg noodles, that is 2 days old.
  7. This program is a simple looped AI and AO 
  8. It is not yet software timed. To do software timed loop, use a while loop inside the outer loop to check if your control loop update time has elapsed and then continue with the next outer loop pass.
  9. In software timed loop, if one outer loop pass takes more time than your control update time, then increase control update time.
  10. In hardware timed loop, use call backs from input task that is triggered after samples are read from the buffer to the computer.
  11. Program below samples  4 channels of analog in TCV, BCV, Excitation and Eddy. Writes 2 outputs TCV and BCV. TCV and BCV are looped into analog in also.
  12. No hardware or software timing, no processing using the sampled values to calculate the outputs. Only seeing how fast simple loop runs. This is the bare minimum control update possible. This uses stream readers and stream writers. Uses shared clock between analog in and analog out. Uses a trigger from analog in to start analog out.

No comments:

Post a Comment