OCCRA
Go to Post Good work I appoint you skillz points. - Kingofl337 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Events   CD-Media   CD-Spy   FRC-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 01-10-2012, 08:06 PM
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Accelerometer Example on New Crio

Does anyone know if the ADXL345 SPI example works on the new Crio? I tried to run it and it gave me an error along the lines of 'I can't find DIO module 2' Any ideas?

Last edited by baronep : 01-10-2012 at 08:42 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-10-2012, 10:09 PM
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: 7,810
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
Send a message via AIM to Alan Anderson
Re: Accelerometer Example of New Crio

The obvious question is: do you actually have a second DIO module installed in your cRIO? It would go in slot 4 of a 4-slot cRIO-II, or slot 6 of an 8-slot cRIO.

The first DIO module is number 1, even though it's actually installed in slot 2. That's a different way of numbering things from previous years, and I expect it'll trip up a few teams.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-10-2012, 10:20 PM
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Re: Accelerometer Example of New Crio

That is what i suspected as well, so I added a control to select crio slot (which defaulted to DIO2 BTW) and changed it to 1 but i received the same error. I know thats not a lot to go on, I will do some more investigative work tomorrow afternoon (how does school always seem to get in the way).
Reply With Quote
  #4   Spotlight this post!  
Unread 01-11-2012, 02:22 AM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 896
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by baronep View Post
That is what i suspected as well, so I added a control to select crio slot (which defaulted to DIO2 BTW) and changed it to 1 but i received the same error. I know thats not a lot to go on, I will do some more investigative work tomorrow afternoon (how does school always seem to get in the way).
You selected Digital Module 1 and still got an error that said you have no Digital Module 2? Maybe you didn't actually change the value. Did you make it a control on the panel of a VI and then deploy it? Did you re-build?

-Joe
Reply With Quote
  #5   Spotlight this post!  
Unread 01-11-2012, 07:15 AM
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: 7,810
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
Send a message via AIM to Alan Anderson
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by baronep View Post
...I added a control to select crio slot (which defaulted to DIO2 BTW)...
"DIO2" sounds like a pin number, not a module number. You might have wired the control up to the wrong terminal on the Open function.
Reply With Quote
  #6   Spotlight this post!  
Unread 01-11-2012, 08:16 AM
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 118
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Accelerometer Example of New Crio

What Joe said to do should work - wire a control to the DIO Module terminal and set it to Digital Module 1. It looks to me like we have a "bug" in our example. By default the ADXL345 SPI Open.vi should have Digital Module 1 as default. We should probably also wire and show that on the example front panel. I will fix this.
__________________
Doug Norman
National Instruments
Reply With Quote
  #7   Spotlight this post!  
Unread 01-11-2012, 11:36 AM
billbo911's Avatar
billbo911 billbo911 is offline
Registered User
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 1,834
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Accelerometer Example of New Crio

Sorry if this has been covered elsewhere, I could not find the info we are looking for and I am not versed enough in LabView to figure it out.....yet.

We can figure out how to run the I2C ADXL345 example, but where we are struggling is how to go about integrating the vi's into our robot project.
As far as we can see, the vi's to add the ADXL345 I2C are not available anywhere in the Functions pallet.

Can someone please point us in the right direction to help us figure out how to add support for the ADXL345 via I2C to our project?
__________________
So long and thanks for all the fish!

CalGames 2009 Semi Finalist, CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist, 2010 Madtown Creative Design Award
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2013 Pow3rhou53 Pwnage Gracious Professionalism Award.
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division, Gracious Professionalism Award.
Reply With Quote
  #8   Spotlight this post!  
Unread 01-11-2012, 01:54 PM
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Re: Accelerometer Example of New Crio

In the project explorer in the example project, there is a folder called ADXL driver. Just copy these VI's to your robot project
Reply With Quote
  #9   Spotlight this post!  
Unread 01-11-2012, 04:39 PM
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Accelerometer Example of New Crio

I've spent half of yesterday and all of today trying to get the ADXL345 working. I've tried both examples using two cRIOs, and nothing works. I did change the DIO module constant/control to 1 instead of 2. I did make sure the sensor is wired correctly. I see no reason why it wouldn't be working.

I posted my question here after somehow missing this thread.


Please help!
Reply With Quote
  #10   Spotlight this post!  
Unread 01-12-2012, 02:59 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 7,838
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Accelerometer Example of New Crio

There's updated files for the SPI ADXL345 example attached to the firstforge bug report. http://firstforge.wpi.edu/sf/go/artf1432
Reply With Quote
  #11   Spotlight this post!  
Unread 01-20-2012, 03:21 PM
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Accelerometer Example of New Crio

The fixed SPI example still doesn't work for me. I've finally gotten I2C working though, apparently it only works with the flat cable.
Reply With Quote
  #12   Spotlight this post!  
Unread 01-20-2012, 03:28 PM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 896
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by NeatNit View Post
The fixed SPI example still doesn't work for me. I've finally gotten I2C working though, apparently it only works with the flat cable.
Not sure what "flat cable" you are talking about. If it is the DB-37 cable from the kit, then it "only works" if you fix the cable end to not be reversed.
Reply With Quote
  #13   Spotlight this post!  
Unread 01-20-2012, 03:31 PM
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by jhersh View Post
Not sure what "flat cable" you are talking about. If it is the DB-37 cable from the kit, then it "only works" if you fix the cable end to not be reversed.
Yes, I meant that flat cable the replaced the thick round ones in previous years. What I meant to say is that the ADXL345 doesn't work with the old cable, in other words only works with the newer flat one. (our cable needed to be flipped but we already did that)
Reply With Quote
  #14   Spotlight this post!  
Unread 01-20-2012, 03:33 PM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 896
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by NeatNit View Post
Yes, I meant that flat cable the replaced the thick round ones in previous years. What I meant to say is that the ADXL345 doesn't work with the old cable, in other words only works with the newer flat one. (our cable needed to be flipped but we already did that)
It works with my thick round one. Maybe yours is just damaged.

-Joe
Reply With Quote
  #15   Spotlight this post!  
Unread 01-20-2012, 03:37 PM
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Accelerometer Example of New Crio

Quote:
Originally Posted by jhersh View Post
It works with my thick round one. Maybe yours is just damaged.

-Joe
Taken from this thread: http://www.chiefdelphi.com/forums/sh...d.php?t=100324

Quote:
Originally Posted by ggorsuch View Post
Got it working!
Used the flat db37 cable included in this years Kop, instead of the old round one.
Quote:
Originally Posted by abrightwell View Post
That's what we just did and sure enough it worked. Makes sense as when we Ohm'ed it out, pin 1 went to pin 15 on the other end. I didn't think to check the KoP website, but I'm definitely going to check it out. It still seems like a curious situation that the flat works for the accelerometer but the round doesn't. :-/ Oh well, I'll take it at face value for now.

Thanks for the follow up!

Sure, these are Java, but I'm still seeing a recurring pattern....
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 10:41 AM.

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


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