Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Code on Temperature measurement

Hi, I am trying to read the temperature data from the keithley data logger but I am getting the wrong readings. The code is as follows. I got this program from a sample code provided by keithley. Can anyone explain tis code to me.

Dim reading As Double
        Dim isOverRange As Boolean


        Try
            Using vi As New KE2700("TemperatureReader", True, True)

                System.Console.Out.WriteLine("One-shot T/C Temperature Measurement, 2700 Manual, p. 2-49, example #3")

                ' There are two alternative implementations.

                ' Implementation 1: Uses vi.ChannelList to pass the channel name
                ' configure the temperature unit,  KE2700Properties.TEMPUNIT is not channel-based.
                vi.SetInt32(KE2700Properties.TempUnit, "", KE2700Constants.TempFahrenheit)

                ' configure function and range
                vi.SetChannelList("101")
                vi.ConfigureMeasurement(KE2700Constants.Temperature, KE2700Constants.AutoRangeOn, 0.0001)

                ' Configure the temperature transducer type as Thermocouple,
                vi.ConfigureTransducerType(KE2700Constants.Thermocouple)

                ' configure the thermocouple type and reference junction type
                vi.ConfigureThermocouple(KE2700Constants.TempTcJ, KE2700Constants.TcRefSimulated)

                ' set the simulated reference junction value
                vi.ConfigureSimRefJunction(32.0#)

                ' init and fetch a reading
                vi.Read(5000, reading)

Actually, what does this mean
KE2700Constants.TcRefSimulated

vi.ConfigureSimRefJunction(32.0#) How is this 32.0 set.

Kindly explain this code.

Thank you.
0 Kudos
Message 1 of 2
(3,086 Views)

That appears to be .NET

 

If you don't understand .NET perhaps some tutorials would be helpful.

Otherwise, talk to Keithley. It's their code.

 

 

0 Kudos
Message 2 of 2
(3,077 Views)