Go to Post I am alive today because I can't hold onto things. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2010, 07:50
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Digital IOs scrambled on Dashboard

We added the Dashboard sample to our robot project and got that to work by uncommenting the functions that get the actual values and commenting out the constant values. However, the digital IO values seem to be all scrambled up. It seems to be some sort of byte swap or bit order problem.

Is no one else having this problem? There doesn't seem to be any traffic on this problem.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2010, 11:20
Steve Warner Steve Warner is offline
Controls / Programming
FRC #0234 (Cyber Blue)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Indiana
Posts: 41
Steve Warner is an unknown quantity at this point
Re: Digital IOs scrambled on Dashboard

We had the same problem. If you print out the value in hex that is being sent to the DS you'll see what is going on. Writing from memory, the two rightmost bits are not used. The third bit is point 14, the fourth is point 13, etc. I might have this backwards but it's something like that. We shifted the bits right two places and then shuffled the bits so they wound up in the right place. A good example of bit shifting to show the students but another bit of "sample" code that doesn't work. If you need more detail on this, let me know.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital IO in C++ EricGoodchild C/C++ 3 15-01-2009 23:05
Labview Dashboard and updated IFI dashboard spec Joe Ross LabView and Data Acquisition 1 04-04-2006 02:04
Digital Caliper as a Digital Readout on Small Mill sanddrag Technical Discussion 9 13-10-2005 22:51
2004 Dashboard Protocal vs 2005 Dashboard Protocal Kyle T Programming 4 14-03-2005 22:19
Digital videos archiver 2001 1 24-06-2002 03:57


All times are GMT -5. The time now is 13:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi