The syntax of the step Spice directive is correct, however I misinterpreted the use of the period character.
I have changed the directive to read ".step param w list 20u 80u 320u" and got the intended results.
The problem was that with the period the values were being read as 200n, 800n, and 320n respectively. This is smaller than the model I was using allowed for which resulted in the error.
With spice, you'll have to roll your own code but there are ways to get data in and out of LT Spice and run it from a scripting language.
This works on other oses, having never run LT spice on a mac I don't know if the command line works on a mac.
If you run LT spice in command line mode, from a windows command line:
Run in batch mode. E.g. "scad3.exe –b deck.cir" will leave the data in
file deck.raw
"scad3.exe –b deck.cir"
Or you'd probably want a .txt file which you could then import back into a scripting language
'ltsputil.exe -ca example.raw dete.txt'
Test this and see if you can run LT spice from the command line, here is some info on running exe's from a command line on a mac:
Running command line exe's from a mac
You can run shell commands from python also
So generate a python script to generate raw files then use the utility to generate text files. (which you can then import back into python). You can edit the .cir file directly from python and change things (like add components or change values, its just text file and spice netlist after all).
So if you wanted to change a step command, all you would have to to is find the line of text in the .cir file change it, then rerun the simulation and look at the output.
Keep in mind that LT Spice is very powerful if you know how to use it:
B-sources can do some crazy math with nodes (like simulate bit
quantization of ADC's and DAC's or laplace transforms
There are monte carlo simulations that randomize values.
.step commands with parameters can run multiple simulations
You can set resistors and other components to the value of a voltage node to create variable resistances\component values.
- PWL files to change the voltage and current sources from a file.
If these don't work then run script a simulation.
Best Answer
LTspice does support Modulus function :"Mod", for example MOD(2,2)=0, MOD(3,2)=1.