MIT Frame Packer¶
Run the MIT Frame Packer MicroSim Fullscreen
You can include this MicroSim on your website using the following iframe:
<iframe src="https://dmccreary.github.io/robot-arm/sims/mit-frame-packer/main.html"
height="672px" width="100%" scrolling="no"></iframe>
Description¶
Set the position, speed, Kp, Kd and torque of an MIT-mode command for a Damiao motor and see each value become a whole number, its hexadecimal form and the eight bytes of the CAN frame. Then work out the whole number yourself in six problems. Used in Chapter 9.
An MIT-mode command carries five numbers in the 8 data bytes of one CAN frame. Each number is first turned into a whole number: 16 bits for the position and 12 bits each for the speed, Kp, Kd and the torque. The table shows that step for every value, and the row of boxes shows the eight bytes, coloured by the value each byte carries. Bytes 3 and 6 are shared by two values. The formula, the bit counts and the ranges are those of the Chapter 9 section "An MIT Frame in Eight Bytes". This MicroSim is a calculator and sends nothing to a motor.
Lesson Plan¶
Grade level: Middle school and up (age 12+). Time: 15 minutes.
- Start with the chapter's example. Explore mode opens on a DM4310 with a position of 1.0 rad, which packs to 35388, or
0x8A3C. Find those two bytes in the row of boxes. - Explore. Change one value at a time and watch which bytes change. Set the speed to 0 and look at its whole number. Is it exactly half of 4095?
- Change the model. Switch to the DM4340P. The speed and torque limits change, so the same speed packs to a different number.
- Six problems. Work out the whole number for each value and type it. You get one try for each problem, and 5 of 6 is mastery. The working is shown after each answer.
- Think about it. The formula drops the fraction. How large is the biggest error that can cause in a 16-bit position?
A value outside its range is limited to the range before the formula is applied, and the sim says so when it happens.
Specification¶
The learning objective, evidence of mastery and content for this MicroSim are specified in Chapter 9: Building the reBot-DevArm and Choosing a Platform.