The loop command is used to perform a simulation analysis over a range of conditions.
loop [-c] [min1 [max1 [step1]] [min2 [max2 [step2]]] [analysis]]The command works like a dc sweep, however the shell variables value1 and value2, which are accessible in the circuit as $value1 and $value2, are incremented, as in operating range analysis (see Chapter 5). The specified analysis is performed at each point, yielding multidimensional output vectors. If analysis is omitted, an analysis specification is expected to be found in the deck. Only one analysis can be specified (no dc chaining). The deck should contain $value1 and $value2 (if used) for substitution, and be the current circuit. If an analysis loop is paused, for example by pressing Ctrl-C, it can be resumed by entering the loop command again. No arguments are required in this case, however if the -c option is given the old analysis is cleared, and a new analysis started if further parameters are supplied. The -c is ignored if there was no loop analysis in progress. The resume command will also resume a paused loop analysis. The reset command given with the -c option will also clear any paused loop analysis.