03-03-2015 05:47 PM
Hello i have to sweep the voltage between say(-5 volts to 5 volts) as such
between -5 to -2 at step size of 1, and between -2 and 2 at a step size of 0.5, and then at a step size of 1 beyond 2.
the range -2 to 2 can change.(user input)
can anyone help me find a way to do that.
regards
Debi
Solved! Go to Solution.
03-03-2015 08:53 PM
Create an array that has those steps defined. Then feed that to the For Loop that contains your analog output function through an auto-indexing tunnel.
03-04-2015 04:01 AM
Thanks, but can you send me a screenshot or an example to do this. As my sweep rate can always vary
03-04-2015 05:11 AM
Vary your sweep rate with a timer in the for loop.
03-04-2015 05:19 AM
03-04-2015 05:41 AM
Hi Gerd,
Perhaps I misunderstood the OPs comment? I thought it was a query on how to vary the sweep rate (a time delay in the loop to vary the time between steps based on a user input is the obvious way).
I see now that perhaps the comment was raising the problem that varying the step size will vary the dv/dt if the loop speed is constant. If that is the case then the loop time would need to be calulated based on the step size taken from the array (assuming RavensFan solution).
Or have I missed something completely?
Stu.
03-04-2015 11:17 AM
Hi All
Thanks for the replies. But I cant play around with time as well.
What I mean to ask is like if I have to sweep my voltage from -5 v to 5 volt at a specific sweep interval of 0.5 volts, but between a range (say -2v to 2 v, ) I want to sweep the voltge at lower sweep interval say 0.05 volts or even less.
Thanks again
Debi
03-04-2015 11:25 AM
03-04-2015 11:30 AM
Thanks , but I have my vi like this. Can you have a look into that.
I can play with step sizes between -2v to 2 volts
03-04-2015 12:03 PM
Hi debi,
well, you should learn about using statemachines - and DATAFLOW in general.
You use too many sequences and local variables!
And you need to change your "step size" according to your conditions. It will not work as long as you use a fixed value!