LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4W R Measurement and error handling

Solved!
Go to solution

Keithley 2450_R_loop.png

I need to measure a temperature using a 600 Ohm resistance in 4-wire configuration with a Keithley 2450. I have two problems. As the measurement is done inside a vacuum chamber, I have to be careful not to heat up the sample with my T-measurement. Therefore I want to measure with a very small current. In 2-wire configuration I managed to configure the current, but I think in my above code snippet the current setting is ignored as soon as I use "SENS;RES;RSENS ON;".

The bigger problem is, that I get random errors (maybe one error in 24h). While its not an issue to miss a single measurement data point, the loop seems to stop, so I don't record any more data. And worse, the output stays on, therfore heating up my sample. As I'm quite new to Labview I have no idea how I should handle this error. Ideally I would like to catch an error (its not allways the same error code) inside the loop and somehow reset the keithley 2450 so I can continue to record data in the next loop.

0 Kudos
Message 1 of 11
(2,607 Views)

Hi DPM,

 


DPM@ch wrote:
The bigger problem is, that I get random errors (maybe one error in 24h). While its not an issue to miss a single measurement sample, the loop seems to stop, so I don't record any more data. And worse, the output stays on, therfore heating up my sample. As I'm quite new to Labview I have no idea how I should handle this error. Ideally I would like to catch an error (its not allways the same error code) inside the loop and somehow reset the keithley 2450 so I can continue to record data in the next loop.

You use shift registers to hold the error cluster in the loop: due to DATAFLOW an error is kept into the next iteration of your loop. By standard a function should do NOTHING when an error is indicated at its input! So once an error occurs within the loop the loop will still iterate, but the VIs in there will do nothing anymore - they don't read new sample and they don't change any output signals…

You need to handle any error before starting the next iteration! Do the basic training lessons (see at the top of the LabVIEW board) to learn, how to react on errors!

 


DPM@ch wrote:
In 2-wire configuration I think I managed to configure the current, but I think in my above code snippet the current setting is ignored as soon as I use "SENS;RES;RSENS ON;".

Did you read the manual for your device? What does it say about that specific behaviour?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(2,598 Views)

Thanks. You might not belive it, but I got through Labview Core 1 and half of Labview core 2 tutorial. And btw. they are a real pain in the ass (who thought it would be a good idea to make a video based tutorial for a programming language and to top that divide it in small pieces of a few seconds without an index and no way to jump back to a specific topic to look something up again)! I know that I use shift registers - because thats only a small part of a larger project and I wanted to get all error messages when stopping the vi. If you could hint me to a text based explanation for error handling, I would be happy to look it up myself.

 

About the Keithley 2450 manual - yes I did read it, but its not very specific. I also got the reference manual for the programming (thats were I found the "SENS;RES;RSENS ON;" from to turn on 4-wire R). The vis provided by Keithley seem to not support 4-wire measurements. Well, they also do not support people in Germany - I spent hours to fix the vi's to work at all. Sorry if this sounds a little frustrated. Maybe it was a mistake to start using labview instead of sticking to python/c++ ^^

0 Kudos
Message 3 of 11
(2,582 Views)

Here's a couple hints:

 

IF Error = TRUE

THEN Handle it (run a sub-vi to clear it, fixt it, whatever it takes...)

ELSE Do nothing

 

You can connect the Error Cluster directly to the Case Selector of a Case Structure 

Hint1.PNG Hint2.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 11
(2,566 Views)

Hi DPM,

 


DPM@ch wrote:

About the Keithley 2450 manual - yes I did read it, but its not very specific. I also got the reference manual for the programming (thats were I found the "SENS;RES;RSENS ON;" from to turn on 4-wire R). The vis provided by Keithley seem to not support 4-wire measurements. Well, they also do not support people in Germany - I spent hours to fix the vi's to work at all. Sorry if this sounds a little frustrated. Maybe it was a mistake to start using labview instead of sticking to python/c++ ^^


Keithley provides drivers tested for English computers. German computers often use different regional settings, especially a comma instead of a point as decimal separator...

The simple solution would be to set LabVIEW to NOT use the system's regional settings! (The better option is to refactor the drivers to handle numeric values independent of the OS settings.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(2,559 Views)
Solution
Accepted by topic author DPM@ch

There was already some good advice about error handling, one other note would be to turn the output OFF regardless of error.

 

You should at the very least read the manual about the Auto-ranging Resistance measurement which you are using in your code.  It will use up to 1mA for the 2000Ohms range.  In your case its probably not what you want to use.  You can use a much lower current if you source a fixed current and measure the voltage and calculate the resistance yourself.

 

A fixed current source of perhaps 5uA which would be a voltage reading of 3mV for 600Ohms.  To make the measurement fast, perform the auto-zero ahead of time and use a fixed measurement range (either 20mV/200mV/2V..) rather than auto-ranging but honestly it happens so fast I doubt it matters.  (I'm not sure at what temperature you are working so adjust current to suit needs, but remember there are sourcing and measuring errors that get larger at lower values. Consult 2450 datasheet for details!)

 

So your code could look more like this.. (Untestsd as I only have 2400s and 2600s)

 

Keithley 2450_R_loop_cds.png

Craig

Message 6 of 11
(2,539 Views)

@cstorey wrote:

Auto-ranging Resistance measurement which you are using in your code


Thanks, if you hadn't mentioned explicitly, that I was using it in my code, I might have overlooked the word "Auto" in "Auto Resistance" forever 😳 (in my defence - I had looked up what the vi is doing instead, and it only sends ":FUNC "RES"" - and for this the Keithley 2450 reference manual only states "Switch to resistance measurements." Even when looking it up again today, I couldn't find a hint, that this also sets Auto-Range in the manual - but its mentioned in the vi description 🙄). I think after a night of sleep I will be able to fix my code with your suggestions.I guess to reset the Error, I should simpy use an empty error constant?

 

About the temperature - for now I need to measure very small relative temperature changes (deltaT somewhere around 0.01 to 0.5 Kelvin) to correct another measurement signal in post processing. So it realy helps if I know, how much power I put into my sample due to the R-measurement.

0 Kudos
Message 7 of 11
(2,517 Views)

You're correct, I went looking in the manual for details and there's not much there at all.  My knowledge was from working with the older 2400 SMUs.  Here's a reference sheet they wrote that describes the 2450 and 3 resistance measurement techniques including the Auto-resistance.

 

https://download.tek.com/document/2450%20TSP%20Commands%20Resistance.pdf

 

Craig

0 Kudos
Message 8 of 11
(2,465 Views)

DPM@ch wrote:

Thanks. You might not belive it, but I got through Labview Core 1 and half of Labview core 2 tutorial. And btw. they are a real pain in the ass (who thought it would be a good idea to make a video based tutorial for a programming language and to top that divide it in small pieces of a few seconds without an index and no way to jump back to a specific topic to look something up again)! I know that I use shift registers - because thats only a small part of a larger project and I wanted to get all error messages when stopping the vi. If you could hint me to a text based explanation for error handling, I would be happy to look it up myself.

 

About the Keithley 2450 manual - yes I did read it, but its not very specific. I also got the reference manual for the programming (thats were I found the "SENS;RES;RSENS ON;" from to turn on 4-wire R). The vis provided by Keithley seem to not support 4-wire measurements. Well, they also do not support people in Germany - I spent hours to fix the vi's to work at all. Sorry if this sounds a little frustrated. Maybe it was a mistake to start using labview instead of sticking to python/c++ ^^


While GerdW is definitely right about the shift registers on the errors causing the issue, I believe that the shipping examples of QMH have shift registers on the error wires with the error trapping happening at the beginning of each iteration.  Which also works, but I think it's more natural to have the error trapping happening at the end of each iteration, so that you always end up with "no error" at the end of the iteration, rendering the shift register unnecessary.

 

In other words, I don't totally blame you for using shift registers on the error wire.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 11
(2,449 Views)

Thanks for the pdf. As far as I can see, it only handles 2-Wire measurements. The trouble with auto range happens when switching to 4-wire R measurement. But the solution via sourcing curent and measuring voltage worked for me, so I'm quite happy.

 

I also managed the error handling thanks to the help given here. It works in most cases. Saddly, there seems to be some errors, where it is not possible to reset the Keithley 2450. In that cases, I have to turn the power off and on before it works again. But thanks to the error handling I can at least catch those cases, and stop the complete measurement.

0 Kudos
Message 10 of 11
(2,404 Views)