46
MPC-385 SERIES OPERATION MANUAL – REV. 3.21K (20201120)
13. Multi Axis Movement Speed Increase: Specified travel speeds are for single-axis
movements. When travel traverses a 45° diagonal within a dual-axis square, speed is
increased by 40% (x 1.4), and by 70% (x 1.7) within a triple-axis cube.
14. Move Interruption: A command should be sent to the controller only after the task of any
previous command is complete (i.e., the task-completion terminator (CR) is returned). One
exception is the “Interrupt Move” (^C) command, which can be issued while a command-
initiated move is still in progress.
15. Extracting the MPC-200 Firmware Version Number: The firmware version number
returned by the ‘K’ command is encoded in BCD (Binary Coded Decimal) in two bytes,
with minor version byte first, followed by major version byte, each of which contains two
digits , the first of which is in the upper nibble and the next in the lower nibble. For
example, if the complete version is 3.15, then the bytes at offsets 1 and 2 will show (in
hexadecimal) as 0x15 0x03 (ret[1] and ret[2] as shown in the following code snippets). The
following code shows how to extract and convert the 4 BCD digits into usable forms for
later comparison without altering the original command return data (written in C/C++
and is easily portable to Python, Java, C#, MATLAB script, etc.).
/* “ret” is the array of bytes containing
the ‘K’ command’s return data */
/* define variables */
unsigned char verbyte; /* temp work byte */
int minver, majver, majminver;
float version;
Minor version number as an integer (e.g., 15):
verbyte = ret[1]; /* get minor ver. digits */
/* get 1’s digit & then get & add 10’s digit */
minver = (verbyte & 0x0F) +
((verbyte >>4 & 0x0F) * 10);
Major version number as an integer (e.g., 3):
verbyte = ret[2]; /* get major ver. digits */
majver = (verbyte & 0x0F) +
((verbyte >>4 & 0x0F) * 10);
Complete (thousands) version as an integer (e.g., 315):
majminver = majver * 100 + minver;
Complete version as a floating-point number (e.g., 3.15):
version = majminver * .01;