Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Accelerometer code (http://www.chiefdelphi.com/forums/showthread.php?t=102808)

NeatTeam 14-02-2012 14:51

Accelerometer code
 
1 Attachment(s)
We tried to use this code but this didn't work.
We will appreciate any help.

Alan Anderson 14-02-2012 15:47

Re: Accelerometer code
 
Quote:

Originally Posted by NeatTeam (Post 1126523)
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?

NeatTeam 14-02-2012 16:28

Re: Accelerometer code
 
Quote:

Originally Posted by Alan Anderson (Post 1126542)
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.

Alan Anderson 14-02-2012 16:51

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.

NeatTeam 15-02-2012 11:11

Re: Accelerometer code
 
1 Attachment(s)
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.


All times are GMT -5. The time now is 11:14.

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