# LTspice a voltage source as a function of time

I saw the ability to control R by time in someone's drawing, tried it, and it worked fine. Then, I thought that I could use that "time" keyword also to control the voltage of a DC source. However it didn't work. It gives an error:

Error on line 2 : vcc n001 0 time*2 Unknown parameter "time*2" Vcc: Missing value, assumed 0V @ DC .OP point found by inspection.

So, is there an easy way, as easy as it is with the resistor value, to do what I want?

• If in doubt, try to wrap your expression with {}. So you may write {time*2} and see how that works. – jonk Dec 1 '19 at 20:38
• @jonk nope, didn't work – muyustan Dec 1 '19 at 20:50

Use Arbitrary behavioral voltage source (BV) instead. You don't need curly braces for that, just V=time*10m