Which do you need? A triangle wave or a sawtooth one? (they are different).
For a sawtooth, just plot the .ACC value of a free-running timer. Done.
XIO Timer.DN TON Timer 1000 0
For the wave form between t2 to t3, use the formula t2 Maximum Value - t3 time, with a limit of 0. This will give you a negative slope going downhill from t2 max to 0.I was thinking once I get that sloped side I can just reverse the ladder logic for the run then copy/paste it to form the other half of the wave.
For the wave form between t2 to t3, use the formula t2 Maximum Value - t3 time, with a limit of 0. This will give you a negative slope going downhill from t2 max to 0.
Search the forum for ramp. There are lots of analog output ramping programs that have been posted. You need a ramp up and a ramp down, once you understand how to do a ramp the rest is trivial.
Ok Thanks for the responses. I am going to search the forum and see if I can get it working later when I get to class.