<@U03ED7UNVFH> Chapter 12.2.9 of the ngspice user...
# xschem
s
@Ahmed Reda Chapter 12.2.9 of the ngspice user manual: Filesource (PWL sourced from file). Xschem does not have this very ngspice specific component, but I have used a
vsource.sym
and modified its netlist rule to produce an instance line as explained in the ngspice manual. Attached an example image and the test schematic I used. You can open the test schematic in xschem, copy/paste the voltage source into your circuit and modify the 'filesource' file as required. The file format is not csv, it is a tabular format, one line per time, first column is time, second column is voltage value.
1
a
Thanks. @Stefan Schippers
m
@Stefan Schippers if you place more than 1 vsource with your changed netlist rule, it only recognizes the last one inserted. in the spice file, only one is shown. what specific changes would need to be done to make it recognize the other vscource as well?
s
Check out this modified circuit. It has two filesource devices. In short: you need to change the model name for the additional sources. Place
filesource
and
filesource2
in the directory where ngspice runs.
1.png
m
Many Thanks.