LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smooth voltage output jumps

As illustrated in the attached image, my program outputs a set of voltage values over and over. The issue is when starting a next loop, it has to do a large jump from last value to a first value, which causes mechanical vibrations from an instrument.  Is there any way to avoid/smooth that?

 

IMG_0842.JPG

0 Kudos
Message 1 of 5
(2,526 Views)

Yes, there is.  Don't do that.  If the test requires you to make that jump, you'll have to live with the fallout.  If it doesn't, ramp it down like you ramped it up.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(2,522 Views)

You could also put a filter (analog or digital) on your output.  It will, of course, affect all of the signal.  Once again, however, here's someone asking for help, but not showing us the relevant LabVIEW code so that we can make LabVIEW suggestions ...

 

Bob Schor

0 Kudos
Message 3 of 5
(2,503 Views)

Here I attached part of the VI that does the analog output.

 

  • The data line of analog write is a 2D array of three rows, for ao0, ao1, and ao2 respectively.
  • /Dev4/PFI1 is the clock source, whose signals are defined by a counter as a square wave train, so the data values are looped over and over.

ao_loop.png

 

 

0 Kudos
Message 4 of 5
(2,490 Views)

Chase your 2D array back to where you create it.

Use Reverse array and concantenate the original with the reversed and try again.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 5
(2,481 Views)