Page 1 of 1

How to ask for a fixed output with READ

Posted: November 15th, 2015, 9:41 am
by maurice74
Hi folks,
I am reading a Keithley 2700 using a Lantronix, accessing with SCPI commands.
I have a card behind, with 2 temperature sensors, and I would like to read them.
I tried to use these commands:
*RST
TRAC:CLE
FUNC 'TEMP'
TEMP:TRAN FRTD
TEMP:FRTD:TYPE PT100
SAMP:COUN 1
ROUT:CLOS (@101)
READ?
ROUT:CLOS (@102)
READ?

The problem is that I am reading some bytes back, and the typical output that I can have is a string similar to this one:

+2.39266682E+01_C,+11183.320SECS,+00891RDNG#

The problem is: sometimes I have just part of this string, and sometimes I cannot properly take the correct number out of the string.
Is there a way to have only the measurement, nothing else, and always of the same bytes length ?
Thanks for any suggestion
PS I am using python with the socket library
Cheers
Maurizio

Re: How to ask for a fixed output with READ

Posted: November 16th, 2015, 12:57 am
by Norbert W
Hello,

the *RST default delivers reading, unit, reading number and time stamp.
To select reading only just place the following command after the *RST command:

FORMAT:ELEMENTS READING