|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to invert the x-axis values?
We have been trying out our new robot but when we turn our joystick left the robot goes right and vice versa. Is there any way to invert the x values in labview so we can rectify this?
|
|
#2
|
||||
|
||||
|
Re: How to invert the x-axis values?
The answer to the question specifically asked is to multiply by a constant of -1. I believe, I am not heavily versed in this area.
If we dig deeper we might actually find the problem. Could it be fixed by reversing which wires are connected to the motor controller? i.e. swaping m+ and m-. This is not the proper solution if forwards and backwards are working correctly. Is this default code you are running or have you done any work on it? |
|
#3
|
|||
|
|||
|
Re: How to invert the x-axis values?
We made it so the Right and Left MotorInverted values are opposite because the robot would only drive in a circle (the two motors are opposite ways and would clash without doing this), but I don't think we changed anything else yet.
(Also, sorry if you can't understand what I'm saying exactly; I'm a newbie programmer for my team. ) |
|
#4
|
||||
|
||||
|
Re: How to invert the x-axis values?
There is a "negate" function available for this. It is a little cleaner on the BD.
|
|
#5
|
|||||
|
|||||
|
Re: How to invert the x-axis values?
It might just be that the left and right motors are swapped. Make doubly certain that the PWM outputs you're telling the Drive Open to use match the ones actually wired on the robot. There are ways of connecting things and configuring the "MotorInverted" parameters that will give the results you are reporting.
|
|
#6
|
||||
|
||||
|
Re: How to invert the x-axis values?
As mentioned, you correct by physically swapping motor wires or multiplying the command value by negative one. For me though, the cleaner way is to look into the begin.vi where the motor definition is. You should see a boolean input to the motor definition vi that allows you to change motor direction definition.
|
|
#7
|
|||||
|
|||||
|
Re: How to invert the x-axis values?
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|