From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature reading from Keithley 6517B using LabVIEW drivers

Solved!
Go to solution

Hello there, this is my first post and as the name suggests, I am a rookie when it comes to both LabVIEW and Keithley 6517B so if this is a silly question, please go easy on me.

 

I am trying to get a temperature reading from the 6517B so I have put together this very basic VI using kei6517 drivers downloaded from NI but when I run it, all I get is a voltage reading.

 

In case you're wondering, yes I have attached the K-type thermocouple to the back of the device and yes I have configured the device for temp measurements and I can see both temp and humidity values in the front panel.

 

Any help would be much appreciated.

0 Kudos
Message 1 of 14
(4,079 Views)

I had a look through the driver, and it looks like it is not set up to handle the temperature and humidity stamping that you desire. The default setup string from "Default Instrument Setup.vi" is: 

*ESE 60;*SRE 48;*CLS;:FORM:DATA ASC;:FORM:ELEM READ,RNUM,CHAN,TST,UNIT;:SYST:TST:TYPE RTCL;

 

Note: if your emoticon display settings for the LabVIEW forums are set to something other than "none" then the SCPI commands can get very emotional.

 

The part I bolded from determines the format of read data from page 14-53 of the user manual. To get humidity and external temperature as well, you will need to make it read something like:

*ESE 60;*SRE 48;*CLS;:FORM:DATA ASC;:FORM:ELEM READ,RNUM,CHAN,TST,UNIT,HUM,ETEM;:SYST:TST:TYPE RTCL;

 

Now, when you get data back, it will be in a different format, so you will need to change the "Parse Readings" VI as well. This data should be in the "remain readings" string and you just have to figure out how to extract it out into a number. The data format is shown on page 14-51 of the user manul.

 

parse reading vi.PNG

Message 2 of 14
(4,043 Views)

Thank you for the response and sorry for the very late reply, I did not have access to labview for quite a few days so I could not test out what you suggested.

 

I typed the phrase you gave into the required VI and then ran the program and got two error messages (image attached) and no output in the front panel. I also attached the new program, everything's the same except for the new phrase.

Download All
0 Kudos
Message 3 of 14
(4,015 Views)

I cannot open your file, as it is from LV 2017 and I only have 2016. But query unterminated probably means you need some extra characters to tell the instrument that it reached the query. Often hitting the return key will fix the problem, but to get a better idea of what's going on you can right click the string constant and change from normal display to "\ codes display". This will change all the invisible characters into their corresponding slash code visually to you, but in reality the contents of the string has not been changed. A space will look like "\s", for instance. At the end of your string you can try adding "\r\n", or just "\r" or "\n" to add return or new line characters respectively. The fastest way to see if this works is to open instrument communications in MAX.

Message 4 of 14
(4,007 Views)

Sorry for bothering you with this over and over again. I did what you said and it worked i.e the "query unterminated" error is gone but I still get a message saying "syntax error -102" and "no error 0".

0 Kudos
Message 5 of 14
(3,976 Views)

Sorry for bothering you again and again with this. I did what you said (img attached) and it worked i.e the "query unterminated" error is gone but I still get a message saying "syntax error -102" and "no error 0".

Download All
0 Kudos
Message 6 of 14
(3,972 Views)

I did what you said and it worked i.e the "query unterminated" error is gone but I still get a message saying "syntax error -102" and "no error 0".

Download All
0 Kudos
Message 7 of 14
(3,975 Views)

Sorry for the multiple posts in a row. When I sent the first one, it didn't appear in the thread so I sent another and the same thing happened. and now all three of them are here.

0 Kudos
Message 8 of 14
(3,968 Views)

Well, I wish I had the instrument right in front of me to play with... I would recommend reading the manual if you haven't already and see if you come to a different conclusion than I did. If you've already looked through it, hopefully someone else can come along with more knowledge of that instrument!

0 Kudos
Message 9 of 14
(3,962 Views)

OK I'll do that. I'll admit I have been hesitant about that cos the manual is like 500 pages! But thanks anyway for all the help so far.

0 Kudos
Message 10 of 14
(3,959 Views)