LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change the voltage with different period of time for both channels

Solved!
Go to solution

I am having DC power supply which is having two output channel, each channel is able to give two different voltage at a time. i want to change the voltage for both the channels with two differnet period of time. ex: channel1 voltage will change every 2mins period of time and Channel2 voltage will change every 5mins period of time. so please give me the suggestion for this problem thanks in advance. 

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

Check the time every minute.  If divisible by 2, change channel 1.  If divisible by 5, change channel 2.  Of course when it it divisible by 10, both conditions are satisfied and both channels will be changed.

 

This is not a very flexible approach. Another way is to calculate the next change time for each channel when the program starts or when a change is made. Each time through the loop, compare the current time to the "next change times" for all the channels. For each channel where current time is >= next change time, update the voltage and calculate the new next change time.  Keeping the next change times in an array in a shift register allows any number of channels without changes to the program. It is also possible to have variable intervals for the channels, such as channel 1 changes every 2 minutes for the first 20 minutes and then evey 7 minutes after that.

 

Lynn

0 Kudos
Message 2 of 5
(2,256 Views)

Thank you for response i can't get your logic so please explain me in detail it would be helpful for me please

0 Kudos
Message 3 of 5
(2,246 Views)
Solution
Accepted by topic author kumuch

maybe like this....

Spoiler
timer_BD.png
Spoiler
timer2_BD.png

connect the write code to the bools, ofcourse the same concept used for minutes(120secs and 300secs)...

Download All
0 Kudos
Message 4 of 5
(2,241 Views)

Thank you so much Johnsold,now i got the logic and very thanks to apok for explain the logic clearly through code  

0 Kudos
Message 5 of 5
(2,226 Views)