MACRO Newker
MACRO Newker
MACRO Newker
,LTD
WWW.NEWKER-CNC.COM
1) Output instruction:OUT
Format: OUT+(-/A/P/R)Y(M)**+(-/A/P/R)Y(M)**+(-/A/P/R)Y(M)**
Description: + means effective output;
- means ineffective output;
A mans reverse output status(exchange effective and ineffective)
P means judges turret nearby, if CW, then output is
effective; if CCW, then output is ineffective;
R means judges turret nearby, if CW, then output is
ineffective; if CCW, then output is effective.
Example:OUT+Y5-Y7+Y9+Y11-Y15
Output Y5, Y9, Y11 effective; output Y7, Y15 ineffective;
Example: OUT+M12-M13+Y14+Y8-Y16
Output M12,Y14,Y8 effective; output M13, Y16 ineffective;
Format:WAT+(-)X**+(-)X**+(-)X**+(-)X**+(-)X**+(-)X**
Description: + means waiting for effectiveness;
- means waiting for ineffectiveness;
Y or M can be zero or one at most, while X is unlimited;
3.1 the maximum waiting time instruction: MAXWAT
Used to limit the maximum waiting time of WAT instruction
Format: MAXWAT****
Description:
the range of number behind MAXWAT is 0-99999, unit is ms;
System will alarm and quit when over time;
When assignment as 0 or sole MAXWAT, it means ineffective,
namely unnecessary to limit maximum waiting time.
3.2 the holding time when meet WAT condition: HOLDWAT****
Used to specify the holding time when meet condition of WAT
Format: HOLDWAT****
Description:
the range of number behind HOLDWAT**** is 0-99999,
unit is ms;
System will alarm and quit when over time;
When assignment is 0 or sole HOLDWAT****, it means the
function is ineffective, namely unnecessary to limit maximum holding time.
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
3.3 the maximum waiting time instruction mode: MODWAT
MODWAT used to couple with MAXWAT.
Format:MODWAT1/MODWAT2/MODWAT3/MODWAT4
Default: MODWAT1
MODWAT1: over WAT time, system will prompt alarm and quit;
MODWAT2: over WAT time, system will prompt alarm and
keep running program;
MODWAT3: over WAT time, system will not prompt alarm or quit;
MODWAT4: over WAT time, system will not prompt alarm, but
keeping running program.
Example: detect X0 signal for 5 seconds, if failed then alarm No.1.
MODWAT4
MAXWAT5000
WAT+X0
IF (-X0) THEN
OUT+M81
ERREXIT
ENDIF
4)delay command:PAUS
Instructions: for pausing during the program, the unit is MS (MS);
Format: PAUS***
Example:PAUS100
delay for 100ms;
5)suspend command: M36
Used for tool changing in segments, when tool change program reach M36,
it will pause till press Start again
6)assignment instruction :=
Used to assign values to variables
Format:=
Example:#251=890.34
#450=#123
Available for mathematical expressions, for example:
#440=#234+#670
7)refresh tool status display: DISP
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
Used to refresh tool status display in main interface.
Format: DISP
8) save tool number: SAVETOOL
Used to save tool number when tool number does not depends on external
switch, normally works in the end of program
Format: SAVETOOL
9) wait for tool No. changing ready: CASE
Waiting for certain tool No. changing ready, and judge the defined
condition. When condition is met, it means change tool ready, program goes
continually.
Format: CASET** +(-)X**+(-)X**+(-)X**+(-)X**+(-)X**+(-)X**+(-)X**
T** means tool number;
“+” means valid input;
“-” means invalid input;
“X” means input signal.
Example: CASET1-X16+X17-X18-X19+X20
When Tool 1 rotates ready, X16,X18,X19 are invalid,and X17,X20 are valid.
10) Information prompt dialog
Format:MESSAGEBOX(Information string)
or MSG(Information string);
11)current tool changing status display
Format: STATUSINFO(Information string)
or STAF(Information string)
Notice: when just insert STATUSINFO or STAF or STATUSINFO() or
STAF(), it means disable the status display.
12) choose tool on tool disk
Format: CHOOSET(P1,P2); p1=1 means choose tool in umbrella
magazine, P2 is tool number.
TS0 means tool number in spindle; TAIM means the aim tool
13) Condition statement: if the condition is met, then continue to execute,
otherwise skip.
Format:
IF(auxiliary relay or input or output or macro variables) THEN
.....
ENDIF
Example 2: Pop up dialog box and exit when the X13 is valid.
IF (+X13) THEN
MESSAGEBOX(Error: Tool in seat already or air pressure alarm, can
not back tool!)
RETURN;// return;
ENDIF
Example 3: Pop up dialog box and exit when the Y13 is valid.
IF (+Y13) THEN
MESSAGEBOX(Error: Tool in seat already or air pressure alarm, can
not back tool!)
RETURN;// return;
ENDIF
Example 4: When the macro variables #313=1(not 0), Pop up dialog box and
exit.
IF (+#313) THEN
MESSAGEBOX(Error: Tool in seat already or air pressure alarm, can
not back tool!)
RETURN;// return;
ENDIF
Additional condition command:
1> IF [logic expression] THEN
......
......
ENDIF
2> IF [logic expression] THEN #345=235(assignment command)
3> IF [logic expression] THEN OUT+Yxx-Yxx(output command)
4> IF [logic expression] THEN GOTO xxx(skip command)
Notice: [logic expression] has the common format with macro program,
available for GT/NE/LE logical judgement and mathematical expression.
14)Moving coordinate axis
Format:MOVE(G,F,X,Y,Z,A,B,W);
The first parameter G is G90 or G91, which is used to define relative or
absolute.
F specifies speed, XYZAB specifies machine coordinates.
W specifies condition signal which is valid, stop running.
for example: W+5 means if X5 is valid, then stop running.
Example :
MOVE(G90,F8000,X-100);// The X axis moves to the machine
coordinate X-100 mm
MOVE(G91,F8000,Z-100);// Z axis moves -100 mm.
MOVE(G91,F8000,Y-300,W-8);// Y axis moves -300 mm, but stops
running when the input point X8 is invalid.
Parameters F and XYZAB can be defined value through macro variables.
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
Example: MOVE(G91,F#231,Y#240,W+2);// Y axis moves -#240 mm
in the speed of #231, but when X2 is valid, then stop running.
Notice: if the axis is rotary, then run according to rotary rules, like
proximity principle and coordinate reduction.
15) Set the value of the current workpiece coordinate system and save it.
Format: SETWK(X,Y,Z,A,B);
Example: SETWK(X23.56,Z567.89);// Set the X of the current
workpiece coordinate system is 23.56 mm, Z is 567.89 mm.
Parameter XYZAB can be defined value through macro variables.
Example: SETWK(X#238,Z#237);// Setting the X of the current work
piece coordinate system is #238,Z coordinate value is #237
16) Set the offset value of the current workpiece coordinate system and save it.
Format:SETWF(X,Y,Z,A,B);
Example: SETWF(X23.56,Z567.89);// Set X offset of the current
workpiece coordinate system is 23.56 mm, Z offset is 567.89 mm.
Parameter XYZAB can be defined value through macro variables.
Example :SETWF(X#238,Z#237);// Setting the X offset of the current
work piece coordinate system is #238, Z coordinate offset value is #237.
17) Set the value of the current machine coordinate system and save it.
Format: SETMH(X,Y,Z,A,B);
Example: SETMH(X23.56,Z567.89);// Set X value of the current
machine coordinates as 23.56 mm, Z value as 567.89 mm。
Parameter XYZAB can be defined through macro variables
Example: SETMH(X#238,Z#237);// Set X value of the current machine
coordinates as #238 mm, Z value as #237 mm.
18) Tool count command: COUN
The instruction used to wait tool changing ready through a tool
counting signal, and judge the defined tool positioning signal, if condition is met,
tool change is ready, then continue the program.
Format: COUNT**+(-)X**+(-)X**
Note: T** means tool number, TT means aim tool.
The first input signal X means tool counting signal, “+” rising-
edge tool counting, “-” means falling-edge tool counting.
The second signal X defines position signal, “+” means valid
position, “-” means invalid position.
The two signals can be the same. Or omission of the second
signal is acceptable.
Increasing or decreasing of tool number depends on Tool Parameter
“Tool selection”, if single direction, then tool number increase. If
bidirectional, then judge tool number increasing or decreasing as the
principle of proximity. Change Parameter “tool number depends on input
point” into disable.
Example:
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
COUNTT+X11-X11 choose aim tool in T command, tool counting
signal is X11, rising-edge tool counting, positioning signal is X11, invalid means
position ready.
COUNTT+X10 choose aim tool in T command, tool counting signal is
X10, rising-edge tool counting, not detect positioning signal.
COUNT6+X10-X10 choose Tool No.6, tool counting signal is X10,
rising-edge tool counting, positioning signal is X10, invalid means position ready.
COUNT7-X6+X8 choose Tool No.7, tool counting signal is X6,
falling-edge tool counting, positioning signal is X8, valid means position ready.
Notice: this tool counting command is just available to low-speed
rotary magazine.
19) counting tool and output signal: CUNOUT
Output magazine rotating command and waiting for tool changing
ready, then automatically close the magazine rotary output signal in parameter.
Format: CUNOUT+(-/A/P/R)Y**+(-/A/P/R)Y**+(-/A/P/R)Y**+(-/A/P/R)Y**
Note:
+ means effective output;
- means ineffective output;
A mans reverse output status(exchange effective and ineffective)
P means judges turret nearby, if CW, then output is
effective; if CCW, then output is ineffective;
R means judges turret nearby, if CW, then output is
ineffective; if CCW, then output is effective.
Example: CUNOUT+Y9PY5RY7+Y11-Y15
The parameters need setting as follows:
32,Tool selection/number tool signal
25,Set up T08 signal [rise"1000+input number",drop"2000+input
number"]
26,Set up M61 signal [1000+output number]
27,Set up M63 signal [1000+output number]
28,Set up M71 signal [1000+output number]
Notice: this tool counting command is available to high-speed rotary
magazine.
20) Jump statement: GOTO
Format: GOTO xx
Example:
OUT-Y8
N12; mark needs to take up a line
OUT+Y4-Y6
PAUS5000
WAT+X23
GOTO 12; jump to N12
21) save macro variable into memorizer: SAVEMACR
Format: SAVEMACR
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
22) Error and exit,
Format:ERREXIT
23) Succeed and exit,
Format:RETURN
24) Special variable definition:
CURTS: current tool seat No.;
CURTH: current tool length compensation No.;
TAIM: aim tool No., input through T command;
TS(xx): Tool No. In tool seat xx;
TS(0) or TS0: tool No. on spindle.
25) Pause command: M00 or M0
Used to pause normal program, program will pause at
M00 line, only if press Start button again, can program
continue again.
Format: M00 or M0
26) Set current tool length compensation value and save
Format: SETTH(X,Y,Z,A,B)
Example: SETTH(X23.56,Z567.89); //set current tool compensation X
value as 23.56mm, Z value as 567.89mm.
Parameter XYZAB can be defined value through macro variable
Example: SETTH(X#238,Z#237);// set current tool compensation X
value as #238mm, Z value as #237mm
27) Set current tool radius compensation value and save: SETTD(Parameter)
28) file operation command:
1> found and open a file:
FILEON(parameter) or FILEON[parameter]
Example:
FILEON(AABBCC) or FILEON[AABBCC]
means found a file named AABBCC and open it.
2> close file
FILECE means close the currently opened file. If without this, the
opened file will be closed automatically after program finished.
3> write word or string into the opened
FILEWD(parameter) or FILEWD[parameter]
Example:
FILEWD(G54G0X0Z0) or FILEWD[G54G0X0Z0]
means write word string G54G0X0Z0 into the opened file.
4> Write current feed axis absolute coordinate into
the opened file: FILEWC
29) Serial communication
1> configure serial check mode.
Format: COMP1 means odd check;
COMP2 means even check;
COMP3 means no check;
2> clear serial data receiving buffer.
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
Format: COMC
3> Send one or more character from serial port.
Format: COMS(parameter); parameter is a
character or more or macro variable(variable value is
ASCII code corresponding to character).
Example: COMS(A); means send character A.
COMS(ABCF); means send characters ABCF.
COMS(#560); means send ASCII code that #560 value corresponds to.
If #560=65, it will send character A.
COMS(##560); means translate #560 value into ASCII code and send it
out. If #560=52.234, it will send string 52,234 out.
4> receive character from serial port
Format: COMR(parameter);
parameter is a macro variable, the variable save the received character
value(variable value is ASSCII code correspond to character).
Example: COMR(#561); means assign ASCII code value which
corresponds to received character to variable #561. if received character is B,
then variable #561 will be assigned as 66.
#1806: X60-X67(D0-D7)
#1808: Y00-Y15(D0-D15
#1809: Y16-Y31(D0-D15)
Format:#i= expression;
4) Arithmetic and logic
Arithmetic and logical operation table:
Function Format Remarks
Definition #i = #j
Addition #i = #j + #k ;
Subtraction #i = #j - #k ;
Multiplication #i = #j * #k ;
Division #i = #j / #k ;
Sine #i = SIN(#j) ;
Arc sine #i = ASIN(#j); Angle unit is
Cosine #i = COS(#j) ; degree, 90 degrees
Arc cosine #i = ACOS(#j); 30 minutes is 90.5
Tangent #i = TAN(#j); degrees.
Arc tangent #i = ATAN(#j);
Absolute Square #i = SQRT(#j);
Absolute value #i = ABS(#j) ;
Round off #i= ROUND(#j);
Round down #i = FIX(#j);
Round up #i = FUP(#j);
Natural logarithm #i = LN(#j);
Exponential #i = EXP(#j);
Logical operation
Or #i = #j OR #k ;
works one by one
Exclusive or #i = #j XOR #k ;
bit with binary
And #i = #j AND #k ;
number
5) Unconditional Jump: GOTO n
Transfer to the program segment marked with the order number n, when
specified number except for 1 to 99999, it will alarm error, order also can be
defined by expression.
Example: GOTO 5, GOTO #100
6) Conditional Jump:
1) IF (conditional expression)GOTO OR THEN
2) IF (conditional expression)
< operation >
ELSE
< operation >
ENDIF
3) IF (conditional expression)
< operation >
ELIF
< operation >
ELIF
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
< operation >
ENDIF
If the specified conditional expression is met, then execute following
statement; if the specified condition expression is not met, then execute next
section of the program.
Example: IF (#100 EQ 2) THEN #100=5
IF (#101 GT 2) GOTO 6
Operator character meaning:
EQ equal to =
NE not equal to
GT greater than >
GE greater than or equal to >=
LT less than <
LE less than or equal to <=
Example:
IniStatus=M means Boot into manual continuous status.
IniStatus=A means Boot into the automatic continuous status.
3) Pressing Enter button in main interface, it will pop up the dialog box
which will be displayed in main interface(including the general coordinates
and the current program display area)
Other parameter P900" user-defined dialog box [1 is invalid, 4 is
valid, 12 is all, +256: G54-G59 Display by USxx]"
//+2 means inner occupied;
//+4 means dialog will pop up when press Enter in main interface;
//+8 means available certain modification in both main interface and
sub interface;
//+16 means dialog will pop up and display user-defined picture when
press Enter in main interface;
//+32 means hide Z axis setting when set work piece coordinate.
//+64 means record all program running time automatically;
//+128 means block manual switch of 4th and 5th axis in 5 axis
controller;
//+256 means display user coordinate with US0-US54 in robot
controller;
//+512 means the 2nd channel shares spindle with 1st channel in
bichannel controller(only works in the 2nd channel);
//+1024 means in tool compensation interface press F8 to back main
interface. Otherwise, back to user coordinate setting interface;
//+2048 means if tool offset changed or workpiece coordinate changed
after move feed axis manually, display moving value as modified value.
//+4096 means when press Enter in main interface, pop up dialog for
page No. input, then pop up user-defined dialog.
//+8192 means system occupied;
//+16384 for standby;
//+32728 means system occupied;
Notice: Entering into workpiece coordinate from tool compensation
interface, F1-F6 correspond to workpiece coordinate G54-G59, F7
corresponds to G54.1-G54.48, press F7 again to choose from G43.1-G54.8.
Input E to clear offset value. The setting here is the same as that in the
parameter interface, workpiece coordinate system can be delete from
configuration to save storage.
//+64 means record all program running time automatically;
The data will be saved in file “runtimerecord.txt”, it can be backed
up with parameter files. Pressing Q in program management interface, a
dialog will pop up to show program running time, and input RECORD in
Other parameter P12 inner parameter to clear file “runtimerecord.txt”.
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
//+2048 means if tool offset changed or workpiece coordinate changed
after move feed axis manually, display moving value as modified value.
When program running, press Pause, and move feed axis through
handwheel or button, then modify current workpiece coordinate offset in
tool compensation or parameter interface, controller will display moving
coordinate as offset value, press Enter to set current coordinate system
offset vale, and it is also editable.
The dialog box definition is as follows:
Start from BeginMainFace, end with EndMainFace[optional ]
Sample:
BeginMainFace // the start configuration.
0,20,80,420,300, Please enter the parameter<F1-Clear, F8-Null> //four data
from 2nd bite to 5 bite, the dialog box l/t/w/h, l/t means start point coordinate of
box, w/h means width and height, following is prompt information;
4,3,3,280,190,fillpict1.bmp //4 means picture, following 4 bites are l/t/w/h,
fillpict1.bmp is picture name;
1,282,10,60,25,X: //First bite means control type: button, following 4 bites
are l/t/w/h, the last bite corresponds to the macro variable(only for edit box) or
prompt information;
3,330,10,85,25,345,I //editable box, corresponds to Macro variables #345,
and integer type (I specified integer, otherwise floating point type)
1,282,40,60,25,Z:
3,330,40,85,25,288, //corresponds to Macro variables #345, integer type
1,282,70,60,25,R:
3,330,70,85,25,500,I
1,282,100,60,25,P:
3,330,100,85,25,700,
1,282,130,60,25,S:
3,330,130,85,25,456,
1,200,195,100,25, helical pitch K(E):
3,300,195,90,25,145,
1,200,223,100,25,time L:
3,300,223,90,25,225,
2,30,253,100,26,Enter
2,240,253,100,26, Cancel
EndMainFace //configuration end.
Control type:
0: Dialog box itself;
1: User-defined static text;
2: User-defined button;
3: User-defined edit box;
4: Picture ;
8: User-defined small font static text;
Note:
1> border style includes:
'D' means concave border;
'U' means convex border;
'F' means flat table border;
'0 ' means with no borders.
2> if the interface borders range exceeds the actual scope, software will limit
it automatically.
The range of system interface F:left=5, top=160, right=460, bottom=530;
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
The range of system interface A:left=5, top=35, right=460, bottom=155;
The range of system interface B: left=470;Top=35; right=795; bottom=560;
The scope of the current running program name in the B interface: left=465,
top=45, right=795, bottom=75;
The scope of G code, Tool No. and Tool offset in the B interface: left=465,
top=75, right=795, bottom=165;
The scope of the current M code in the B interface: left=465, top=165,
right=795, bottom=245;
The scope of current feed and spindle speed and speed rate in the B
interface:left=465, top=250, right=795, bottom=340;
The scope of the current machine coordinates in the B interface: left=465,
top=350, right=795, bottom=460;
The scope of current single piece time in the B interface: left=465, top=465,
right=795, bottom=493;
The scope of the current processing No. in the B interface: left=465, top=496,
right=795, bottom=524;
The scope of current spindle speed in the B interface: left=465, top=527,
right=795, bottom=555;
The 1st bit defines control type, following 4 bit data define l/t/w/h (start
point, width, height), next is address word, the last is prompt message;
Control types:
0 refers to dialog box itself;
1 means user-defined static text;
2 means user-defined button;
3 means user-defined edit box;
4 means picture;
8 means user-defined small fonts static text.
Modify l/t/w/h to adjust the box, and also use abbreviation to suit box.
Additional Sample for graphic program:
GraphProgramEdit //Start
Gcode#19999= //Gcode#19999= means general dialog box in the
beginning;
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
0,20,80,420,300,Please input G code number<F1-Clear, F8-Null>
//the first bit refers to control type, four data from
2nd bite to 5 bite, the dialog box l/t/w/h, l/t means
start point coordinate of box, w/h means width and
height, following is prompt information;
1,2,10,380,25,please input //the first bit refers to control type, four
data from 2nd bite to 5 bite, the dialog
box l/t/w/h, l/t means start point
coordinate of box, w/h means width and
height, following is address word(only
edit box), the last bit is prompt information;
1,2,30,380,25,Please input//
1,10,200,60,25,Command G//
3,70,200,180,25,
2,30,250,130,30,Enter
2,230,250,130,30,Esc
Gcode#78= //Gcode#78=means G78 dialog box;
0,20,80,420,300,Please input G78 parameter <F1-Clear, F8-Null>
//the first bit refers to control type, four
data from 2nd bite to 5 bite, the dialog
box l/t/w/h, l/t means start point
coordinate of box, w/h means width and
height, the last bit is prompt information;
9,G78
1,275,10,60,25,X(U): //the first bit refers to control type, four
data from 2nd bite to 5 bite, the dialog
box l/t/w/h, l/t means start point
coordinate of box, w/h means width and
height, following is address word(only
edit box), the last bit is prompt information;
3,330,10,85,25,X,
1,275,40,60,25,Z(W):
3,330,40,85,25,Z,
1,275,70,60,25,I:
3,330,70,85,25,I,
1,275,100,60,25,J:
3,330,100,85,25,J,
1,275,130,60,25,Q:
3,330,130,85,25,Q,
1,200,195,100,25,pitch K(E):
3,300,195,90,25,K,
1,200,223,100,25,leader quantity L(SP):
3,300,223,90,25,L,
9#Fixed circle command
2,30,250,130,30,Enter
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
2,230,250,130,30,Esc
4,2,2,270,190,gcode78.bmp //gcode78.bmp is picture file name;
EndGraphProgEdit //End
Control types:
0: Dialog box itself;
1: User-defined static text;
2: User-defined button;
3: User-defined edit box;
4: Picture;
5: MiniGUI static text;
6: MiniGUI efit box
7: User-defined small-font static text;
9: Generate command type fixed word string(if this control exists, it will
not generate G code again, and this control will display in 1st line);
9#: generate fixed word string(used to generate note, and not add “,”
behind #, displaying in the 1st line).
Attention:
For MOVCI/MCI/G5/G6, only half of intersection can be programmed once, full
intersection line needs two lines of program. With G2/G3 L93, full intersection can
be programmed once. Till now, intersection line instruction only support one
cylinder being perpendicular to another cylinder.
Definition rules of User(workpiece) coordinate system:
For MOVCI/MCI, axis of small cylinder is Z axis direction, axis of big cylinder is X
axis direction.
For G6 L93, axis of small cylinder is Z axis direction, axis of big cylinder is X axis
direction.
For G17 L93 G2/G3/G5, axis of small cylinder is Z axis direction, axis of big
cylinder is X axis direction.
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
For G18 L93 G2/G3/G5, axis of small cylinder is Y axis direction, axis of big
cylinder is Z axis direction.
For G19 L93 G2/G3/G5, axis of small cylinder is X axis direction, axis of big
cylinder is Y axis direction.
For the intersection line specified by G2/G3/G5/G6, when change L93 into L94,
definition rule will change;
For MOVCI L94/MCI L94, axis of small cylinder is Z axis direction, axis of big
cylinder is Y axis direction.
For G6 L94, axis of small cylinder is Z axis direction, axis of big cylinder is Y axis
direction.
For G17 L94 G2/G3/G5, axis of small cylinder is Z axis direction, axis of big
cylinder is Y axis direction.
For G18 L94 G2/G3/G5, axis of small cylinder is Y axis direction, axis of big
cylinder is X axis direction.
For G19 L94 G2/G3/G5, axis of small cylinder is X axis direction, axis of big
cylinder is Z axis direction.
BeginDwSelfMcode //Start.
1, //1 means 1st display position, sequence is from left to
right, from upper to lower.
a,M53,g,Spindle CW, //a means the 1st case, M53 means condition
is relay M53 valid, g means green light,
following is display message;
b,M54,g,Spindle CCW, //b means the 2nd case, M54 means
condition is relay M54 valid, g means
green light, following is display message;
c,M67,b,Spindle Stop, //c means the 3rd case, M67 means
condition is relay M67 valid, b means
blue light, following is display message;
d,NNN,r,Spindle Stop, //d means the 4th case, NNN means
no above condition met, r means red
light, following is display message;
2, //2 means 2nd display position, sequence is from left to
right, from upper to lower.
a,M49,r,Tool loosen, //a means the 1st case, M49 means
condition is relay M49 valid, r means
red light, following is display message;
b,m49,g,Tool tighten, //b means the 2nd case, m49 means
condition is relay M49 invalid, g means
green light, following is display message;
3, //3 means 3rd display position, sequence is from left to
right, from upper to lower.
a,M48,g,M08, //a means the 1st case, M48 means condition
is relay M48 valid, g means green light,
following is display message;
b,m48,r,M09, //b means the 2nd case, m48 means condition
is relay M48 invalid, r means red light,
following is display message;
4, //4 means 4th display position, sequence is from left to
right, from upper to lower;
a,M51,g,Lubrication on, //a means the 1st case, M51 means
condition is relay M51 valid, g means
green light, following is display message;
b,m51,r,M33, //b means the 2nd case, m51 means
condition is relay M51 invalid, r means
red light, following is display message;
5, //5 means 5th display position, sequence is from left to
right, from upper to lower;
a,M56,g,Test on, //a means the 1st case, M56 means
condition is relay M56 valid, g means
green light, following is display message;
CHEHNGDU NEWKer CNC-TECHNOLOGY CO.,LTD
WWW.NEWKER-CNC.COM
b,m56,r,Test off, //b means the 2nd case, m51 means
condition is relay M51 invalid, r means
red light, following is display message;
6, //6 means 6th display position, sequence is from left to
right, from upper to lower;
a,M57,r,Practice on, //a means the 1st case, M57 means
condition is relay M57 valid, r means
red light, following is display message。
b,m57,g,Practice off, //b means the 2nd case, m57 means
condition is relay M57 invalid, g means
green light, following is display message;
EndDwSelfMcode //End