I am designing a circuit in LTSPICE. I need a variable resistor to use it in my circuit. I try to use the variable resistor(XVAR) from LTSPICE library.
Are you trying to use a varistor (a resistor with a nonlinear resistance, its resistance depends on the voltage), or do you just need a potentiometer or rheostat? ?You might have mixed them up.
The "xvaristor" symbol in the library is for a varistor which is a nonlinear resistor. ?It requires a subcircuit (that you would provide), to describe its R(V) characteristics.
I think LTspice's built-in library has no component for a potentiometer, but there are several in this YahooGroup's "Files" section. ?Go to the "Table of Contents" area and download the file "all_files.htm". ?Then open it in your web browser, and search for "potentiometer". ?There are several to choose from.
Alternatively, you could just use an ordinary resistor symbol, and annotate it to show that it is a variable resistor or potentiometer. ?Its resistance value would be fixed during any one simulation, right?