Hi @tec_support,
Thank you for your support.
If i may, i’d still like to know what’s the difference between the two options: Speed / Power
The Arduino code for the Speed-rpm block adds PID related parametres.
Encoder_1.setPulse(8);
Encoder_1.setRatio(46.67);
Encoder_1.setPosPid(1.8,0,1.2);
Encoder_1.setSpeedPid(0.18,0,0);
Can i assume that:
- Power = simple pwd/duty cycle (would this be like a simple DC motor (no Optical Encoder)?
- Speed = PID (~feedback…) for pwd
???
Is the PID thing the whole reason why the motors are Optical Encoder motors? So that they can allow accurate repeatable motion control?
Sorry if it sounds like i have no idea of what i’m talking about … it’s close enough 
void setup(){
//Set Pwm frequency to 8KHz
TCCR1A = _BV(WGM10);
TCCR1B = _BV(CS11) | _BV(WGM12);
TCCR2A = _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(CS21);
// ***
// Pre-defined parametres, no manual control ***
// Set encoder motor Port1 === POWER block
attachInterrupt(Encoder_1.getIntNum(), isr_process_encoder1, RISING);
// Set encoder motor Port1 to === SPEED-RPM block --> PID
Encoder_1.setPulse(8);
Encoder_1.setRatio(46.67);
Encoder_1.setPosPid(1.8,0,1.2);
Encoder_1.setSpeedPid(0.18,0,0);
// ***
// User values ***
// Set encoder motor Port1 to === SPEED 180 RPM --> PID
Encoder_1.runSpeed(180);
// Set encoder motor Port1 to === POWER to 100 (PWM)
Encoder_1.setTarPWM(100);
// Set encoder motor Port1 to === Rotate 1000 degrees at SPEED 180 RPM --> PID
Encoder_1.move(1000,abs(180));
// Set encoder motor Port1 to === POWER to 0 = STOP (PWM)
Encoder_1.setTarPWM(0);
}
Thank you.
Stefan