Me and my team have a little problem. We want the encoder to make the motor stop moving at a certain position. We tried using the encoder example VI to do this, but nothing happened. We are using the encoders included in the kit (optical). Any help would be greatly appreciated.
Can you post the pertinent code that is not workin? Is the encoder working properly in your project?
Hold on, let me rephrase this. We used the encoder example VI to receive readings from the encoder, that’s working fine. Now we want to use those readings to make the motor stop at a certain point.
OK, now I understand what you want (I think). So I presume you want to make a motor (let’s assume a Victor) move in a single direction until the encoder count reaches a certain value (i.e. setpoint).
If you look at the included Motor Control Example, which is available from the Examples on the Getting Started window when LabVIEW starts up (or from View->Getting Started Window… in the menubar), then you can see how to tell a motor to go to a set speed.
In your case, you probably want it to be driven at a fixed speed until the encoder hits your setpoint. So instead of using a control like the Motor Speed (-1 to 1) in the Motor Control Example, you could use a case structure or Select function.
The encoder value could be wired as shown in the picture to set the motor speed.