05-01-2015 01:46 AM
I have a program which I can use for seeping voltage between -3 to +3 voltage. I want to modify for -3 to +3 to -3. I am attaching the .vi file. Please suggest me how can I do so?
Thnaks
05-01-2015 04:20 AM
Well, your program takes the number of steps and sets a for loop to run this many times. To go up and then down you will need twice as many steps, so multiply this by two before feeding to the 'N' teminal.
In the loop you keep track of current value in a shift register and add the step value each time. You will need to add the step value for the first half of the cycle (increasing) and then subtract it for the second half (decreasing). Decide which half you are in by comparing the 'i' value to the number of steps, and if greater you need to choose the subtract rather than the add. You can use a case statement or a 'Select' vi to make the choice.
05-01-2015 06:44 AM
Personally, I would use the Ramp Pattern.vi to create two arrays (one for ramping up and another for ramping down), but combine them to get your full profile. You then just autoindex on that array for your set points. It would make things a lot simpler for you.
05-01-2015 09:21 AM
+1 Crossrulz. Even easier is to reverse the original array assuming you always want to return to the start point.