08-07-2017 02:48 PM
Hello,
I am currently working on a LabView program to control the voltage to a device via a Keithley 2400 SourceMeter. When I control the power supply manually, with the auto range enabled, it works properly. However, when I connect it to my PC and run my code, it encounters a range compliance issue. I've been reading up on this and it seems that this is caused when the measured value (current in this case) exceeds the measurement window. I have the Configure Measurement VI at the start of my code, and auto range is set to ON. If I turn auto range off and try to set my own measurement range, I encounter error 823,"Invalid with source read-back on". I notice that if I add Read.vi inside the while loop, the measurement range will auto update as intended. However, this slows down the code to undesirable levels.
Ultimately, my questions are as follows:
1) How can I get the measurement window to update automatically without using Read.vi to avoid range compliance issues?
2) Alternatively, are there other settings I can adjust to perhaps get the code including Read.vi to run more quickly (I need at minimum 20Hz for the control frequency)?
For reference, I'm supplying 0-15V to a thermal actuator resulting in a current of 0-20mA.
Thank you in advance for any advice! I've attached a VI for reference.
08-07-2017 04:26 PM
@dcooke13 wrote:
Hello,
I am currently working on a LabView program to control the voltage to a device via a Keithley 2400 SourceMeter. When I control the power supply manually, with the auto range enabled, it works properly. However, when I connect it to my PC and run my code, it encounters a range compliance issue. I've been reading up on this and it seems that this is caused when the measured value (current in this case) exceeds the measurement window. I have the Configure Measurement VI at the start of my code, and auto range is set to ON. If I turn auto range off and try to set my own measurement range, I encounter error 823,"Invalid with source read-back on". I notice that if I add Read.vi inside the while loop, the measurement range will auto update as intended. However, this slows down the code to undesirable levels.
Ultimately, my questions are as follows:
1) How can I get the measurement window to update automatically without using Read.vi to avoid range compliance issues?
2) Alternatively, are there other settings I can adjust to perhaps get the code including Read.vi to run more quickly (I need at minimum 20Hz for the control frequency)?
For reference, I'm supplying 0-15V to a thermal actuator resulting in a current of 0-20mA.
Thank you in advance for any advice! I've attached a VI for reference.
I'm not even sure what you are trying to do. What I see you doing is configuring the output and then enabling it as fast as the computer can do this. Is that what you want, or is this a simple version of something a lot larger? Myself, I think you should be configuring and enabling ONCE before the loop, then do whatever in the loop, then execute the rest of the code as you have written it. It may very well be that your constant reconfiguring and enabling is causing issues. Did you look at any of the provided examples? Are any of them close to what you need to do?
08-07-2017 04:34 PM
I was just browsing the manual - they made the front/rear software-selectable??? WOW!
The last time I looked a Keithley 2400, it was a hardware switch only. 😄
08-07-2017 04:35 PM - edited 08-07-2017 04:48 PM
Hi Bill,
The attached VI is indeed simplified. In troubleshooting the issue I pulled out the relevant Keithley driver VIs from my larger VI to see if I could get a simple VI working that controlled the power supply. In the larger VI, I will use user input to form a voltage curve that will be passed to the power supply one point at a time, at ~20Hz. I should probably include a wait time in the example VI I provided so that it doesn't run as quickly as possible, but that doesn't fix the issue.
Again, the same program that I provided but with Read.vi implemented after the output enable VI (but still within the while loop) runs fine, but slows the execution down significantly.
Is there possibly a better way to quickly control and change the voltage without using Configure Output repeatedly within the while loop?
EDIT: I've attached the larger VI for reference if that helps. The relevant portion is just the Keithley VIs and "Control Loop"
08-07-2017 04:56 PM - edited 08-07-2017 05:00 PM
You have to provide values for every input terminal on the Configure Ouput.vi. Try setting them to reasonable values and see if that helps.
edit oops I didn't see that larger VI. I'm not sure that will help at all.