Limit and Encoder Programing Problems

Hello…
I was wondering how to program the Optical Shaft encoders (not the quad shaft encoders…) and how to set up more than 1 of them in the variables table… meaning having one encoder for each side of the robot… left and right…

I am curently using the newest version of EasyC V2 and am also using the old vexnet adapter… i have learned robotC and from that i learned that the encoders should be in pair with the motors meaning that if a motor is in motor port 1 the encoder should be in analog/digital port 1(i also dont understand the analog/digital either…) my question is i want it to have the robot run the autonomous but on the driving portion use the input of the encoders to be more accurate… i cant seem to figure out how to get the robot to get out of the loop and move on to the next command… i dont understand where to start the encoder and where to preset it bc i would have to use the encoder multiple times… as in go forward(using encoders) then raise arm(no encoder) lower arm(no encoder) then go backward (using encoder)… etc… Also when would i want to stop all input form the encoder

also same with the limit switches i have got it to work in a while loop that is forever such in user controll but in the autonomous i cant get the robot to, when the limit is hit to stop the motors and run the next command…

Can someone please help by giving me an example on how to set any of these up… or anything would be nice…[PHP][/PHP]

Anyone With information on how to program these please email me at Masterglitch96@gmail.com

Have you looked at the help file and the sample Quad Encoder Program?

What have you done so far? Have you searched, there are a ton of threads on encoders.

yes i have searched about it and looked at the sample codes and my problem comes when i need to reset the encoder back to 0 to start a new command… i am also using the old encoders and not the quad encoders…

my same question comes does this work the same with the ultra sonic sensor and poteniometer.

You call the encoder block and select preset and set the value you like. You cannot preset the Ultrasonic, or Potentiometers.