Integrated Motor Encoder 269 PID and Printing error

This is the first time I’ve tried to use the IME, I haven’t tried using it the way i would if it were just a Optical encoder but i’m trying to make the PID work.

I’ve dowloaded a sample code i found here for the integrated motor encoder. I’m not sure what he’s talking about with motor polarity in the help file, i can’t find anything other than a picture that suggests that i go red to red with the motor controller.

When i print out the encoder value I get the expected value per rotation, but when i use the PID sample code, #1 it goes in the reverse expected direction, and #2 it doesn’t stop when it hits what should be the correct point, or ever for that matter.

My EasyCV4 is up to date with drivers, is the PID just not working right now?

If you look in the configuration window it calls out the wiring for ports 1 & 10 what color the wires should be in the port. When you use the speed controllers, the colors should match. Go into the PID help topic and it explains how to setup everything.

You can also take a look at the sample included with EasyC, located in the samples forlder.

Last, to make sure everything is working look at the Online Window.

None of that helps. Is the PID control supposed to turn the motor or not? and why if i put in a positive number for the setpoint does the motor turn on going the negative direction? (based on the printing)

Try to get the sample running first and then troubleshoot your code. Make sure the correct motor is set in the configuration window.