FANUC CNC supported access

FANUC CNC Variables

The FANUC CNC Driver supports the following variables as device variables.

Alarms

Alarms are listed in the Variables panel under an INT4 variable called Alarms. Each bit of the Alarms variable is exposed as its own variable. The meaning of each bit is as follows:

Series 15/15i

Value Description Type
#00 Background P/S (BG)
#01 Foreground P/S (PS)
#02 Overheat alarm (only Series 15) (OH)
#03 Sub-CPU error (only Series 15) (SB)
#04 Synchronized error (SN)
#05 Parameter switch on (SW)
#06 Overtravel, External data (OT)
#07 PMC error (PC)
#08 External alarm message (1) (EX)
#09 (Not used)  
#10 Serious P/S (SR)
#11 (Not used)  
#12 Servo alarm (SV)
#13 I/O error (IO)
#14 Power off parameter set (PW)
#15 System alarm (only Series 15i) (SY)

Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i

Value Description
#00 P/S100
#01 P/S000
#02 P/S101
#03 P/S alarm except above
#04 Overtravel alarm
#05 Overheat alarm
#06 Servo alarm
#07 System alarm
#08 APC alarm
#09 Spindle alarm
#10 P/S alarm(No.5000,..), Punch press alarm
#11 Laser alarm
#12 (Not used)
#13 Rigid tap alarm
#14 (Not used)
#15 External alarm message

Series 16i/18i-W

Value Description Type
#00 P/S alarm #00
#01 Overtravel alarm #01
#02 Servo alarm #02
#03 (Not used) #03
#04 Overtravel alarm #04
#05 Stroke limit - 1 #05
#06 Stroke limit - 2 #06
#07 Edit alarm #07
#08 APC alarm #08
#09 (Not used) #09
#10 P/S 5000 ... alarm #10
#11 (Not used) #11
#12 (Not used) #12
#13 (Not used) #13
#14 External alarm message #14
#15 Reverse control alarm #15

Series 30i, 0i-D/F, PMi-A

Value Description Type
#00 Parameter switch on (SW)
#01 Power off parameter set (PW)
#02 I/O error (IO)
#03 Foreground P/S (PS)
#04 Overtravel, External data (OT)
#05 Overheat alarm (OH)
#06 Servo alarm (SV)
#07 Data I/O error (SR)
#08 Macro alarm (MC)
#09 Spindle alarm (SP)
#10 Other alarm (DS) (DS)
#11 Alarm concerning Malfunction prevent functions (IE)
#12 Background P/S (BG)
#13 Synchronized error (SN)
#14 (reserved)  
#15 External alarm message (EX)

PMC Variables

PMC data can be read directly off the CNC using the “PMC” variable tree. All PMC variable ranges are automatically enumerated from the connected CNC. The PMC Address indicates the type of PMC variables within it.

Address Description
G Signal to PMC->CNC
F Signal to CNC->PMC
Y Signal to PMC->machine
X Signal to machine->PMC
A Message demand
R Internal relay
T Changeable timer
K Keep relay
C Counter
D Data table
M Signal input from other PMC path
N Signal output to other PMC path
E Extended relay

Modal Variables

Modal data like G codes can be read using the “Modal” variable tree. Each modal group is made up of 6 variables describing the modal block.

Address Description
Previous Block G Code Previously commanded G Code.
Previous Block Flag Previously commanded G Code block flag.
Active Block G Code Currently commanded G Code.
Active Block Flag Current commanded G Code block flag.
Next Block G Code The G code that will be commanded next.
Next Block Flag The next commands G Code block flag.

The bits of the flag variables are described below…

Flag Bit Description
#3 Command differs from the previous block (only Series 30i, 0i-D/F, PMi-A)
#4 There is a command of a decimal point.
#5 Negative
#6 1 digit
#7 There is a command in the present block.

Status Variables

Status variables are listed under the “Status” variable tree. All statuses are read as numbers and their meanings are listed below.

