12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The MD25 has 17 registers numbered 0 to 16 as follows;Register Write Read Description0 Speed1 Speed1 Motor1 speed (mode 0,1) or speed (mode 2,3)1 Speed2/Turn Speed2/Turn Motor2 speed (mode 0,1) or turn (mode 2,3)2 Enc1a xEncoder 1 position, 1st byte (highest), capture countwhen read3 Enc1b x Encoder 1 position, 2nd byte4 Enc1c x Encoder 1 position, 3rd byte5 Enc1d x Encoder 1 position, 4th (lowest byte)6 Enc2a xEncoder 2 position, 1st byte (highest), capturecount when read7 Enc2b x Encoder 2 position, 2nd byte8 Enc2c x Encoder 2 position, 3rd byte9 Enc2d x Encoder 2 position, 4th byte (lowest byte)10 Battery volts x The supply battery voltage11 Motor 1 current x The current through motor 112 Motor 2 current x The current through motor 213 Software Revision x Software Revision Number14 Acceleration rate Acceleration rate Optional Acceleration register15 Mode Mode Mode of operation (<strong>se</strong>e below)U<strong>se</strong>d for re<strong>se</strong>t of encoder counts and module16 Command Command address changesNotes of the developer:• The speed registers work as follows: 128 = stop / 0 = full speed rever<strong>se</strong> / 1 = full speedforward• If you want to read the encoder value of one of the motors – be sure to first read theEncxd register – this will copy the current encoder value of the 4 bytes into a 4 bytebuffer which gives you time to read out all 4 registers (if necessary). So – always firstread out the High byte – then one or all of the others!Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!