Help with 1048_0 temperature

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

Help with 1048_0 temperature

Post by Biggermens »

Hello everyone

I just got a couple of 1048_0 temperature sensors
I am having a hard time I have not done this in years and years
I looked at the sample code I downloaded from the website and I cant figure it out
Can anyone help me with just simple code to get me started ???
Please

I am also using VB2012 64bit is that a problem ???
Thanks
Biggs
User avatar
burley
Human-Cyborg Relations
Posts: 442
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Help with 1048_0 temperature

Post by burley »

What kind of problems are you having exactly?
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
Biggermens
Phidgetsian
Posts: 14
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post by Biggermens »

Well I have lots of problem and probably more to come hehe right now this is were I am at

I have this for code to make thermocouple 0 Ktype work in a textbox


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


If e.Index = 0 Then
TextBox1.Text = e.Temperature.ToString
ElseIf e.Index = 1 Then
TextBox2.Text = e.Temperature.ToString
End If


End Sub

And I also have 2 1048 to make work at the same time

And would be easier if I use a 32bit system ???

Thanks
Biggs
User avatar
burley
Human-Cyborg Relations
Posts: 442
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Help with 1048_0 temperature

Post by burley »

But what is actually going wrong? That code looks generally fine so the problems must be coming from elsewhere in the your program.
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
Biggermens
Phidgetsian
Posts: 14
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post by Biggermens »

OK I will keep working at that and see what will happen.

One problem I see I will have is How do I get 2 1048 working at the same time ????

I think the biggest problem is who is sitting in front of my computer screen hehe

Thanks
Biggs
User avatar
burley
Human-Cyborg Relations
Posts: 442
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Help with 1048_0 temperature

Post by burley »

Just create a second object in the same way that you created the first. When you call open make sure that you use the appropriate serial number.
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
Biggermens
Phidgetsian
Posts: 14
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post by Biggermens »

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
Biggermens
Phidgetsian
Posts: 14
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post by Biggermens »

I cant figure out how to use multiple 1048-0 temperature sensor
This is what I got

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

End Sub

Private Sub sensor_TemperatureChange(ByVal sender As Object, ByVal e As Phidgets.Events.TemperatureChangeEventArgs) Handles sensor.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


Were do I open the second 1048 SN# 284285 ??? and how do I do the sensor_TemperatureChange for the second 1048


Thanks
Biggs
User avatar
burley
Human-Cyborg Relations
Posts: 442
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Help with 1048_0 temperature

Post by burley »

You need to create a second temperature sensor object.

sensor = New Phidgets.TemperatureSensor
sensor.open(284703)

Like that, only a second one. Use the appropriate serial number as well. You can use the same event handler for both devices. You can differentiate in the handler which device generated the event by checking the serial number of the sender object.
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
Biggermens
Phidgetsian
Posts: 14
Joined: Sun Aug 02, 2009 9:55 pm
Contact:

Re: Help with 1048_0 temperature

Post by Biggermens »

This is what I did not sure if its right as for the handle I cant figure one out :(
I also have been looking for multiple phidgets examples from the example pack I downloaded from you guys I cant find it

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

End Sub

How would I go about doing the handle ???

Thanks in advance
Biggs
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests