Go to Post Doctor the drill, or doctor your hand. Easy choice. Let's all make the right one. - Molten [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 01-02-2014, 17:47
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Question Sensor Issue

We are trying to program a LV-MaxSonar-EZ1 sensor for distance measurements. We have copied the template and when deployed alone it works fine but when we try to run it with the rest of our code it does not give us any feedback as to if it is working or not. We have an icon on our dashboard that is suppose to move with the distance but shows nothing. Any help would be greatly appreciated!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2014, 22:48
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Sensor Issue

Did you copy the code by re-making exactly it in your project exactly how you saw it or did you simply CTR-C, CTR-V? If you CTR-C'd it, try remaking it just how you see it in the example, this will add the needed dependency files to your robot project, rather than just those copied from the other vi.

Also, posting a picture of your code can be very helpful!
__________________
Per Audacia Ad Astra
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2014, 16:59
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
Re: Sensor Issue

We had this exact problem with the accelerometer vi, make sure it is checking the correct DIO module. It had defaulted to Breakout 2, which was not physically present on our robot. Also, make sure that there are no conflicting functions, such as the one that connects to the dashboard, which are often in the example code. I would recommend simply transplanting the sub-programs within the examples, such as the load and read functions within the main example loop. if you continue having issues, post your code; I would be happy to look over it.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2014, 21:43
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Re: Sensor Issue

Here is the code that I tried.
Attached Thumbnails
Click image for larger version

Name:	Programming.png
Views:	44
Size:	262.5 KB
ID:	16090  
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2014, 22:19
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: 8,560
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: Sensor Issue

When you copied the front panel controls to teleop, did you make sure the values stayed the same?
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2014, 12:14
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Re: Sensor Issue

Quote:
Originally Posted by Joe Ross View Post
When you copied the front panel controls to teleop, did you make sure the values stayed the same?
Yes. All values are the same.
Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2014, 16:18
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Re: Sensor Issue

Here is a pic of the front panel...I am unsure if there are any other VIs I need to add a front panel to other than teleop...
Attached Thumbnails
Click image for larger version

Name:	frontpanel.png
Views:	13
Size:	221.1 KB
ID:	16151  
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2014, 16:26
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,349
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: Sensor Issue

We had this issue when we tried using the "Digital", or "PWM", output. We ended up just choosing to use analog, as you did here.
The one thing to remember about this sensor is, it only samples at a 10Hz rate. Anything beyond that is not getting you any additional data, and may be corrupting your readings..
With the default config, you are sampling it at 1KHz.
Try setting the sample rate down to 10Hz and see how it works.


(We ended up re-building the digital interface and it worked like a charm. I have NO CLUE why it failed previously!)
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
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 ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2014, 17:59
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Re: Sensor Issue

I edited the code, but its still not functioning
Attached Thumbnails
Click image for larger version

Name:	fixedcode.png
Views:	12
Size:	166.7 KB
ID:	16153  
Reply With Quote
  #10   Spotlight this post!  
Unread 07-02-2014, 23:57
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,349
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: Sensor Issue

Quote:
Originally Posted by ROBOGIRL2781 View Post
I edited the code, but its still not functioning
Dividing the value by 9.8 is only off by a factor of 1000.
It should be .0098.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
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 ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #11   Spotlight this post!  
Unread 08-02-2014, 10:47
ROBOGIRL2781 ROBOGIRL2781 is offline
Registered User
FRC #2781
 
Join Date: Jan 2013
Location: Burbank,IL
Posts: 19
ROBOGIRL2781 is an unknown quantity at this point
Re: Sensor Issue

I changed the scaling but it still does not show its working...is there specific numbers for the AverageBits and OversampleBits?
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 04:38.

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