slave motor issues

So for our flywheel, we experimented with a slave motor program to make sure all motors were outputting the same power. However, this program doesn’t work for some reason unless it is either turning the motors to 127 or 0 power. We are using a motor with an IME and PID loop enabled. Does anyone has an explanation as to what is going on?

Here is the test program;

#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, , sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port5, FW1, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, FW2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, FW3, tmotorVex393_MC29, PIDControl, encoderPort, I2C_1)
#pragma config(Motor, port8, FW4, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
slaveMotor(port5, port7);
slaveMotor(port6, port7);
slaveMotor(port8, port7);

while(true) {
  if( vexRT Btn8U ] == 1 )
    motor port7 ] = 50;
  if( vexRT Btn8R ] == 1 )
    motor port7 ] = 100;

  if( vexRT Btn8D ] == 1 )
    motor port7 ] = 0;



Looks like that code came from here.

I don’t see any issues, check the usual things, wiring to motors etc.