06-14-2018 10:42 AM
I am trying to use Keithley2700 do 4-wire and 2-wire continuous resistance measurement based on channel assignment, then output measured data. I attached the VIs and error messages I get.
I am able to do 4-wire or 2-wire continuous resistance measurement separately. When I try to switch between 4-wire and 2-wire, it doesn't work. Anything I need to set here?
The Forloop is the top VI, the .csv file is the channel assignment.
Any suggestion and help are appreciated.Thanks.
06-14-2018 12:40 PM
You may need to explain how this should work a bit more, but I'll make some guess based on what I can deduce..
It looks like you want to read in a channel list from file and select either a 2 wire or 4 wire measurement for each channel. Your design has some flaws however.
- Your "ForLoop.vi" never specifies the channel number to the "Keithley_27XX_Flex_Test.vi", it hands over a list of channels (101:140).
- The "Keithley_27XX_Flex_Test.vi" is measuring ALL channels the same way, either 4-wire or 2-wire. I suspect some of your channels can't handle 2/4-wire setups and you get an error about a settings conflict.
You should redesing this in one of two ways:
- Either read in all the channels and divide them into 2 lists; 2-wire and 4-wire. Then supply those lists to the "Keithley_27XX_Flex_Test.vi".
- Alternately if you want to measure each channel individually you need to design a measurement for a single channel. Then have the top level VI pass both the channel and measurement config (2/4-wire) to the measurement VI. Also, you could do the initializing and closing of the instrument communications in the top level and save yourself lots of duplication!
Here's a mock up for you...
06-21-2018 02:44 PM
cstorey, thanks for the vis.
I attached Vis, output files and error messages. I run the TopLevel vi, it reads the first time, then start to beep and pops error, the error message is attached, is stars with -221 conflict setting, then -222. The testeee.csv is the reading output. As shown, only the first reading is there.
I step into vis, and find out the Keithley config measurement vi, as shown highlighted, the value there is:
:FUNC "FRES" , (@103)
;:FRES:RANG:AUTO ON , (@103)
;:FRES:DIG 7 , (@103)
Anything might go wrong anywhere? thanks for the help.
Then it start beeping and shows error.
06-21-2018 03:24 PM
Just to add the channel assignment .csv
06-22-2018 02:03 PM
Hmm, that all looks correct. The only possible error I can see it that the channel 103 (@103) doesn't support 4-wire which it is trying to configure
So it works for channel 1 and channel 2, but gives an error for channel 3? Can you confirm that the channel does support 4 wire on that card? Which cards are you using?
If channel 103 does support 4 wire, can you send those commands individually for that channel and have it work?
07-02-2018 09:19 AM
I step into vis, and find out the Keithley config measurement vi, as shown highlighted, the value there is:
:FUNC "FRES" , (@103)
;:FRES:RANG:AUTO ON , (@103)
;:FRES:DIG 7 , (@103)
The use of the semicolon is to be used only when two commands are on the same line. The command interpreter within the instrument treats the ";" the same as the newline "\n" character It assumes that the receipt of either of those characters marks the end of a current command/query and needs to perform that function. Try using one or the other. Not sure how it would respond to ";\n;". Also, one of these characters should be the last character sent in your string.
07-04-2018 10:36 AM
Hmm...good catch minions! I just checked that VI and its not well done for a Keithley made VI. It does append a "\n;:" when it should only be a ";:". Would be an easy fix to that VI, just edit 2 strings to remove the "\n".
But, I've tested the VI in question and it did work for me..but I only have 2 wire cards. If I try to set 4-wire mode I have to use the front pannel of my 2700 and then run that VI and all is fine. But it doesn't append channel info. If I try to tell it that my 2-wire card supports 4-wire mode, then justifiable errors occur (Error message is settings conflict I believe).
OP has never clarified which cards they are using, whether the code works for ch1 and ch2 but not ch3 (all are supposed to be 4 wire setup).
07-12-2018 01:29 PM
Thanks all for the help. I am able to run the vi get the chn 101- 139 measurement values once ,output looks correct. From the second round, seems the channel numbers are missing, they all show channel 100, and pop up error Parameters out of range error". Also, how can I add time stamp to each measurement? Thanks.
07-12-2018 02:07 PM
Hmm...wonder why the channel info is lost. Has the code changed in >3 weeks? Can you run in debug more and see why?
You can just make a date time stamp for every measurement like.. (add %S for seconds if you need that sort of precision.)
07-12-2018 06:13 PM
I added a session refresh vi into the code, this make the vi run all channels once. The second time, channel numbers lost. I want it to continuously reading measurement until I stop the vi. I attached an example output, testeee.csv. Column A-C is the results I got (Keithley start to beep after the first round), Column F-H is the results I expect to get. Thanks.