06-11-2014 09:13 AM
Hey,
i'm a student in a lab and we have a DC power supply "Agilent E3646A". I have install driver for this. From front panel i can change the voltage but what i need is to simulate the power from a Satellite Photovoltaic Panel.
So, i need to have as input an array with different value of voltage which change every one minute.
Im new in labview and i don't know it well.
I have attached the VI of our supply.
Thank you in advance.!
Solved! Go to Solution.
06-11-2014 09:59 AM
Hello sarri,
The code I am giving you is bit advanced but hope you will understand.
It has two parts.
First use a another while loop as in the figure.
The loop has two shift registers
1) time loop
2) index of the voltage value array.
In the timer part check if 60 seconds has elapsed. When 60 seconds has passed, increase the index of array to select new voltage value. Also replace the timer shift register to new value.
06-11-2014 10:32 AM
As I understand your question, you want to "do something" once a minute. LabVIEW, unlike many other programming languages, treats Time as a Very Important Player -- there is a Timing palette on the Block Diagram that will allow you to "Wait 60000 milliseconds" (or 1 minute). Since LabVIEW uses data flow, putting such a function inside a While loop will cause the loop to run once a minute, with no extra work! No need to read the time, do computations, keep checking the time, etc.
It was unclear how you were generating the voltages you want to output. if you have a pre-generated set of voltages, you can save them in an Array and "feed" the Array into the While loop. Even better, replace the While loop with a For loop, which will (by default) automatically index through your Array. You put the same "Wait" function inside the For loop (so it loops once a minute), and when all the Array elements have been output, the loop exits (and you clean up after yourself).
Alternatively, you could put a random number generator (from the Numerics palette) inside the While loop to have random values output to your device.
Bob Schor
06-12-2014 07:17 AM
Hey, thank you so much.
It works.!
I created a sample example with a little changes and it worked right.
Monday, when i will return to my lab i will test it with our Aginlent DC supply.!
Thanks again!
06-12-2014 07:26 AM
Hey Bob,
thanks for your reply.
I would not to domethnig once a minute, but contineously !
I want every one minute the output voltage take the next value of the array and keep it for one minute.And after one minute to take the next.
06-12-2014 09:00 AM
05-04-2021 12:37 PM
Sir,
I am so grateful that you could provide us, beginners, with this solution. But the problem is as we are beginners we weren't exactly able to implement it properly. Sir, would you be kind enough to share this small project file with us? We would be eternally grateful.
I hope you will consider our request.