Go to Post PS. Listen to the wise Brandon Martus. Think before you (re)act. - artdutra04 [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 12-02-2010, 16:46
mcristina444 mcristina444 is offline
Registered User
FRC #2078 (Robotic Ooze)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Covington, LA
Posts: 27
mcristina444 is an unknown quantity at this point
Exclamation Camera servo

im trying to move the camera using the 2nd joytick. we want to make button 8 make it go left and button 9 go right. then for up and down we want the thing that is between them to make it go up and down. anyone know how to do this?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2010, 17:12
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,752
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: Camera servo

I think there was a thread that went into details on this recently. Basically you want to set the servo to a value each time through the loop. In front of this, you take the values sent last time and optionally increment, decrement, or leave alone. The value also needs to be remembered again until the next teleop message. The value can be fed back using a feedback node, it can use a shift register, a local variable, or even a global variable.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2010, 21:49
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: Camera servo

Quote:
Originally Posted by Greg McKaskle View Post
The value also needs to be remembered again until the next teleop message. The value can be fed back using a feedback node, it can use a shift register, a local variable, or even a global variable.
The servo itself remembers its value, so you can just Get Position, add to or subtract from it, and Set Position each time through.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-02-2010, 22:15
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Camera servo

The "thing" between buttons 8 & 9 is called the Throttle ... a.k.a Axis-3.

It goes from -1 to 1 ... but IMO, it goes the wrong way. You can wire the Axis3 (throttle) axis directly into the Tilt servo's SET POSITION. You might want to throw a "negate" in between if it acts backwards.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2010, 00:11
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Camera servo

Quote:
Originally Posted by Ziaholic View Post
The "thing" between buttons 8 & 9 is called the Throttle ... a.k.a Axis-3.

It goes from -1 to 1 ... but IMO, it goes the wrong way. You can wire the Axis3 (throttle) axis directly into the Tilt servo's SET POSITION. You might want to throw a "negate" in between if it acts backwards.
That is actually a good idea! I never knew that little thing on the front of the joystick was Axis 3.

btw(by the way), i created a post JUST like this, but I have code that does work(with the lightbulb on). I am still trying to figure out why the camera servo itself isnt working when we deploy the code.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2010, 00:53
mcristina444 mcristina444 is offline
Registered User
FRC #2078 (Robotic Ooze)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Covington, LA
Posts: 27
mcristina444 is an unknown quantity at this point
Re: Camera servo

Thanks for all the quick replies! sorry i cant take screen shots of the programming i have already done. what i basically set up was button 8 going into a case structure. (in true) i called up the Get angle then added 10 to it the put that value into Set Angle. it showed a red dot at Set angle. we deployed this code and nothing happened. is there a way to fix the red dot or should we use another Vi such as Set Position and Get position?
Also i did get the Throttle to work. all we added was a negate because it was backwards.
Again thanks for all the help. This is the second year I have been on the team and i am already the head programmer on my team.
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2010, 08:35
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: Camera servo

Quote:
Originally Posted by mcristina444 View Post
i called up the Get angle then added 10 to it the put that value into Set Angle. it showed a red dot at Set angle. we deployed this code and nothing happened. is there a way to fix the red dot or should we use another Vi such as Set Position and Get position?
The dot is because Get Angle provides an unsigned 16 bit integer, and Set Angle wants a signed 32 bit integer. They are compatible, but not identical. You are right to be concerned about it, but this particular red dot is to be expected and causes no problems.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-02-2010, 08:36
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: Camera servo

Quote:
Originally Posted by umangv620 View Post
I am still trying to figure out why the camera servo itself isnt working when we deploy the code.
Do you have the 6v power jumper installed next to the PWM pins going to the servo?
Reply With Quote
  #9   Spotlight this post!  
Unread 13-02-2010, 09:36
mcristina444 mcristina444 is offline
Registered User
FRC #2078 (Robotic Ooze)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Covington, LA
Posts: 27
mcristina444 is an unknown quantity at this point
Re: Camera servo

Quote:
Originally Posted by Alan Anderson View Post
The dot is because Get Angle provides an unsigned 16 bit integer, and Set Angle wants a signed 32 bit integer. They are compatible, but not identical. You are right to be concerned about it, but this particular red dot is to be expected and causes no problems.
If there is compatibility then why isnt our robot responding? do i need to add a converter Vi in between that? or is there something else wrong with our code?
Reply With Quote
  #10   Spotlight this post!  
Unread 13-02-2010, 18:13
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Camera servo

Quote:
Originally Posted by Ziaholic View Post
The "thing" between buttons 8 & 9 is called the Throttle ... a.k.a Axis-3.

It goes from -1 to 1 ... but IMO, it goes the wrong way. You can wire the Axis3 (throttle) axis directly into the Tilt servo's SET POSITION. You might want to throw a "negate" in between if it acts backwards.
We got our camera servo working using axis 3.
to take into account the -1 to 1, the value given by the axis was divided by 4, and then added .5, so the total value would go from .25 to .75(since we dont need the camera to go up and down all the way)
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #11   Spotlight this post!  
Unread 14-02-2010, 00:43
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: Camera servo

Quote:
Originally Posted by mcristina444 View Post
If there is compatibility then why isnt our robot responding?
I don't know why your robot is not responding. You haven't given enough information about how you're trying to make it do what you want it to.
Reply With Quote
  #12   Spotlight this post!  
Unread 14-02-2010, 01:26
ecnahc515 ecnahc515 is offline
Registered User
FRC #3192
 
Join Date: Jan 2010
Location: Oregon
Posts: 6
ecnahc515 is an unknown quantity at this point
Re: Camera servo

Quote:
Originally Posted by umangv620 View Post
That is actually a good idea! I never knew that little thing on the front of the joystick was Axis 3.

btw(by the way), i created a post JUST like this, but I have code that does work(with the lightbulb on). I am still trying to figure out why the camera servo itself isnt working when we deploy the code.
Make sure you have a jumper on the pwm channel your using for the servo.

Also I have a question:

Im using axis 3 as a throttle to control the speed for our robot. Basically I wana be able to move it down to make our robots motors run slower so going over the bump isnt so fast and reckless.

I did it with controls, but I wana do this with the actual axis 3 button.

How would I go about doing it. These two are what I have:





Last edited by ecnahc515 : 14-02-2010 at 18:15.
Reply With Quote
  #13   Spotlight this post!  
Unread 14-02-2010, 23:12
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Camera servo

Quote:
Originally Posted by ecnahc515 View Post
Make sure you have a jumper on the pwm channel your using for the servo.
That wasnt the problem. Our original code had button 2 moving the camera up and button 3 moving the camera down, and that was not moving the camera for some reason. Without touching the electrical board, we changed the camera servo code so that it moves according to the values given by Axis 3, the camera started moving. I dont know why it didnt work before, but it works now, which is one less thing for us to worry about
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
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
Programing servo in Axis camera 206 frcchile NI LabVIEW 6 18-01-2009 08:53
Camera servo trouble Demothesis Electrical 5 27-01-2007 17:15
Camera Servo Problems pi_guy578 Programming 2 28-01-2006 13:17
Servo Strain With Camera DanDon Motors 6 13-02-2005 08:49
Camera Servo Obi Programming 2 30-01-2005 17:09


All times are GMT -5. The time now is 22:39.

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