our team is working to improve the program so we ask u how to program the axis for jaguar … and is there -xaxis ?! to use it left or right
Are you programming using LabVIEW, or are you writing C++ in Workbench? The details differ for each.
[Caution: I am posting without benefit of LabVIEW running on my computer, so I might not get the details exactly right in what follows.]
In LabVIEW, you use a Motor Open VI to specify which PWM output and what kind of speed controller you’re using. The output of that VI is a device reference that you feed to a Motor Set VI, and later to a Motor Close. The Motor Set takes a number from -1 to 1 in order to control the motor direction and speed.
Similarly, you use a Joystick Open VI to specify which USB port’s joystick you want to read. Its device reference goes to a Joystick Get Axis VI, and later to a Joystick Close. The Joystick Get Axis also takes an input defining which axis you want to use (yes, the X axis is the left-right one), and provides a numeric output from -1 to 1 representing the position of the joystick.
The output of the Joystick Get Axis VI goes to the input of the Motor Set VI.
[Again, caution: I don’t have practice with C++ and the WPI library this year, so my description might not get the details here right either.]
Using C++, the ideas are the same, but the implementation is completely different. You instantiate a Motor object, either by setting a Motor *pointer to a new() or by statically declaring a Motor variable, and similarly instantiate a Joystick object. Use Joystick.GetAxis() to read the joystick position, and use Motor.Set() to set the motor speed.
C++ would be
Joystick stick(1);//joystick1
stick.GetX();
i am using windriver
thanks i have done