Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Xbox 360 Controller Triggers (http://www.chiefdelphi.com/forums/showthread.php?t=91628)

MathMaven 12-02-2011 15:33

Xbox 360 Controller Triggers
 
1 Attachment(s)
We (team 3175) have been testing the use of an Xbox 360 controller to control our arm and have found issues with the trigger buttons. When using the trigger buttons to control a window motor, we find that our program is reading axis z-axis values that do not correspond to how we are pressing the trigger buttons.

In one case, we let go of the trigger buttons and the value sent to the TeleOp.vi was 1. However, when looking at the controller through the control panel while running the program, it shows that the z-axis is in a neutral position.

Why is this happening? Is this a fault of the controller's hardware, the programming (which I have attached to this thread), or something else? We'd really appreciate some answers.

Greg McKaskle 13-02-2011 07:02

Re: Xbox 360 Controller Triggers
 
You don't show what is in the other case frame, so I can't be sure whether you stop the motor or leave it running.

You also don't really describe what the buttons are supposed to do to the motor.

What I'd suggest is to put some joystick code into your disabled routine. If using LV, just drop the Joystick get into disabled and you can open it to see the values at runtime. Otherwise add some printfs or use some debugging features of the IDE to observe the joystick values while disabled.

Once you can run the robot, leave it disabled, and see what the XBox controller is sending. If that looks correct, the issue is with the code or possibly the HW.

With a programming buddy, think through what commands are being sent to the motor with different inputs. For example. If the last command told the motor to spin, and releasing the button is supposed to make it stop, show them the code that sets the speed to zero. If you can't find the code, you have found a problem.

Greg McKaksle

Alan Anderson 13-02-2011 14:36

Re: Xbox 360 Controller Triggers
 
Quote:

Originally Posted by MathMaven (Post 1021422)
We (team 3175) have been testing the use of an Xbox 360 controller to control our arm and have found issues with the trigger buttons. When using the trigger buttons to control a window motor, we find that our program is reading axis z-axis values that do not correspond to how we are pressing the trigger buttons.

I have no specific experience with the Xbox controller, but I wouldn't expect buttons to have any affect on the joystick axis values. They normally appear on the joystick button values.

mck1117 16-02-2011 12:46

Re: Xbox 360 Controller Triggers
 
As far as I know, the XNA driver for the Xbox 360 controller (the one that Windows uses) has the two controllers input as one axis. The Xbox controller outputs five axes, two for each stick and one that is the combined triggers. i believe that it returns 0 for neither trigger pulled and each trigger adds or subtracts one from this value when pulled (i.e. you pull both triggers and the value is still 0).

Joe Ross 16-02-2011 12:58

Re: Xbox 360 Controller Triggers
 
Quote:

Originally Posted by Alan Anderson (Post 1022075)
I have no specific experience with the Xbox controller, but I wouldn't expect buttons to have any affect on the joystick axis values. They normally appear on the joystick button values.

The xbox controller has two analog "buttons" or "triggers".


All times are GMT -5. The time now is 05:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi