12-18-2007 05:13 PM
12-18-2007 06:26 PM
I just quickly read your post. (just taking a very quick break).
Suggestion: breakdown the three sections into number of steps.
Define number of steps for ramp up, number of steps for hold (constant level), and number of steps for ramp down.
Add the three sets of steps and that will give you the total of iterations. Then you can figure the increment size based on max level divided by steps ramp up, and do the same for ramp down.
You could use a For Loop and shift registers... Maybe during my next break, I can do a small example.. But the above should get you going..
RayR
12-18-2007 06:47 PM - edited 12-18-2007 06:49 PM
You are looking for something that would generate a ramp like the picture below, right?
I wrote the code extremely fast and I'm kinda ashamed of posting the code. 😉
12-19-2007 10:27 AM