LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with control system that reduces a flat output signal every time a certain input exceeds given value

I'm having difficulty setting up a closed loop control system that reduces one of my voltage outputs (connected to a high voltage system) by 30% every time a measured voltage exceeds a certain threshold value.  I'm using a USB 6229 DAQ.  I've been trying to create a waveform that looks like a DC signal, but the only waveforms that I can seem to manipulate while my VI is running are the stock waveform types.  Also, I've tried to use a formula node or conditional structure to update the output value every time the measured voltage exceeds a given value, but everything I do reinitializes the output value every time it runs or won't store the previous signal value.  I'm using LabVIEW 8.6 and don't have the PID or similar express VI's.  I've attached the mess I've got working right now.  Can anyone help?  I'm really stuck!

 

Thanks! 

Download All
0 Kudos
Message 1 of 4
(3,008 Views)

I hate to say it.  But your VI's make no sense.

 

What is output control.vi supposed to do and how does it relate to your problem?  Most of the code is disabled.  What is left just writes and empty array to an analog output.

 

HiV step down.vi seems to relate to your question.  But it just does a basic calculation based on an input value running at super high speed on the very first data point coming out of a sinewave generator.  When you run it as is, it runs so fast it looks like nothing is happening.  Put an indicator on the sine wave or the scalar value it is converted to, it slows it down just enough to see some changes in data including the one indicator jumping between two values.

0 Kudos
Message 2 of 4
(3,002 Views)

I'm sorry it's such a mess; I'm still pretty new at this.  These are both little driver programs for a larger overall control program. 

 

Output control is meant to send a flat signal to the DAQ whose value can be manipulated while the VI is running.  I have the second activated segment merely to check the values being output.  I didn't realize I attached a version with a meaningless control...I had a control where the user would put in the stating voltage (the high voltage source has a 1V-100V setting for external control).  I've attached this slightly different but equally dysfunctional version.  Ideally, I would have liked something like the analog signal generator vi to come with an input wiring for offset on the DC signal.  Most of the code was diabled because it is copied from an example; it is largely rubbish.  I initially used the DAQ Assistant, but when things weren't working out I switched to putting in each step manually to try to troubleshoot.

 

As far as HiV step down is concerned, I've tried something different with a nested case structure (if that's the right terminology?), and I've attached that file.  I think this problem has been solved, but you never know!

0 Kudos
Message 3 of 4
(2,990 Views)
And thanks so much for your help, RavensFan!
0 Kudos
Message 4 of 4
(2,988 Views)