Go to Post Its always reassuring to share a design with a respected, competitive and veteran team. - Adama [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 21-02-2012, 12:43
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Quadratic equation problem

I took data from a sensor and basically tried to use the quadratic equation on it. When I plug in a number for it it would work, but the problem is that the motor just won't run when I do it. I've attached the program I made for it. If anyone could guide me in the right direction that would be much appreciated.
Attached Thumbnails
Click image for larger version

Name:	durrhurr.PNG
Views:	69
Size:	10.0 KB
ID:	12033  
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2012, 15:02
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,112
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: Quadratic equation problem

Where are you putting the code you posted a picture of? What sensor are you reading?

What are you trying to do with this computation?
Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2012, 17:23
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Quadratic equation problem

The code is in the teleop.vi. It's being read from a sonar (after the conversions). I basically needed to run a motor at different speeds based on the distance, but it didn't work well linearly.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-02-2012, 17:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Quadratic equation problem

Quote:
Originally Posted by DFZXA View Post
The code is in the teleop.vi. It's being read from a sonar (after the conversions). I basically needed to run a motor at different speeds based on the distance, but it didn't work well linearly.
Let "y" be the output from that code, and "x" be the input.

Then it looks like you are computing

y = -8.24x2 +12.3x -3.97

See attachment. Is that what you intended?


Attached Thumbnails
Click image for larger version

Name:	quad.png
Views:	26
Size:	8.2 KB
ID:	12038  

Last edited by Ether : 21-02-2012 at 17:47.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2012, 10:53
DFZXA DFZXA is offline
Registered User
FRC #3055 (Furious George)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Minnesota
Posts: 60
DFZXA is infamous around these parts
Re: Quadratic equation problem

Quote:
Originally Posted by Ether View Post
Let "y" be the output from that code, and "x" be the input.

Then it looks like you are computing

y = -8.24x2 +12.3x -3.97

See attachment. Is that what you intended?


Yes that's exactly how I wanted it, but the motor just sits there and does nothing when I tried that.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-02-2012, 11:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Quadratic equation problem

Quote:
Originally Posted by DFZXA View Post
Yes that's exactly how I wanted it, but the motor just sits there and does nothing when I tried that.
Put a probe on the output from your equation (the input to MotorSetOutput) and see what value is there when "the motor just sits there and does nothing".


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 11:22.

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