LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increase voltage over specified time

Solved!
Go to solution

Hello

 

I'm fairly new to Labview so I apologize if my question is a little trivial. I'm trying to make a VI that will increase the voltage of my Kepco power supply over a specified time. An example is that starting at 5V and increase 5V every 2 minutes. All of these should be variable that can be changed in the interface. The increment can either continue on forever or set to stop after a certain time.I have tried to use the while loop but it doesnt seems to work because there are multiple conditions (i.e. stop time, continue forever, stop voltage).

 

I have attached what I made so far (Kepco2.vi) along with the driver for the Kepco power supply. Please note that it will not work unless you have the Kepco power supply. All the drivers worked fine when tested manually (ie. setting voltage by itself), it's just the loop/condition that isnt working.

 

Any help will be greatly appreciated.

 

Thanks you.

 

0 Kudos
Message 1 of 19
(5,277 Views)
Hi, I joined a new version.
There are 2 while loops : one for hardware, and one for software.
The first for the soft is verry quick, and the second is slower.
Let me know if it can help you.
Best regards,
V-F
0 Kudos
Message 2 of 19
(5,251 Views)

Thank you so much for your help.

 

I modified your VI and instead of how it was routed through the Kepco APP VI as before, I inserted the whole block diagram from the APP VI. I also added the "Kepco set output state.vi" so that I can change the outp to on all in one VI. A couple of problems arise when executing.

 

1.) For some reason when running (either the one incorporated version or just the "Kepco set output state.vi" by itself), the initial state will be set to off and even if you put it back to on position, it wouldnt send out the "OUTP ON" command. 

 

I can turn on the output manually using VISA Interative control by putting in "OUTP ON" and execute it. After turning it on manually, I can then set the voltage with the "Kepco Config Voltage.vi" or "Kepco Applications.vi" and it will works fine.

 

  

2.) As for the loop, it only work partially. I tested it with initial voltage starting at 5V with 2V increment and stopping at 10V, time increment 6000ms, time stop 60000ms. (Over voltage protection 100V). I took an NI SPY capture during the  testing and attached it below.

 

From the NI SPY, line 16, it shows the initial voltage output was set to 7V (5+2), not 5V. However the actual voltage on the power supply was 0V.

 

After the first loop, line 34, it shows an output comand for 2V. Now, the actual voltage on the power supply is 2V. 

 

After that, it wouldnt keep adding 2V anymore even after repeated command in land 52,70, etc... The actual power supply voltage keeps staying at 2V.

 

 

The modified version and capture of the testing (in txt and .spy) is attached.

 

Thank you again. 

 

 

 

 

Download All
0 Kudos
Message 3 of 19
(5,217 Views)

I have fixed the outp on output. The reason was that it didnt put a space in between. It was sending out "OUTPON" but should really be "OUTP ON". I have attached the newer VI in previous post.

 

Message Edited by oioi on 10-14-2008 06:43 PM
0 Kudos
Message 4 of 19
(5,215 Views)
woudlnt let me attach last time for some reason.. so here's the newer one heh.
0 Kudos
Message 5 of 19
(5,205 Views)

Some of the problems are pretty obvious. The reason you don't start at the initial voltage is that the addition of the increment is done before the first setting. The addition needs to be done after. Some of the stop logic may need to be changed and I'm not sure all of those case statements are required.

 

Your command for the output on is sitting all by itself. You really need to understand dataflow. That command may or may not execute after the initialize function. Place the output on command in the regular dataflow, after the initialize.

 

If the set voltage function is not setting a voltage, you are going to have to do some debugging to determine why not. Set a breakpoint  there and see if there is an error present.

Message 6 of 19
(5,195 Views)
Hi,
As said Dennis, you should do some exemple in order to understand the dataflow system.
You should maybe do what you want without the drivers of your Kepco, in order to be sure that the vi do what you wants !
V-F
0 Kudos
Message 7 of 19
(5,185 Views)

Hi oioi,

 

I've created a little VI that handles most of the inputs/outputs you require in your program. I skipped the OVP setpoint, current output, current setpoint and the actual control of the instrument. These you can add later on.

 

This VI is based on the producer/consumer structure. You can find/learn more about this structure in the tutorial Application Design Patterns: Producer/Consumer.

 

The Start button is placed in the intialization loop (when you start the program, you can enter all the values (start voltage, increment voltage, etc)). After pressing the Start button, the first loop will be stopped, allowing the producer and consumer loop to run.

 

I hope this will give you a hand writing your program!

 

Best regards,

 

Peter Schutte

Message 8 of 19
(5,172 Views)

Thank you for your help. Can you convert it to version 8.5? I dont have the 8.6

 

Thanks again.

 

0 Kudos
Message 9 of 19
(5,131 Views)

I'm sorry Oioi, standard working in the latest versions! 😉

 

Enclosed you'll find the 8.5 version of the VI!

Message 10 of 19
(5,070 Views)