DVP-15MC Series Motion Controller Operation Manual
11-286
11
1
11.6.4.12
M Code
Function: Interacts with general programs.
Format: N_ M_ D_
Parameter Explanation:
N_
:
The row number of M code in NC program
M_
:
The number of M code, range: 0~99
D_
:
Output parameter, data type: LREAL.
Instruction Explanation:
1.
D_ can be omitted and then no paramter is output after M code is executed.
2.
Two methods of using M code: one is to write it outside the row of G code; the other is to write it
in the row of G code.
3.
When M code and G code are not in the same row, e.g. N0 M10 D10.02
;
N1 G1 X100 Y100.
When arriving at the row N0, G code exution will stop. Meanwhile, DMC_ReadMFunction is
used to read the state of M code, MFuntion is TRUE and the value of MFunctionValue is 10.02.
After M code is reset by using DMC_ResetMFunction intruction, G code execution will continue
and then N1 row will be executed.
4.
When M code and G code are in the same row and M code can only be placed after G code,
e.g. N0 G1 X100 M10 D10.02. When the execution arrives at N0 row, G1 is executed.
Meanwhile, DMC_ReadMFunction is used to read the state of M code, MFuntion is TRUE and
the value of MFunctionValue is 10.02. The following execution will continue after G1 execution is
finished and reset instruction will no be needed to reset M code.
Example
N0 G1 X100 Y50
N1 M20
N2 G1 X200 Y50 M21 D3.14
N3 G1 X300 Y150
1
1
20
State of M20
Read M20
DMC_Read MFunct ion
Axe sGroup
Valid
DMC_ReadMFunc tion1
Enable
MFun ctionID
Busy
Error
ErrorID
M un ction
f
Data from M20
MFunc tionValue
2
1
20
Reset M20
DMC_Res etMFunc tion
Axe sGroup
Done
DMC_ResetMFunction1
Ex ecute
MFun ctionID
Busy
Error
ErrorID
3
1
21
S tate of M21
Read M21
DMC_Read MFunct ion
Axe sGroup
Valid
DMC_ReadMFunc tion2
Enable
MFun ctionID
Busy
Error
ErrorID
M un ction
f
Data from M21
MFunc tionValue
Summary of Contents for DVP-15MC Series
Page 19: ...DVP 15MC Series Motion Controller Operation Manual 1 4 _1 MEMO...
Page 23: ...DVP 15MC Series Operation Manual 2 4 _2 MEMO...
Page 31: ...DVP 15MC Series Motion Controller Operation Manual 3 8 _3 MEMO...
Page 75: ...DVP 15MC Series Motion Controller Operation Manual 6 26 _6 MEMO...
Page 87: ...DVP 15MC Series Motion Controller Operation Manual 7 12 _7 MEMO...
Page 432: ...Chapter 8 Logic Instructions 8 345 8_ MEMO...
Page 470: ...DVP 15MC Series Motion Controller Operation Manual 10 34 10 MEMO...
Page 878: ...DVP 15MC Series Motion Controller Operation Manual 11 408 11 1 MEMO...
Page 920: ...DVP 15MC Series Motion Controller Operation Manual A 16 A MEMO...
Page 941: ...D 1 D Explanation of Homing Modes Table of Contents D 1 Explanation of Homing Modes D 2...
Page 966: ...DVP 15MC Series Motion Controller Operation Manual D 26 D MEMO...