which system are you using?
Im going to assume first off that your using the old control system from IFI and not the cRIO, and that your using the default code.
limit switches are automatically programmed, they use the digital_io ports on the rc. Look in user_routines.c twords the bottom you'll see a block that will look something like this...
Code:
/*---------- PWM outputs Limited by Limit Switches ------------------------*/
Limit_Switch_Max(rc_dig_in05, &pwm03);
Limit_Switch_Min(rc_dig_in06, &pwm03);
Limit_Switch_Max(rc_dig_in07, &pwm04);
Limit_Switch_Min(rc_dig_in08, &pwm04);
Limit_Switch_Max(rc_dig_in09, &pwm09);
Limit_Switch_Min(rc_dig_in10, &pwm09);
Limit_Switch_Max(rc_dig_in11, &pwm10);
Limit_Switch_Min(rc_dig_in12, &pwm10);
Limit_Switch_Max(rc_dig_in13, &pwm11);
Limit_Switch_Min(rc_dig_in14, &pwm11);
Limit_Switch_Max(rc_dig_in15, &pwm12);
Limit_Switch_Min(rc_dig_in16, &pwm12);
each one corresponds to a dig_io port on the RC, you'll notice that for each motor [pwm port] there are two dig_io ports used. If you are just using one limit switch and one motor you just need to use one of the ports, but if you were using 2 limit switches and one motor you would use 2 ports both of which would have to be controlling the pwm port that the motor is on.
does that make sence? feel free to ask more questions
