03-17-2023 12:06 PM
Hello,
I am writing a labview program to automate the measurement of the IV characteristic of a diode-like device. The device starts passing current only above a critical voltage which is not known a priori, above the critical voltage the current depends ~exponentially on the voltage, and too high of a current can damage the device. With these facts in mind, I need a program that sweeps up the voltage applied to the device while measuring the current, and when the current reaches a specified threshold value, the voltage sweep should change direction and decrease until it reaches a user-set stopping voltage.
Hardware:
The program allows you to define the starting voltage, voltage step size, a threshold current, a maximum voltage (program stops if threshold current is not reached before maximum voltage is reached), a stopping voltage, and the time to spend on each step.
The program works decently well, but I'm having a problem where the voltage always increases by one extra step after the threshold is crossed and I'm struggling to understand why. I also noticed that an error that occurs if I set the step time to greater than 10 seconds, which I haven't figured out the cause of.
I'm still a labview novice so I'm sure there are some things in the program that are sub-optimal, so I'm open to any suggestions for improvement.
Solved! Go to Solution.
03-17-2023 12:07 PM
Here's the labview code
03-17-2023 12:42 PM
It is because you write data to DAQ despite of whether you want to stop or not.
You should write to DAQ only if you want to continue. Enclose the write to DAQ with a case structure based on the decision.
Your code could be made a lot better, that is aside from getting the functionality right.