Hi guys. I'm new to Spice so realise this will probably come down to my own lack of understanding. My apologies in advance.
I'm trying to learn about varying device parameters in LTSpice by setting up a potentiometer model so I can vary the rotation percent and see factors change within the circuit. I've created a .asc file with basically two resistors in it offering 3 terminals and with their values defined as R*(Val/100) and R*(1-Val/100) based on parameter Val which represents percentage rotation. I have created a .asy file, saved in the same place, with a simple symbol for it with 3 pin/ports. It has attributes Prefix: P, Spiceline: R=10k Val=50, Description: A Potentiometer.
When I set this up in a simple DC Voltage circuit and check the DC on the wiper, it behaves exactly as it should. Changing Val manually generates the right voltages on the wiper. If I try to automate stepping through the Val range 1-100 and displaying DC on the wiper it won't play!
I have the pot set in my schematic as "R=50k Val={PC}" and added a .op with two lines ".step param PC 1 100 1" and ".op". When I try to run I get the message "Cannot find definition of model "1" ". Changing the first start value parameter changes the message to match so it is the first parameter in the .step line after PC which is confusing it.
What I have set up seems to fit in with what I can see in other tutorial/references for this sort of thing. Can anyone point out where I am going wrong?
I'm trying to learn about varying device parameters in LTSpice by setting up a potentiometer model so I can vary the rotation percent and see factors change within the circuit. I've created a .asc file with basically two resistors in it offering 3 terminals and with their values defined as R*(Val/100) and R*(1-Val/100) based on parameter Val which represents percentage rotation. I have created a .asy file, saved in the same place, with a simple symbol for it with 3 pin/ports. It has attributes Prefix: P, Spiceline: R=10k Val=50, Description: A Potentiometer.
When I set this up in a simple DC Voltage circuit and check the DC on the wiper, it behaves exactly as it should. Changing Val manually generates the right voltages on the wiper. If I try to automate stepping through the Val range 1-100 and displaying DC on the wiper it won't play!
I have the pot set in my schematic as "R=50k Val={PC}" and added a .op with two lines ".step param PC 1 100 1" and ".op". When I try to run I get the message "Cannot find definition of model "1" ". Changing the first start value parameter changes the message to match so it is the first parameter in the .step line after PC which is confusing it.
What I have set up seems to fit in with what I can see in other tutorial/references for this sort of thing. Can anyone point out where I am going wrong?