I would like to sweep a resistor in DC analysis so that I can plot the resistance along the X-axis versus my voltage and current plots. How do I do this?
There are two methods for doing this in DC analysis.
The first method is the easy way. In the DC analysis limits dialog box, simply select the resistor part name from the Name field in the Variable 1 settings. Next, set the Range field to the resistance values that you would like to sweep through.
For the second method, you need the MODEL attribute for a resistor defined. Do the following:
1) For the resistor that you want to sweep, double click on that resistor and define the MODEL attribute. For this example, we will use the name RMod. Make sure that the model name is unique to this resistor in the schematic. Set the RESISTANCE attribute value to 1 (I'll explain why in the following step).
2) Go to DC analysis. For Variable 1, choose the appropriate resistor model in the Name attribute from the drop down list. You should see an entry such as RES RMod in the list if the model name was RMod. Set the second field so it specifies the R parameter. In the Range field, enter the range that you would like the resistance swept through. The R parameter is a multiplier and multiplies the Resistance value. That is why we set the Resistance value to 1 previously so that we can sweep R with the value directly in the Range field.