Jump to content

jfj

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by jfj

  1. As part of a course I teach, we have created a magnetic levitator for the students to play with.  We used to drive the levitator with NI PCIe boards, but lately we have given the students ADS units and taught LabVIEW programming.

    The Levitator runs in a PID loop, and while it works with the ADS is is not as stable, nor does it handle as wide a range of parameters as it did with the PCIe boards.

    I think this is because the service interval is now a bit over 2ms, where it used to be 1ms.  All the time in the program is spent acquiring the  a signal proportional to the levitated ball, the process variable (PV), and outputting a control voltage (CV) to set the current in the magnet.

    Using the information in https://forum.digilentinc.com/topic/21482-analog-discovery-2-continuous-data-acquisition, I've gotten the PV read below 1ms.

    The code I am using to output the CV is

     

    image.png.061790273448ef5a705f6f1479e2c3d1.png

    to set up the wavegen, and 

    image.png.12f054cb0d9db441457c9145cf011c40.png

    to set the new CV.  Is there a faster (less overhead, presumably) way to output a single analog voltage?  (Ignore the broken wires; they are connected in the real program.)

    For that matter, is there a faster way to read the PV than that outlined inhttps://forum.digilentinc.com/topic/21482-analog-discovery-2-continuous-data-acquisition ?

    Thanks,

    Joel

     

×
×
  • Create New...