Robotics & Mechatronics · Commission one observed axis
Give one axis a direction, zero and unit
“Move positive” is incomplete until you know which direction is positive, where zero is and which unit the interface accepts. Establish these conventions with a small, inspectable one-axis record before interpreting any independent command.
All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.
Lesson preparation and course links
Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.
Back to the Robotics chapterAfter reading, you can
Use an operational position convention to label the local axis and distinguish command units, sensor counts and observed motion; introduce the needed number-line and scale reasoning locally.
Put the rail on a number line
Stand at the declared observation side. In convention A1, positive x points to the right along the rail; zero is a fixed reference mark on the rail; positions are in millimetres. A carriage left of the zero can have a negative coordinate. The sign describes its location relative to the reference, not whether it is moving.
Displacement is final position minus initial position: Δx=
Convert a raw indication using a declared scale
For this constructed axis, reference count c0=
At c=
Keep raw state separate from command units
The destination interface in this example accepts metres, while the human task and ruler use millimetres. An explicit conversion prevents a thousandfold mistake.
| Field | Example | Meaning |
|---|---|---|
| Destination command | 0.030 m | Requested 30 mm coordinate |
| Raw encoder | 1600 count | Indication before calibration |
| Calibrated state | 30.0 mm | Position inferred with A1 scale and reference |
| Independent ruler | 29.8±0.3 mm | Separate constructed observation, not the command |
| Reference identity | A1, c0=1000 | Convention and zero used for this interpretation |
Use a reversal check to expose convention errors
A supplied small rightward displacement produces counts 1000→1100. Under A1, inferred displacement is +5.0 mm, agreeing with rightward positive. Returning to count 1000 gives −5.0 mm from the second point and returns to the original coordinate. This checks sign and return consistency in the supplied record; it does not measure absolute accuracy across the whole range.
If rightward motion instead produces 1000→900, raw count direction is opposite A1. The calibration needs a negative scale, x=
A new zero is a changed interpretation
A startup count of zero does not prove the carriage is physically at the rail zero. Relative encoders and counters can lose a previous reference after reset. A reference procedure relates an installed observation to the chosen physical datum; a software offset merely changes numbers until that relationship is established.
The count increment corresponds to 0.050 mm in the supplied model. That is scale resolution, not ±0.050 mm accuracy. Reference uncertainty, alignment, transmission behaviour and the measurement method remain. Later calibration lessons investigate these effects; the beginner requirement is to record rather than hide them.
Predict a reversal and convert the command
Initial count is 1500, so x_initial=
The expected final count for the stipulated calibration is 1000+10/0.050=
If the carriage makes the same physical move but software changes the coordinate zero to the starting point, the coordinates become 0 and −14.5 mm for the supplied final indication; displacement remains −14.5 mm. A consistent translation of zero changes positions, not their difference.
Try the reasoning
Counts change from 800 to 1300 under A1. Find both positions and displacement.
Show the answer and reasoning
Initial x=
−10.0 mm, final x= 15.0 mm, and Δx= +25.0 mm. A 40 mm destination is sent to an interface in metres as the number 40. What went wrong?
Show the answer and reasoning
The required number is 0.040 m. Sending 40 means 40 m, a factor of 1000 larger; the interface must reject out-of-range requests.
Rightward ruler motion coincides with decreasing counts. Must the ruler be wrong?
Show the answer and reasoning
No. The raw encoder direction may be opposite the declared axis. Establish the sign relationship and reference before changing a control loop.
A reset reports count 0 while the carriage has not moved. Has physical position become zero?
Show the answer and reasoning
No. The counter/reference state changed. Position relative to the rail datum needs re-established or retained reference evidence.
The axis moves +5 mm and then −5 mm. Give distance and net displacement.
Show the answer and reasoning
Distance is 10 mm; net displacement is 0 mm. Return to the same indication does not alone prove absolute reference accuracy.
What to carry forward
Declare positive direction, physical zero, unit and raw-to-state conversion together. Check them by predicting a small signed change and its reversal.
References
Sources supporting this lesson’s explanations and examples.