LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I update an analog output channel continuously based on an analog input channel?

I am writing a program that will send a voltage to a programmable power supply based on an input voltage.  The program as written reads 200 samples correctly, but then the output stays constant for every 200 samples.  As it continues to run, it is using the last value of the input voltage to determine the next 200 samples of output voltage. There are other things I need to accomplish with a PID control loop, but I haven't been able to get anything to output correctly in even the most simple case.

 

Can anyone help me figure out how to read an input voltage, then have that determine an output voltage?  The frequency needs to be approximately 200 Hz.

 

I've attached the block diagram.

Thanks,

designteam4

0 Kudos
Message 1 of 3
(3,632 Views)

So your program is outputting a voltage, but it's just staying constant?  You also want this voltage to change at a rate of once every 5ms or so based on whatever's currently at the input?  Just trying to clarify the problem.

0 Kudos
Message 2 of 3
(3,596 Views)

 

Hi,

 

I hope this helps you on it's way.  The timing is something you have to do by itself.  Cause that is not really obvious from what you mentioned

 

Dont forget to wire the number of samples to read at the sample clock 😉

 

VISnippet.png

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 3 of 3
(3,568 Views)