Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   How to invert the x-axis values? (http://www.chiefdelphi.com/forums/showthread.php?t=89158)

Prairs 14-01-2011 20:25

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?

ATannahill 14-01-2011 20:29

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?

Prairs 14-01-2011 20:35

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. :) )

SuperS_5 14-01-2011 20:41

Re: How to invert the x-axis values?
 
Quote:

Originally Posted by rtfgnow (Post 1000272)
The answer to the question specifically asked is to multiply by a constant of -1.

There is a "negate" function available for this. It is a little cleaner on the BD.

Alan Anderson 15-01-2011 08:46

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.

MotorHead 15-01-2011 13:59

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.

MaxMax161 24-01-2011 08:32

Re: How to invert the x-axis values?
 
Quote:

Originally Posted by Alan Anderson (Post 1000571)
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.

We had the same problem and it turned out that we had our "MotorInverted" parameters backwards, it's a quick fix just change the trues to falses in the begin.vi.


All times are GMT -5. The time now is 10:06.

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