# LTSpice "Error: undefined symbol in:" Problem

**URL:** <https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081>\
**Category:** Design Tools and Resources\
**Created:** [March 27, 2021, 8:17pm UTC](https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081 "2021-03-27T20:17:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobMcN](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robmcn/32/14906_2.png) [@RobMcN](https://forum.digikey.com/u/RobMcN)\
**Post date:** [March 27, 2021, 8:17pm UTC](https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081/1 "2021-03-27T20:17:39Z")

</div>

First time posting and I really hope I selected the correct category.  
Below is my schematic for a relay SPDT symbol I’m creating.

 ![2021-03-27mod](https://global.discourse-cdn.com/digikey/original/2X/e/ea2a33ad9cbd84cad88ce26b0809cb42f6a46e25.png)

You may notice I’m not yet very proficient with LTSpice. Getting past that, You’ll notice the spice directive on the top right corner. What I’m trying to do is this:

1. Regardless of what voltage POS is, V4 = 5 unless POS=\<0

2. Since it is SPDT both electronic switches (ADG1201) have the same input COM1 but each has a different Output. The switch turns on when Mom = 5. So U1[In] =0 and U2[In]=5 when Mom = 5. Also, U1[In]=5 and U2[In]=0 when Mom=0  
-Here I tried to modify the expressions with the .func statement along with If statements.

In my test Circuit, the Spice Error log reads:  
Questionable use of curly braces in “v4 n004 0 {z}”  
Error: undefined symbol in: “[z]”  
Questionable use of curly braces in “v5 n006 0 {y}”  
Error: undefined symbol in: “[y]”  
Questionable use of curly braces in “v6 n005 0 {x}”  
Error: undefined symbol in: “”  
Questionable use of curly braces in “v4 0 {fnvoltmod(v(pos))}”  
Error: undefined symbol in: “(if((v)\>0,z=u((v(pos)))\*5))”  
Questionable use of curly braces in “v5 0 {fndecy(mom)}”  
Error: undefined symbol in: “(if(([mom])\>0,y=0,y=5))”  
Questionable use of curly braces in “v6 0 {fndecx(mom)}”  
Error: undefined symbol in: “(if(([mom])\>0,x=5,x=0))”  
Fatal Error: Multiple instances of “V:x1:4”

I wouldn’t ask this question if I hadn’t already searched the web for an answer. I think I don’t understand how to use Spice Directives on a schematic properly. I’ve read the LTSpice help and expanded help on the wiki site - but I can’t seem to find schematic rules with spice directives.

In short, Please help me understand.

Thank you in advance  
Robert

---

<div class="post-metadata">

**Author:** ![JohnMHanninen](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JohnMHanninen](https://forum.digikey.com/u/JohnMHanninen)\
**Post date:** [March 28, 2021, 10:59pm UTC](https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081/2 "2021-03-28T22:59:01Z")

</div>

I am not able to help you with this set of errors. Is there anyone out there who is familiar with using spice models?

---

<div class="post-metadata">

**Author:** ![RobMcN](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robmcn/32/14906_2.png) [@RobMcN](https://forum.digikey.com/u/RobMcN)\
**Post date:** [March 29, 2021, 12:01am UTC](https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081/3 "2021-03-29T00:01:10Z")

</div>

I’ve also posted this in stack exchange

[https://electronics.stackexchange.com/questions/556978/follow-up-ltspice-errorundefined-symbol-in-problem](https://electronics.stackexchange.com/questions/556978/follow-up-ltspice-errorundefined-symbol-in-problem)

I received a decent answer but I’m still having this issue. The link above shows where the problem is at now.

---

<div class="post-metadata">

**Author:** ![Kaleb\_Kohlhase](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/kaleb_kohlhase/32/59963_2.png) [@Kaleb\_Kohlhase](https://forum.digikey.com/u/Kaleb_Kohlhase)\
**Post date:** [March 30, 2021, 6:24pm UTC](https://forum.digikey.com/t/ltspice-error-undefined-symbol-in-problem/13081/4 "2021-03-30T18:24:09Z")

</div>

I know quite a bit about LTSpice, what exactly are you trying to accomplish with those expressions in the curly braces? This might help me understand.
