[FTC]: Servo daisy chain problem

Hi, my team just finished rewiring our robot, and in the process we rearranged the setup of our motors and servos. Before now, things have always functioned quite well, but as soon as we changed the servo controller to 3rd in the daisy chain, the servo was no longer recognized as a servo in the pragmas. Below is the setup, with the “ploop” servo refusing to turn brown after compiling:
#pragma config(Sensor, S2, gyro, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, HTSMUX, sensorI2CCustom)
#pragma config(Sensor, S4, , sensorI2CMuxController)
#pragma config(Motor, motorA, bristle, tmotorNXT, PIDControl, encoder)
#pragma config(Motor, mtr_S1_C1_1, liftLeft, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C1_2, backLeft, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S1_C2_1, frontLeft, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S1_C2_2, flagRaiser, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C1_1, liftRight, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S4_C1_2, frontRight, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_1, backRight, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S4_C2_2, dropper, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S4_C3_1, ploop, tServoStandard)
#pragma config(Servo, srvo_S4_C3_2, servo2, tServoNone)
#pragma config(Servo, srvo_S4_C3_3, servo3, tServoNone)
#pragma config(Servo, srvo_S4_C3_4, servo4, tServoNone)
#pragma config(Servo, srvo_S4_C3_5, servo5, tServoNone)
#pragma config(Servo, srvo_S4_C3_6, servo6, tServoNone)
Has anyone else had an issue with the servo controller when not placed first in the chain?

#pragma config(Sensor, S4, , sensorI2CMuxController)

It looks like you are configuring S4 as a Sensor here

#pragma config(Motor, mtr_S4_C1_1, liftRight, tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor, mtr_S4_C1_2, frontRight, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S4_C2_1, backRight, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S4_C2_2, dropper, tmotorTetrix, openLoop)
#pragma config(Servo, srvo_S4_C3_1, ploop, tServoStandard)
#pragma config(Servo, srvo_S4_C3_2, servo2, tServoNone)
#pragma config(Servo, srvo_S4_C3_3, servo3, tServoNone)
#pragma config(Servo, srvo_S4_C3_4, servo4, tServoNone)
#pragma config(Servo, srvo_S4_C3_5, servo5, tServoNone)
#pragma config(Servo, srvo_S4_C3_6, servo6, tServoNone)

and here you are trying to use S4 as a motor/servo controller.
I am not sure, but I don’t think the S4 port can do both at the same time.

I think the problem is that RobotC didn’t add in the necessary pragmas to have controllers on the ports S1, and S4.

This should work:

#pragma config(Hubs,  S1, HTMotor,  HTMotor,  none,     none)
#pragma config(Hubs,  S4, HTMotor,  HTMotor,  HTServo,  none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Sensor, S2,     gyro,           sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3,     HTSMUX,         sensorI2CCustom)
#pragma config(Sensor, S4,     ,               sensorI2CMuxController)
#pragma config(Motor,  motorA,          bristle,       tmotorNXT, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C1_1,     liftLeft,      tmotorTetrix, openLoop, reversed)
#pragma config(Motor,  mtr_S1_C1_2,     backLeft,      tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_1,     frontLeft,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C2_2,     flagRaiser,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C1_1,     liftRight,     tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S4_C1_2,     frontRight,    tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S4_C2_1,     backRight,     tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S4_C2_2,     dropper,       tmotorTetrix, openLoop)
#pragma config(Servo,  srvo_S4_C3_1,    ploop,                tServoStandard)
#pragma config(Servo,  srvo_S4_C3_2,    servo2,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S4_C3_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma config(Hubs, S1, HTMotor, HTMotor, none, none)
#pragma config(Hubs, S4, HTMotor, HTMotor, HTServo, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Sensor, S2, gyro, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, HTSMUX, sensorI2CCustom)
#pragma config(Sensor, S4, , sensorI2CMuxController)

Did your program work with S1 and S4 both defined as a Hub and a Sensor.

I did not think that was possible. When I used the motor and sensor setup tab it gave me an error when I tried to define a sensor port (S4) as 2 different things.





Thanks for the responses, everyone. In the time since I first posted, I found an odd peculiarity with robotc that seems to be the culprit: it seems as though it is indeed impossible for RobotC to properly recognize a servo when used in a daisy chain run through the 4th port, wherein it is not first in the chain. I found this out through simple trial and error, changing nothing but the ports and position of the servo and its controller. My team and I just switched a sensor multiplexer to port four and then put the controller chain in port 3, and voila! Problem solved. Feel free to verify, but at least in my version of robotc (3.62), which should be the latest, this seems to be the only way around the oddly-specific issue.