NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Dinakar
Posts: 5
0 Kudos

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.
Active Participant nyc
Active Participant
Posts: 1,568
0 Kudos

Re: Code on Temperature measurement

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.

 

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page