LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Odometer reading decreases instead of increasing

Solved!
Go to solution
Highlighted

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?

 

Thanks for any help

0 Kudos
Message 1 of 9
(275 Views)
Solution
Accepted by topic author musicguy2112

If you'd attached some code, it would have been a little easier to make some suggestion, but perhaps you can do the following - take a current measurement of the reading (some number that goes up or down, i.e. represents position?) and then compare with the previous measurement.

 

Add to a shift register each iteration the absolute value of the previous calculation.

 

Hopefully this shows what I mean:

Example_VI.png

Here the absolute value is always 1, but in your case I expect that is not true!


GCentral
Message 2 of 9
(252 Views)

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?


An odometer is an indicator. How does it get the speed information from the motor and how is the motor controlled?

 

If you want the value to always be positive, use the absolute value function right before the indicator.

 

(If you are reading an angle sensor repeatedly, you need to ensure that the sampling frequency is sufficient, else you might read an alias frequency (or speed), which will be wrong and might be negative. Similar to a movie of a wheel that seems to turn backwards even if the car goes forward)


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 3 of 9
(227 Views)

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?

 

Thanks for any help


 

WOW that's a big order for someone who did not post any code or circuit diagram...

 

Without seeing that or knowing anything about your program or circuit, sensors, motor, etc.

 

All I can say is ignore the direction the motor is spinning and just count revolutions

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 4 of 9
(226 Views)

@RTSLVU wrote:

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?

 

Thanks for any help


 

WOW that's a big order for someone who did not post any code or circuit diagram...

 

Without seeing that or knowing anything about your program or circuit, sensors, motor, etc.

 

All I can say is ignore the direction the motor is spinning and just count revolutions


An odometer implies a car engine.  In all my life, I have never known an automobile engine to (purposely) operate in a manner backwards from what is normal.  Is this a simulated odometer?  Or, by "motor", do you mean "transmission tail shaft"?  THAT can reverse direction if you put the car in reverse.

 

Sounds like homework to me.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 9
(202 Views)

@billko wrote:

@RTSLVU wrote:

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?

 

Thanks for any help


 

WOW that's a big order for someone who did not post any code or circuit diagram...

 

Without seeing that or knowing anything about your program or circuit, sensors, motor, etc.

 

All I can say is ignore the direction the motor is spinning and just count revolutions


An odometer implies a car engine.  In all my life, I have never known an automobile engine to (purposely) operate in a manner backwards from what is normal.  Is this a simulated odometer?  Or, by "motor", do you mean "transmission tail shaft"?  THAT can reverse direction if you put the car in reverse.

 

Sounds like homework to me.


Well I am (again) guessing that a car odometer is probably not exactly what is in question, as a car engine does not turn the opposite direction when moving in reverse.

 

But then again: Who knows? The OP did not provide any relevant information.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 6 of 9
(194 Views)

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen....


That is technically illegal if we do it on purpose but if that is true...

 

Spoiler
Finally a car that increases in value when we drive off the lot!

Share some code and someone should be able to tell you were to put the absolute value node.

 

Ben

0 Kudos
Message 7 of 9
(182 Views)

@RTSLVU wrote:

@billko wrote:

@RTSLVU wrote:

@musicguy2112 wrote:

Hello! I have a motor Odometer reading decreasing when turned opposite direction, which I do NOT want to happen. Anyone know how program a reading to increase instead of decreasing regardless of the direction of the motor?

 

Thanks for any help


 

WOW that's a big order for someone who did not post any code or circuit diagram...

 

Without seeing that or knowing anything about your program or circuit, sensors, motor, etc.

 

All I can say is ignore the direction the motor is spinning and just count revolutions


An odometer implies a car engine.  In all my life, I have never known an automobile engine to (purposely) operate in a manner backwards from what is normal.  Is this a simulated odometer?  Or, by "motor", do you mean "transmission tail shaft"?  THAT can reverse direction if you put the car in reverse.

 

Sounds like homework to me.


Well I am (again) guessing that a car odometer is probably not exactly what is in question, as a car engine does not turn the opposite direction when moving in reverse.

 

But then again: Who knows? The OP did not provide any relevant information.


Sorry, that was directed at the OP.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 9
(179 Views)

thank you!!! and sorry I didnt provide a code. But this actually helped!

Message 9 of 9
(136 Views)