Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Writing to text file in Win Spice

  1. May 18, 2010 #1

    I'm trying to create an IV plot of a device by varying the resistance of a resistor and measuring the current through it and voltage drop across it. I'm using WinSpice to do this. I would like to write the values to a text file as I seep through the resistance of the resistor. I've tried to write some code shown below:

    let res = 1
    while res <= 1000
    alter @rload[resistance] = res
    write output.txt v(1) i(vmeas)
    let res = res + 50

    This doesn't work because it keeps overwriting the output file and I only get the last calculated values of current and voltage. I need a command to append the file instead of overwriting it.

    Any help or suggestions or sample code would be much appreciated.

  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted