LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Odometer reading decreases instead of increasing

Solved!
Go to solution

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
(2,337 Views)
Solution
Accepted by 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
(2,314 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)

0 Kudos
Message 3 of 9
(2,289 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

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 9
(2,288 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
(2,264 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.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 9
(2,256 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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 9
(2,244 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
(2,241 Views)

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

Message 9 of 9
(2,198 Views)