01-17-2018 04:38 AM
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.
Solved! Go to Solution.
01-17-2018 01:28 PM - edited 01-17-2018 01:31 PM
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.
01-24-2018 04:38 AM
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.
01-24-2018 11:09 AM
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.
01-29-2018 03:06 AM
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".
01-29-2018 05:09 AM
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".
01-29-2018 05:18 AM
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".
01-29-2018 10:24 AM
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.
01-29-2018 11:11 AM
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!
01-29-2018 11:41 AM
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.