team3329
15-04-2010, 11:22
Hey anyone!!!! I am trying to program the servos and I had a few questions: here is what I have so far:
In Begin.vi Servo Open.vi>>Setrefnum
in teleop.vi I created a vi called Servo
In Servo.vi I have Getrefnum(for the servo)>> adn Getrefnum (for the joystick)
I then wired an unbundle by name for button 3 to Joystick_Get.vi and created a case structure. In the case structure I use Servo_GetPosition>> and added it to a constant of .1 and then set it to Servo_SetPosition.vi
I created a check to make sure that the new position that I am calling for is not above one. I created a less than check and the x value is the out put from the adding of .1 and the GetPosition; and the y value is 1.
if The less than check is true I set the servo position
if it is false it does nothing
The PMW channel indicator on the dashboard (the blue vertical bar thingy) is full when I click button 3. Adn the indicator (GPIO state) is on.
I have two PMW wires linked together to the servo wire (yellow,red,black) is linked to the wires
In Begin.vi Servo Open.vi>>Setrefnum
in teleop.vi I created a vi called Servo
In Servo.vi I have Getrefnum(for the servo)>> adn Getrefnum (for the joystick)
I then wired an unbundle by name for button 3 to Joystick_Get.vi and created a case structure. In the case structure I use Servo_GetPosition>> and added it to a constant of .1 and then set it to Servo_SetPosition.vi
I created a check to make sure that the new position that I am calling for is not above one. I created a less than check and the x value is the out put from the adding of .1 and the GetPosition; and the y value is 1.
if The less than check is true I set the servo position
if it is false it does nothing
The PMW channel indicator on the dashboard (the blue vertical bar thingy) is full when I click button 3. Adn the indicator (GPIO state) is on.
I have two PMW wires linked together to the servo wire (yellow,red,black) is linked to the wires