I would like to know how to probe a current inside subckt. I can not find an example of that in the manual.
Ex.
.subckt test a b
VR1 a c 0
R1 c b 10
.ends
XR1 ax 0
V1 ax 0 1
.control
save @XR1.R1[i] all
dc v1 0 5 0.1
plot @XR1.R1[i] <-- Does not work
plot i(XR1.VR1) <-- Does not work
.endc
.end
I don't know what else to try.
Note. I work with voltages but not currents?
Could somebody please guide me
Thank you.
Use the "listing e" command to see how to reference.
The below example works.
The .save command has a problem with "@" that I don't
understand right now, or maybe it has to do with the
DC command.
-marcel
~~~~
::html
Example probing
.subckt test a b
VR1 a c dc=1.234
R1 c b 10
.ends test
XR1 ax 0 test
V1 ax 0 dc=1
.save @r.xr1.r1[i] all
.control
listing e
dc v1 0 5 0.1
plot v(xr1.c)
plot @r.xr1.r1[i]
.endc
.end
Last edit: marcel hendrix 2015-09-23
Hej Marcel.
Thank you for clarifying this.
So as I understand from you the syntax for device probing is.
@<device letter="">.<subckt>. ..<devicename></devicename></subckt></device>
Correct!
Thanks
marcel hendrix wrote:
--
Yours sincerely
Carsten Bleser Rasmussen
Technical Director - R & D
Polaric
Jernholmen 54B
DK-2650 Copenhagen SV
Denmark
(tlf) (+45)70225579
(mob) (+45)42720739
http://www.polaric.dk
Related
Bugs:
#314In principle: yes.
My example lacked a .save command for the resistor current. I have corrected that now by editting the answer. The plots should now be what you intended.
Your question is not a bug and is better put on the ngspice-user forum.
-marcel