In a recent post to this forum, @archbugaboo pointed out an “increment operator” using the character ‘+’. Didn’t know it existed.
I’ve only tested inside the PWL attribute of a Voltage source. It does work as @archbugaboo indicated.
Here is what my experiments have revealed:
- It appears to ONLY work on time values in the PWL.
For example: PWL 0 0 10m 0 +1u 1 +10m 1 +1u 0
will cause the voltage to be- 0V @ 0s
- 0V @ 10ms
- 1V @ 10.001ms.
- 1V @ 20.001ms
- 0V @ 20.002ms
- It doesn’t work with voltage values. A ‘+’ voltage voltage is a positive voltage at that value.
- The increment operator works with the last stated time value. Therefore, the time increment is cumulative. This effect is noticeable if the PWL uses repeated waveforms with a potential time shift error. Using an absolute time value in the PWL attribute may help to reduce time shift errors. For example using PWL 0 0 10m 0 +1u 1 20m 1 +1u 0 will reduce the time shift error by 1us.
- The increment operator also works inside file of the FILE directive of the PWL attribute.
- A decrement operator (‘-’) for time value is available. However, the effect appears to provide bizarre results. Probably because it is confusing for time to go backwards in a .tran simulation.
If you find other effects or other directives/attributes to use the increment operator, please add to this posting.
Len