Help with 1048_0 temperature

Supporting Visual Studio on Windows
Biggermens
Phidgetsian
Posts: 10
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post 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
TMaiden
Fresh meat
Posts: 1
Joined: Thu Dec 14, 2017 10:47 am
Location: Missouri, United States
Contact:

Re: Help with 1048_0 temperature

Post 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,"###.##")

Tom

"If at first you don't succeed, do not take up sky-diving"
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests