TRIO MPC-145 SERIES MICROMANIPULATOR SYSTEM OPERATION MANUAL – REV. 2.62C (20191001) (FW V2.62)
28
follow the command byte. No delimiters are used between command sequence arguments,
and command sequence terminators are not used. Although most command bytes can be
expressed as ASCII displayable/printable characters, the rest of a command sequence must
generally be expressed as a sequence of unsigned byte values (0-255 decimal; 00 – FF
hexadecimal, or 00000000 – 11111111 binary). Each byte in a command sequence
transmitted to the controller must contain an unsigned binary value. Attempting to code
command sequences as “strings” is not advisable. Any command data returned by the
controller should be initially treated as a sequence of unsigned byte values upon reception.
Groups of contiguous bytes can later be combined to form larger values, as appropriate (e.g.,
2 bytes into 16-bit “word”, or 4 bytes into a 32-bit “long” or “double word”). For the TRIO
MPC-100, all axis position values (number of microsteps) are stored as “unsigned long” 32-
bit positive-only values, and each is transmitted and received to and from the controller as
four contiguous bytes.
4.4
Axis Position Command Parameters
All axis positional information is exchanged between the controller and the host computer in
terms of microsteps. Conversion between microsteps and microns (micrometers) is the
responsibility of the software running on the host computer (see
Microns/microsteps
conversion
table for conversion factors).
Microsteps are stored as positive 32-bit values (“long” (or optionally, “signed long”), or
“unsigned long” for C/C++; “I32” or “U32” for LabVIEW). “Unsigned” means the value is
always positive; negative values are not allowed. The positive-only values can also be stored
in signed type variables, in which case care must be taken to ensure that only positive values
are exchanged with the controller.
The 32-bit value consists of four contiguous bytes, with a byte/bit-ordering format of Little
Endian (“Intel”) (most significant byte (MSB) in the first byte and least significant (LSB) in
the last byte). If the platform on which your application is running is Little Endian, then no
byte order reversal of axis position values is necessary. Examples of platforms using Little
Endian formatting include any system using an Intel/AMD processor (including Microsoft
Windows and Apple Mac OS X).
If the platform on which your application is running is Big Endian (e.g., Motorola PowerPC
CPU), then these 32-bit position values must have their bytes reverse-ordered after receiving
from, or before sending to, the controller. Examples of Big-Endian platforms include many
non-Intel-based systems, LabVIEW (regardless of operating system & CPU), and Java
(programming language/environment). MATLAB and Python (script programming language)
are examples of environments that adapt to the system on which each is running, so Little-
Endian enforcement may be needed if running on a Big-Endian system. Some processors
(e.g., ARM) can be configured for specific endianess.
4.5
Microsteps and Microns (Micrometers)
All coordinates sent to and received from the controller are in microsteps. To convert
between microsteps and microns (micrometers), use the following conversion factors
(multipliers):