We have an idea to use an encoder on a motor which lifts and brings down a forklift. Is it possible to use an encoder to measure how many rotations the motor shaft makes and then of course subtract the measurement when the shaft moves in the opposite direction (thus bringing the lift down)…?
The purpose is to get a forklift height reading on the driver station.
Could anyone provide us any leads? We’re using labview and we’re a bit lost on how to get started. Our build team will have the encoder’s on the motor shaft in a day or two.
The encoder get can return a ton of very useful things. If you set the encoder open.vi correctly, you could get the get function to return the direct height of the arm! You can also get the direction, if it’s stopped, etc.
The examples are great for testing out the electrical connections before you put your code into the mix. They are also good for learning to copy/paste or base your code on how an example does it. This is really useful for gaining understanding of how the sample code works, and how to modify it.
Thanks! Just to clarify: in begin I should initialize one encoder but have two inputs for the dio using two seperate initializers but wire them into one to have in memory and in teleop I will access them and then have them get values.
However I’m confused by where the results of the get values would appear. Will they show somewhere in the DS? (I haven’t been able to experiment yet, and won’t be able to until tomorrow).
Once again, thanks!
and @Greg: thanks! I’ll definitely take a look at that before experimenting ^^ tomorrow!