![background image](http://html1.mh-extra.com/html/omron/smartslice-grt1-ml2/smartslice-grt1-ml2_programming-manual_742305158.webp)
BASIC commands
PROGRAMMING MANUAL
152
R
e
vi
si
o
n
1
.0
3.2.201 MPOS
/i
3.2.202 MSPEED
/i
3.2.203 MSPHERICAL
/i
Type
Axis parameter (read-only)
Syntax
MPOS
Description
The
MPOS
parameter is the measured position of the axis in user units as
derived from the encoder. This parameter can be set using the
DEFPOS
command. The
OFFPOS
axis parameter can also be used to shift the origin
point.
MPOS
is reset to 0 at start-up or after the controller has been reset,
except when using absolute encoders. In that case
MPOS
is initialised with
the absolute position read from the encoder.
The range of the measured position is controlled with the
REP_DIST
and
REP_OPTION
axis parameters.
Arguments
N/A
Example
WAIT UNTIL MPOS >= 1250
SPEED = 2.5
See also
UNITS
,
AXIS
,
DEFPOS
,
ENCODER
,
FE
,
OFFPOS
,
REP_DIST
,
REP_OPTION
,
UNITS
.
Type
Axis parameter (read-only)
Syntax
MSPEED
Description
The
MSPEED
parameter contains the measured speed in units/s. It is calcu-
lated by taking the change in the measured position in user units in the last
servo period and divide it by the servo period (in seconds). The servo period is
set with the
SERVO_PERIOD
parameter.
MSPEED
represents a snapshot of the speed and significant fluctuations,
which can occur, particularly at low speeds. It can be worthwhile to average
several readings if a stable value is required at low speeds.
Arguments
N/A
Example
No example.
See also
AXIS
,
SERVO_PERIOD
,
VP_SPEED
,
UNITS
.
Type
Axis command
Syntax
MSPHERICAL(end_x, end_y, end_z, mid_x, mid_y, mid_z, mode)
Description
Moves the three axis group defined in
BASE
along a spherical path with a
vector speed determined by the
SPEED
set in the X axis. There are 2 modes
of operation with the option of finishing the move at an endpoint different to
the start, or returning to the start point to complete a circle. The path of the
movement in 3D space can be defined either by specifying a point somewhere
along the path, or by specifying the centre of the sphere.
Arguments
•
end_x, end_y, end_z
mode
= 0 or 1: Coordinates of the end point.
mode
= 2: Coordinates of a second point on the curve.
•
mid_x, mid_y, mid_z
mode
= 0 or 2: Coordinates of a point along the path of the curve.
mode
= 1 or 3: Coordinates of the sphere centre.
•
mode
Specifies the way the end and mid parameters are used in calculating the
curve in 3D space.
0 = specify end point and mid point on curve.
1 = specify end point and centre of sphere
2 = mid point 2 and mid point 1 are specified and the curve completes a
full circle
3 = mid point on curve and centre of sphere are specified and the curve
completes a full circle.
Note.:The coordinates of the mid point and end point must not be co-lin-
ear. Semicircles cannot be defined by using mode 1 because the sphere
centre would be co-linear with the endpoint