PID help

How do you set a minimum speed with the PID loop. We know how to set maximum speed with setmotortarget but dont know how to set minimum speed.

#pragma config(Sensor, dgtl11, ArmEncoder, sensorQuadEncoder)
#pragma config(Motor, port5, arm1, tmotorVex393_MC29, PIDControl, encoderPort, dgtl11)
#pragma config(Motor, port7, arm2, tmotorVex393_MC29)
#pragma config(MotorPidSetting, port5, 50, 25, 640, 10, 0, 0, 0, 0)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

#pragma platform(VEX2) //This is to tell the compiler that you are using the cortex
#pragma competitionControl(Competition) //This tells the compiler that your robot will have to listen to the field for when it can go
#include “Vex_Competition_Includes.c” //This is telling it how the field will talk to it

//This is a function used to set up tasks before the match
void pre_auton(){}

//This is a function used for an autonomous mode, OCCRA does not have autonomous modes so ignore this function
task autonomous(){}
task usercontrol(){
slaveMotor(arm2, arm1);
setMotorTarget(arm1, 40, 127, true);
}

Thank you for your help

This thread has already been asked on the VEX Forum (twice)


We can keep the conversation over there, and a mod can probably just close / delete this thread.

1 Like