|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: NEED HELP WITH SERVOS!!
Quote:
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. |
|
#2
|
||||||
|
||||||
|
Re: NEED HELP WITH SERVOS!!
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.
|
|
#3
|
||||
|
||||
|
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.) |
|
#4
|
|||
|
|||
|
Re: NEED HELP WITH SERVOS!!
Quote:
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 |
|
#5
|
|||||
|
|||||
|
Re: NEED HELP WITH SERVOS!!
Quote:
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |