Hello PSpice community,
I have been having trouble making a desired measurement parameter.
Let me try to explain briefly: I have a charging- and a discharging curve of the voltage across my resistor which is connected to a capacitor (thus making the charging curves later mentioned). I also have a DC voltage called "threshold".
I want to measure the time (I'm doing a transient analysis) between the charging curve crossing the threshold voltage, until the discharging curve crosses the threshold voltage again.
I'm trying to use the "XatNthY" measurement for this.
I fill out the measurement like this: "XatNthY(V(R1:2),V(Threshold),2) - XatNthY(V(R1:2),V(Threshold),1)", which gives me the x-value for the second time the voltage across my resistor crosses the threshold voltage, minus the first time. This is what I'm interested in.
It should work, but it does not. It gives wrong result. When I replace "V(Threshold)" with the actual voltage value 2.6, I get the correct result. (I tested if V(Threshold) had the correct value by pressing it into measurement expressions. 2.600000 it said, so should be good)
The problem is that I want to change the value of V(Threshold) often, and I would prefer not to have to put in the hardcoded value into the measurement every time I do so.
So my question is: Is there any way to make a variable, which can be put into the mentioned measurement, or is it strictly for hardcoded values? A collegue told me he once saw a guy in a PSpice course do something to implement a variable in measurements, but he does not remember how. So my initial thought is that it should be possible somehow, I just haven't managed to find it.
Thank you in advance for your replies and stay safe out there!