Go to Post I am a mentor now and I would be more proud of a National Chairmans Award which acknowledges my many years of service to the team and the community rather than a National Championship which acknowledges one great robot I helped build. - The Lucas [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 14-02-2012, 14:51
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Accelerometer code

We tried to use this code but this didn't work.
We will appreciate any help.
Attached Files
File Type: rar Accelerometer code.rar (212.0 KB, 19 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2012, 15:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Accelerometer code

Quote:
Originally Posted by NeatTeam View Post
We tried to use this code but this didn't work.
We will appreciate any help.
You aren't giving much information to go on. Can you be a little more specific than "this didn't work"? What part of the code should we be looking for? What do you want it to do, and what is it doing instead?
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2012, 16:28
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Re: Accelerometer code

Quote:
Originally Posted by Alan Anderson View Post
You aren't giving much information to go on. Can you be a little more specific than "this didn't work"? What part of the code should we be looking for? What do you want it to do, and what is it doing instead?
Well we tried to base our code on what shown in the Example of AXDL345 i2c - We used the Open and Read methods they built.

(The part that you should probably inspect is the teleop)

We wanted to get the acceleration from the accelerometer sensor, but the acceleration output (in the Teleop) returned 0.
We have double checked the wiring is exactly as shown in the example, so we know that is not the problem.
I hope this helps.
Thank you.

Last edited by NeatTeam : 14-02-2012 at 16:34.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2012, 16:51
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Accelerometer code

Ah, the infamous "accelerometer returns zero" issue. The code looks right at first glance.

What cable are you using between the cRIO's DIO module and the Digital Sidecar? There are many reports of the white round-jacketed cable from previous years not working with I2C while a ribbon cable does. There's also the possibility that a ribbon cable from this year's Kit of Parts didn't quite get fixed properly, and has some bad connections at the end where the I2C pins are.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2012, 11:11
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Re: Accelerometer code

First of all, thanks for the quick reply!
We have used the white round-jacketed cable from previous years and not the ribbon cable because the ribbon cable was destroyed when we tried to fix it (It had arrived broken in the KOP)... We are now trying to get a new ribbon cable.
I also tried to use the accelerometer with SPI, but it had the same problem (acceleration is always 0). Is it also because of the cable?

the code for the SPI try is attached.
Attached Files
File Type: rar AccelerometerSPI_TRY.rar (212.0 KB, 4 views)
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


All times are GMT -5. The time now is 22:07.

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