Go to Post "It's not a bug, it's an unlisted feature." - Barry Craig [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 16-02-2009, 20:23
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Using a pot to control speed

I know how to obtain the value from the pot,
but when I use it to determine speed of the motor
it gives one constant speed.
I have the input in a while loop, so I don't understand why the speed isn't adjusting.
Also, the values on the front panel are nearly all within a small standard deviance.
Help?
__________________


Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2009, 20:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using a pot to control speed

Are you reading the pot inside the loop? It sounds like you are reading it once outside the loop and then acting forever on that one value.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2009, 20:33
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

I do have the Get Dig In inside the while loop.

also, the values returned are changing, just very very slightly.

It appears the the value is being update constantly.
__________________


Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2009, 20:42
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using a pot to control speed

Then is it that the pot's range isn't what you expected? You may want to look at the panel and turn it to a few known locations to learn the needed mapping.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2009, 20:54
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

pardon my ignorance.....mapping?
So it isn't possible to run the value through a scale factor and have that be the value sent to the motor?
__________________


Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2009, 20:57
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,995
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Using a pot to control speed

How exactly do you have it connected? Remember, a pot doesn't count rotational speed, it senses position.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2009, 21:00
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

aha.

I have the pot as a analog input on the driverstation.
using the position from the voltage return, I figured that I could multiply that value by 100, and use it to control the speed of the motor.
__________________


Reply With Quote
  #8   Spotlight this post!  
Unread 16-02-2009, 21:19
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,995
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Using a pot to control speed

Ah. OK.
You are seeing the pot value change, right? If so...
Then you multiply it by 100. So 1 volt = 100, 2 volts = 200... Remember the max range ofr a Victor for example is 0 to 254 - do you see a scaling issue here?

OK. Find the minimum value of your pot (say it is zero) and the maximum value (say it is 5.1). Then find the min and max valuse you can send to the Victor or Jaguar (say it is 0 and 254) (NOTE: Your values may be different, deoends on how you do it)

Then 0 = 0, and 5.1 = 254. Multiply the pot by (254/5.1 = 49.8 and it should be OK.

This assumes that you can control the speed of the motor manually - that is, set the output to 200 and it goes one speed, and 230 it goes another speed. That has to be working!
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #9   Spotlight this post!  
Unread 16-02-2009, 21:27
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

I am multiplying the value return by 100 because the value returned is all in the millionths. or .001 place. yeah.
and the set motor function in labview uses the values between -1 and 1 to set the outputs, so that shouldn't be an issue.
__________________


Reply With Quote
  #10   Spotlight this post!  
Unread 16-02-2009, 21:53
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using a pot to control speed

Scaling and mapping are related. Scaling is just multiplying by a number, mapping usually involves an offset, scale, and offset to linearly map one numeric range to another.

Probe the number going into the motor and see if it makes sense.

Greg McKaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 16-02-2009, 22:22
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

ahh.
So that's what that probe whatchamacallit is for.
Haha
I will try that and get back later.
__________________


Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2009, 01:19
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: Using a pot to control speed

Quote:
Originally Posted by SL8 View Post
I am multiplying the value return by 100 because the value returned is all in the millionths. or .001 place. yeah.
How exactly do you have this pot wired? It doesn't sound like it's giving much of a voltage to the Driver Station input pin.
Reply With Quote
  #13   Spotlight this post!  
Unread 17-02-2009, 21:29
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: Using a pot to control speed

Quote:
Originally Posted by SL8 View Post
I do have the Get Dig In inside the while loop.

also, the values returned are changing, just very very slightly.

It appears the the value is being update constantly.
If you're using GetDigIn, you're trying to get a digital value, aren't you? The pot is analog. You should be using the GetAnalogIn VI (I think that's what it's called, if not, it's something similar). Unless "Dig" stands for digit, in which case that's a really screwed up VI...
Reply With Quote
  #14   Spotlight this post!  
Unread 18-02-2009, 17:02
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: Using a pot to control speed

Quote:
Originally Posted by daltore View Post
If you're using GetDigIn, you're trying to get a digital value, aren't you? The pot is analog. You should be using the GetAnalogIn VI (I think that's what it's called, if not, it's something similar). Unless "Dig" stands for digit, in which case that's a really screwed up VI...
oh.
typo.
I am using tthe analog.
__________________


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed control Drake Hunter Programming 1 11-02-2009 23:08
can we control the amount of air to control the speed of the cylinder? Team2339 Pneumatics 22 11-02-2009 15:33
Labview questions, using motor and pot as a servo martin417 NI LabVIEW 7 05-02-2009 16:43
Drive Control, Wheel Speed Calibration, and Rapid Speed Changes 7-11number1 Programming 3 23-01-2008 20:36
are we allowed to control a window motor using a speed controller? Wstedtlogan Motors 1 19-02-2006 15:47


All times are GMT -5. The time now is 10:41.

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