Go to Post I'm not worried about the amount of Segways at a regoinal, I'd rather see them out in the real world than at a robotics competition. - Joe Matt [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 06-03-2012, 21:27
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Potentiometer for Shooter

Quote:
Originally Posted by Doug Norman View Post
According to eStop Robotics, that board gets read as a joystick input on your robot. For the Joystick Open VI, choose the JoystickDevice input to match the location of your eStop CCI on the Driver Station Setup tab. For example, if your CCI is in location 2 on the DS, then your JoystickDevice input would be USB 2 in the robot code.

There is another alternative you could use. On the I/O tab of the DS, when it is set to Compatible Mode, you will see Analog Input sliders. You could read these instead of an external potentiometer. In this case you would read the values on the robot using the WPI Robotics Library>>DriverStation>>Compatibility I/O>>WPI_DriverStationGet Analog Input.vi. Then you would scale it accordingly to drive your motor.
Would the analog input(like a potentiometer) then act as a joystick and the digital inputs act as buttons on the joystick vi's? That seems to be my understanding.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2012, 18:38
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Potentiometer for Shooter

Ok so I have had success with programming this. Essentially what I did was in Teleop called the joystick vi's like you normally would when you want to do tank drive or other joystick related things and set the axis 1 as the shooting axis. The reason why I choose axis 1 is because on the board the analog inputs it gives you are call X, Y, Z, R. I assumed they all followed the the same in LV. This worked with great success but the problem I have is that when you turn the POT, you have a neutral position(zero position) where the shooter motor is not running and when you turn the knob to one side it goes forward and the other side spins the motor in reverse. Is there any way where I can take the values from from one extreme and use this as my starting position where the motor spins forward and increases the speed as you turn the knob?
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2012, 20:40
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,113
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: Programming Potentiometer for Shooter

Joystick values range from -1 to +1. You want to run the value through a formula that produces an output from 0 to +1 before you feed that to the motor, right? That's easy: add one, then divide by two.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-03-2012, 20:47
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Programming Potentiometer for Shooter

Quote:
Originally Posted by Alan Anderson View Post
Joystick values range from -1 to +1. You want to run the value through a formula that produces an output from 0 to +1 before you feed that to the motor, right? That's easy: add one, then divide by two.
Ahh, thanks for this, I completely forgot about adding one and dividing by two.
__________________
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 22:11.

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