Go to Post Just because you haven't witnessed parts leaving the flywheel yet, doesn't mean it won't happen. - Al Skierkiewicz [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 04-02-2010, 11:42
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: NEED HELP WITH SERVOS!!

Quote:
Originally Posted by EagleS!! View Post
we are trying some code but it isn't working. Could you tell me where is the mistake.
Saying "it isn't working" doesn't give a lot of information. What do you expect it to do, and what is it doing instead?

There's a red dot on the input of the Servo Set Angle vi. That means you're giving it a data type that it doesn't expect.

Your code will add ten every time Teleop is called -- which is fifty times a second. You probably don't want to do that.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2010, 12:27
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,563
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: NEED HELP WITH SERVOS!!

Quote:
Originally Posted by Alan Anderson View Post
There's a red dot on the input of the Servo Set Angle vi. That means you're giving it a data type that it doesn't expect.
The coercion dot is because GetAngle outputs an unsigned 16 bit integer, while SetAngle accepts a signed 32 bit integer. Either one handles far more then the servo needs, and so the coercion dot shouldn't matter. Not sure why two different types are used by the library.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2010, 13:37
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: NEED HELP WITH SERVOS!!

It might have just been the picture quality, but in your Begin it looks like it says "servc a" and not "servo a". Check that and watch the errors on the diagnostics tab of the Driver Station to see if you get any refnum errors, this will tell you if you have a typo somewhere.

As far as the datatype issue is, instead of using the blue constant (integer) use a orange constant (float), that should fix your datatype mismatch error (I think...No LV here to try it on.)
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2010, 14:43
EagleS!! EagleS!! is offline
Registered User
FRC #3390 (Anatolian Eaglebots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Turkey
Posts: 20
EagleS!! will become famous soon enoughEagleS!! will become famous soon enough
Re: NEED HELP WITH SERVOS!!

Quote:
Originally Posted by Alan Anderson View Post
Saying "it isn't working" doesn't give a lot of information. What do you expect it to do, and what is it doing instead?

There's a red dot on the input of the Servo Set Angle vi. That means you're giving it a data type that it doesn't expect.

Your code will add ten every time Teleop is called -- which is fifty times a second. You probably don't want to do that.
I just expect code to move camera by 10 degrees when button8 is pressed. But when pressed, nothing happens.

Do you think red dot on the input can cause problem?

I will try any code changes tomorrow as it is night here now.

Thanks in advance
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2010, 15:21
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: NEED HELP WITH SERVOS!!

Quote:
Originally Posted by EagleS!! View Post
I just expect code to move camera by 10 degrees when button8 is pressed. But when pressed, nothing happens.
Can you probe the values while the code is running to see if the input to the Set Angle vi is changing?

Is the robot enabled using the Driver Station?

Is the Robot Status Light on the Digital Sidecar on and winking off for a moment every second and a half?

Is the 6v power jumper installed for the PWM channel that the servo is connected to?

Is the 6v light on the Digital Sidecar lit?

If you try to turn the servo by hand, does it go where you put it, or does it resist motion and try to stay in the same position?



Once you get the servo to respond, you're only partway there. You will need to add something that only changes the servo angle when the button value changes from false to true. That means remembering the previous value so you can test against it. I use something called a Feedback Node to do that.



The red dot won't break anything. Apparently it's there because the Servo vi data types aren't consistent, and there really isn't much you can do about it.
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
Labview Servo Control Issue EricWilliams Programming 5 22-01-2010 14:24
Camera servo control off of the Joystick axes m3rc1l3ss NI LabVIEW 5 13-03-2009 20:00
Servo Control? mattg101 Technical Discussion 2 20-01-2007 13:12
Direct control of a Servo or Speed Controller Schmitty! National Instruments LabVIEW and Data Acquisition 3 06-03-2006 13:53
Servo behavior question / advanced servo/PIC programming question DanL Electrical 12 18-10-2005 18:33


All times are GMT -5. The time now is 11:57.

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