• 0

Fast singlepoint output from LabVIEW with an ADS



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



to set up the wavegen, and 


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 ?




Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now