Imports Emant
Module Module1

    Sub Main()
        Const A As Double = 0.001129148
        Const B As Double = 0.000234125
        Const C As Double = 0.0000000876741
        Dim volt, temp, R As Double

        Dim DAQ As Emant300 = New Emant300
        'DAQ.Simulation = True
        DAQ.Open()
        DAQ.WriteAnalog(0.1)
        volt = DAQ.ReadAnalog(Emant300.AIN.AIN3, Emant300.AIN.AIN2)
        R = volt / 0.0001
        Console.WriteLine(R)
        temp = 1 / (A + B * Math.Log(R) + C * Math.Pow(Math.Log(R), 3))
        temp = temp - 273
        Console.WriteLine(temp)
        DAQ.Close()
    End Sub

End Module
