I am trying to figure out the proper syntax to get the Keithley multimeter to return the temperature from channel 1 on the first slot (@101). I am connected to the Keithley 2700 through a USB to Serial connection. I can query the DMM for the serial number. So I know I am connected and can send commands. But I don't understand how to format the command to measure the temperature (or any of the resistances, for that matter).
public string GetTemperature(string comPort)
{
string msg = "MEAS:TEMP?:@101"; // I also tried "*TEMP? @101"
string response = string.Empty;
SerialPort sp = new SerialPort();
sp.PortName = comPort;
if (!sp.IsOpen)
sp.Open();
while (sp.BytesToRead > 0)
{
response += sp.ReadExisting();
}
sp.DiscardInBuffer();
sp.Close();
return response;
}
I get no errors. It just returns an empty string.
Can anyone help?
Thanks.