Series 15/15i

* In case of multi-path, there are difference of path for only Status of axis movement, dwell, and Status of M,S,T,B function. As for the other status, there is no difference.

aut

AUTOMATIC mode selection

Status Description
0 ****(No selection)
1 MDI
2 TAPE(Series 15), DNC(Series 15i)
3 MEMory
4 EDIT
5 TeacH IN
manual

MANUAL mode selection

Value Description
0 ****(No selection)
1 REFerence
2 INC·feed
3 HaNDle
4 JOG
5 AnGular Jog
6 Inc+Handl
7 Jog+Handl
run

Status of automatic operation

Value Description
0 STOP
1 HOLD
2 STaRT
3 MSTR(jog mdi)
4 ReSTaRt(not blinking)
Except under manual mode and under cutter radius compensation outside corner
5 PRSR(program restart)
6 NSRC(sequence number search)
7 ReSTaRt(blinking)
Under manual mode or under cutter radius compensation outside corner
8 ReSET
9 (Not used)
10 (Not used)
11 (Not used)
12 (Not used)
13 HPCC(during RISC operation)
edit

Status of program editing

Value Description
0 ****(Not editing)
1 EDIT
2 SeaRCH
3 VeRiFY
4 CONDense
5 READ
6 PuNCH
motion

Status of axis movement,dwell

Value Description
0 ***
1 MoTioN
2 DWeLl
3 Wait (waiting:only TT)
mstb

Status of M,S,T,B function

Value Description
0 ***
1 FIN
emergency

Status of emergency

Value Description
0 (Not emergency)
1 EMerGency
write

Status of writing backupped memory

Value Description
0 (Not writing)
1 @(writing)
labelskip

Status of label skip

Value Description
0 Label SKip
1 (Not label skip)
alarm

Status of alarm

Value Description
0 (No alarm)
1 ALarM
warning

Status of warning

Value Description
0 (No warning)
1 WaRNing
battery

Status of battery

Value Description
0 (Normal)
1 BATtery low(backupped memory)
2 BATtery low(absolute position detector)

Series 16/18/21, 16i/18i/21i, 0i, 30i/31i/32i, Power Mate i, PMi-A

hdck (30i/31i/32i, 0i-D/F only)

Status of manual handle re-trace

Value Description
0 Invalid of manual handle re-trace
1 M.H.RTR.(Manual handle re-trace)
2 NO RVRS.(Backward movement prohibition)
3 NO CHAG.(Direction change prohibition)
tmmode

T/M mode selection (only with compound machining function)

Value Description
0 T mode
1 M mode
aut

AUTOMATIC/MANUAL mode selection

Value Description
0 MDI
1 MEMory
2 ****
3 EDIT
4 HaNDle
5 JOG
6 Teach in JOG
7 Teach in HaNDle
8 INC·feed
9 REFerence
10 ReMoTe
run

Status of automatic operation

Value Description
0 ****(reset)
1 STOP
2 HOLD
3 STaRT
4 MSTR(during retraction and re-positioning of tool retraction and recovery, and operation of JOG MDI)
0 ****(reset)
1 STOP
2 HOLD
3 STaRT
4 MSTR(during retraction and re-positioning of tool retraction and recovery, and operation of JOG MDI)
0 ****(reset)
1 STOP
2 HOLD
3 STaRT
motion

Status of axis movement, dwell

Value Description
0 ***
1 MoTioN
2 DWeLl
mstb

Status of M,S,T,B function

Value Description
0 ***(Others)
1 FIN
emergency

Status of emergency

Value Description
0 (Not emergency)
1 Emergency
2 Reset
3 WAIT(FS35i only)
alarm

Status of alarm

Value Description
0 ***(Others)
1 Alarm
2 Battery low
3 FAN(NC or Servo amplifier)
4 PS Warning
5 warning
6 Insulate warning
7 Encoder warning
8 PMC alarm
edit

