|
The Serial Communication of the axisis control
unit takes place through a serial interface
at a fixed 9600 baud rate. The exchanged command
strings are in ASCII code, terminated with
<CR> ; other controll characters (like
<LF>, <VT>) are ignored. The protocol
is not case sensitive.
Command Summary:
-
U: Requests the current
global status of the unit. (See further
how the status is coded).
-
Pa,b: Moves the axes
to an a and b coordinate position: a and
b are the absolute position in micro-steps.
Both a and b values must to be included
between –644.999 and +639.999.
-
Xa:
Moves the X axis to an a coordinate position
(absolute position in micro-steps). The
a parameter must to be included between
–644.999 and +639.999.
-
Ya: Moves the Y axis
to an a coordinate position (absolute
position in micro-steps). The a parameter
must to be included between –644.999 and
+639.999.
-
Da,b: Moves the axes
for an a and b run (relative movement),
where a and b are the runs values in micro
steps (Both values must to be included
between -–644.999 and +639.999). It is
possible to ignore the “b” parameter to
move the first axis only.
- H:
Moves the two axes to the home position
(limit detection).
- HX:
Moves the X axis to the Home position
(limit
detection)
- HY:
Moves the Y axis to the Home position
(limit detection)
-
K: Stops immediately
the run of both axes
- KX:
Stops the run of the X axis
- KY:
Stops the run of the Y axis
- CX,n:
Procedure of the X axis motor movement:
• n = 0: whole step.
• n = 1: half step.
• n = 2: 1/4 step.
• n = 3: 1/8 step.
- CX?:
Requests of the procedure of X axis motor
movement.
- CY,n:
Procedure of the Y axis motor movement:
• n = 0: whole step.
• n = 1: half step.
• n = 2: 1/4 step.
• n = 3: 1/8 step.
- CY?:
Requests of the procedure of Y axis motor
movement.
- FX,n:
Sets the position of the X axis. The n
parameter has to be includeed between
-1.289.999 and +1.279.999.
- FY,n:
Sets the position of the Y axis. The n
parameter has to be includeed between
-1.289.999 and +1.279.999.
- GX,n:
Perpetual motion of the X axis; when n>0
or it is omitted, this command allows
the forward movement, when n < 0 it
allows the backward movement.
- GY,n:
Perpetual motion of the Y axis; when n>0
or it is omitted, this command allows
the forward movement, when n < 0 it
allows the backward movement.
- L1:
Actives the auxiliary exit.
- L0:
Deactivates the auxiliary exit.
- W:
Requests the current position: (X,Y) coordinates
- ?:
Requests the current firmware version
- SX,n:
Sets to n micro-steps/s the speed for the
X axis. This speed has to be includeed
between 35 and 1.000. This command must
to be executed only when both the axes
are stopped.
- SY,n:
Sets to n micro-steps/s the speed for the
Y axis. This speed has to be includeed
between 35 and 1.000. This command must
to be executed only when both the axes
are stopped.
- SX?:
Requests the X axis current speed
- SY?:
Requests the Y axis current speed
- M:
Stores in non-volatile memory the current
X and Y speed settings
|
|

It
is also possible, for commands using X and
Y characters, repleacing X with 1 and Y with
2: for instance, the command FX,100 is equivalent
to F1,100.
The status request message ("U")
forces the microC to return a byte (2 hex
characters) representing the actual status
of the MT2 unit. Return message interpretation
table:
- bit
7:
error;
-
bit 6: Y axis status
position;
-
bit 5: X axis status
position;
- bit
4: light source status (1=on,
1=off);
- bit
3: Y axis home position;
- bit
2: X axis home position;
- bit
1: running;
- bit
0: ready (Known position after
an home position).
If the error bit is high (i. e. if it answers
with a code as the 81), then another error
code is added after a comma (for example 81,02).
The possible codes are:
- bit
0: Command not acknowledged
-
bit 1: Illegal command
(i.e. an absolute movement request when
the positions are unknown or during a
running ).
- bit
2: Out of range parameter (i.
e. the set speed is out of the fixed ranges).
- bit
3:
Time out or error during the home position
search.
- bit
4: Invalid number stored in non-volatile
memory.
- bit
5: Checksum of the stored data
in the non-volatile memory invalid.
- bit
6: Reached the X axis home position
during the backward movement when the
negative run is disabled with the appropiate
jumper.
- bit
7: Reached the Y axis home position
during the backward movement when the
negative run is disabled with the appropiate
jumper.
The message request of the position gives
the answer of the X, Y coordinates value.
If the position is unknow, then the character
will be #.
The
message request of the speed gives the aswer
of the current speed value in microstep/sec.

MT2MS
Connection
Configuration
|
|