Electronic – LTspice a voltage source as a function of time

ltspice

enter image description here

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?

Best Answer

The problem is you try to make an alterating voltage source with a DC source.
Use Arbitrary behavioral voltage source (BV) instead. You don't need curly braces for that, just V=time*10m