Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

6517A Buffer readings format and transfer

Post Reply
muflone
Posts: 2
Joined: May 25th, 2012, 1:48 am
Country: Italy

6517A Buffer readings format and transfer

Post by muflone » May 25th, 2012, 3:43 am

Hi to everybody. I have a Keithley 6517a to perform low current measurements. I also use Labview to store all the readings of the internal buffer in a .txt file. The whole process is pretty clear and i think i can manage anything except for one important issue. I am measuring currents of about 1e-15 Amps and the electrometer works fine and store the information correctly and displays the data in floating point as it is set. Unfortunately when i send the :TRAC:DATA? query to the electrometer it answers with the correct sequence of informations set through the :FORMAT:ELEM commands, but the reading is always sent in terms of EXP-12 Amps losing the floating point precision and resolution of the displayed information. Am I doing anything wrong? Did i forget to set anything in the communication settings? I would like to receive data from the electrometer in ASCII format, but if there is a way around through the binary single or double precision format i would change my mind promptly. :D
Any help would be appreciated, sorry for my poor english, i hope i explained well the problem. For further infos, labview VIs or anything else i can show what i tried in the last weeks.
Thanks again to the whole community.

muflone
Posts: 2
Joined: May 25th, 2012, 1:48 am
Country: Italy

Re: 6517A Buffer readings format and transfer

Post by muflone » May 25th, 2012, 6:00 am

Sorry for the extra post. After a few measurements i found an interesting thing.
If i store in the buffer it seems that the actual range of the electrometer is being store in the buffer too. If i store the readings in the 2nA range, the ASCII communication sends numbers as to 1e-9. if i store them in the 2uA range it returns values as to 1e-6 etc etc. I cannot find how to remove this sort of "label" from the stored readings and so be able to read values as to 1e-xx as it should be in scientific format. thanks again

Dale C
Keithley Applications
Keithley Applications
Posts: 2849
Joined: June 10th, 2010, 6:22 am
Country: United States
Contact:

Re: 6517A Buffer readings format and transfer

Post by Dale C » May 25th, 2012, 7:50 am

If you want to read in scientific format then you can select this from the front panel.
MENU
GENERAL
DISPLAY
NUMERIC-FORMAT
SCIENTIFIC(1.0EXX)
FIXED-EXP
Now select what you want.
I do not see any SCPI code to set this.
The only method I can see is the SYSTEM:KEY commands.
The SYSTEM:KEY command will emulate a front panel button push.
It would be tedious but not impossible.

orso_orso78
Posts: 2
Joined: October 1st, 2020, 5:49 am
Country: Italy

Re: 6517A Buffer readings format and transfer

Post by orso_orso78 » October 1st, 2020, 5:58 am

Dear Dale,
I read your comment but that is effective only in the display part
and it does not change the buffer data.

Instead I found on the manual that it is possible to change the format
of buffer data by using the command:

':format dre' to change it in 64 bit format from ascii STANDARD
also it is possible to use ':format sre' for 32 bit format

Now the problem is that I cannot anymore understand the bit string...

I was reading : '-000.0161E-09' in ascii FORMAT (only tenths of pC as reading resolution)
In Display it is possible to get much better view.

WITH the change in SRE or DRE format I get stuff like this :
'ºîÿ©' or '䜗rb„'

Do you know how to interpret these signs as bit string ?

My best acknowledgements

Andrea C
Keithley Applications
Keithley Applications
Posts: 1481
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: 6517A Buffer readings format and transfer

Post by Andrea C » October 2nd, 2020, 10:08 am

In the Rev C manual for the 6517A, pg 14-51, it details the :FORMat:DATA command.

Only the ASCII format will be human readable. The other ones are IEEE754 binary representations.
Typical motivation for binary is fewer characters to xfer on the bus and reduction of that overhead cost.
But then on the PC side of things, you need to convert it back to ASCII to make sense of it.

Can we back up and confirm the actual issue you face?
Using ASCII, what are you seeing for the reading?
Should be of format: sign + digits + E+xx exponent.

The original poster I believe was displeased to see values of +00.00100E-12 reported for the 1fA level of currents measured by the most sensitive 20pA measure range.
What problem are you facing?

orso_orso78
Posts: 2
Joined: October 1st, 2020, 5:49 am
Country: Italy

Re: 6517A Buffer readings format and transfer

Post by orso_orso78 » October 8th, 2020, 10:19 am

Andrea C wrote:
October 2nd, 2020, 10:08 am
In the Rev C manual for the 6517A, pg 14-51, it details the :FORMat:DATA command.

Only the ASCII format will be human readable. The other ones are IEEE754 binary representations.
Typical motivation for binary is fewer characters to xfer on the bus and reduction of that overhead cost.
But then on the PC side of things, you need to convert it back to ASCII to make sense of it.

Can we back up and confirm the actual issue you face?
Using ASCII, what are you seeing for the reading?
Should be of format: sign + digits + E+xx exponent.

The original poster I believe was displeased to see values of +00.00100E-12 reported for the 1fA level of currents measured by the most sensitive 20pA measure range.
What problem are you facing?

Exactly!
Only I have difficulties to reconstruct back the real number:

Like ASCII reading:
ans =

'-2.99598533E-08
'

After changing the format to SRE:

ans =

'#0£ÂȲ'

Further Reading:

ans =

'#0Nг'

This happens in MATLAB environment with UNICODE format,
I tried to translate the signal back to table numbers with double Command and I got
respectively for those two strings :

35 48 163 194 562 (resembling maybe 38 bit string and not the 32bit imposed)

35 48 78 208 15 179 (maybe 39 bit)

My best acknowledgements for your help

Andrea C
Keithley Applications
Keithley Applications
Posts: 1481
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: 6517A Buffer readings format and transfer

Post by Andrea C » October 9th, 2020, 7:25 am

If you want to use binary mode data formatting on the information that the instrument sends to PC, you'll need to convert it from the IEEE754.
Here is some code from VB.NET to illustrate the concept.
It assumes you have configured the instrument to use binary and have a reading ready to retrieve.

Code: Select all


        ' read back the binary data
        Dim data64 As Byte()
        Dim ConvertedData As Single

        data64 = myInstr.IO.Read(100)   ' IEEE754 single precsion, 4 bytes

        ' response will be #0 + wxyz + LF
        For i = 0 To data64.Length - 1
            Debug.Print(data64(i) & "  " & Hex(data64(i)))
        Next

        ConvertedData = BitConverter.ToSingle(data64, 2)  ' start at position two due to #0 header
        Debug.Print(ConvertedData)
        Label1.Text = ConvertedData

        Dim StrConvertedData As String
        StrConvertedData = BitConverter.ToString(data64, 2)
        Debug.Print(StrConvertedData)
        Label1.Text = Label1.Text & "****" & StrConvertedData


Post Reply

Return to “Low Current Measurements”

Who is online

Users browsing this forum: No registered users and 1 guest