TPA81 reads differently when calling from RoboticsStudio vs. Serializer.NET
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



TPA81 reads differently when calling from... Expand / Collapse
Author
Message
Posted Tuesday, March 25, 2008 1:11 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: Thursday, April 03, 2008 8:22 PM
Posts: 16, Visits: 24
I have a TPA81 that reads usually 75-77 F (24-25C) in Robotics Studio service TPA81Service.  However, if I poll the exact same sensor from a Windows Forms application using Serializer.Net call like this:

lblTemp = tpa81[0].Temperature.ToString();   //get ambient temp

the value I get returned is usually 56-57.  If I heat the thing up, it goes up; if I cool it down, it goes down.  So on a relative basis it seems to be working, but the value it is returning is clearly not Celsius or Fahrenheit.  The same for all the other eight temp points.  I know the sensor is working fine, because RoboticsStudio service is correctly reading the temps off it.  Is my programmatic call above retrieving some kind of raw sensor reading that needs to be converted to F or C?  (If so, what is the formula?)  Or what might be going on here, any ideas?

Thanks!

Post #230
Posted Tuesday, March 25, 2008 3:17 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299, Visits: 426
Hmm...

I just compared the src code between the .NET lib and the Serializer Services and they are using the same algorithm for calculating Fahrenheit.   The only real difference I see is that the .NET lib is storing the value in a double, and the Serializer Services is storing it in an int.  Dunno why I did that.

I have some CE stuff to do this weekend, but I will try to get to the bottom of this on Saturday.    I'll post the results (if not before then).

You might want to ensure you're setting the units to your desired value for the Serializer .NET Lib (in the CommunicationsStarted handler).

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #231
Posted Tuesday, March 25, 2008 3:28 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299, Visits: 426
Okay, I found the (order of operations) bug... It's in the Serializer .NET Lib.

I'll fix it tonight, and post a new release (which has another bug fix anyway).

Thanks for pointing this out my friend!

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #232
Posted Tuesday, March 25, 2008 6:48 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299, Visits: 426
I just posted a new release of the Serializer .NET Lib (1.2.3.0) that fixed this issue.

http://www.roboticsconnection.com/p-16-serializer-net-robot-controller.aspx (see Docs/HowTo/Library tab).

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #235
Posted Tuesday, March 25, 2008 9:16 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: Thursday, April 03, 2008 8:22 PM
Posts: 16, Visits: 24
Jason, thanks for such a quick turn-around!  I installed and tested the new version of the library you just posted, and it worked perfectly; the temperature readings are now displaying accurately on my labels.  Thanks again!
Post #237
Posted Wednesday, March 26, 2008 5:49 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299, Visits: 426
You are welcome!  I'm glad it was a quick fix, and that I could get it out for you asap.

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #242
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 2:36pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.187. 13 queries. Compression Disabled.