Page 2 of 2

Re: Help with 1048_0 temperature

Posted: Wed Sep 25, 2013 8:56 pm
by Biggermens
Hey I got it :D

This is what I did

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
sensor1 = New Phidgets.TemperatureSensor
sensor1.open(284703)
sensor2 = New Phidgets.TemperatureSensor
sensor2.open(284285)

End Sub

Private Sub sensor1_TemperatureChange(ByVal sender As Object, ByVal e As Phidgets.Events.TemperatureChangeEventArgs) Handles sensor1.TemperatureChange

If e.Index = 0 Then
NumericUpDown19.Text = e.Temperature.ToString
ElseIf e.Index = 1 Then
NumericUpDown20.Text = e.Temperature.ToString
ElseIf e.Index = 2 Then
NumericUpDown21.Text = e.Temperature.ToString
ElseIf e.Index = 3 Then
NumericUpDown22.Text = e.Temperature.ToString
End If

End Sub

Private Sub sensor2_TemperatureChange(ByVal sender As Object, ByVal e As Phidgets.Events.TemperatureChangeEventArgs) Handles sensor2.TemperatureChange

If e.Index = 0 Then
NumericUpDown23.Text = e.Temperature.ToString
ElseIf e.Index = 1 Then
NumericUpDown24.Text = e.Temperature.ToString
ElseIf e.Index = 2 Then
NumericUpDown25.Text = e.Temperature.ToString
ElseIf e.Index = 3 Then
NumericUpDown26.Text = e.Temperature.ToString
End If

End Sub


Thanks for everyone's help
Biggs

Re: Help with 1048_0 temperature

Posted: Thu Dec 14, 2017 5:16 pm
by TMaiden
Biggermens wrote:ok thank you I will try it then I will let you know

Would you know by any chance know how to display only 2 decimal points ?? instead of 4 ??


Thanks
Yves
I know that this post is 4 years old, but I don't think this "Show 2 decimal points..." question was answered.

You can use the FORMAT() function to display your numbers.

TextBox1.text = format(Variable,"###.##")