Status of others

In case of 0i-D, the meaning of status(16,21,23,42,44,46) is changed according to the parameter No.13104#0.(same as 30i)

M series (including Power Mate i)
Value Description
0 ****(Not editing)
1 EDIT(during editing)
2 Search(during searching)
3 OUTPUT(during output)
4 INPUT(during input)
5 COMPARE((during comparing)
6 Label Skip(label skip status)(30i, 0i-D/F are unused.)
7 Restart(during program restart)
8 HPCC(during RISC operation)(FS16i/18i only)
9 PTRR(during tool retraction and recovery mode)
10 RVRS(during retracing)
11 RTRY(during reprogressing)
12 RVED(end of retracing)
13 HANDLE(during handle overlapping)(30i, 0i-D/F are unused.)
14 Offset(during tool length measurement mode)
15 Work Offset(during work zero point measurement mode)
16 AICC(during AI contour control)
AICC(during AI contour control)(0i-D:No.13104#0=1)
AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
17 Memory Check(checking tape memory)(30i, 0i-D/F are unused.)
18 Customer’s BoarD(during customer's board control)(30i, 0i-D/F are unused.)
19 SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
20 AI NANO(during AI Nano contour control)(30i, 0i-D/F are unused.)
21 AI APC(during AI advanced preview control) (21i-MA)(0i-D:No.13104#0=1)
22 MBL APC(during multi blocks advanced preview control) (0i-MA only)
23 NANO HP(Running of AI High-precision Contour Control)
AICC 2(during AI contour control II)(30i, 0i-F)
AICC 2(during AI contour control II)(0i-D:No.13104#0=1)
AICC(during AI contour control)(0i-D:No.13104#0=0)
24 AI HPCC(Running of AI Nano High-precision Contour Control)
25 5-AXIS(Running of 5-axes machining)
26 LEN(change the manual active offset value: length offset change mode)
27 RAD(change the manual active offset value: radius offset change mode)
28 WZR(change the manual active offset value: workpiece origin offset change mode)
39 TCP(during tool center point control of 5-axes machining)
40 TWP(during tilted working plane command)
41 TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
42 APC(Advanced Preview Control)(16i/18i/21i,0i-C)
APC(Advanced Preview Control)(0i-D:No.13104#0=1)
43 PRG-CHK(High speed program check)
44 APC(Advanced Preview Control)(0i-D:No.13104#0=0)
45 S-TCP(during smooth TCP)(30i, 0i-F)
46 AICC 2(during AI contour control II)(0i-D:No.13104#0=0)
59 ALLSAVE(High speed program management: the programs saving in progress)
60 NOTSAVE(High speed program management: by the programs not saved status)
T series
Value Description
0 ****(Not editing)
1 EDIT(during editing)
2 Search(during searching)
3 OUTPUT(during output)
4 INPUT(during input)
5 COMPARE(during comparing)
6 Label Skip(label skip status)(30i, 0i-D/F are unused.)
7 Offset(during writing mode of tool length compensation amount)
8 Work Shift(during writing mode of work shift amount)
9 Restart(during program restart)
10 16i:(Not used), 30i, 0i-F:RVRS(during retracing)
11 16i:(Not used), 30i, 0i-F:RTRY(during reprogressing)
12 16i:(Not used), 30i, 0i-F:RVED(end of retracing)
13 (Not used)
14 PTRR(during tool retraction and recovery mode)
15 (Not used)
16 AICC(during AI contour control)
AICC(during AI contour control)(0i-D:No.13104#0=1)
AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
17 Memory Check(checking tape memory)(30i, 0i-D/F are unused.)
18 (Not used)
19 SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
20 AI NANO(during AI Nano contour control)(30i, 0i-D/F are unused.)
21 HPCC(during RISC operation)
22 (Not used)
23 NANO HP(Running of AI High-precision Contour Control)
AICC 2(during AI contour control II)(30i, 0i-F)
AICC 2(during AI contour control II)(0i-D:No.13104#0=1)
AICC(during AI contour control)(0i-D:No.13104#0=0)
24 AI HPCC(Running of AI Nano High-precision Contour Control)
25 5-AXIS(Running of 5-axes machining)
26 OFSX(change the manual active offset value: X-axis offset change mode)
27 OFSZ(change the manual active offset value: Z-axis offset change mode)
28 WZR(change the manual active offset value: workpiece origin offset change mode)
29 OFSY(change the manual active offset value: Y-axis offset change mode)
31 TOFS(change the manual active offset value: Tool offset change mode)
39 TCP(during tool center point control of 5-axes machining)
40 TWP(during tilted working plane command)
41 TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
42 APC(Advanced Preview Control)(16i/18i/21i,0i-C)
APC(Advanced Preview Control)(0i-D:No.13104#0=1)
43 PRG-CHK(High speed program check)
44 APC(Advanced Preview Control)(0i-D:No.13104#0=0)
45 S-TCP(during smooth TCP)(30i, 0i-F)
59 ALLSAVE(High speed program management: the programs saving in progress)
60 NOTSAVE(High speed program management: by the programs not saved status)

Series 16i/18i-W

aut

AUTOMATIC/MANUAL mode selection

Value Description
0 MDI
1 MEM
3 EDT
4 HAND
5 JOG
10 TAPE
run

Status of automatic operation

Value Description
0 NOT READY
1 M-READY
2 C-START
3 F-HOLD
4 B-STOP
motion

Status of axis movement, dwell

Value Description
0 ****
1 CMTN
2 CDWL
mstb

Status of M, S, T, B function

Value Description
0 ****
1 CFIN
emergency

(Not used)

alarm

Status of alarm

Value Description
0 ****(Not emergency)
1 ALARM
2 BATTERY LOW
edit

Status of program editing

Value Description
0 ****(Not editing)
1 EDITING(during search)
2 SEARCH(during search)
3 RESTART (during restart)
4 RETRACE(during retrace)

Parameters

Parameters are an advanced feature of the Fanuc CNC driver that must be enabled through the device definition. Click the “Use Advanced Properties” checkbox to get to the advanced settings and then set “Parameters” to true to enabled parameter reads. Once the “Parameters” option is enabled “Parameter Write” option will appear. Enable “Parameter Write” to allow writes to parameters.

Parameters are automatically enumerated from the CNC. Each parameter is unique in data type, description and bitmask. See the different parameter variables below.

Unit

Value Description
0 except real number
1 input unit
2 output unit
3 offset unit

Dimension

Value Description
0 except real number
1 length unit
2 angle unit
3 length + angle unit
4 velocity unit

Input

Value Description
0 normal
1 setting parameter
2 input prohibit

Display

Value Description
bit 0 symbol exist
bit 1 top of group
bit 2 bottom of group
bit 3 gap required

Other

Value Description
bit 0 unsigned
bit 1 power off required
bit 2 not output
bit 3 not compared
bit 4 loader attribute

Macros

Macros are an advanced feature of the Fanuc CNC driver that must be enabled through the device definition. Click the “Use Advanced Properties” checkbox to get to the advanced settings and then set “Macros” to true to enabled macro reads. Once the “Macros” option is enabled “Macro Write” option will appear. Enable “Macro Write” to allow writes to macros.

Macros are represented as arrays of FLOAT8 variables. These ranges are automatically enumerated based on the CNC configuration.

PMacros

P Macros are an advanced feature of the Fanuc CNC driver that must be enabled through the device definition. Click the “Use Advanced Properties” checkbox to get to the advanced settings and then set “P Macros” to true to enabled macro reads. Once the “P Macros” option is enabled “P Macro Write” option will appear. Enable “P Macro Write” to allow writes to macros.

P Macros just like Macros are represented as arrays of FLOAT8 variables. These ranges are automatically enumerated based on the CNC configuration.