0% found this document useful (0 votes)
446 views569 pages

FANUC PICTURE - Specification For Edition 08.0 or Later

Uploaded by

Melih Yılmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
446 views569 pages

FANUC PICTURE - Specification For Edition 08.0 or Later

Uploaded by

Melih Yılmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 569

7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

FANUC PICTURE Specification


(Edition 8.0 or later)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 1/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

TABLE OF CONTENTS

1 OVERVIEW ············································································· 6
1.1 INSTALLER CHANGE ······················································································· 6
1.2 FP CONTROL ·································································································· 6
1.3 RUBY SCRIPT ································································································· 7
1.4 LIBRARY FUNCTIONS CAN BE USED FROM RUBY SCRIPT ·································· 8
1.5 ASYNCHRONOUS EXECUTION OF RUBY SCRIPT ··············································· 8
1.6 IMPROVE OF SCREEN CALL FUNCTION ···························································· 9
1.7 COMBINED APPLICATION IN STANDARD DISPLAY UNIT ······································ 9
1.8 REMARKS ·····································································································10

2 INSTALLER··········································································· 11
2.1 INSTALLATION PROCEDURE ··········································································· 11

3 FP CONTROL ········································································ 12
3.1 ADDITION OF FP CONTROL·············································································12
3.1.1 Check Box Control ··································································································· 16
3.1.1.1 Function ··········································································································· 16
3.1.1.2 Diagram ··········································································································· 16
3.1.1.3 Icon design ······································································································· 16
3.1.1.4 Operation ········································································································· 17
3.1.1.5 Properties ········································································································· 17
3.1.1.6 List display········································································································ 26
3.1.1.7 Batch editing ····································································································· 30
3.1.1.8 Message ·········································································································· 31
3.1.2 Radio Button Control ································································································· 31
3.1.2.1 Function ··········································································································· 31
3.1.2.2 Diagram ··········································································································· 31
3.1.2.3 Icon design ······································································································· 31
3.1.2.4 Operation ········································································································· 31
3.1.2.5 Properties ········································································································· 33
3.1.2.6 List display········································································································ 42
3.1.2.7 Batch editing ····································································································· 46
3.1.2.8 Message ·········································································································· 46
3.1.3 List Box Control ······································································································· 47
3.1.3.1 Function ··········································································································· 47
3.1.3.2 Diagram ··········································································································· 47
3.1.3.3 Icon design ······································································································· 47
3.1.3.4 Operation ········································································································· 47
3.1.3.5 Properties ········································································································· 56
3.1.3.6 List display········································································································ 65
3.1.3.7 Batch editing ····································································································· 69
3.1.3.8 Message ·········································································································· 69
3.1.4 Message Box ·········································································································· 69
3.1.4.1 Function ··········································································································· 69
3.1.4.2 Image ·············································································································· 69
3.1.4.3 Operation ········································································································· 70
3.1.4.4 Configuration specifications ·················································································· 72

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 2/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.4.5 Properties ········································································································· 74


3.1.4.6 Function ··········································································································· 80
3.1.4.7 Drawing specifications························································································· 81
3.1.4.8 Messages ········································································································· 82
3.1.5 Combo Box Control ·································································································· 82
3.1.5.1 Function ··········································································································· 82
3.1.5.2 Diagram ··········································································································· 82
3.1.5.3 Icon design ······································································································· 84
3.1.5.4 Operation ········································································································· 85
3.1.5.5 Properties ········································································································· 88
3.1.5.6 List display········································································································ 98
3.1.5.7 Batch editing ··································································································· 101
3.1.5.8 Message ········································································································ 101
3.1.6 Pie Graph Control ·································································································· 102
3.1.6.1 Function ········································································································· 102
3.1.6.2 Diagram ········································································································· 102
3.1.6.3 Icon design ····································································································· 102
3.1.6.4 Operation ······································································································· 102
3.1.6.5 Properties ······································································································· 104
3.1.6.6 List display······································································································ 108
3.1.6.7 Batch editing ··································································································· 113
3.1.6.8 List of messages ······························································································ 113
3.1.7 Extended bar graph control ······················································································ 113
3.1.7.1 Function ········································································································· 113
3.1.7.2 Diagram ········································································································· 113
3.1.7.3 Icon design ····································································································· 114
3.1.7.4 Operation ······································································································· 114
3.1.7.5 Properties ······································································································· 115
3.1.7.6 List display······································································································ 121
3.1.7.7 Batch editing ··································································································· 126
3.1.7.8 List of messages ······························································································ 126
3.2 DESIGN CUSTOMIZATION ············································································· 127
3.2.1 [Image File List] Screen ··························································································· 127
3.2.1.1 Listing image files····························································································· 127
3.2.1.2 Creating a shape······························································································ 128
3.2.1.3 Adding a shape································································································ 129
3.2.1.4 Deleting a shape ······························································································ 130
3.2.1.5 Editing a shape ································································································ 131
3.2.1.6 Copying a shape ······························································································ 132
3.2.1.7 Menu bar and toolbar ························································································ 133
3.2.1.8 Creating a file ·································································································· 134
3.2.1.9 Adding a file ···································································································· 135
3.2.1.10 Deleting a file ·································································································· 136
3.2.1.11 Copying a file ·································································································· 137
3.2.2 Image File Edit Screen ···························································································· 138
3.2.2.1 Startup of the image file edit screen ····································································· 138
3.2.2.2 Menu bar and toolbar ························································································ 139
3.2.2.3 Control bar······································································································ 141
3.2.2.4 Configuration tree····························································································· 143
3.2.2.5 Drawing area··································································································· 145
3.2.2.6 Property list····································································································· 146
3.3 IMPROVEMENT OF PROPERTY SETTING OF FP CONTROL ······························· 152
3.3.1 Display of Setting Value Names················································································· 152
3.3.1.1 Function ········································································································· 152
3.3.1.2 Relevant items································································································· 152
3.3.1.3 Diagram ········································································································· 152

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 3/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.3.1.4 Operation ······································································································· 153


3.3.2 Changing FP Control Property from a Ruby Script ························································· 153
3.3.2.1 Function ········································································································· 153
3.3.2.2 Operation ······································································································· 154
3.3.2.3 Function ········································································································· 154

4 RUBY SCRIPT ······································································162


4.1 CREATION OF RUBY SCRIPT ········································································· 162
4.1.1 Script List ············································································································· 162
4.1.1.1 Display script list ······························································································ 162
4.1.1.2 New ·············································································································· 163
4.1.1.3 Entry ············································································································· 165
4.1.1.4 Remove ········································································································· 167
4.1.1.5 Edit ··············································································································· 168
4.1.1.6 Check syntax ·································································································· 168
4.1.1.7 Startup register/restore ······················································································ 168
4.1.1.8 Timer script register/restore ················································································ 169
4.1.2 Enhancement of Script Editor Functions ······································································ 170
4.1.2.1 Addition of the Menu Bar ··················································································· 170
4.1.2.2 Expansion of the UNDO Function and REDO Function ············································ 174
4.1.2.3 Change in the Way Script Number/Name is Changed ·············································· 174
4.1.2.4 Restricting the Number of Script Description Lines ·················································· 176
4.1.2.5 Adding Search/Replace Functions ······································································· 177
4.1.2.6 Adding the Symbol Setting Menu ········································································· 181
4.1.2.7 Adding the FP Function Input Assistance Function ·················································· 181
4.1.2.8 Adding the Multi-language Text Setting Function ····················································· 183
4.1.3 Conversion Function ······························································································· 188
4.1.3.1 Conversion of a Project ····················································································· 191
4.1.3.2 Conversion of Scripts ························································································ 195
4.1.4 Syntax Check ········································································································ 204
4.1.4.1 Syntax Check from the Script Editor ····································································· 204
4.1.4.2 Content of the Syntax Check ·············································································· 205
4.1.5 Checking for Characters Unavailable for Symbol Names ················································ 205
4.1.6 MEM File Creation ·································································································· 206
4.1.7 Debug Function ····································································································· 209
4.1.7.1 Setting the Break Types ····················································································· 209
4.1.7.2 [Debug settings] Dialog Box ··············································································· 210
4.1.7.3 [Break detail settings] Dialog Box ········································································ 213
4.1.7.4 Debug Window and Log Output··········································································· 215
4.1.7.5 Extension of the Debug Signal ············································································ 220
4.1.8 Changes Due to Edition 8.0 ······················································································ 221
4.1.9 Other Functions ····································································································· 223
4.2 Functional Difference with FP Script ······························································· 225
4.2.1 List of FP functions that can be used in Ruby scripts······················································ 225
4.2.2 Using User Functions in Ruby Script ·········································································· 231
4.3 mruby LICENSE DISPLAY ·············································································· 231
4.3.1 Overview ·············································································································· 231
4.3.2 Diagram ··············································································································· 231
4.3.3 Operation ············································································································· 233
4.3.4 Properties ············································································································· 233

5 LIBRARY FUNCTIONS CAN BE USED FROM RUBY SCRIPT······· 235


5.1 LISTS OF FUNCTIONS ·················································································· 235
5.2 RETURN VALUES OF FUNCTIONS ·································································· 248

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 4/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.3 FUNCTION REFERENCE ··············································································· 249


5.4 TIMER-ACTIVATED OPERATOR FUNCTION ERROR VARIABLE ·························· 544
5.5 RESTRICTIONS ···························································································· 548

6 ASYNCHRONOUS EXECUTION OF RUBY SCRIPT ···················· 549


6.1 FUNCTIONS USED FOR ASYNCHRONOUS EXECUTION ···································· 549
6.1.1 Ruby Script Asynchronous Execution Function (scriptasync) ··········································· 549
6.1.2 Ruby Script Asynchronous Execution Handler Registration Function (set_handlerasync) ······ 550
6.1.3 Task Stop Function (sleep) ······················································································· 551
6.2 ERROR DURING ASYNCHRONOUS EXECUTION ·············································· 552

7 IMPROVE OF SCREEN CALL FUNCTION ·································553


7.1 SETTING METHOD ······················································································· 555
7.1.1 Group number of screen number memory ··································································· 558
7.2 HOW TO USE ······························································································· 559
7.2.1 Memory of screen number ······················································································· 559
7.2.2 Specification of screen number ················································································· 560
7.3 NOTES ········································································································ 561
7.3.1 Displaying popup screen ·························································································· 562
7.3.2 Sub-screen and focus state ······················································································ 563
7.3.3 Memory period of screen number ·············································································· 563

8 COMBINED APPLICATION IN STANDARD DISPLAY UNIT··········· 566


8.1 CONSTRUCTION METHOD OF THE DEVELOPMENT ENVIRONMENT ·················· 566
8.1.1 The corresponding C executor library ········································································· 566
8.1.2 Supplement: Diab compiler version in the sample ························································· 566
8.1.3 Merge of FANUC PICTURE providing file ···································································· 566
8.1.3.1 When creating a new environment ······································································· 567
8.1.3.2 When updating from an environment created in earlier than 8.0 ································· 567

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 5/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1 OVERVIEW

This section provides an overview of the functions added to FANUC PICTURE as well as functions that were
improved.

1.1 INSTALLER CHANGE

In FANUC PICTURE edition 8.0 or later, there are the following changes.
① Screnns for FS0i/0i Mate-D can not be created.
② The extension of the project file is changed.
( The project created in ealier than 8.0 edition can be used by converting. )
③ There is no compatibility for FP Driver.
( If only FP Driver is updated to edition 8.0 or later, an error screen will be displayed. )

When you use the project created in the past as it is, please use FANUC PICTURE earlier than 8.0 edition. The
latest FANUC PICTURE ealier than 8.0 edition is included in the installation disk. When installing, please choose
which to use and install.

For details, refer to Chapter 2, "INSTALLER ".

FANUC PICTURE
Installation CD

FANUC PICTURE
( 8.0 or later )

FANUC PICTURE
( earlier than 8.0 )

Fig. 1.1 (a) Installation disk image

1.2 FP CONTROL

In FANUC PICTURE, the following controls were added.


■ FP control (Refer to: "3.1 ADDITION OF CONTROLS")
- Check box control
- Radio button control
- List box control
- Message box
- Combo box control
- Pie graph control

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 6/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- Extended bar graph control

Additionally, the following functions were added to support flexible screen design.
■ Design customization function (Refer to: "3.1 DESIGN CUSTOMIZATION")
- Function for customizing FP control image file

Additionally, the following functional improvements are made and the convenience of property setting of FP
control is improved.
■ Improvement of property setting of FP control. (Refer to: "3.3 IMPROVEMENT OF THE EXISTING
FUNCTIONS")
- Display property setting values as eigenvalues
- Change the control property from the script

1.3 RUBY SCRIPT

In addition to FP script, generic script (mruby) is now available.This allows for processes such as the following
to be written in generic scripts in addition to processes that can be performed with FP scripts.In this
specification, mruby script is described as Ruby script.

For details, refer to Chapter 4, "RUBY SCRIPT".

Table 1.3 (a) List of available functions


No. Function name FP script Ruby script Additional explanation
1. Arithmetic operation  
2. Comparison operation  
3. Bit operation  
4. Use of FP functions  
5. Read values from control  
6. Set values in control  
7. Activate timer  
8. Repetitive processing  
9. Use of symbols  
10. Use of script variables  
11. Use of argument reference  
variables
12. Use of multidimensional -  Multidimensional array variables can be
array variables written in scripts.
13. Use of structure variables -  Structure variables can be written in scripts.
14. Non-volatile memory -  Non-volatile memory access can be
access accessed from scripts.
15. Define/use inner functions -  Inner functions can be created/used in
scripts.
16. Class definition -  Class definitions can be created/used in
scripts.
17. String operations -  Script removal and conversion can be
performed in scripts.
18. Hash -  Hash values can be used in scripts.
19. Handling of NULL -  NULL values can be written in scripts.
20. Handling of TRUE/FALSE -  TRUE/FALSE can be written in scripts.
21. Exception handling -  Exceptions can be detected in the script.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 7/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

For basic information on mruby, refer to the following page.


- mruby API reference
http://mruby.org/docs/api/

- Ruby 1.9.3 Library Documentation(mruby is compatible with Ruby 1.9)


http://mruby.org/docs/api/

1.4 LIBRARY FUNCTIONS CAN BE USED FROM RUBY SCRIPT

The following library functions can be used in Ruby script.


・CNC window library
・PMC window library
・File operation library
・Serial library
・F-ROM library
・Network library
・ANSI C standard library
・MS-C extended C standard library
・mruby extension library

For details, refer to Chapter 5, "LIBRARY FUNCTIONS CAN BE USED FROM RUBY SCRIPT"

1.5 ASYNCHRONOUS EXECUTION OF RUBY SCRIPT

Ruby scripts are normally executed during FP control processing (drawing, action, etc.), timer processing, and
event processing such as screen transitions. However, ruby script processing can be executed as a separate
process by using this function. This enables asynchronous execution of various control processing (drawing,
action, etc.), timer processing, and event processing such as screen transitions, without having to stop the
process until the Ruby script ends.

The following two functions are added.


- A function that allows asynchronous Ruby script execution from a control action (scriptasync)
- A function for registering the handler, which makes the asynchronous Ruby script execution request from
the timer or screen transition event (set_handlerasync)

For details, refer to Chapter 4, "ASYNCHRONOUS EXECUTION OF RUBY."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 8/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1.6 IMPROVE OF SCREEN CALL FUNCTION

When displaying the FANUC PICTURE screen from the home screen, it is possible to designate and display a
specific screen, but in addition to its specification, the following specifications are now possible.
- Displaying the custom screen of written screen number in specified PMC area
- Displaying the latest custom screen

For details, refer to Chapter 7, "EXPANSION OF SCREEN CALL ."

1.7 COMBINED APPLICATION IN STANDARD DISPLAY UNIT

There is a change in part of the development environment construction procedure concerning creation of
combinated application.

For details, refer to Chapter 8, "PRODUCER FOR CREATING COMBINED APPLICATION IN STANDARD
DISPLAY UNIT".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 9/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1.8 REMARKS

In FANUC PICTURE 8.0, there is no upward compatibility


When reading with FP driver 8.0 or later, convert the project file, and then have the MEM file regenerated. For
details, refer to Section 4.1.3, "Conversion Function."

In this document, they are referred to as follows for distinction.


FANUC PICTURE earlier than 8.0: "Old FANUC PICTURE"
FANUC PICTURE 8.0 or later: "New FANUC PICTURE"
FP driver 8.0 or later
FP editor earlier than 8.0

Project file
(earlier than 8.0)

MEM file
(earlier than 8.0)

FP 8.0 or later FP driver 8.0 or later


Conversion
processing
Project file
(earlier than 8.0)

MEM file
(8.0 or later)

Fig. 1.8 (b) Restriction

NOTE
1. Project after conversion can not be restored. Please obtain backup in advance.
2. When converting a project of unsupported model ( FS0i/0i Mate-D etc. ), please
change the setting of the project to a supported model beforehand and execute the
conversion with FANUC PICTURE 8.0.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 10/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2 INSTALLER

2.1 INSTALLATION PROCEDURE

The procedure for inserting the installation CD is as follows.

1. When inserting the installation CD, the following dialog box will be displayed automatically.

NOTE
If it is not displayed automatically, open the Explorer window, select the DVD
drive, and run AutoRun.exe in the top folder.
(The Administrator authority is necessary.)

2. Select the version you want to install and press the <OK> button.

Fig.2.1 (a) Version selection Dialog.

3. The installation wizard is displayed. Follow the message and proceed with installation.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 11/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3 FP CONTROL

3.1 ADDITION OF FP CONTROL

Icons
FP control icons displayed on the toolbar are displayed in the following order.
For details about FP control, refer to the description of each control.

Table 3.1 (a) Display of Toolbar about FP Control


No. Control name New
1. Screen configuration
2. Screen switch
3. Button
4. Framed button
5. Lamp
6. Label
7. Number/string display
8. PMC string
9. Number entry display
10. Key in
11. Numeric keypad entry
12. MDI key
13. Keyboard
14. Message
15. Text
16. Combined message
17. History message
18. Clock
19. Meter
20. Graph
21. Line graph
22. Image
23. Screen switch with image
24. Button with image
25. Lamp with image
26. Check box New
27. Radio button New
28. List box New
29. Combo box New
30. Pie graph New
31. Extended bar graph New

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 12/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Common setting items


The setting items that apply to all properties have the following options.
Table 3.1 (b) Common Setting Items
Setting item Option Value Note
Shortcut key FL/F1A 255
F1/F2B 240
F2/F3C 241
F3/F4D 242
F4/F5E 243
F5/F6F 244
F6/F7G 245
F7/F8H 246
F8/F9I 247
F9/F10J 248
F10/F11K 249
FR/F12L 254
VF1/VFR1 168
VF2/VFR2 167
VF3/VFR3 166
VF4/VFR4 165
VF5/VFR5 164
VF6/VFR6 163
VF7/VFR7 162
VF8/VFR8 161
VF9 160
VF10 169
VF11 170
VF12 171
Page-Up 143
Page-Down 142
HELP 154
Right-Arrow 136
Left-Arrow 137
Down-Arrow 138
Up-Arrow 139
CAN 8
INPUT 13
INSERT 148
DELETE 149
ALTER 150
F14M 208
F15O 209
F16P 210
F17Q 211
F18R 212
F19S 213
F20T 214
F21U 215
F22V 216
F23W 217
F24X 218

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 13/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Option Value Note


F25Y 219
VFL1 196
VFL2 197
VFL3 198
VFL4 199
VFL5 200
VFL6 201
VFL7 202
VFL8 203
VL1 183
VL2 184
VL3 185
VL4 186
VL5 187
VL6 188
VL7 189
VL8 190
VL9 191
VL10 192
VL11 193
VL12 194
TAB 176
ESC 177
POSITION 232
PROGRAM 233
OFFSET 234
MESSAGE 236
GRAPHIC 237
CUSTOM/CUST 238
SYSTEM 235
PMC path 1st PMC N/A
2nd PMC 2
3rd PMC 3
4th PMC 4
5th PMC 5
DCS PMC 9
PMC area 0:R R
1:D D
2:C C
3:T T
4:K K
5:X X
6:Y Y
7:G G
8:F F
9:A A
10 : M M
11 : N N
12 : E E
13 : Z Z
PMC bit 0 0

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 14/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Option Value Note


1 1
2 2
3 3
4 4
5 5
6 6
7 7
Character type 0:ANK 0
1: Double 1
2: Quad 2
3: Hex 3
4: Small 4
5:UserFont1 5 iHMI mode only
6:UserFont2 6 iHMI mode only
7:UserFont3 7 iHMI mode only

Changes to the project settings screen


The [Operation Mode Switch Key] setting has been added in line with the addition of the list box and combo
box controls.
For details about the [Operation Mode Switch Key] setting, refer to "3.1.3.4 Operation."

Fig. 3.1 (b) Project Settings Screen

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 15/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
Because the key set to [Operation Mode Switching Key] takes precedence over
the [Shortcut Key] of each control, do not set the same key. When the same key
is set, the [Shortcut Key] of each control doesn't operate.

3.1.1 Check Box Control

3.1.1.1 Function

The check box is a control for selecting an item by putting a check mark in the box.
A caption is displayed next to the check box. To change the state of the check box (select or clear the check
box), touch the check box control or enter the corresponding key.

3.1.1.2 Diagram

You can select a large, medium or small check box.


You can select left aligned or right aligned as the display position.
The height of the control is automatically centered.
The default size is "small." If the created control is smaller than the small size, the size is automatically set to small.

Fig. 3.1.1.2 (a) Image of Check Box

Specify centered, left aligned, or right aligned in the text area as the caption layout.
Unless the caption is centered, you can specify X- and Y-coordinates.

Text area
Check mark
area (caption area)

Fig. 3.1.1.2 (b) Image of Check Box Area

3.1.1.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.1.3 (a) Icon Design

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 16/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.1.4 Operation

To change the state of the check box, perform one of the following operations:
- Touch the check box control.
- Press the shortcut key allocated to the check box.
- Press the <INPUT> key with the focus on the check box.
The state of the check box cannot be changed when the control is disabled, after the disable signal is received, or
when the interlock is engaged.
The PMC area (1 bit) can be allocated to the check box.
If the PMC area is allocated, data is written into the PMC area allocated to the check box when the user changes
the state of the check box.

3.1.1.5 Properties

This section describes the properties of check box control.

Tab configuration
Table 3.1.1.5 (a) List of Tabs
Item Description
General Used to specify the position and size of the check box.
Character Used to specify the position, color, and text of the caption in the text area.
Action Used to specify the initial status, allocation to the PMC area, interlock, and shortcut key.
Focus Used to specify the focus number and how to move the focus.
Image Used to specify the image when the control is disabled and the image at usual times.
NoAction Image Used to specify the allocation of the PMC area and the image for the disable signal.
Interlock Image Used to specify the image for when the interlock is engaged.

[General] tab

Fig. 3.1.1.5 (a) Properties Page - [General] Tab

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 17/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.1.5 (b) List of Properties on the [General] Tab


Setting item Entry type Specification Initial value Note
Object ID Fixed value FPCheckBoxXX XX is automatically entered. (User entry is not allowed.)
-

X User entry Numerical value Specify the X-coordinate with reference to the left top
- of the check box.
(Display starting position)
Y User entry Numerical value Specify the Y-coordinate with reference to the left top
- of the check box.
(Display starting position)
Width User entry Numerical value - Width of the check box.
Height User entry Numerical value - Height of the check box.

[Character] tab

Fig. 3.1.1.5 (b) Properties Page - [Character] Tab

Table 3.1.1.5 (c) List of Properties on the [Character] Tab


Setting item Entry type Specification Initial value Note
No use Check box ON/OFF OFF This item is enabled when you select the [Use the
multi-language multi-language display function] check box on the
[Multi-Language Settings] tab for project settings.
When you select this check box, [Multi-language key]
is enabled.
Multi-language Selection Arbitrary First Select a language key from those registered under
key candidate project settings.
Alignment Selection Center Left Aligned Select the caption layout.
Left Aligned
Right Aligned
Caption User entry Arbitrary Blank Enter the text to be displayed in the text area.
When using the multi-language key, specify a caption for
each key that can be specified with [Multi-language key].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 18/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


X User entry Numerical value 0 Enter a value less than or equal to the height of the
caption area.
This item is disabled when Center is selected.
Y User entry Numerical value 0 Enter a value less than or equal to the width of the
caption area.
This item is disabled when Center is selected.
Character Type Selection Refer to "Table ANK Select the character type.
3.1 (b) Common When using the multi-language key in the iHMI mode,
Setting Items." specify the character type for each key that can be
specified with [Multi-language key].
Character Color Palette Color selection Black Select a color from the color selection dialog.
Disable Color Palette Color selection Black Select a color from the color selection dialog.
Interlock Color Palette Color selection Black Select a color from the color selection dialog.
Focus Color Palette Color selection Black Select a color from the color selection dialog.

[Action] tab

Fig. 3.1.1.5 (c) Properties Page - [Action] Tab

Table 3.1.1.5 (d) List of Properties on the [Action] Tab


Setting item Entry type Specification Initial value Note
NoAction Check box ON/OFF OFF When you select this check box, [NoAction Image] is
enabled.
Init state Selection ON/OFF OFF Select the state of the check box when the screen opens.
When you switch the screen with the memory for the
screen configuration set to clear, the last display state is
discarded and the screen appears according to this
setting.
Shortcut Key Check box ON/OFF OFF Select this check box to use shortcut keys.
Shortcut key Selection Refer to "Table First This setting item is enabled when you select the [Shortcut
selection 3.1 (b) Common candidate Key] check box.
Setting Items."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 19/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.1.5 (e) List of I/O Properties


Setting item Entry type Specification Initial value Note
External Check box ON/OFF OFF Select this check box to allocate the PMC area to the
output state of the check box.
When you select this check box, the items below it are
enabled.
I/O setting Selection 1:ON 0:OFF 1:ON 0:OFF Allocates the state of the bit allocated to the PMC area to
0:ON 1:OFF the selected or cleared status of the check box.
PMC Path Selection Refer to "Table First This setting item is enabled with the following settings:
3.1 (b) Common candidate [Use PMC]: ON
Setting Items." [Symbol]: OFF
PMC Area Selection Refer to "Table First This setting item is enabled with the following settings:
3.1 (b) Common candidate [Use PMC]: ON
Setting Items." [Symbol]: OFF
Address User entry Numerical value 0 The allowed range is between 0 and 99999.
This setting item is enabled with the following settings:
[Use PMC]: ON
[Symbol]: OFF
Bit Selection 0~7 0 This setting item is enabled with the following settings:
[Use PMC]: ON
[Symbol]: OFF
Symbol Check box ON/OFF OFF Select this check box to use symbols.
Symbol Entry or Arbitrary Blank Select a symbol from those registered in the PMC symbol
selection selection list.
This setting item is enabled with the following settings:
[Use PMC]: ON
[Symbol]: ON

Table 3.1.1.5 (f) List of Interlock Properties


Setting item Entry type Specification Initial value Note
Interlock Check box ON/OFF OFF Select this check box to use the interlock.
When you select this check box, the items below
it are enabled.
PMC Path Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCArea Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCAddress User entry Numerical value 0 The allowed range is between 0 and 99999.
This setting item is enabled with the following
settings:
[Interlock]: ON
[Symbol]: OFF
InterlockPMCBit Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
Symbol Check box ON/OFF OFF Select this check box to use symbols.
Symbol selection Entry or Arbitrary Blank This setting item is enabled with the following
selection settings:

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 20/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Interlock]: ON
[Symbol]: ON

NOTE
The PMC signal allocated in [External output] retains the status before the
interlock. Therefore, the status before the interlock is displayed at recovery from
the interlock.

[Focus] tab

Fig. 3.1.1.5 (d) Properties Page - [Focus] Tab

Table 3.1.1.5 (g) List of Properties on the [Focus] Tab


Setting item Entry type Specification Initial value Note
Focus is Check box ON/OFF OFF Select this check box to use the focus.
available When you select this check box, the items below it
are enabled.
Focus User entry Numerical value 1 Specify a number that is not already used on the
Index screen (form).
Don't move the Check box ON/OFF OFF Select this check box to avoid consecutive entry.
focus to the next
control after
inputting data.
Appoint Check box ON/OFF OFF Select this check box to directly specify the index
movement that you want to move the focus to.
index When you select this check box, the items below it
are enabled.
UP Key User entry Numerical value 0 Specify the index that you want to move the focus to.
LEFT Key User entry Numerical value 0 Specify the index that you want to move the focus to.
RIGHT Key User entry Numerical value 0 Specify the index that you want to move the focus to.
DOWN Key User entry Numerical value 0 Specify the index that you want to move the focus to.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 21/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Image] tab

Fig. 3.1.1.5 (e) Properties Page - [Image] Tab

Table 3.1.1.5 (h) List of Properties on the [Image] Tab


Setting item Entry type Specification Initial value Note
Button Size Selection Small Small The display size on the standard monitor is as follows.
Medium Small: 25 pixels by 25 pixels (9")
Large 16 pixels by 16 pixels (14")
Medium: 32 pixels by 32 pixels (9")
24 pixels by 24 pixels (14")
Large: 39 pixels by 39 pixels (9")
32 pixels by 32 pixels (14")
The display size on the iHMI mode is as follows.
Small: Equivalent to Same.
Medium: Equivalent to Double.
Large: Equivalent to Quad.
Button Position Selection Left Aligned Left Aligned
Right Aligned
Mask Image File Selection Arbitrary Fig file name Specify the Fig file that describes the style of the
for the check check box when disabled.
box when
disabled This setting item is enabled with the following settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: OFF
Style Selection Arbitrary First style in Select a style from those in the specified Fig file.
the Fig file
This setting item is enabled with the following settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: OFF

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 22/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Image Selection Arbitrary Fig file name Specify the Fig file that describes the style of the
File Name for the check check box.
box This setting item is enabled with the following settings:
Pattern 1
[NoAction] on the [Action] tab: OFF
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Style Selection Arbitrary First style in Select a style from those in the specified Fig file.
the Fig file This setting item is enabled with the following settings:
Pattern 1
[NoAction] on the [Action] tab: OFF
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Check Color Palette Color selection Green Specify the color of the check mark.
(0.128.0) Select a color from the color selection dialog.
If this setting is omitted, the background color of the
check mark is used.
Check Back Palette Color selection Gray Specify the background color of the check mark.
Color (192.192.192) Select a color from the color selection dialog.
Border Color1 Palette Color selection Black Specify the (upper) border of the check mark.
Select a color from the color selection dialog.
Border Color2 Palette Color selection White Specify the (lower) border of the check mark.
Select a color from the color selection dialog.
Back Color Palette Color selection Gray Specify the background color of the caption area.
(192.192.192) Select a color from the color selection dialog.
Focus Color Palette Color selection Yellow Specify the status color for when the focus is selected.
(128.128.0) Select a color from the color selection dialog.
Check ON Check box ON/OFF ON You cannot select this check box in the following cases:
Preview Pattern 1
[NoAction] on the [Action] tab: ON
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: ON
Pattern 3
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: ON
[Preview] on the [Interlock Image] tab: ON
Focus Preview Check box ON/OFF OFF You cannot select this check box in the following cases:
Pattern 1
[NoAction] on the [Action] tab: ON
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: ON
Pattern 3
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: ON
[Preview] on the [Interlock Image] tab: ON
*There is a preview button on the iHMI mode.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 23/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[NoAction Image] tab

Fig. 3.1.1.5 (f) Properties Page - [NoAction Image] Tab

Table 3.1.1.5 (i) List of Properties on the [NoAction Image] Tab


Setting item Entry type Specification Initial value Note
NoAction Signal Check box ON/OFF OFF This setting item is enabled with the following
settings:
[NoAction] on the [Action] tab: ON

When you select this check box, the items below it


are enabled.
Image File Name Selection Arbitrary Fig file name Specify the Fig file that describes the style of the
for the check check box.
box
Style Selection Arbitrary First style in Select a style from those in the specified Fig file.
the Fig file
Check Color Palette Color selection Black Specify the color of the check mark.
Select a color from the color selection dialog.
Check Back Color Palette Color selection Gray Specify the background color of the check mark.
(192.192.192) Select a color from the color selection dialog.
Border Color1 Palette Color selection Black Specify the (upper) border of the check mark.
Select a color from the color selection dialog.
Border Color2 Palette Color selection White Specify the (lower) border of the check mark.
Select a color from the color selection dialog.
Back Color Palette Color selection Gray Specify the background color of the caption area.
(192.192.192) Select a color from the color selection dialog.
PMC Path Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Symbol]: OFF
PMC Area Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Symbol]: OFF
Address User entry Numerical value 0 This setting item is enabled with the following
settings:
[Symbol]: OFF

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 24/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Bit Selection Refer to "Table First This setting item is enabled with the following
3.1 (b) Common candidate settings:
Setting Items." [Symbol]: OFF
Symbol Check box ON/OFF Select this check box to use symbols.
Symbol selection Entry or Arbitrary Blank This setting item is enabled with the following
selection settings:
[Symbol]: ON
Check Timing Selection 0: Power On 0: Power On Specify when the disable signal is checked.
1: Always
Check ON Check ON/OFF ON Select this check box to display the check mark on
Preview box the preview screen.
Preview Check box ON/OFF OFF This setting item is enabled with the following
settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
*There is a preview button on the iHMI mode.

[Interlock Image] tab

Fig. 3.1.1.5 (g) Properties Page - [Interlock Image] Tab

Table 3.1.1.5 (j) List of Properties on the [Interlock Image] Tab


Setting item Entry type Specification Initial value Note
Display Check box ON/OFF OFF This setting item is enabled with the following
settings:

Pattern 1
[Action] tab: OFF
[Interlock] on the [Action] tab: ON

Pattern 2
[NoAction] on the [Action] tab: ON
[Interlock] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab:

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 25/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


OFF

When you select this check box, the items below it


are enabled.
Image File Arbitrary Fig file name for the Specify the Fig file that describes the style of the
Name check box check box.
Style Arbitrary First style in the Fig Select a style from those in the specified Fig file.
file
Check Color Palette Color specification Black Specify the color of the check mark.
Select a color from the color selection dialog.
Check Back Palette Color specification Gray Specify the background color of the check mark.
Color (192.192.192) Select a color from the color selection dialog.
Border Color1 Palette Color specification Black Specify the (upper) border of the check mark.
Select a color from the color selection dialog.
Border Color2 Palette Color specification White Specify the (lower) border of the check mark.
Select a color from the color selection dialog.
Back Color Palette Color specification Gray Specify the background color of the caption area.
(192.192.192) Select a color from the color selection dialog.
Check ON Check box ON/OFF ON Select this check box to display the check mark on
Preview the preview screen.
Preview Check box ON/OFF OFF This setting item is enabled with the following
settings:
Pattern 1
[Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF
[Display] on the [Interlock Image] tab: ON
Pattern 2
[Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: OFF
[Display] on the [Interlock Image] tab: ON
*There is a preview button on the iHMI mode.

3.1.1.6 List display

For details about the item display conditions, refer to "Table 3.1.1.6 (b) List of Item Display Conditions."

Table 3.1.1.6 (a) List of List Display Items


Item name Settings tab Setting item Specification Item display conditions
Object ID General
Tab index - - Arbitrary (The initial value
is 0.)
Comment - - Arbitrary (The initial value
is blank.)
X General
Y General
Width General
Height General

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 26/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
No use Character 0:OFF 1:ON
multi-language
Multi-language key Character Multi-language key No. - 1 No.1
Arrangement Character Center Left Aligned
Left Aligned
Right Aligned
Offset posX Character X Arbitrary (The initial value No.2
is 0.)
Offset posY Character Y Arbitrary (The initial value No.2
is 0.)
Character Type Character Refer to "Table 3.1 (b)
Common Setting Items."
Character Color Character
Disable Color Character
Lock Color Character
Focus caption Character
Color
Caption Character When the multi-language
keys are used, the same
number of captions as
that of keys are displayed.
NoAction Action 0:OFF 1:ON
Init state Action ON OFF
OFF
Shortcut Key Action - Shortcut Key 0:OFF
- Shortcut key Other settings: Refer to
selection "Table 3.1 (b) Common
Setting Items."
External output Action 0:OFF 1:ON
I/O setting Action 1:ON 0:OFF 1:ON 0:OFF No.3
0:ON 1:OFF
External output Action Symbol 0:OFF 1:ON No.3
PMC symbol flag
External output Action Symbol selection No.4
PMC symbol
External output Action - PMC Path Refer to "Table 3.1 (b) No.5
Signal - PMC Area Common Setting Items."
- Address
- Bit
Interlock Action 0:OFF 1:ON
Interlock signal Action Symbol No.6
symbol flag
Interlock signal Action Symbol selection No.7
symbol
Interlock signal Action - PMC Path Refer to "Table 3.1 (b) No.8
- InterlockPMCArea Common Setting Items."
- InterlockPMCAddress
- InterlockPMCBit
Focus is available Focus 0:OFF 1:ON
Number of focus Focus Numerical value Arbitrary (The initial value No.24
index is 0.)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 27/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Don't move focus Focus 0:OFF 1:ON No.24
to the next control
after data input
operation.
Appoint Focus 0:OFF 1:ON No.24
movement index
Focusing up Focus Numerical value Arbitrary (The initial value No.25
is 0.)
Focusing down Focus Numerical value Arbitrary (The initial value No.25
is 0.)
Focusing left Focus Numerical value Arbitrary (The initial value No.25
is 0.)
Focusing right Focus Numerical value Arbitrary (The initial value No.25
is 0.)
Button Size Image 0: Small 1: Medium 2: Large
Position Image 0: Left 1: Right
No action image Image Mask Image File No.13
file name
No action image Image Style Style number No.13
style
Image File Name Image No. 14 or No. 15
Style Image Style number No. 14 or No. 15
Check Color Image
Check Back Color Image
Border Color1 Image
Border Color2 Image
Background color Image
Focus Color Image
Check ON Image 0:OFF 1:ON No. 20, No. 21, No. 22
Preview or No. 23
Focus Preview Image 0:OFF 1:ON No. 20, No. 21, No. 22
or No. 23
No action signal NoAction Image 0:OFF 1:ON No.16
No action image NoAction Image Mask Image File No.15
file name
No action signal NoAction Image Style No.15
style
No action Check NoAction Image Color of check mark No.15
Color when disabled
No action Check NoAction Image Background color of check No.15
Back Color mark when disabled
No action border NoAction Image Border color 1 when the No.15
color1 control is disabled
No action border NoAction Image Border color 2 when the No.15
color2 control is disabled
No action signal NoAction Image Symbol 0:0FF 1:ON No.15
symbol flag
No action signal NoAction Image Symbol selection No.17
symbol

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 28/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
No action signal NoAction Image - PMC path when the Refer to "Table 3.1 (b) No.18
PMC control is disabled Common Setting Items."
- PMC area when the
control is disabled
- PMC address when
the control is disabled
- PMC bit when the
control is disabled
No action signal NoAction Image Preview of the check 0:0FF 1:ON No.15
Check ON Preview mark
No action signal NoAction Image Preview 0:0FF 1:ON No.15
preview
Interlock image Interlock Image Display 0:OFF 1:ON No. 9 or No. 10
display
Interlock image Interlock Image Image File Name No. 11 or No. 12
file name
Interlock image Interlock Image Style Style number No. 11 or No. 12
style
Interlock Check Interlock Image Check Color No. 11 or No. 12
Color
Interlock Check Interlock Image Check Back Color No. 11 or No. 12
Back Color
Interlock border Interlock Image Border Color1 No. 11 or No. 12
color 1
Interlock border Interlock Image Border Color2 No. 11 or No. 12
color 2
Interlock Back Interlock Image Back Color No. 11 or No. 12
Color
Interlock Check Interlock Image Preview of the check 0:OFF 1:ON No. 11 or No. 12
ON Preview mark
Interlock preview Interlock Image Preview 0:OFF 1:ON No. 11 or No. 19

Table 3.1.1.6 (b) List of Item Display Conditions


No. Display condition
1 [Use the multi-language display function]: ON (project settings)
2 [Left] or [Right] is selected.
3 [Use PMC] on the [Action] tab: ON
4 [Use PMC] on the [Action] tab: ON
[Symbol] on the [Action] tab: ON
5 [Use PMC] on the [Action] tab: ON
[Symbol] on the [Action] tab: OFF
6 [Interlock] on the [Action] tab: ON
7 [Interlock] on the [Action] tab: ON
[Symbol] on the [Action] tab: ON
8 [Interlock] on the [Action] tab: OFF
[Symbol] on the [Action] tab: OFF
9 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF
10 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 29/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Display condition


11 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF
[Display] on the [Interlock Image] tab: ON
12 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Display] on the [Interlock Image] tab: ON
13 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: OFF
14 [NoAction] on the [Action] tab: OFF
15 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
16 [NoAction] on the [Action] tab: ON
17 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Disable signal symbol on the [NoAction Image] tab: ON
18 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Disable signal symbol on the [NoAction Image] tab: OFF
19 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: OFF
[Display] on the [Interlock Image] tab: ON
20 [NoAction] on the [Action] tab: OFF
[Interlock] on the [Action] tab: OFF
21 [NoAction] on the [Action] tab: OFF
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: OFF
22 [NoAction] on the [Action] tab: OFF
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: ON
[Preview] on the [Interlock Image] tab: OFF
23 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: OFF
24 [Focus is available] on the [Focus] tab: ON
25 [Focus is available] on the [Focus] tab: ON
[Focus move rules] on the [Focus] tab: ON

3.1.1.7 Batch editing

The following table shows the setting items on each tab that are the same as those in the list display. The
property names other than the items shown below are the same as those in the list display.

Table 3.1.1.7 (a) List of Differences for the Same Setting Items
Item name (list display) Property name (batch editing)
Shortcut Key Shortcut Key
Shortcut key code

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 30/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.1.8 Message

There is no specific message displayed when setting this control.

3.1.2 Radio Button Control

3.1.2.1 Function

The radio button control is used to select only one choice from multiple options.
You can group controls linked on the same screen by setting the [GroupNo] property.

3.1.2.2 Diagram

You can select a large, medium or small radio button. You can select left aligned or right aligned as the display
position. The height of the control is automatically centered.
The default size is "small." If the created control is smaller than the small size, the size is automatically set to small.

Fig. 3.1.2.2 (a) Images of Radio Buttons

3.1.2.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.2.3 (a) Icon Design

3.1.2.4 Operation

Whether the radio button is selected or not is managed in the dynamic memory in the FP driver.

Up to 4 bytes are allocated from the output PMC address on the [Action] tab and the selection status of up to 32
buttons is output.
1 to 4 bytes are allocated according to the No. in the group set to the laid out radio button.

If you change the PMC status from an external application or tool, the selection status changes.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 31/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Output PMC address [R100] Output PMC address [R100]


R100
A A
0x02 is output to R100.
Select B. Other buttons are deselected. 0
B B
C C 1

0
B is selected.
Other buttons are deselected. Control information

Fig. 3.1.2.4 (a) PMC Output

The property design and output destination PMC must be the same within the group.
When you change control settings, the same settings are applied to other controls in the group.

The properties of the control whose group No. is changed apply to the controls with the new group No.
The applied properties are shown in the following table.

Table 3.1.2.4 (a) Properties Applied When the Group No. Is Changed
Tab Setting item
Action PMC Path
OutPMCArea
OutPMCAddress
Symbol
Symbol selection
Image Button Size
Button Position
Mask Image File
Style
Image File Name
Style
Back Color
Border Color
Outer Frame Color
ON Color
OFF Color
NoAction Image File Name
Image Style
Back Color
Border Color
Outer Frame Color
State Color
Interlock Image File Name
Style
Back Color
Border Color
Outer Frame Color
State Color

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 32/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.2.5 Properties

This section describes the properties of radio button control.

Tab configuration
Table 3.1.2.5 (a) List of Tabs
Item Description
General Used to specify the position and size of the radio box.
Character Used to specify the position, color, and text of the caption in the text area.
Action Used to specify the initial status, allocation to the PMC area, interlock, and shortcut key.
Focus Used to specify the focus number and how to move the focus.
Image Used to specify the image when the control is disabled and the image at usual times.
NoAction Image Used to specify the allocation of the PMC area and the image for the disable signal.
Interlock Image Used to specify the image for when the interlock is engaged.
[General] tab

Fig. 3.1.2.5 (a) Properties Page - [General] Tab

Table 3.1.2.5 (b) List of Setting Items on the [General] Tab


Setting Entry type Specification Initial Synchronization Note
item value
Object ID Fixed value FPRadioBtnX - No X is automatically entered.

X User entry Numerical value - No Specify a value smaller than the screen size.
Y User entry Numerical value - No Specify a value smaller than the screen size.
Width User entry Numerical value - No Specify a value smaller than the screen size
starting from [X].
Height User entry Numerical value - No Specify a value smaller than the screen size
starting from [Y].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 33/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Character] tab

Fig. 3.1.2.5 (b) Properties Page - [Character] Tab

Table 3.1.2.5 (c) List of Properties on the [Character] Tab


Setting item Entry type Specification Initial Synchronization Note
value
No use Check box ON/OFF OFF No When you select this check box,
multi-language [Multi-language key] is enabled.

Multi-language Selection Arbitrary First No Select a language key from those


key candidate registered under project settings.
Alignment Selection Left Aligned Left No
Center Aligned
Right Aligned
Caption User entry Arbitrary Blank No Enter the text to be displayed in the
text area.
When using the multi-language key,
specify a caption for each key that can
be specified with [Multi-language key].
X User entry Numerical 0 No Specify a value smaller than [Width] on
value the [General] tab.

This setting item is enabled with the


following settings:
[Center]: OFF
Y User entry Numerical 0 No Specify a value smaller than [Height]
value on the [General] tab.

This setting item is enabled with the


following settings:
[Center]: OFF
Character Type Selection Refer to "Table ANK No Select a character type from the
3.1 (b) settings.
Common When using the multi-language key in
Setting Items." the iHMImode, specify the character
type for each key that can be specified

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 34/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

with [Multi-language key].


Character Color Palette Color selection Black No Select a color from the color selection
dialog.
Disable Color Palette Color selection Black No Select a color from the color selection
dialog.
Interlock Color Palette Color selection Black No Select a color from the color selection
dialog.

[Action] tab

Fig. 3.1.2.5 (c) Properties Page - [Action] Tab

Table 3.1.2.5 (d) List of Properties on the [Action] Tab


Setting item Entry type Specification Initial Synchronizati Note
value on
NoAction Check box ON/OFF OFF No When you select this check box,
[NoAction Image] is enabled.
GroupNo User entry 1~9 1 No
GroupIndex User entry 0~31 0 No Specify the bit to be allocated.
If the same No. is set within the same
group, an error occurs during
generation of the MEM file.
Init Status Check box ON/OFF OFF No When you select this check box, the
state is ON when the screen appears. If
ON is set to multiple items within the
same group, an error occurs during
generation of the MEM file.

When you switch the screen with the


memory for the screen configuration set
to clear, the last display state is
discarded and the screen appears
according to this setting.
Shortcut Key Check box ON/OFF OFF No

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 35/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial Synchronizati Note


value on
Shortcut key Selection Refer to "Table First No This setting item is enabled with the
selection 3.1 (b) Common candidate following settings:
Setting Items." [Shortcut Key]: ON
Output PMC
PMC Path Selection Refer to "Table First Yes This setting item is enabled with the
3.1 (b) Common candidate following settings:
Setting Items." [Symbol]: OFF
OutPMCAre Selection Refer to "Table First Yes This setting item is enabled with the
a 3.1 (b) Common candidate following settings:
Setting Items." [Symbol]: OFF
OutPMCAdd User entry Numerical value 0 Yes The allowed range is between 0 and
ress 99999.

This setting item is enabled with the


following settings:
[Symbol]: OFF
Symbol Check box ON/OFF OFF Yes
Symbol Entry or Arbitrary Blank Yes Select a symbol from those registered in
selection selection the PMC symbol list.
If the number of bits of the type
specified with the selected symbol is
insufficient for the number of radio
buttons set in the same group, an error
occurs during generation of the MEM
file.

This setting item is enabled with the


following settings:
[Symbol]: ON
Interlock
Interlock Check box ON/OFF OFF No
PMC Path Selection Refer to "Table First No This setting item is enabled with the
3.1 (b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPM Selection Refer to "Table First No This setting item is enabled with the
CArea 3.1 (b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPM User entry Numerical value 0 No The allowed range is between 0 and
CAddress 99999.
This setting item is enabled with the
following settings:
[Interlock]: ON
[Symbol]: OFF
InterlockPM Selection Refer to "Table First No This setting item is enabled with the
CBit 3.1 (b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
Symbol Check box ON/OFF OFF No

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 36/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial Synchronizati Note


value on
Symbol Entry or Arbitrary Blank No This setting item is enabled with the
selection selection following settings:
[Interlock]: ON
[Symbol]: ON

NOTE
The PMC signal allocated in [Output] retains the status from before the interlock
engaged. Therefore, the same status as before the interlock engaged is
displayed upon recovery from the interlock.

[Focus] tab

Fig. 3.1.2.5 (d) Properties Page - [Focus] Tab

Table 3.1.2.5 (e) List of Properties on the [Focus] Tab


Setting item Entry type Specification Initial Note
value
Focus is Check box ON/OFF OFF Select this check box to use the focus.
available When you select this check box, the items below it are
enabled.
Focus User entry Numerical value 1 Specify a number that is not already used on the screen
Index (form).
Don't move Check box ON/OFF OFF Select this check box to avoid consecutive entry.
the focus to
the next
control after
inputting data.
Appoint Check box ON/OFF OFF Select this check box to directly specify the index that you
movement want to move the focus to.
index When you select this check box, the items below it are
enabled.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 37/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial Note


value
Upward move User entry Numerical value 0 Specify the index that you want to move the focus to.
Leftward User entry Numerical value 0 Specify the index that you want to move the focus to.
move
Rightward User entry Numerical value 0 Specify the index that you want to move the focus to.
move
Downward User entry Numerical value 0 Specify the index that you want to move the focus to.
move

[Image] tab

Fig. 3.1.2.5 (e) Properties Page - [Image] Tab Screen

Table 3.1.2.5 (f) List of Setting Items on the [Image] Tab


Setting item Entry type Specification Initial value Synchronization Note
Button Size Selection Small Small Yes The display size on the standard
Medium monitor is as follows.
Large Small: 25 pixels by 25 pixels (9")
16 pixels by 16 pixels (14")
Medium: 32 pixels by 32 pixels (9")
24 pixels by 24 pixels (14")
Large: 39 pixels by 39 pixels (9")
32 pixels by 32 pixels (14")
The display size on the iHMImode is as
follows.
Small: Equivalent to Same.
Medium: Equivalent to Double.
Large: Equivalent to Quad.
Button Selection Right Aligned Left Aligned Yes
Position Left Aligned

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 38/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Synchronization Note


Mask Image Selection Arbitrary Fig file name Yes Specify the Fig file that describes the
File for the radio style of the radio button when disabled.
button when
disabled This setting item is enabled with the
following settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction
Image] tab: OFF
Style Selection Arbitrary First style in Yes Select a style from those in the
the Fig file specified Fig file.

This setting item is enabled with the


following settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction
Image] tab: OFF
Image File Selection Arbitrary Fig file name Yes Specify the Fig file that describes the
Name for the radio style of the radio button.
button
This setting item is enabled with the
following settings:
Pattern 1
[NoAction] on the [Action] tab: OFF

Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction
Image] tab: ON
Style Selection Arbitrary First style in Yes Select a style from those in the
the Fig file specified Fig file.

This setting item is enabled with the


following settings:
Pattern 1
[NoAction] on the [Action] tab: OFF

Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction
Image] tab: ON
Back Color Palette Color Gray Yes Select a color from the color selection
selection (192.192.19 dialog.
2)
Border Palette Color Black Yes Select a color from the color selection
Color selection dialog.
Circle border (This applies to both the
inner and outer circles.)
Outer Palette Color Gray Yes Select a color from the color selection
Frame selection (192.192.19 dialog.
Color 2)
ON Color Palette Color Green Yes Select a color from the color selection
selection (0.128.0) dialog.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 39/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Synchronization Note


OFF Color Palette Color Black Yes Select a color from the color selection
selection dialog.
ON Preview Check box ON/OFF OFF
*There is a preview button on the iHMI mode.

[NoAction Image] tab

Fig. 3.1.2.5 (f) Properties Page - [NoAction Image] Tab

Table 3.1.2.5 (g) List of Properties on the [NoAction Image] Tab


Setting item Entry type Specification Initial value Synchronization Note
NoAction Check box ON/OFF OFF No This setting item is enabled with the
Signal following settings:
[NoAction] on the [Action] tab: ON

When you select this check box, the


items below it are enabled.
Image File Selection Arbitrary Fig file name Yes Specify the Fig file that describes the
Name for the radio style of the radio button.
button
Style Selection Arbitrary First style in Yes Select a style from those in the
the Fig file specified Fig file.
Back Color Palette Color Gray Yes Select a color from the color
selection (192.192.192) selection dialog.
Border Color Palette Color Black Yes Select a color from the color
selection selection dialog.
Circle border (This applies to both
the inner and outer circles.)
Outer Frame Palette Color Gray Yes Select a color from the color
Color selection (192.192.192) selection dialog.
Outer Frame Color
State Color Palette Color Gray Yes Select a color from the color
selection (192.192.192) selection dialog.
Color of inner circle

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 40/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Synchronization Note


PMC Path Selection Refer to First No This setting item is enabled with the
"Table 3.1 (b) candidate following settings:
Common [Symbol]: OFF
Setting Items."
PMC Area Selection Refer to First No This setting item is enabled with the
"Table 3.1 (b) candidate following settings:
Common [Symbol]: OFF
Setting Items."
Address User entry Arbitrary 0 No The allowed range is between 0 and
99999.

This setting item is enabled with the


following settings:
[Symbol]: OFF
Bit Selection Refer to First No This setting item is enabled with the
"Table 3.1 (b) candidate following settings:
Common [Symbol]: OFF
Setting Items."
Symbol Check box ON/OFF OFF No
Symbol Entry or Arbitrary Blank No This setting item is enabled with the
selection selection following settings:
[Symbol]: ON
Check Timing Selection 0: Power On 0: Power On No Specify when the disable signal is
1: Always checked.
Preview Check box ON/OFF OFF No
*There is a preview button on the iHMI mode.

[Interlock Image] tab

Fig. 3.1.2.5 (g) Properties Page - [Interlock Image] Tab

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 41/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.2.5 (h) List of Properties on the [Interlock Image] Tab


Setting item Entry type Specification Initial value Synchronization Note
Display Check box ON/OFF OFF No This setting item is enabled with the
following settings:
Pattern 1
[NoAction] on the [Action] tab: OFF
[Interlock] on the [Action] tab: ON

Pattern 2
[NoAction] on the [Action] tab: ON
[Interlock] on the [Action] tab: ON

When you select this check box, the


items below it are enabled.
Image File Selection Arbitrary Fig file name Yes Specify the Fig file that describes the
Name for the radio style of the radio button.
button
Style Selection Arbitrary First style in Yes Select a style from those in the
the Fig file specified Fig file.
Back Color Palette Color Gray Yes Select a color from the color selection
specification (192.192.192) dialog.
Border Color Palette Color Black Yes Select a color from the color selection
specification dialog.
Circle border (This applies to both the
inner and outer circles.)
Outer Frame Palette Color Gray Yes Select a color from the color selection
Color specification (192.192.192) dialog.
Outer Frame Color
State Color Palette Color Gray Yes Select a color from the color selection
specification (192.192.192) dialog.
Color of inner circle
Preview Check box ON/OFF OFF No
*There is a preview button on the iHMI mode.

3.1.2.6 List display

The list display items are shown in "Table 3.1.2.6 (a) List Display Items."
Note that the description is omitted in the following cases:
- The item name is the same as the setting item.
- The setting value is the same as that on the [Property] tab.
For details about the item display conditions, refer to "Table 3.1.2.6 (b) List of Item Display Conditions."

Table 3.1.2.6 (a) List Display Items


Item name Settings tab Setting item Specification Item display conditions
Object ID General
Tab index - - Arbitrary (The initial
value is 0.)
Comment - - Arbitrary (The initial
value is blank.)
X General

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 42/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Y General
Width General
Height General
No use Character 0:OFF 1:ON
multi-language
Multi-language Character Multi-language key No. No.1
key -1
Arrangement Character Center Left Aligned
Left Aligned
Right Aligned
Text offset Character X No.2
posX
Text offset Character Y No.2
posY
Character Character Refer to "Table 3.1 (b)
Type Common Setting Items."
Caption color Character
Disable Color Character
Lock Color Character
Focus caption Character
color
Caption Character When the multi-language keys are
used, the same number of captions
as that of keys are displayed.
No action Action 0:OFF 1:ON
Group no. Action
Group index Action
Init Status Action 0:OFF 1:ON
Shortcut Key Action - Shortcut Key 0:OFF
- Shortcut key selection Other settings: Refer to
"Table 3.1 (b) Common
Setting Items."
Out PMC Action Symbol 0:OFF 1:ON
symbol flag
Out PMC Action Symbol selection No.3
symbol
Out PMC Action - PMC Path Refer to "Table 3.1 (b) No.4
- OutPMCArea Common Setting
- OutPMCAddress Items."
Interlock Action 0:OFF 1:ON
Interlock Action Symbol 0:OFF 1:ON No.5
signal symbol
flag
Interlock Action Symbol selection No.6
signal symbol
Interlock Action - PMC Path Refer to "Table 3.1 (b) No.7
signal - InterlockPMCArea Common Setting
- InterlockPMCAddress Items."
- InterlockPMCBit
Interlock Interlock Display 0:OFF 1:ON No. 8 or No. 9
image display Image

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 43/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Interlock Interlock Image File Name No. 10 or No. 11
image file name Image
Interlock Interlock Style Style number No. 10 or No. 11
image style Image
Interlock Back Interlock Back Color No. 10 or No. 11
Color Image
Interlock Interlock Border Color No. 10 or No. 11
Border Color Image
Interlock Outer Interlock Outer Frame Color No. 10 or No. 11
Frame Color Image
Interlock state Interlock State Color No. 10 or No. 11
color Image
Interlock Interlock Preview 0:OFF 1:ON No. 10 or No. 11
preview Image
Focus is Focus 0:OFF 1:ON
available
Number of Focus Numerical value Arbitrary (The initial No.19
focus value is 0.)
Index
Don't move Focus 0:OFF 1:ON No.19
focus to the
next control
after data
input
operation.
Appoint Focus 0:OFF 1:ON No.19
movement
index
Focusing up Focus Numerical value Arbitrary (The initial No.20
value is 0.)
Focusing left Focus Numerical value Arbitrary (The initial No.20
value is 0.)
Focusing right Focus Numerical value Arbitrary (The initial No.20
value is 0.)
Focusing Focus Numerical value Arbitrary (The initial No.20
down value is 0.)
Button Size Image 0: Small
1: Medium
2: Large
Position Image 0: Left
1: Right
No action Image Mask Image File No.12
image file
name
No action Image Style Style number No.12
image style
Image File Image No. 13 or No. 14
Name
Style Image Style number No. 13 or No. 14
Background Image
color
Border Color Image

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 44/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Outer Frame Image
Color
ON Color Image
OFF Color Image
ON Preview Image 0:OFF 1:ON
No action NoAction 0:OFF 1:ON No.15
signal Image
No action NoAction Mask Image File No.16
signal image Image
file name
No action NoAction Style Style number No.16
signal style Image
No action NoAction Back Color No.16
Back Color Image
No action NoAction Border Color No.16
Border color Image
No action NoAction Outer Frame Color No.16
Outer Frame Image
Color
No action NoAction State Color No.16
State Color Image
No action NoAction Symbol 0:OFF 1:ON No.16
signal symbol Image
flag
No action NoAction Symbol selection No.17
signal symbol Image
No action NoAction - PMC Path Refer to "Table 3.1 (b) No.18
signal PMC Image - PMC Area Common Setting
- Address Items."
- Bit
No action NoAction Preview 0:OFF 1:ON No.16
signal preview Image

Table 3.1.2.6 (b) List of Item Display Conditions


No. Display condition
1 [Use the multi-language display function] (project settings): ON
2 [Left] or [Right] is selected on the [Action] tab.
3 Output PMC symbol flag on the [Action] tab: ON
4 Output PMC symbol flag on the [Action] tab: OFF
5 [Interlock] on the [Action] tab: ON
6 [Interlock] on the [Action] tab: ON
Interlock signal symbol flag on the [Action] tab: ON
7 [Interlock] on the [Action] tab: ON
Interlock signal symbol flag on the [Action] tab: OFF
8 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF
9 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
10 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 45/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Display condition


[Display] on the [Interlock Image] tab: ON
11 [Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Display] on the [Interlock Image] tab: ON
12 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: OFF
13 [NoAction] on the [Action] tab: OFF
14 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
15 [NoAction] on the [Action] tab: ON
16 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
17 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Disable signal symbol on the [NoAction Image] tab: ON
18 [NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
Disable signal symbol on the [NoAction Image] tab: OFF
19 [Focus is available] on the [Focus] tab: ON
20 [Focus is available] on the [Focus] tab: ON
[Appoint movement index] on the [Focus] tab: ON

3.1.2.7 Batch editing

The following table shows the setting items on each tab that are the same as those in the list display.
The property names other than the items shown below are the same as those in the list display.

Table 3.1.2.7 (a) List of Differences for the Same Setting Items
Item name (list display) Property name (batch editing)
Shortcut Key Shortcut Key
Shortcut key code

*Group Nos. and the settings in "Table 3.1.2.7 (a) Properties Applied When the Group No. Is Changed" cannot
be edited in batch.

3.1.2.8 Message

The specific message displayed when setting this control is shown below..
Table 3.1.2.8 (a) List of Messages
Cause Timing Message
A group No. is changed to an - When the property When the group No. is changed, the following items are
existing group No. tab is switched also changed. Are you sure you want to continue?
- When [Apply] is - Output PMC
selected - Image
- When [OK] is - NoAction Image
selected - Interlock Image

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 46/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.3 List Box Control

3.1.3.1 Function

The list box control lists registered items from which the user can select multiple options.

3.1.3.2 Diagram

The minimum size of a list box is as follows.


- Width: Width of one double-byte character + Height of row (setting value)
- Height: Height of row (setting value) x 2

Strings are displayed up to the number of characters that can be displayed.


The part after the number of characters that can be displayed is not displayed.
- The vertical scroll bar is displayed if the number of items that can be registered is larger than the
number of displayed rows or if you select to display the scroll bar in Property.
- The horizontal scroll bar is not displayed.
- The up and down buttons on the scroll bar are square with the same height as the row.
Minimum size Normal size

A AAAAAAAAAA
B BBBBBBBBBB
CCC
DDDD
EEEEEE
Fig. 3.1.3.2 (a) Images of List Boxes

3.1.3.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.3.3 (a) Icon Design

3.1.3.4 Operation

Status management
Specify the first PMC address to synchronize the item selection status in the list box with the PMC. Items
are allocated to the bits of the address in order.
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 47/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Operation
Once the list box operation mode is enabled, you can operate the list box.
End the list box operation mode before operating other controls.

The following description when "TAB key" is set to [Operation Mode Switch Key].

(1) To start the list box operation mode

(a) Move the focus with the directional keys to select the list box and press the <TAB> key to
change the list box to the operation mode.
(b) If you can click the list box with the mouse or touch it on the screen, click or touch the list box to
directly start the list box operation mode.

(2) To end the list box operation mode

(a) Press the <TAB> key while the list box operation mode is active to end it.
You can move the focus to another control by operating the directional keys.
(b) Click outside the list box with the mouse or, if possible, touch outside the list box on the screen
to end the list box operation mode. After the list box operation mode ends, there is no focus.

(3) Transition of the operation mode

(a) Procedure 1 (operation by moving the focus with the directional keys)
(i) Move the focus to the list box by using the directional keys.
(ii) Press the <TAB> key to switch the list box operation mode.
Press the <TAB> key to switch the list box between the operation mode and the non-operation
mode.
(iii) You can now operate the list box.
(iv) End the list box operation mode by using the <TAB> key.
(v) Switch the focus to another control by using the directional keys.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 48/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Directional Directional
keys keys

Focus on another
control

Directional Directional
keys keys
List box
Focus

List box TAB key List box


Non-operation mode Operation mode
TAB key

Directional Directional
keys keys

Focus on another
control

Directional Directional
keys keys

Fig. 3.1.3.4 (a) Operation Mode Transition Diagram (1)

(b) Procedure 2 (clicking the list box with the mouse or touching it on the touch panel)
(i) Click or touch the list box to start the list box operation mode.
(ii) Click or touch outside the list box to end the list box operation mode.

(4) Key operations


The key operations in each status of the list box are shown below.

Table 3.1.3.4 (a)Mode Transition List


State
The focus is on another The focus is in a list box.
control. Non-operation mode Operation mode
The list box operation mode The list box operation
(Entire) list box -
is enabled. mode is enabled.
Mouse or touch screen operation

The focus is moved to


The list box operation mode The list box operation
Up button the row above the
is enabled. mode is enabled.
current one.
The focus is moved to
The list box operation mode The list box operation
Down button the row below the
is enabled. mode is enabled.
current one.
The list box operation mode The list box operation
Specify the row that
is enabled. mode is enabled.
the focus is on and
(Specify the row that the (Specify the row that the
Item row switch between
focus is on and switch the focus is on and switch
selection and
selection status of it at the the selection status of it
deselection.
same time.) at the same time.)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 49/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

State
The focus is on another The focus is in a list box.
control. Non-operation mode Operation mode
The list box operation mode The list box operation
Scroll bar -
is enabled. mode is enabled.
Outside the list The focus is removed The focus is removed
-
box from the list box. from the list box.
The focus is moved to
<Up> key The focus is moved. The focus is moved. the row above the
current one.
The focus is moved to
<Dn> key The focus is moved. The focus is moved. the row below the
current one.
<Right> key The focus is moved. The focus is moved. -
Key operations

<Left> key The focus is moved. The focus is moved. -


The previous page is
<PgUp> key - -
displayed.
The next page is
<PgDn> key - -
displayed.
The row that the focus
<INPUT> key - - is on is selected or
deselected.
The list box
The list box operation
<TAB> key - non-operation mode is
mode is enabled.
enabled.

(5) Relationship between the item list and the list box
In the list box display in the item list, as many items as possible are displayed in the list box from the
first display item.
Item list EEEE
EEEE
AAAA FFFF
BBBB GGGG
CCCC HHHH
DDDD Up button
First display List box
EEEE
item
FFFF Selected row
GGGG EEEE
EEEE
HHHH FFFF
IIII GGGG
Deselected row
JJJJ HHHH
KKKK
LLLL Focus row
MMMM Down button

Fig. 3.1.3.4 (b) Item List and Display

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 50/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
When the item on the focus row is selected, the text is displayed in the selected
color.

(6) Position of the gauge on the scroll bar


The position of the gauge is determined based on the position of the item specified as the first display
item among all the items registered in the item list.
In the item list that contains 12 items from "AAAA" to "LLLL" as shown below, the gauge on the
scroll bar is positioned as follows.

- If the item specified as the first display item is at the beginning of the item list
AAAA
BBBB
CCCC AAAA
EEEE
DDDD BBBB The gauge is
EEEE CCCC positioned at
FFFF the top.
DDDD
GGGG
HHHH
IIII
JJJJ
KKKK
LLLL
- If the item specified as the first display item is at the middle of the item list
AAAA
BBBB
CCCC
DDDD EEEE
EEEE FFFF
The gauge is
FFFF GGGG
positioned at
GGGG HHHH the middle.
HHHH
IIII
JJJJ
KKKK
LLLL
- If the item specified as the first display item is at the bottom of the item list

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 51/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

AAAA
BBBB
CCCC
IIII
EEEE
DDDD
EEEE JJJJ
KKKK The gauge is
FFFF
LLLL positioned at
GGGG
the bottom.
HHHH
IIII
JJJJ
KKKK
LLLL
Fig. 3.1.3.4 (c) Display Position of Scroll Bar

(7) Operation of the Up button or <Up> key


Press the Up button on the scroll bar of the list box or the <Up> key to move the focus one row up.
When the first display item is on the focus row, the item above the current focus row is displayed and
the focus is moved there. The selected row is not changed.
Press the Up button EEEE
EEEE
EEEE EEEE
or <Up> key.
FFFF FFFF
GGGG GGGG
HHHH HHHH

EEEE
EEEE DDDD
Press the Up button
FFFF or <Up> key. EEEE
EEEE
GGGG FFFF
HHHH GGGG
Fig. 3.1.3.4 (d) Operation of the Up Button or <Up> Key

(8) Operation of the Down button or <Dn> key


Press the Down button on the scroll bar of the list box or the <Dn> key to move the focus one row
down. When the focus is on the last item in the list box, the item below the current focus row is
displayed and the focus is moved there. The selected row is not changed.
EEEE Press the Down
EEEE button or <Dn> key. EEEE
EEEE
FFFF FFFF
GGGG GGGG
HHHH
HHHH

EEEE
EEEE Press the Down FFFF
FFFF button or <Dn> key. GGGG
GGGG HHHH
HHHH IIII

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 52/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.3.4 (e) Operation of the Down Button or <Dn> Key

(9) Operation of the <PgUp> key


Press the <PgUp> key to display the items on the previous page (as many items as the number of
display items). The focus moves to the first display item.
EEEE
EEEE AAAA
EEEE
Press the <PgUp> key.
FFFF BBBB
GGGG CCCC
HHHH DDDD

AAAA AAAA
BBBB BBBB
CCCC CCCC
DDDD DDDD
EEEE EEEE
FFFF FFFF
GGGG GGGG
HHHH HHHH
IIII IIII
JJJJ JJJJ
KKKK
KKKK
LLLL
LLLL
MMMM
MMMM

Fig. 3.1.3.4 (f) Operation of the <PgUp> Key

(10) Operation of the <PgDn> key


Press the <PgDn> key to display the items on the next page (as many items as the number of display
items). The focus moves to the first display item.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 53/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

EEEE
EEEE IIII
EEEE
Press the <PgDn> key.
FFFF JJJJ
GGGG KKKK
HHHH LLLL

AAAA AAAA
BBBB BBBB
CCCC CCCC
DDDD DDDD
EEEE EEEE
FFFF FFFF
GGGG GGGG
HHHH HHHH
IIII IIII
JJJJ JJJJ
KKKK KKKK
LLLL LLLL
MMMM MMMM

Fig. 3.1.3.4 (g) Operation of the <PgDn> Key

(11) Switch of the selection status of an item


This section describes how to switch the selection status of each item in the item list.
Whether multiple items can be selected or not can be selected from Property.

(a) Switching the selection status with the <INPUT> key


(i) Use the <PgUp> or <PgDn> key to move the focus row and select the item whose selection
status you want to change with the <Up> or <Dn> key.
(ii) Press the <INPUT> key in this state to switch the selection status of the focus row.
When the focus row is selected, the text is displayed in the selection color. When the focus row
is deselected, the text is displayed in the deselection color.
(When it is not possible to select multiple items, the currently selected item is deselected.
When it is possible to select multiple items, the currently selected items remain selected.)
(iii) When you press the <INPUT> key again, the selection status is switched again.
You can see whether an item is selected or not by looking at whether the text on the focus row is
in the selection color or deselection color.

EEEE EEEE
FFFF FFFF
GGGG GGGG
Press the HHHH
HHHH
<INPUT> key.
(Deselection color) (Selection color)

Fig. 3.1.3.4 (h) Change in the Text Color Depending on the Status

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 54/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(b) Switching the selection status by clicking the mouse or touching the screen
(i) When you select the item row of which selection status you want to change by left-clicking it
with the mouse or touching it on the screen, the focus moves to the row of the clicked or touched
item and the selection status of that item is switched.
(ii) If you click or touch the same item row again, only the selection status of the item row is
switched but the focus row remains unchanged.

(12) Memory clear


When the memory clear setting on the screen configuration control parent screen tab is set to ON, all
the settings in the list box are cleared and return to the initial status when you switch the screen.

(13) Addition and deletion in the item list in the list box
You can add and delete items via the Ruby script.
However, note that the maximum number of items that can be added is the number of items that can
be registered.

(14) Addition of items


You can add items within the number of items that can be registered.
The new item is added to the end of the item list.
AAAA
BBBB Registered
CCCC
DDDD

⋅ Empty

AAAA
BBBB
CCCC Added to the end of
DDDD the item list.
GGGG


Fig. 3.1.3.4 (i) Image Diagram of Item Addition

(15) Deletion of item


You can delete any item from the item list.
When you delete an item, all the items in the item list are deselected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 55/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

AAAA
BBBB AAAA
CCCC BBBB
CCCC
DDDD
DDDD
EEEE

⋅ Delete
⋅ "CCCC."

AAAA
BBBB AAAA
DDDD BBBB
EEEE DDDD
⋅ EEEE

Fig. 3.1.3.4 (j) Image Diagram of Item Deletion

3.1.3.5 Properties

This section describes the properties of list box control.

Tab configuration

Table 3.1.3.5 (a) List of Tabs


Item Description
General Used to specify the position and size of the list box.
Character Used to specify the character type and color of the caption.
Action Used to specify the initial status, allocation to the PMC area, and
interlock and to manage and register items.
Focus Used to specify the focus number and how to move the focus.
Image Used to specify color information at usual times.
NoAction Image Used to specify color information when the disable signal is issued.
Interlock Image Used to specify color information when the interlock is engaged.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 56/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[General] tab

Fig. 3.1.3.5 (a) Properties Page - [General] Tab

Table 3.1.3.5 (b) List of Properties on the [General] Tab


Setting item Entry type Specification Initial value Note
Object ID Fixed value FPListBoxX - X is automatically entered. (User
entry is not allowed.)

X User entry Numerical value -


Y User entry Numerical value -
Width User entry Numerical value -
Height Entry not allowed. Numerical value -
(Automatically adjusted.*)
*This value is automatically set based on the row height and the number of display items.

[Character] tab

Fig. 3.1.3.5 (b) Properties Page - [Character] Tab (Left: Standard Monitor mode, Right: iHMImode)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 57/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.3.5 (c) List of Properties on the [Character] Tab


Setting item Entry type Specification Initial value Note
Multi-language Selection Arbitrary First Select a language key from those registered
key candidate under project settings.
Character Type Selection Refer to "Table 3.1 (b) ANK Select the character type.
Common Setting When using the multi-language key in the iHMI
Items." mode, specify the character type for each key
that can be specified with [Multi-language key].
Unselected Palette Color selection Black Select a color from the color selection dialog.
Color
Selected Color Palette Color selection Black Select a color from the color selection dialog.
Interlock Color Palette Color selection Black Select a color from the color selection dialog.

[Action] tab

Fig. 3.1.3.5 (c) Properties Page - [Action] Tab

Table 3.1.3.5 (d) List of Properties on the [Action] Tab


Setting item Entry type Specification Initial value Note
NoAction Check box ON/OFF OFF When you select this check box, [NoAction
Image] is enabled.
Status management PMC
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common Setting candidate following settings:
Items." [Symbol]: OFF
Start Area Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common Setting candidate following settings:
Items." [Symbol]: OFF
Start Address User entry Numerical value 0 The allowed range is between 0 and
99999.

This setting item is enabled with the


following settings:
[Symbol]: OFF
Symbol Check box ON/OFF OFF

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 58/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Symbol selection Entry or Arbitrary Blank This setting item is enabled with the
selection following settings:
[Symbol]: ON
Interlock
Interlock Check box ON/OFF OFF
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common Setting candidate following settings:
Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCArea Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common Setting candidate following settings:
Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCAddress User entry Numerical value 0 The allowed range is between 0 and
99999.

This setting item is enabled with the


following settings:
[Interlock]: ON
[Symbol]: OFF
InterlockPMCBit Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common Setting candidate following settings:
Items." [Interlock]: ON
[Symbol]: OFF
Symbol Check box ON/OFF OFF
Symbol selection Entry or Arbitrary Blank This setting item is enabled with the
selection following settings:
[Interlock]: ON
[Symbol]: ON
Item
File Name User entry Arbitrary Blank Specify the Itemxml file.
Display Item Count User entry Numerical value 2 The allowed range is between 2 and 99.
Registrable Items User entry Numerical value 1 The allowed range is between 1 and 2048.
Row Height User entry Numerical value 16 The allowed range is from the height of
ANK (16 in the standard machine mode, 12
in the iHMI mode) to 64.
Multi Select Check box ON/OFF ON ON: Multiple selection
OFF: Single selection
Scroll Display Check box ON/OFF ON ON: Always displayed.
OFF: Displayed when the value in [Display
Item Count] is larger than that in
[Registrable Items].

NOTE
The PMC signal allocated in [Status management PMC] retains the status from
before the interlock was engaged. Therefore, the status from before the interlock
engaged is displayed upon recovery from the interlock.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 59/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

File edit screen

Fig. 3.1.3.5 (d) Itemxml File Edit Screen

Table 3.1.3.5 (e) List of Items on the Itemxml File Edit Screen
Item Description
Add row Adds a row.
Insert Row Inserts a row.
Delete row Deletes a row.
Import Import a CSV file.
Export Export data in CSV format.
Add sheet Adds a sheet for multi-language settings.
Rename sheet Renames a sheet.
Delete sheet Deletes a sheet.
No use multi-language Select this check box when you do not need multi-language display
switching. For example, when using characters that do not depend
on the display language.
Check char Checks all the message sentences to make sure that strings in the
message do not contain characters that cannot be displayed with the
character type set with the character property of the control.
Item Displays the message to be displayed in the list box.
OK button Displays File Explorer and saves edits in the itemxml file format. If
there are empty rows between items, an error message appears. (A
row only containing spaces is considered an empty row.)
Cancel Discards edits.

- Import
A tab-separated CSV file can be imported.
The CSV file that contains the multi-language key that matches that on the sheet is imported.
Because files are imported row by row, the file with the most rows in the language used is imported.
If there are more data items to be imported than empty rows, the file is not imported.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 60/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Example)
Screen CSV file
English Chinese English Chinese
A 1 E 3
B 2 F 4
C G
D H

English Chinese
A 1
B 2
C
D
E 3
F 4
G
H

[Focus] tab

Fig. 3.1.3.5 (e) Properties Page - [Focus] Tab

Table 3.1.3.5 (f) List of Properties on the [Focus] Tab


Setting item Entry type Specification Initial value Note
Focus is Check box ON/OFF OFF Select this check box to use the focus.
available When you select this check box, the items below it are
enabled.
Index User entry Numerical 1 Specify a number that is not already used on the screen
value (form).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 61/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Appoint Check box ON/OFF OFF Select this check box to directly specify the index that
movement you want to move the focus to.
index When you select this check box, the items below it are
enabled.
UP key User entry Numerical 0 Specify the index that you want to move the focus to.
value
LEFT key User entry Numerical 0 Specify the index that you want to move the focus to.
value
RIGHT key User entry Numerical 0 Specify the index that you want to move the focus to.
value
DOWN key User entry Numerical 0 Specify the index that you want to move the focus to.
value

[Image] tab

Fig. 3.1.3.5 (f) Properties Page - [Image] Tab

Table 3.1.3.5 (g) List of Properties on the [Image] Tab


Setting item Entry type Specification Initial value Note
Selected Back Palette Color selection Blue Select a color from the color selection dialog.
Color
Unselected Palette Color selection Gray Select a color from the color selection dialog.
Back Color
Focused Back Palette Color selection Yellow Select a color from the color selection dialog.
Color
Border Color Palette Color selection Black Select a color from the color selection dialog.
Scroll Palette Color specification White Select a color from the color selection dialog.
ON Color Specify the background color for the up and
down arrow marks.
Scroll Palette Color specification Gray Select a color from the color selection dialog.
OFF Color Specify the background color for the up and
down arrow marks.
Scroll Palette Color specification Black Select a color from the color selection dialog.
Button Color Specify the color of the up and down arrow
marks.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 62/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Scroll Palette Color specification Gray Select a color from the color selection dialog.
Back Color Specify the background color of the scroll bar.
Scroll Palette Color specification Black Select a color from the color selection dialog.
Border Color Specify the border color of the scroll bar.
Scrollbar Color Palette Color specification Black Select a color from the color selection dialog.
Specify the color of the scroll bar.
Display Check box ON/OFF OFF When you select this check box, exclusive
Selection Status control is performed.
Focus Preview Check box ON/OFF OFF When you select this check box, exclusive
control is performed.

[NoAction Image] tab

Fig. 3.1.3.5 (g) Properties Page - [NoAction Image] Tab

Table 3.1.3.5 (h) List of Properties on the [NoAction Image] Tab


Setting item Entry type Specification Initial value Note
NoAction Signal Check box ON/OFF OFF This setting item is enabled with the following
settings:
[NoAction]: ON

When you select this check box, the items


below it are enabled.
Back Color Palette Color selection Gray Select a color from the color selection dialog.
Border Color Palette Color selection Black Select a color from the color selection dialog.
Scroll State Palette Color specification Dark gray Select a color from the color selection dialog.
Color (128.128.128) Specify the background color for the up and
down arrow marks.
Scroll Palette Color specification Black Select a color from the color selection dialog.
Button Color Specify the color of the up and down arrow marks.
Scroll Back Palette Color specification Gray Select a color from the color selection dialog.
Color Specify the background color of the scroll bar.
Scroll Border Palette Color specification Black Select a color from the color selection dialog.
Color Specify the border color of the scroll bar.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 63/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Note


Scrollbar Color Palette Color specification Dark gray Select a color from the color selection dialog.
(128.128.128) Specify the color of the scroll bar.
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common candidate settings:
Setting Items." [Symbol]: OFF
PMC Area Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common candidate settings:
Setting Items." [Symbol]: OFF
Address User entry Arbitrary 0 The allowed range is between 0 and 99999.

This setting item is enabled with the following


settings:
[Symbol]: OFF
Bit Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common candidate settings:
Setting Items." [Symbol]: OFF
Symbol Check box ON/OFF OFF
Symbol Entry or Arbitrary Blank Select a symbol from those registered in the
selection selection PMC symbol list.

This setting item is enabled with the following


settings:
[Symbol]: ON
Check Timing Selection 0: Power On 0: Power On Specify when the disable signal is checked.
1: Always
Preview Check box ON/OFF OFF When you select this check box, exclusive
control is performed.

[Interlock Image] tab

Fig. 3.1.3.5 (h) Properties Page - [Interlock Image] Tab

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 64/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.3.5 (i) List of Properties on the [Interlock Image] Tab


Setting item Entry type Specification Initial value Note
Display Check box ON/OFF OFF
Back Color Palette Color specification Gray
Border Color Palette Color specification Black
Scroll State Palette Color specification Dark gray Select a color from the color selection dialog.
Color (128.128.128) Specify the background color for the up and
down arrow marks.
Scroll Palette Color specification Black Select a color from the color selection dialog.
Button Color Specify the color of the up and down arrow
marks.
Scroll Back Palette Color specification Gray Select a color from the color selection dialog.
Color Specify the background color of the scroll bar.
Scroll Border Palette Color specification Black Select a color from the color selection dialog.
Color Specify the border color of the scroll bar.
Scrollbar Color Palette Color specification Dark gray Select a color from the color selection dialog.
(128.128.128) Specify the color of the scroll bar.
Without caption Check box ON/OFF OFF
Preview Check box ON/OFF OFF When you select this check box, exclusive
control is performed.

3.1.3.6 List display

The setting items that can be edited in the list display are shown in "Table 3.1.3.6 (a) List of Properties in the
List Display."
The setting tabs and setting items are the corresponding tab names and item names on the Property screen.

For details about the item display conditions, refer to "Table 3.1.3.6 (b) List of Item Display Conditions."

Table 3.1.3.6 (a) List of Properties in the List Display


Item name Settings tab Setting item Specification Item display
conditions
Object ID General Object ID
Tab index - Tab index Arbitrary
Comment - Comment Arbitrary
X General X
Y General Y
Width General Width
Multi-language key Character Multi-language key Multi-language key No. - No.1
1
Character Type Character Character Type Refer to "Table 3.1 (b) No.19
Common Setting Items."
Character Type (1) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (2) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (3) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (4) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 65/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Character Type (5) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (6) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (7) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (8) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (9) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (10) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (11) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (12) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (13) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (14) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (15) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (16) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (17) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (18) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (19) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (20) Character Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Selected Color Character Selected Color
Unselected Color Character Unselected Color
Lock Color Character Interlock
Character Color
NoAction Action NoAction 0:OFF 1:ON
File Name Action File Name
Display Item Count Action Display Item Count
Number of Registrable Action Registrable Items
Items
Row Height Action Row Height
Multi Select Action Multi Select 0:OFF 1:ON
Scroll Display Action Scroll Display 0:OFF 1:ON
Status Mabagement Action Symbol 0:OFF 1:ON
Start Symbol Flag
Status Mabagement Action Symbol selection No.2
Start Symbol
Status Management Action - PMC Path Refer to "Table 3.1 (b) No.3
Start PMC - Start Area Common Setting Items."
- Start Address

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 66/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Interlock Action Interlock 0:OFF 1:ON
Interlock signal Action Symbol 0:OFF 1:ON No.4
symbol flag
Interlock signal Action Symbol selection No.5
symbol
Interlock signal Action - PMC Path Refer to "Table 3.1 (b) No.6
- InterlockPMCArea Common Setting Items."
- InterlockPMCAddress
- InterlockPMCBit
Interlock Interlock Display 0:OFF 1:ON No.7
image display Image No.8
Interlock Interlock Back Color No.9
Back Color Image
Interlock Interlock Border Color No.9
Border Color Image
Interlock Interlock Scroll State Color No.9
Scroll State Color Image
Interlock Interlock Scroll Button Color No.9
Scroll Button Color Image
Interlock Interlock Scroll Back Color No.9
Scroll Back Color Image
Interlock Interlock Scroll Border Color No.9
Scroll Border Color Image
Interlock Interlock Scrollbar Color No.9
Scrollbar Color Image
Without caption at Interlock Without caption 0:OFF 1:ON No.9
interlock Image
Interlock Preview Interlock Preview 0:OFF 1:ON No.10
Image
Focus is available Focus Focus is available 0:OFF 1:ON
Number of focus index Focus Index Arbitrary (The initial No.17
value is 0.)
Appoint movement index Focus Appoint movement index 0:OFF 1:ON No.17
Focusing up Focus <UP> Key Arbitrary (The initial No.18
value is 0.)
Focusing down Focus <DOWN> Key Arbitrary (The initial No.18
value is 0.)
Focusing left Focus <LEFT> Key Arbitrary (The initial No.18
value is 0.)
Focusing right Focus <RIGHT> Key Arbitrary (The initial No.18
value is 0.)
Selected Back Color Image Selected Back Color
Unselected Back Color Image Unselected Back Color
Focused Back Color Image Focused Back Color
Border Color Image Border Color
Scroll ON Color Image Scroll ON Color
Scroll OFF Color Image Scroll OFF Color
Scroll Button Color Image Scroll Button Color
Scroll Back Color Image Scroll Back Color
Scroll Border Color Image Scroll Border Color
Scrollbar Color Image Scrollbar Color

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 67/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Display Selection Status Image Display Selection Status 0:OFF 1:ON No.11
Display Focused Status Image Focus Preview 0:OFF 1:ON No.12
No action Signal NoAction Image NoAction Signal 0:OFF 1:ON No.13
No action Border Color NoAction Image Border Color No.14
No action Back Color NoAction Image Back Color No.14
No action Scroll NoAction Image Scroll State Color No.14
State Color
No action Scroll NoAction Image Scroll Button Color No.14
Button Color
No action Scroll NoAction Image Scroll Back Color No.14
Back Color
No action Scroll NoAction Image Scroll Border Color No.14
Border Color
No action Scrollbar NoAction Image Scrollbar Color No.14
Color
No action signal NoAction Image Symbol 0:OFF 1:ON No.15
symbol flag
No action signal symbol NoAction Image Symbol selection No.16
No action signal PMC NoAction Image - PMC Path Refer to "Table 3.1 (b)
- PMC Area Common Setting Items."
- Address
- Bit
No action signal preview NoAction Image Preview 0:OFF 1:ON No.14

Table 3.1.3.6 (b) List of Item Display Conditions


No. Display condition
1 [Use the multi-language display function] (project settings): ON
Edit mode: iHMI
2 Symbol flag: ON
3 Symbol flag: OFF
4 Interlock: ON
5 Interlock: ON
Interlock signal symbol flag: ON
6 Interlock: ON
Interlock signal symbol flag: OFF
7 Interlock: ON
NoAction: OFF
8 Interlock: ON
NoAction: ON
NoAction Signal: ON
9 Interlock image display: ON
10 Interlock image display: ON
Preview of disabled status: OFF
11 Focus Preview: OFF
Preview of disabled status: OFF
Interlock preview: OFF
12 Display Selection Status: OFF
Preview of disabled status: OFF
Interlock preview: OFF

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 68/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Display condition


13 NoAction: ON
14 NoAction Signal: ON
15 NoAction Signal: ON
Blind Signal Symbol Flag: ON
16 NoAction Signal: ON
Blind Signal Symbol Flag: OFF
17 [Focus is available] on the [Focus] tab: ON
18 [Focus is available] on the [Focus] tab: ON
[Focus move rules] on the [Focus] tab: ON
19 [Use the multi-language character type function] (project settings): OFF
Edit mode: iHMI
20 [Use the multi-language display function] (project settings): ON
[Use the multi-language character type function] (project settings): ON
Edit mode: iHMI

3.1.3.7 Batch editing

You can display the setting items on each tab. The property names are the same as those in the list display.

3.1.3.8 Message

There is no specific message displayed when setting this control.

3.1.4 Message Box

3.1.4.1 Function

The message box is a dialog box that displays a message to the user.
The message box appears in the foreground of the screen in operation and prompts the user to respond by
selecting a button.
3.1.4.2 Image

The message box size is large or small. The large or small size is automatically applied depending on the
number of characters in the title and message.
The display position is at the center of the user-created screen.
Select an icon from the provided five types.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 69/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.4.2 (a) Small Message Box Fig. 3.1.4.2 (b) Small Message Box
(Standard Monitor version) (iHMI version)

Create relatively large buttons to support touch panel operation as well.


Although the message box looks different on the standard monitor version and the iHMI version, the component
parts and operation are the same.

Table 3.1.4.2 (c) Size of Message Box (Image)


Small size Large size

3.1.4.3 Operation

The message box can be called and displayed as a FP function from a Ruby script.
The displayed message box cannot be moved. (It cannot be dragged on the touch panel, either.)
While the message box is displayed, user screens other than the message box cannot be operated.
To close the message box, press a button. (Touch a button or press the allocated shortcut key.)
While the message box is displayed, you can switch to another screen (such as the maintenance screen).
If you switch back to the user screen after switching to another screen while the message box is displayed, the
currently displayed message box is displayed again.
Multiple message boxes do not appear at the same time. Only one message box appears at a time.
Once a message box appears, another message box cannot appear until the displayed message box is closed.
This applies to both the standard monitor version and iHMI version.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 70/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.4.3 (a) Conceptual Image of Displayed Message Box

Character specifications
- The character type of all the displayed text (title name, message, and button text) is fixed to the default
(ANK).
- The title must be one row. If the title string contains a line feed code, only the text before the code is
displayed.
- When the number of characters in the title or body exceeds the maximum number of characters for the
small size, the large message box is displayed.
- The number of characters that can be displayed in the standard monitor version is shown in the following
tables.( In iHMI version, the number of characters that can be displayed depends on the setting of character
type "ANK".)

Table 3.1.4.3 (a) Specifications of the Number of Displayed Characters In the Standard Monitor Version
When Using Small Characters
(One Character = One Byte)
Size Button type Title Body
Small size One-button 32 characters x 1 row 16 characters x 3 rows
Two-button 36 characters x 1 row 20 characters x 3 rows
Three-button 52 characters x 1 row 32 characters x 3 rows
Large size Common 60 characters x 1 row 40 characters x 5 rows

Table 3.1.4.3 (b) Specifications of the Number of Displayed Characters In the Standard Monitor Version
When Using Big Characters
(One Character = One Byte)
Size Button type Title Body
Small size One-button 16 characters x 1 row 8 characters x 2 rows
Two-button 18 characters x 1 row 10 characters x 2 rows
Three-button 26 characters x 1 row 16 characters x 2 rows
Large size Common 30 characters x 1 row 20 characters x 3 rows

NOTE
A double-byte character takes up 2 bytes.

- Even if you do not insert line feed codes, line feeds are automatically inserted if text exceeds the horizontal
limit of characters.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 71/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- If the number of rows exceeds the limit of the small size after you insert line feed codes or line feeds are
automatically inserted, the large size display is used. If the number of rows exceeds the limit of the large
size, text is displayed until the maximum number of rows for the large size.
- If the last byte in each row is the first byte of a double-byte character, that last byte is displayed as the
double-byte character on a new row. If the current row is the last display row, that character is not
displayed.

Fig. 3.1.4.3 (b) Screen Using Big Fig. 3.1.4.3 (c) Screen Using Small
Characters Characters

3.1.4.4 Configuration specifications

The message box consists of components 1 to 6 below.

2 1

4
3

5
6

Fig. 3.1.4.4 (a) Basic Message Box

Table 3.1.4.4 (a) Names and Description of Message Box Components


No. Name Description
1 Title bar Background of title.
2 Title Title of message box.
Screen background of the message box other
3 Background
than the title bar.
User-specified icon that is displayed at the same
4 Icon
time as the body of the message.
5 Message User-defined string.
6 Button Buttons clicked by users such as [OK].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 72/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.4.4 (b) List of Components that the User Can Define (Adjust) in the Message Box
Component Display position Size Multi-language Color Script
No Yes (six options)
Message
No (automatic - - (Refer to the next
box
selection) section.)
Title bar No No - Yes No
Yes (three options)
Title No - Yes Yes
(left, center or right)
Background - - - Yes No
Yes (five options)
Icon No No - - (Refer to the next
section.)
Yes (three options)
Message No - Yes Yes
(left, center or right)
Button (text) No No Yes Yes No
Button
No - - Yes (*1) No
(background)
*1) When this setting is ON, Border Color1 and Border Color2 are switched and output.

The message box can be selected from the following types.


Table 3.1.4.4 (c) Types of Message Boxes
Number Initial display
Image (standard Image (iHMI
Button type of names of
monitor version) version)
buttons buttons

1 1 OK

OK
2 2
Cancel
Stop
3 3 Retry
Ignore
Yes
4 3 No
Cancel
Yes
5 2
No

Retry
6 2
Cancel

*The initial display names of buttons are those in the English version.

The following types of icons are available.


Table 3.1.4.4 (d) Images of Icons
Image
Image
(standard
Icon type Sample usage and description of icon (iHMI
monitor
version)
version)
1 No icon N/A N/A

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 73/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2 Cross mark in red circle


Used when displaying an error message, warning
the user, and so on.
3 Question mark in round balloon
Used for inquiry messages and so on.

4 Exclamation mark in yellow triangle


Used when prompting the user to confirm
something, alerting the user, and so on.
5 "i" letter in round balloon
Used when displaying information to the user and
so on.

NOTE
The background color is applied to the gray part of the icon image.

3.1.4.5 Properties

This section describes the properties of message boxes.

Overall configuration
Message boxes consist of the [Button] and [Template] tabs.

Table 3.1.4.5 (a) Property Tab Configuration


Tab name Settings
Button Used to set up the buttons in a message box.
Template Used to specify the background color, text color, and text position of
a message box.

Displaying the message box properties


Start FANUC PICTURE and select [MessageBox Setting] from the [Project] menu.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 74/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.4.5 (a) Conceptual Image of Displaying Message Properties

When you select the above command, the message box dialog appears, displaying the [Button] tab.

[Button] tab
The following items can be specified on the [Button] tab.

Fig. 3.1.4.5 (b) Conceptual Image of the [Button] Tab (Standard Monitor mode)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 75/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.4.5 (c) Conceptual Image of the [Button] Tab (iHMI mode)

Table 3.1.4.5 (b) List of Properties on the [Button] Tab


Setting item Entry type Specification Initial value Remarks
Button Type Selection Button type ButtonType1 Select the type of buttons to be used in the
1–6 message box.
No use Check box ON/OFF OFF This item is enabled when you select the [Use the
multi-language multi-language display function] check box on the
[Multi-Language Settings] tab for project settings.
When you select this check box, [Multi-language
key] is enabled.
Multi-language Selection Any First candidate Displays the specified text in the caption of the
key button with the multi-language key.
Character Type Selection Any First candidate iHMI mode only
A character type can be specified for each
multi-language key when you select the [Use the
multi-language character type function] check box
on the [Multi-Language Settings] tab for project
settings.
Left Caption User entry Text OK (when First caption for the selected button type.
English is used.)
Center Caption User entry Text Blank Second caption for the selected button type.
This item is unavailable for ButtonType1.
Right Caption User entry Text Blank Third caption for the selected button type.
This item is available only for ButtonType3 and
ButtonType4.
Shortcut Check box ON/OFF OFF When you select this check box, the items below
key it become selectable.
Shortcut Selection Refer to "Table First candidate This setting item becomes selectable when you
key selection 1 3.1 (b) Common select the [Shortcut key] check box.
Setting Items."
Shortcut Selection Refer to "Table Second This setting item becomes selectable when you
key selection 2 3.1 (b) Common candidate select the [Shortcut key] check box.
Setting Items." This item is not selectable for ButtonType1.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 76/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Shortcut Selection Refer to "Table Third candidate This setting item becomes selectable when you
key selection 3 3.1 (b) Common select the [Shortcut key] check box.
Setting Items." This item is selectable only for ButtonType3 and
ButtonType4.

Text displayed in each caption


The default caption for each button type is shown below.
Once you overwrite and save a caption, the saved string is displayed on the caption.

Table 3.1.4.5 (c) Default Value of Each Caption Display


ButtonType ButtonType ButtonType ButtonType ButtonType ButtonType
1 2 3 4 5 6
Left OK OK Stop Yes Yes Retry
Caption
Center - Cancel Retry No No Cancel
Caption
Right - - Ignore Cancel - -
Caption
*When English is used.

Character sample display


- The button size is fixed to the actual size. Strings specified in caption items are displayed.
- Text in "Left Caption," "Center Caption," and "Right Caption" is displayed in the display buttons from the
left.
- If the caption contains line feed codes, the string is displayed on multiple rows.
- The characters displayed on the character sample screen are actually displayed.

[Template] tab
The following items can be specified on the [Template] tab.

Fig. 3.1.4.5 (d) Conceptual Image of the [Template] Tab (Standard Monitor mode)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 77/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.4.5 (e) Conceptual Image of the [Template] Tab (iHMI mode)
Table 3.1.4.5 (d) List of Properties on the [Template] Tab
Setting item Entry type Specification Initial value Remarks
Multi-language Selection Any First iHMI mode only
key candidate The multi-language key is enabled with the following
settings:
[Multi-Language Settings] tab for project settings
[Use the multi-language character type function]: ON
[Button] tab
[No use multi-language]: OFF
Title - Character Selection Any First iHMI mode only
Type candidate A character type can be specified for each
multi-language key when you select the [Use the
multi-language character type function] check box on
the [Multi-Language Settings] tab for project settings.
Title - Alignment Selection Left Aligned Left Aligned Select the display position of title string in the message
/Centered box.
/Right Aligned
Title - Color of Palette Color White Select the color of the title text of the message box.
Caption selection
Title - Back Palette Color Blue Select the color of the title background of the message
Color selection (0,255,0) box.
Message - Selection Any First iHMI mode only
Character Type candidate A character type can be specified for each
multi-language key when you select the [Use the
multi-language character type function] check box on
the [Multi-Language Settings] tab for project settings.
Message - Selection Left Aligned Left Aligned Select the display position of the message string in the
Alignment /Centered message box.
/Right Aligned
Message - Palette Color Black Select the color of the message text in the message
Color of Caption selection box.
Message - Back Palette Color Gray Select the color of the background except for the title of
Color selection (192,192,192) the message box.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 78/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Message Palette Color White Select the color of the borders from the top left to the
Border Color1 selection top right and from the top left to the bottom left of the
message box.
Message Palette Color Black Select the color of the borders from the bottom right to
Border Color2 selection the top right and from the bottom right to the bottom left
of the message box.
Button Caption - Palette Color Black Displayed on the buttons in the message box.
Color of Caption selection Select the color of the button text.
Button Caption - Palette Color Gray Select the background color of the buttons in the
Back Color selection (192,192,192) message box.
When you specify ButtonType1 to 6 and ON/OFF, this
setting applies to all of them.
Button Caption - Palette Color White Select the color of the borders from the top left to the
Border Color1 selection top right and from the top left to the bottom left of the
button in the message box.
Border Color1 and Border Color2 are switched and
displayed every time the button is turned ON or OFF.
Button Caption - Palette Color Black Select the color of the borders from the bottom right to
Border Color2 selection the top right and from the bottom right to the bottom left
of the button in the message box.
Border Color1 and Border Color2 are switched and
displayed every time the button is turned ON or OFF.
ON Preview Check box ON/OFF OFF Border Color1 and Border Color2 are switched and
displayed for the buttons in the review display.
Edit Cancel Button ON Selectable Restores the status before the tab is switched or before
[OK] or [Apply] is selected.
Initialize Button ON Selectable Returns the items that can be specified on the
[Template] tab to the state at the time of installation.

Representation of button selection using Border Color1 and Border Color2


Example) When you allocate white and black to Border Color1 and Border Color2, respectively, under Button
Caption and select [Cancel]

Button Caption - Border


Color1: White
Border Color1 and
Border Color2 are
Button Caption - Border switched and displayed
Color2: Black every time the button
is turned ON or OFF.
Fig. 3.1.4.5 (f) Conceptual Image of When a Button Is Selected in the Message Box

Sample display area


- In the sample display area, you can see the coloring of the whole message box that the items specified on
the [Template] tab are applied to.
- The number of button types is fixed to 2. The sample text on the title bar and message is displayed in the
language used at startup.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 79/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Sample display area

Fig. 3.1.4.5 (g) Sample Display Area

3.1.4.6 Function

This section describes the specifications of the FP functions for message boxes.

[Function]
MsgBoxShow

[Syntax with arguments]


MsgBoxShow( msg , type, title, icon, scrptnum )

[Arguments]
This function has the following arguments.
Table 3.1.4.6 (a) Arguments of the MsgBoxShow Function
Name Type Description
msg String Message to be displayed
type Numerical value ButtonType1 to 6 (*1)
title String Title text to be displayed
icon Numerical value Icon type 1 to 5 (*2)
scrptnum Numerical value Number of the Ruby script that is executed when the button is pressed

[Returns]
This function has the following return values.

Table 3.1.4.6 (b) Value to Be Stored in the Return Value of the MsgBoxShow Function
Type Description
Numerical Execution result
value 0: Display request succeeded.
-1: Display request failed.

[Description]

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 80/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

This function requests to display a message box.


The script is not stopped even when this function is executed.
The settings are shown below.
Table 3.1.4.6 (c) Button Types and Icon Types
(*1) Specification of button type (*2) Specification of icon type
Button type Numerical value Icon type Numerical value
ButtonType1 0 Icon type 1 0
ButtonType2 1 Icon type 2 1
ButtonType3 2 Icon type 3 2
ButtonType4 3 Icon type 4 3
ButtonType5 4 Icon type 5 4
ButtonType6 5 If the numerical value is out of
If the numerical value is out of specification, Icon type 1 (no icon)
specification, ButtonType1 is used. is used.

If a button is pressed, one of the following values is stored in MESSAGE_VAL depending on the pressed button.

Table 3.1.4.6 (d) List of Return Values When a Button Is Selected


Button type Caption name Selected button Return value
(Default name when English is used)
1 Left Caption OK 0
2 Left Caption OK 0
Center Caption Cancel 1
3 Left Caption Stop 0
Center Caption Retry 1
Right Caption Ignore 2
4 Left Caption Yes 0
Center Caption No 1
Right Caption Cancel 2
5 Left Caption Yes 0
Center Caption No 1
6 Left Caption Retry 0
Center Caption Cancel 1

The arguments of this function support three pattern calls in total.


Arguments 1 and 2 are required.
Arguments 3, 4, and 5 can be omitted. The following rules apply when you omit arguments.

Table 3.1.4.6 (e) List of Argument Conditions


Used pattern Argument 1 Argument 2 Argument 3 Argument 4 Argument 5
Pattern 1 Required Required Omitted Omitted Omitted
Pattern 2 Required Required Specified Omitted Omitted
Pattern 3 Required Required Specified Specified Omitted
Pattern 4 Required Required Specified Specified Specified

Specify arguments using one of used patterns 1 to 4.


(" ") can be entered when you do not specify the body, title, and script number.

3.1.4.7 Drawing specifications

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 81/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The message box is drawn at the forefront of the FP screen when the MsgBoxShow function is called.
When a button in the displayed message box (including an allocated shortcut key) is pressed, the message box
closes (end of operation).
If you switch back to the FP screen after switching to another screen such as the maintenance screen while the
message box is displayed, the currently displayed message box is drawn.

3.1.4.8 Messages

The specific messages displayed when setting this control are shown below.

Table 3.1.4.8 (a) List of Messages


Cause Timing Message How to address the error
There is no folder that During generation Failed to create the Files required to execute the
contains Xml for the of MEM file MessageBox file. application cannot be found.
MessageBox template. Reinstall the application.
The Figure folder does not During generation Failed to open the Files required to execute the
contain FPMsgIcon.fig on of MEM file FPMsgIcon.fig file. application cannot be found.
the standard monitor. Reinstall the application.
The FigureEx folder does During generation Failed to open the Files required to execute the
not contain FPMsgIcon.fig of MEM file FPMsgIcon.fig file. application cannot be found.
in the iHMI mode. Reinstall the application.
FigureEx/img does not During generation An error occurred while the Files required to execute the
contain png for icon in the of MEM file HMBICN00.png file was being application cannot be found.
iHMI mode. compressed. File reading error. Reinstall the application.
(Image files are HMBICN00.png
to HMBICN03.png.)

3.1.5 Combo Box Control

3.1.5.1 Function

The combo box control lists registered items from which the user can select only one option.
When you select a combo box in the normal mode, the item list is displayed. When the list of registered items
pops up at the center of the screen, the items can be selected. The selected item is displayed in the combo box in
the normal mode.
3.1.5.2 Diagram

Normal mode (combo box non-operation mode)


- The minimum size is as follows.
Width: Width of one double-byte character + Width of button
Height: Height of row (setting value)
- Strings are displayed up to the number of characters that can be displayed. The part after the number of
characters that can be displayed is not displayed.
(1) The horizontal scroll bar is not displayed.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 82/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(2) The button next to the string is a square with the same height as the string.
(3) The selected item is displayed. Specify the initially displayed item in Property.
Blank is displayed if the item list is not set up. The combo box operation mode cannot be switched.
*-1 is set to the status management PMC.
If an invalid value is set to the item list, the first item in the item list is initially displayed.

AAAAAA
Fig. 3.1.5.2 (a) Image of a Combo Box in Normal Mode

List mode (combo box operation mode)


- The minimum size is as follows.
Width: Fixed to 200
Height: (Height of row (setting value) x 2) + Outer frame (fixed)
- Strings are displayed up to the number of characters that can be displayed. The part after the number of
characters that can be displayed is not displayed.
(1) The vertical scroll bar is displayed if the number of items that can be registered is larger than the
number of displayed rows or if you select to display the scroll bar in Property.
(2) The horizontal scroll bar is not displayed.
(3) The up and down buttons on the scroll bar are square with the same height as the row.

AAAAAAAAAA
BBBBBBBBBB
CCC
DDDD
EEEEEE
Fig. 3.1.5.2 (b) Conceptual Image of a Combo Box in List Mode

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 83/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.5.2 (c) Conceptual Image of Combo Boxes with the Minimum Setting, Normal Mode (Left) and List Mode
(Right)

Fig. 3.1.5.2 (d) Conceptual Image of Combo Boxes with the Maximum Setting, Normal Mode (Left) and List Mode
(Right)

3.1.5.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.5.3 (a) Icon Design

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 84/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.5.4 Operation

Status management
Specify the first PMC address to synchronize the item selection status in the combo box with the PMC. Item
indices are allocated from the address in order.
The system reserves 2 bytes as the status management area.

Operation
Once the combo box operation mode is enabled, you can operate the combo box.
When the combo box operation mode is enabled, the list of registered items pops up at the center of the
screen.
End the combo box operation mode before operating other controls.
Tap outside the item list pop-up or press the <INPUT> key to end the combo box operation mode and close
the item list pop-up. When you end the mode after selecting an item, the selected item is applied to the
combo box.

(1) To start the combo box operation mode

(a) Move the focus using the directional keys to select the combo box and press the operation mode
switch key to change the combo box to the operation mode. The user sets any desired operation
mode switch key on the project setting screen. For details, refer to "Changes to the project
settings screen" in "Common setting items."
(b) When you can click the combo box with the mouse or touch it on the screen, click or touch the
combo box to directly start the combo box operation mode.

(2) To end the combo box operation mode

(a) Tap outside the item list pop-up or press the <INPUT> key in the combo box operation mode to
end the combo box operation mode. After that, you can move the focus to another control with
the directional keys.

(3) Transition of the operation mode

(a) Procedure 1 (when moving the focus with the directional keys)
(i) Move the focus to the combo box by using the directional keys.
(ii) To switch to the combo box operation mode, press the operation mode switch key.
(iii) You can operate the combo box when the item list pop-up appears.
(iv) End the combo box operation mode with the <INPUT> key.
(v) Switch the focus to another control by using the directional keys.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 85/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Directional keys Directional keys

Focus on another
control

Directional keys Directional keys


Combo box
Focus
Operation mode
Combo box Combo box
switch key
Non-operation mode operation mode

<INPUT> key

Directional keys Directional keys

Focus on another control

Directional keys Directional keys

Fig. 3.1.5.4 (a) Operation Mode Transition Diagram

(b) Procedure 2 (clicking the combo box with the mouse or touching it on the touch panel)
(i) Touch the combo box to start the combo box operation mode.
(ii) To end the combo box operation mode, touch an item or touch outside the item list pop-up.

(4) Key operations


The keys that can be used in each status of the combo box are shown below.

Table 3.1.5.4 (a) Mode Transition List


Status
Focus on the combo box
Focus on another control
Non-operation mode Operation mode
The combo box operation The combo box operation
Mouse or touch screen operation

Combo box -
mode is enabled. mode is enabled.
The focus is moved to the
Up button - - row above the current
one.
<delete>

The focus is moved to the


Down button - - row below the current
one.
Another item is selected.
Then, the combo box
Item row - -
non-operation mode is
enabled.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 86/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Status
Focus on the combo box
Focus on another control
Non-operation mode Operation mode
The combo box
Outside the combo The focus is removed
- non-operation mode is
box from the combo box.
enabled.
The focus is moved to the
<Up> key The focus is moved. The focus is moved. row above the current
one.
The focus is moved to the
<Dn> key The focus is moved. The focus is moved. row below the current
one.
Key operations

<Right> key The focus is moved. The focus is moved. -


<Left> key The focus is moved. The focus is moved. -
The previous page is
<PgUp> key - -
displayed.
The next page is
<PgDn> key - -
displayed.
Another item is selected.
Then, the combo box
<INPUT> key - -
non-operation mode is
enabled.

(5) Relationship between the item list and the combo box
The first five items from the first display item in the combo box display are displayed in the item list.
(For the conceptual image, refer to the list box control diagram titled "Item List and Display.")

(6) Position of the gauge on the scroll bar


For details, refer to "(6) Position of the gauge on the scroll bar" in "3.1.3 List Box Control."

(7) Operation of the Up button or <Up> key


For details, refer to "(7) Operation of the Up button or <Up> key" in "3.1.3 List Box Control."

(8) Operation of the Down button or <Dn> key


For details, refer to "(8) Operation of the Down button or <Dn> key" in "3.1.3 List Box Control."

(9) Operation of the <PgUp> key


For details, refer to "(9) Operation of the <PgUp> key" in "3.1.3 List Box Control."

(10) Operation of the <PgDn> key


For details, refer to "(10) Operation of the <PgDn> key" in "3.1.3 List Box Control."

(11) Switch of the selected item


This section describes how to switch the selected item in the item list.

(a) Switching the selected item with the <INPUT> key


(i) Use the <PgUp> or <PgDn> and <Up> or <Dn> keys to move the focus row to the item
you want to select.
(ii) Press the <INPUT> key in this state to select the item in the focus row.
(If an item is already selected, the currently selected item is deselected.)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 87/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(iii) After you press the <INPUT> key, the combo box non-operation mode is enabled and the
pop-up closes.
(If an item is selected when the combo box non-operation mode is enabled, it is displayed
in the combo box.)
When the "Don't move the focus to the next control after inputting data." property is
disabled, the focus moves to the next control.

(b) Switching the selection status by clicking the mouse or touching the screen
(i) When you select the item row you want to select by left-clicking it with the mouse or
touching it on the screen, the focus moves to the row of the touched item and that item is
selected.
(If the focus is already on that row, the item is selected and the focus remains there. If an
item is already selected, the currently selected item is deselected.)
(ii) After you touch the item row, the combo box non-operation mode is enabled and the
pop-up closes.
(If an item is selected when the combo box non-operation mode is enabled, it is displayed
in the combo box.)

(c) Cancellation by touching outside the frame


(i) Left-click outside the pop-up frame with the mouse or touch the screen to change the
combo box to the non-operation mode without switching the selected item and close the
pop-up.
The items displayed in the combo box remain unchanged.

(12) Memory clear


When the memory clear setting on the screen configuration control parent screen tab is set to ON, the
selection status in the combo box is cleared and returns to the initial status when you switch the
screen.

(13) Addition and deletion in the item list in the combo box
You can add and delete items via Ruby scripts.
However, items can no longer be added once the number of items that can be registered is reached.

(14) Addition of items


For details, refer to "Addition of items" in List Box Control.
When the number of items in the item list changes from 0 to 1, the combo box displays the added item.
Then, you can switch the combo box operation mode.

(15) Deletion of items


When you delete an item, all the items in the item list are deselected.
When the number of items in the item list changes to 0, the combo box is blank and you can no longer
switch the combo box operation mode.
When the item list contains one or more items, the combo box displays the first item in the item list.
(For the conceptual image of deletion, refer to the list box control image titled "Conceptual Image of
Item Deletion".)

3.1.5.5 Properties

This section describes the properties of combo box control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 88/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Overall configuration
The properties of combo box control are displayed on the following tabs.

Table 3.1.5.5 (a) List of Tabs


Tab name Settings
General Used to specify the position and size of the combo box.
Text Used to set up the caption.
Action Used to manage and register items.
Focus Used to specify the focus number and how to move the focus.
Image Normally used to specify color information.
NoAction Image Used to specify color information when the disable signal is issued.
Interlock Image Used to specify color information when the interlock is engaged.

[General] tab

Fig. 3.1.5.5 (a) Properties Page - [General] Tab

Table 3.1.5.5 (b) List of Properties on the [General] Tab


Setting item Entry type Specification Initial value Remarks
Object ID Fixed value FPComboBoxX - X is automatically entered. (User
entry is not allowed.)

X User entry Numerical value - Specify a value smaller than the


screen size.
Y User entry Numerical value - Specify a value smaller than the
screen size.
Width User entry Numerical value -
Height Entry not allowed. Numerical value -
(Automatically adjusted.*)
*This value is automatically set based on the row height.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 89/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Character] tab

Fig. 3.1.5.5 (b) Properties Page - [Character] Tab (Left: Standard Monitor mode, Right: iHMI mode)

Table 3.1.5.5 (c) List of Properties on the [Character] Tab


Setting item Entry type Specification Initial value Remarks
Multi-language Selection Any First Select a language key from those registered
key candidate under project settings.
Character Type Selection Refer to "Table ANK Select the character type.
3.1 (b) Common When using the multi-language key in the
Setting Items." iHMI mode, specify the character type for
each key that can be specified with the
[Multi-language key].
Character Palette Color selection Black Select a color from the color selection dialog.
Color
Focused Color Palette Color selection Black Select a color from the color selection dialog.
Interlock Color Palette Color selection Black Select a color from the color selection dialog.
Selected Color Palette Color selection Black Select a color from the color selection dialog.
Unselected Palette Color selection Black Select a color from the color selection dialog.
Color

[Action] tab

Fig. 3.1.5.5 (c) Properties Page - [Action] Tab

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 90/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.5.5 (d) List of Properties on the [Action] Tab


Setting item Entry type Specification Initial value Remarks
NoAction Check box ON/OFF OFF When you select this check box, [NoAction
Image] is enabled.
Status management PMC
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common candidate following settings:
Setting Items." [Symbol]: OFF
Start Area Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common candidate following settings:
Setting Items." [Symbol]: OFF
The system reserves a 2-byte area within
the start area.
Start Address User entry Numerical value 0 The allowed range is between 0 and
99999.

This setting item is enabled with the


following settings:
[Symbol]: OFF
Symbol Check box ON/OFF OFF
Symbol selection Entry or Any Blank This setting item is enabled with the
selection following settings:
[Symbol]: ON
Interlock
Interlock Check box ON/OFF OFF
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCArea Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
InterlockPMCAddress User entry Numerical value 0 The allowed range is between 0 and
99999.

This setting item is enabled with the


following settings:
[Interlock]: ON
[Symbol]: OFF
InterlockPMCBit Selection Refer to "Table 3.1 First This setting item is enabled with the
(b) Common candidate following settings:
Setting Items." [Interlock]: ON
[Symbol]: OFF
Symbol Check box ON/OFF OFF
Symbol selection Entry or Any Blank This setting item is enabled with the
selection following settings:
[Interlock]: ON
[Symbol]: ON
Item
File Name User entry Any Blank Specify the Itemxml file.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 91/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Registrable Items User entry Numerical value 1 The allowed range is between 1 and 2048.
Display Item Count User entry Numerical value 2 The allowed range is between 2 and 10.
Default Item User entry Numerical value 0 Specify the index of the initially displayed
item.
The allowed range is between 0 and 2047.
When you switch the screen with the
memory for the screen configuration set to
clear, the last display state is discarded and
the screen appears according to this
setting.
Row Height User entry Numerical value 16 The allowed range is from the height of
ANK (16 in the standard machine, 12 in the
iHMI mode) to 64.
Scroll Display Check box ON/OFF ON ON: Always displayed.
OFF: Displayed when the value in [Display
Item Count] is larger than that in
[Registrable Items].

File edit screen


For details, refer to "File edit screen" in "3.1.3 List Box Control."

[Focus] tab

Fig. 3.1.5.5 (d) Properties Page - [Focus] Tab

Table 3.1.5.5 (e) List of Properties on the [Focus] Tab


Setting item Entry type Specification Initial value Remarks
Focus is Check box ON/OFF OFF Select this check box to use the focus.
available When you select this check box, the items below it are
enabled.
Index User entry Numerical 1 Specify a number that is not already used on the
value screen (form).
Don't move the Check box ON/OFF OFF Select this check box to avoid consecutive entry.
focus to the next
control after
inputting data.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 92/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Appoint Check box ON/OFF OFF Select this check box to directly specify the index that
movement you want to move the focus to.
index When you select this check box, the items below it are
enabled.
UP key User entry Numerical 0 Specify the index that you want to move the focus to.
value
LEFT key User entry Numerical 0 Specify the index that you want to move the focus to.
value
RIGHT key User entry Numerical 0 Specify the index that you want to move the focus to.
value
DOWN key User entry Numerical 0 Specify the index that you want to move the focus to.
value

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 93/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Image] tab

Fig. 3.1.5.5 (e) Properties Page - [Image] Tab

Table 3.1.5.5 (f) List of Properties on the [Image] Tab


Setting item Entry type Specification Initial value Remarks
Back Color Palette Color selection Gray Select a color from the color selection dialog.
This setting item applies to both the normal
mode and the list mode.
Focused Back Palette Color selection Yellow Select a color from the color selection dialog.
Color This setting item applies to both the normal
mode and the list mode.
Border Color Palette Color selection Black Select a color from the color selection dialog.
This setting item applies to both the normal
mode and the list mode.
Button On Color Palette Color selection White Select a color from the color selection dialog.
Specify the background color for the down (or up
and down) arrow marks.
This setting item applies to both the normal
mode and the list mode.
Button Off Color Palette Color selection Gray Select a color from the color selection dialog.
Specify the background color for the down (or up
and down) arrow marks.
This setting item applies to both the normal
mode and the list mode.
Button Color Palette Color selection Black Select a color from the color selection dialog.
Specify the color of the down (or up and down)
arrow marks.
This setting item applies to both the normal
mode and the list mode.
PopUp Back Palette Color selection Gray Select a color from the color selection dialog.
Color This setting item applies to the list mode.
Selected Back Palette Color selection Blue Select a color from the color selection dialog.
Color This setting item applies to the list mode.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 94/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Scroll Back Palette Color selection Gray Select a color from the color selection dialog.
Color This setting item applies to the list mode.
Scroll Border Palette Color selection Black Select a color from the color selection dialog.
Color This setting item applies to the list mode.
Scrollbar Color Palette Color selection Black Select a color from the color selection dialog.
This setting item applies to the list mode.
Display Check box ON/OFF OFF This item cannot be set with the following settings.
Selection Status Pattern 1
[NoAction] on the [Action] tab: ON
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: ON
Pattern 3
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: ON
[Preview] on the [Interlock Image] tab: ON
Focus Preview Check box ON/OFF OFF This item cannot be set with the following settings.
Pattern 1
[NoAction] on the [Action] tab: ON
Pattern 2
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image] tab: ON
[Preview] on the [NoAction Image] tab: ON
Pattern 3
[Interlock] on the [Action] tab: ON
[Display] on the [Interlock Image] tab: ON
[Preview] on the [Interlock Image] tab: ON

[NoAction Image] tab

Fig. 3.1.5.5 (f) Properties Page - [NoAction Image] Tab

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 95/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.5.5 (g) List of Properties on the [NoAction Image] Tab


Setting item Entry type Specification Initial value Remarks
NoAction Signal Check box ON/OFF OFF This setting item is enabled with the following
settings:
[NoAction]: ON

When you select this check box, the items


below it are enabled.
Back Color Palette Color selection Gray Select a color from the color selection dialog.
Border Color Palette Color selection Black Select a color from the color selection dialog.
Button Caption - Palette Color selection Dark gray Select a color from the color selection dialog.
Back Color (128.128.128) Specify the background color for the down
arrow mark.
Button Color Palette Color selection Black Select a color from the color selection dialog.
Specify the color of the down arrow mark.
Button Border Palette Color selection Black Select a color from the color selection dialog.
Color
PMC Path Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common Setting candidate settings:
Items." [Symbol]: OFF
PMC Area Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common Setting candidate settings:
Items." [Symbol]: OFF
PMC Address User entry Any 0 The allowed range is between 0 and 99999.

This setting item is enabled with the following


settings:
[Symbol]: OFF
PMC Bit Selection Refer to "Table 3.1 First This setting item is enabled with the following
(b) Common Setting candidate settings:
Items." [Symbol]: OFF
Symbol Check box ON/OFF OFF
Symbol Entry or Any Blank Select a symbol from those registered in the
selection selection PMC symbol list.

This setting item is enabled with the following


settings:
[Symbol]: ON
Check Timing Selection 0: Power On 0: Power On Specify when the disable signal is checked.
1: Always
Preview Check box ON/OFF OFF This setting item is enabled with the following
settings:
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image]
tab: ON

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 96/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Interlock Image] tab

Fig. 3.1.5.5 (g) Properties Page - [Interlock Image] Tab

Table 3.1.5.5 (h) List of Properties on the [Interlock Image] Tab


Setting item Entry type Specification Initial value Remarks
Display Check box ON/OFF OFF
Back Color Palette Color selection Gray
Border Color Palette Color selection Black
Button Caption - Palette Color selection Dark gray Select a color from the color selection dialog.
Back Color (128.128.128) Specify the background color for the down
arrow mark.
Button Color Palette Color selection Black Select a color from the color selection dialog.
Specify the color of the down arrow mark.
Button Border Palette Color selection Black Select a color from the color selection dialog.
Color
Without caption Check box ON/OFF OFF
Preview Check box ON/OFF OFF This setting item is enabled with the following
settings:
Pattern 1
[Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: OFF
[Display] on the [Interlock Image] tab: ON
Pattern 2
[Interlock] on the [Action] tab: ON
[NoAction] on the [Action] tab: ON
[NoAction Signal] on the [NoAction Image]
tab: ON
[Preview] on the [NoAction Image] tab: OFF
[Display] on the [Interlock Image] tab: ON

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 97/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.5.6 List display

The setting items that can be edited in the list display are shown in "Table 3.1.5.6 (a) List of Properties in the
List Display."
The setting tabs and setting items are the corresponding tab and item names on the Property screen.

For details about the item display conditions, refer to "Table 3.1.5.6 (b) List of Item Display Conditions."

Table 3.1.5.6 (a) List of Properties in the List Display


Item name Settings tab Setting item Specification Item display
conditions
Object ID General Object ID
Tab index - Tab index Any
Comment - Comment Any
X General X
Y General Y
Width General Width
Multi-language key Text Multi-language key Multi-language key No. - 1 No.1
Character Type Text Character Type Refer to "Table 3.1 (b) No.19
Common Setting Items."
Character Type (1) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (2) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (3) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (4) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (5) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (6) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (7) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (8) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (9) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (10) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (11) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (12) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (13) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (14) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (15) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 98/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Character Type (16) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (17) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (18) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (19) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Character Type (20) Text Character Type Refer to "Table 3.1 (b) No.20
Common Setting Items."
Caption Color Text Normal Mode - Character
Color
Focus caption Color Text Normal Mode - Focus
Color
Lock Color Text Normal Mode
Interlock Color
Selected Color Text List Mode
Selected Color
Unselected Color Text List Mode
Unselected Color
No action Action NoAction 0: OFF 1: ON
File name Action File Name
Number of Registrable Action Registrable Items
Items
Display Item Count Action Display Item Count
Default Item Action Default Item
Row Height Action Row Height
Scroll Display Action Scroll Display 0: OFF 1: ON
Status Management Action Symbol 0: OFF 1: ON
Start Symbol Flag
Status Management Action Symbol selection No.2
Start Symbol
Status Management Action - PMC Path Refer to "Table 3.1 (b) No.3
Start PMC - Start Area Common Setting Items."
- Start Address
Interlock Action Interlock 0: OFF 1: ON
Interlock signal Action Symbol 0: OFF 1: ON No.4
symbol flag
Interlock signal Action Symbol selection No.5
symbol
Interlock signal Action - PMC Path Refer to "Table 3.1 (b) No.6
- InterlockPMCArea Common Setting Items."
- InterlockPMCAddress
- InterlockPMCBit
Interlock Interlock Display 0: OFF 1: ON No.7
image display Image No.8
Interlock Interlock Back Color No.9
Back Color Image
Interlock Interlock Border Color No.9
Border Color Image

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 99/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Interlock Interlock Button Caption - Back No.9
Button Back Color Image Color
Interlock Interlock Button Color No.9
Button Color Image
Interlock Interlock Button Border Color No.9
Button Border Color Image
Without caption at Interlock Without caption 0: OFF 1: ON No.9
interlock. Image
Interlock Interlock Preview 0: OFF 1: ON No.10
preview Image
Focus is available Focus Focus is available 0: OFF 1: ON
Number of focus index Focus Index Any (The initial value is 0.) No.17
Don't move focus to the Focus Don't move the focus to 0: OFF 1: ON No.17
next control after data the next control after
input operation. inputting data.
Appoint movement index Focus Appoint movement index 0: OFF 1: ON No.17
Focusing up Focus <UP> Key Any (The initial value is 0.) No.18
Focusing down Focus <DOWN> Key Any (The initial value is 0.) No.18
Focusing left Focus <LEFT> Key Any (The initial value is 0.) No.18
Focusing right Focus <RIGHT> Key Any (The initial value is 0.) No.18
Background Color Image Back Color
Focused Back Color Image Focused Back Color
Border Color Image Border Color
Button On Color Image Button On Color
Button Off Color Image Button Off Color
Button Color Image Button Color
PopUp Back Color Image PopUp Back Color
Selected Back Color Image Selected Back Color
Scroll Back Color Image Scroll Back Color
Scroll Border Color Image Scroll Border Color
Scrollbar Color Image Scrollbar Color
Display Selection Status Image Display Selection Status 0: OFF 1: ON No.11
Display Focused Status Image Focus Preview 0: OFF 1: ON No.12
No action Signal NoAction Image NoAction Signal 0: OFF 1: ON No.13
No action Border Color NoAction Image Border Color No.14
No action Back Color NoAction Image Back Color No.14
No action Button Back NoAction Image Button Caption - Back No.14
Color Color
No action Button Color NoAction Image Button Color No.14
No action Button Border NoAction Image Button Border Color No.14
Color
No action signal NoAction Image Symbol 0: OFF 1: ON No.15
symbol flag
No action signal symbol NoAction Image Symbol selection No.16
No action signal PMC NoAction Image - PMC Path Refer to "Table 3.1 (b)
- PMC Area Common Setting Items."
- PMC Address
- PMC Bit
No action signal preview NoAction Image Preview 0: OFF 1: ON No.14

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 100/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.5.6 (b) List of Item Display Conditions


No. Display condition
1 [Use the multi-language display function] (project settings): ON
Edit mode: iHMI
2 Symbol flag: ON
3 Symbol flag: OFF
4 Interlock: ON
5 Interlock: ON
Interlock signal symbol flag: ON
6 Interlock: ON
Interlock signal symbol flag: OFF
7 Interlock: ON
NoAction: OFF
8 Interlock: ON
NoAction: ON
NoAction Signal: ON
9 Interlock image display: ON
10 Interlock image display: ON
Preview of disabled status: OFF
11 Focus Preview: OFF
Preview of disabled status: OFF
Interlock preview: OFF
12 Display Selection Status: OFF
Preview of disabled status: OFF
Interlock preview: OFF
13 NoAction: ON
14 NoAction Signal: ON
15 NoAction Signal: ON
NoAction Signal Symbol Flag: ON
16 NoAction Signal: ON
NoAction Signal Symbol Flag: OFF
17 [Focus is available] on the [Focus] tab: ON
18 [Focus is available] on the [Focus] tab: ON
[Focus move rules] on the [Focus] tab: ON
19 [Use the multi-language character type function] (project settings): OFF
Edit mode: iHMI
20 [Use the multi-language display function] (project settings): ON
[Use the multi-language character type function] (project settings): ON
Edit mode: iHMI

3.1.5.7 Batch editing

You can display the setting items on each tab. The property names are the same as those in the list display.

3.1.5.8 Message

There is no specific message displayed when setting this control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 101/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.1.6 Pie Graph Control

3.1.6.1 Function

The pie graph control acquires data from the PMC register or P code macro variable and displays the component
ratio of up to eight data items in a pie graph.

3.1.6.2 Diagram

Fig. 3.1.6.2 (a) Display Image of Pie Graph Controls (Left: without Scale, Right: with Scale)

The graph title, description of data, scale numbers and other items are not displayed on the pie graph control.
To display these items, use a label or other control.

3.1.6.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.6.3 (a) Icon Design

3.1.6.4 Operation

Data display
The component ratio of specified data items is calculated and a pie graph is drawn.
Data items 1 to 8 are displayed clockwise in the specified order.

Select whether to read data from the PMC signal or the P code macro variable.

- If the specified data value is less than 0, that data is treated as 0.


- If the data value is 0, that data is not displayed in the graph.
- If all the data values are 0, only the outer frame of the pie graph is displayed.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 102/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.6.4 (a) Display Example of When the Component Ratio Cannot Be Displayed

Update
The timings with which the graph display is updated and data is written are adjusted using the following two
signals.
- Display request signal
- Display response signal
Allocate any desired PMC signal or P code macro variable to the above signals.

The flow of data writing and updating the display is as follows.


1. Data is written when the value of the display request signal matches that of the display response signal.
2. After data writing is complete, the display request signal is inverted so that the display response signal
does not match the display request signal.
3. The pie graph control monitors the display request signal and display response signal and updates the
display when their values are different.
4. After the display is updated, the pie graph control inverts the display response signal to match it to the
display request signal.

The flow from 1 to 4 is shown in Fig. 3.1.6.4 (b).

F
Fig. 3.1.6.4 (b) Flow of Display Update

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 103/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
The display is not updated if the drawing update speed of the FANUC PICTURE
driver is exceeded.

3.1.6.5 Properties

This section describes the properties of pie graph control.

Overall configurationThe properties of pie graph control are displayed on the following tabs.

Table 3.1.6.5 (a) List of Tabs


Tab name Settings
General Used to specify the position and size of the control.
Action Used to specify the display format of the pie graph.
Image Used to specify the color information of the pie graph.

[General] tab

Fig. 3.1.6.5 (a) Properties Page - [General] Tab

Table 3.1.6.5 (b) List of Properties on the [General] Tab


Setting item Entry type Specification Initial value Remarks
Object ID Fixed value FPPieChartX - X is automatically entered. (User
entry is not allowed.)

X User entry Numerical value -


Y User entry Numerical value -
Width User entry Numerical value -
Height User entry Numerical value -

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 104/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Action] tab

Fig. 3.1.6.5 (b) Properties Page - [Action] Tab (Left Figure: PMC, Right Figure: P Code Macro Variable)

How to specify display data is described below.


- Individual Edit
You can specify the PMC signal or P code macro variable saved as display data for each data item.
- Batch Edit
You can specify consecutive areas by specifying the first address or the first variable number of the areas
saved as display data.
Example) When specifying 5 as the number of data items, D100 as the first address, and 2 bytes as the
data type
The area from D100 to D109 (2 × 5 bytes) is reserved as the storage area.

Table 3.1.6.5 (c) List of Common Properties on the [Action] Tab


Setting item Entry type Specification Initial value Remarks
Data Kind Selection 0: PMC 0: PMC Other setting items on the tab are switched
1: P code macro depending on the setting value in [Data Kind].
variable (Refer to "Fig. 3.1.6.5 (b) Properties Page -
[Action] Tab.")
Script Check box ON / OFF OFF Specify whether to use a data calculation
script.
Script entry User entry Any Blank
Individual Edit Selection ON/OFF ON Exclusive of Batch Edit.
Batch Edit Selection ON/OFF OFF Exclusive of Individual Edit.
Data 1 Palette Color specification Red Display color for Data 1
Data 2 Palette Color specification Red Display color for Data 2
Data 3 Palette Color specification Red Display color for Data 3
Data 4 Palette Color specification Red Display color for Data 4
Data 5 Palette Color specification Red Display color for Data 5
Data 6 Palette Color specification Red Display color for Data 6
Data 7 Palette Color specification Red Display color for Data 7
Data 8 Palette Color specification Red Display color for Data 8

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 105/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.6.5 (d) List of Properties in Display Request Signal on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry Numerical value 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Bit Selection 0 –7 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.6.5 (e) List of Properties in Display Response Signal on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry Numerical value 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Bit Selection 0 –7 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.6.5 (f) List of Properties for Individual Edit on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
Data: Selection Data 1 to Data 8 Data 1 Select the data you want to edit.
Use this Data. Check box ON / OFF OFF Select this check box to use the data in the pie
graph.
PMC Path Selection Refer to "Table 3.1 First Select the PMC path that contains the selected
(b) Common candidate data.
Setting Items." This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
PMC Area Selection Refer to "Table 3.1 First Select the PMC area that contains the selected
(b) Common candidate data.
Setting Items." This setting item is displayed only when [0:
PMC] is selected for [Data Kind].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 106/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Address User entry Numerical value 0 Enter the PMC address for the selected data.
This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
Data Type Selection 0: 1 byte 0: 1 byte This setting item is displayed only when [0:
1: 2 byte PMC] is selected for [Data Kind].
2: 4 byte
Symbol Check box ON / OFF OFF This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
Symbol Selection Any Blank This setting item is displayed only when [0:
selection PMC] is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is displayed only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.6.5 (g) List of Properties for Batch Edit on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
Number of Data: Selection 1 –8 1 Select the first address (variable number).
PMC Path Selection Refer to "Table 3.1 First Select the PMC path for the first address of
(b) Common candidate [Data Kind].
Setting Items." This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
PMC Area Selection Refer to "Table 3.1 First Select the PMC path for the first address of
(b) Common candidate [Data Kind].
Setting Items." This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
Address User entry Numerical value 0 Select the PMC path for the first address of
[Data Kind].
This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
Data Type Selection 0: 1 byte 0: 1 byte This setting item is displayed only when [0:
1: 2 byte PMC] is selected for [Data Kind].
2: 4 byte
Symbol Check box ON / OFF OFF This setting item is displayed only when [0:
PMC] is selected for [Data Kind].
Symbol Selection Any Blank This setting item is displayed only when [0:
selection PMC] is selected for [Data Kind].
Variable User entry From 10000 to 10000 Select the first variable number for [Data Kind].
Number 89999 This setting item is displayed only when [1: P
code macro variable] is selected for [Data Kind].

NOTE
The PMC address and variable number of each data setting is controlled as follows.
Batch Edit
99999 (maximum PMC address) - ("Number of data items" × "Data type" byte count)
89999 (maximum variable number) - ("Number of data items")

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 107/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Image] tab

Fig. 3.1.6.5 (c) Properties Page - [Image] Tab

Table 3.1.6.5 (h) List of Properties on the [Image] Tab


Setting item Entry type Specification Initial value Remarks
Image File Name User entry Any FPPieChart.fig Specify the Fig file that describes the style of the
pie graph.
Style Selection Any 0: XXXX Select a style from those in the specified Fig file.
Number of ticks per User entry Any 10
division
Back Color Palette Color Gray Select the background color for the control from
specification the pallet.
Border Color Palette Color Dark gray Select the color of the outer frame of the pie
specification graph from the pallet.
Graduations Back Palette Color White
Color specification
Graduations Color Palette Color Black
selection

3.1.6.6 List display

The setting items that can be edited in the list display are shown below.
The setting tabs and setting items are the corresponding tab and item names on the Property screen.

For details about the item display conditions, refer to "Table 3.1.6.6 (b) List of Item Display Conditions."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 108/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.6.6 (a) List of Properties in the List Display


Item name Settings tab Setting item Specification Item display
conditions
Object ID General Object ID -
Tab index - - Any -
Comment - - Any -
X General X -
Y General Y -
Width General Width -
Height General Height -
Data Kind Action Data Kind 0: PMC -
1: P code macro
variable
Use Script Action Script 0: OFF 1: ON -
Script Action Script entry No. 1
Display Request symbol Action Symbol 0: OFF 1: ON No. 2
flag
Display Request symbol Action Symbol selection No. 3
Display Request PMC Action PMC Path No. 4
PMC Area
Address
Bit
Display Request Action Variable Number No. 5
variable Number
Display Response Action Symbol 0: OFF 1: ON No. 2
symbol flag
Display Response Action Symbol selection No. 6
symbol
Display Response PMC Action PMC Path No. 7
PMC Area
Address
Bit
Display Response Action Variable Number No. 5
Variable Number
Setting method Action Individual Edit Individual Edit -
Batch Edit Batch Edit
Batch Edit Number of Action Number of Data 0 –8 No. 8
Data
Batch Edit Symbol flag Action Symbol 0: OFF 1: ON No. 9
Batch Edit Symbol Action Symbol selection No. 10
Batch Edit PMC Action PMC Path Refer to "Table No. 11
PMC Area 3.1 (b) Common
Address Setting Items."
Batch Edit Data Type Action Data Type Refer to "Table No. 9
3.1 (b) Common
Setting Items."
Batch Edit Variable Action Variable Number Any No. 12
Number
Use Data 1. Action Data 1 0: OFF 1: ON No. 13
Use this Data.
Data 1 symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 1 symbol Action Symbol selection No. 15

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 109/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Data 1 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 1 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 1 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 2. Action Data 2 0: OFF 1: ON No. 13
Use this Data.
Data 2 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 2 Symbol Action Symbol selection No. 15
Data 2 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 2 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 2 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 3. Action Data 3 0: OFF 1: ON No. 13
Use this Data.
Data 3 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 3 Symbol Action Symbol selection No. 15
Data 3 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 3 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 3 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 4. Action Data 4 0: OFF 1: ON No. 13
Use this Data.
Data 4 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 4 Symbol Action Symbol selection No. 15
Data 4 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 4 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 4 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 5. Action Data 5 0: OFF 1: ON No. 13
Use this Data.
Data 5 Symbol flag Action Symbol 0: OFF 1: ON No. 14

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 110/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Data 5 Symbol Action Symbol selection No. 15
Data 5 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 5 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 5 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 6. Action Data 6 0: OFF 1: ON No. 13
Use this Data.
Data 6 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 6 Symbol Action Symbol selection No. 15
Data 6 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 6 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 6 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 7. Action Data 7 0: OFF 1: ON No. 13
Use this Data.
Data 7 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 7 Symbol Action Symbol selection No. 15
Data 7 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 7 Data Type Action Data Type Refer to "Table No. 16
3.1 (b) Common
Setting Items."
Data 7 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Use Data 8. Action Data 8 0: OFF 1: ON No. 13
Use this Data.
Data 8 Symbol flag Action Symbol 0: OFF 1: ON No. 14
Data 8 Symbol Action Symbol selection No. 15
Data 8 PMC Action PMC Path Refer to "Table No. 16
PMC Area 3.1 (b) Common
Address Setting Items."
Data 8 Data Type Action Data Type Refer to "Table No. 14
3.1 (b) Common
Setting Items."
Data 8 Variable Number Action Variable Number Refer to "Table No. 17
3.1 (b) Common
Setting Items."
Data 1 Color Action Color: Data 1 -
Data 2 Color Action Color: Data 2 -

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 111/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display


conditions
Data 3 Color Action Color: Data 3 -
Data 4 Color Action Color: Data 4 -
Data 5 Color Action Color: Data 5 -
Data 6 Color Action Color: Data 6 -
Data 7 Color Action Color: Data 7 -
Data 8 Color Action Color: Data 8 -
Image file name Image Image File Name -
Style Image Style -
Number of tics per Image Number of ticks per division -
division
Background Color Image Back Color -
Border Color Image Border Color -
Graduations Back Color Image Graduations Back Color -
Graduations Color Image Graduations Color -

Table 3.1.6.6 (b) List of Item Display Conditions


No. Display condition
1 Flag for script use: ON
2 Data Kind: PMC
3 Data Kind: PMC
Display request signal symbol flag: ON
4 Data Kind: PMC
Display request signal symbol flag: OFF
5 Data Kind: P code macro variable
6 Data Kind: PMC
Display response signal symbol flag: ON
7 Data Kind: PMC
Display response signal symbol flag: OFF
8 Batch Edit: ON
9 Data Kind: PMC
Batch Edit: ON
10 Data Kind: PMC
Batch Edit: ON
Data symbol flag: ON
11 Data Kind: PMC
Batch Edit: ON
Data symbol flag: OFF
12 Data Kind: P code macro variable
Batch Edit: ON
13 Individual Edit: ON
14 Data Kind: PMC
Individual Edit: ON
Use Data n.: ON (n: 1 to 8)
15 Data Kind: PMC
Individual Edit: ON
Use Data n.: ON (n: 1 to 8)
Data n symbol flag: ON (n: 1 to 8)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 112/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Display condition


16 Data Kind: PMC
Individual Edit: ON
Use Data n.: ON (n: 1 to 8)
Data n symbol flag: OFF (n: 1 to 8)
17 Data Kind: P code macro variable
Individual Edit: ON
Use Data n.: ON (n: 1 to 8)

3.1.6.7 Batch editing

The same items as those in the list display can be specified.

3.1.6.8 List of messages

There is no specific message displayed when setting this control.

3.1.7 Extended bar graph control

3.1.7.1 Function

This control acquires data from the PMC register or P code macro variable and displays multiple data items in a
bar graph.

3.1.7.2 Diagram

The graph width is automatically calculated from the control width and display interval.
If the display area cannot be ensured, the graph is not displayed.

The coordinate axes of the extended bar graph control can be displayed inside or outside the graph.

Vertical or horizontal can be selected for the display orientation of the bar graph.
The scale is displayed along the vertical axis in the vertical display and along the horizontal axis in the
horizontal display.

The graph title, description of data, scale numbers and other items are not displayed on the extended bar graph
control.
To display these items, use a label or other control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 113/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.1.7.2 (a) Display Image of Extended Bar Graph Controls (Left: When the Coordinate Axes Are Displayed
Inside, Right: When the Coordinate Axes Are Displayed Outside)

3.1.7.3 Icon design

The following icon is displayed on the toolbar.

Fig. 3.1.7.3 (a) Icon Design (Left: Existing Graph Control, Right: Bar Graph Control)

3.1.7.4 Operation

Data display
- Select whether to read data from the PMC signal or the P code macro variable.
- The bar graph data consists of series and categories.
Up 32 data items (the number of series × the number of categories) can be displayed.
Up to eight series can be specified.

- The data display method can be selected from the set display and the stacked display.
In the set display, data in each category is displayed next to each other.
In the stacked display, data is stacked in the positive direction along the coordinate axis from series 1 in
each category.
Negative data is not displayed in the stacked display.

Category
Series 1

Series 2

Series 3

Series 3

Series 2
Series 1

Fig. 3.1.7.4 (a) Display Methods of Extended Bar Graph Control (Left: Set Display, Right: Stacked Display)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 114/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- The graph is displayed showing the minimum value at the bottom of the axis and the maximum value at the
top of the axis.
Data below the minimum value is not displayed.
When the display method is stacked display, the minimum value is 0.

Update
Set the following two signals to adjust the timings with which the graph display is updated and data is written.
- Display request signal
- Display response signal
Allocate any desired PMC signal or P code macro variable to the above signals.
The flow of data writing and updating the display is as follows.
1. Data is written when the value of the display request signal matches that of the display response signal.
2. After data writing is complete, the display request signal is inverted so that the display response signal
does not match the display request signal.
3. The bar graph control monitors the display request signal and display response signal and updates the
display when their values are different.
4. After the display is updated, the bar graph control inverts the display response signal to match it to the
display request signal.
The flow from 1 to 4 is shown below.

Display demand signal

Display response signal

Fig. 3.1.7.4 (b) Flow of Display Update

NOTE
The display is not updated if the drawing update speed of the FANUC PICTURE
driver is exceeded.

3.1.7.5 Properties

This section describes the properties of extended bar graph control.

Overall configurationThe properties of extended bar graph control are displayed on the following tabs.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 115/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.7.5 (a) List of Tabs


Tab name Settings
General Used to specify the position and size of the control.
Action Used to specify the display format of a bar graph.
Data Color Used to specify the color of data in a bar graph.
Image Used to specify the color information of a bar graph.

[General] tab

Fig. 3.1.7.5 (a) Properties Page - [General] Tab

Table 3.1.7.5 (b) List of Properties on the [General] Tab


Setting item Entry type Specification Initial value Remarks
Object ID Fixed value FPBarChartX - X is automatically entered. (User
entry is not allowed.)

X User entry Numerical value -


Y User entry Numerical value -
Width User entry Numerical value -
Height User entry Numerical value -

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 116/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Action] tab

Fig. 3.1.7.5 (b) Properties Page - [Action] Tab (Left Figure: PMC, Right Figure: P Code Macro Variable)

How to specify display data is described below.


- Series Edit
You can specify areas for the number of categories in batch by specifying the first PMC address or the first
variable number of data.

- Batch Edit
You can specify consecutive areas that correspond to the product of the number of categories and the
number of series by specifying the first address or the first variable number of the areas saved as display
data.
Example) When specifying 4 as the number of series, 3 as the number of categories, D100 as the first
address, and 2 bytes as the data type
The area from D100 to D123 (2 bytes × 12 (series x categories)) is reserved as the storage area.

Areas for the categories are reserved in order from Series 1 without spaces.
Specified address: D100
Series 1 Series 2 Series 3 Series 4
Category 1 Category 2 Category 3 Category 1 Category 2 Category 3 Category 1 Category 2 Category 3 Category 1 Category 2 Category 3

Fig. 3.1.7.5 (c) Conceptual Image of Reserving Areas When Editing Data in Batch

Table 3.1.7.5 (c) List of Common Properties on the [Action] Tab


Setting item Entry type Specification Initial value Remarks
Data Kind Selection 0: PMC 0: PMC Other setting items on the tab change
1: P code macro depending on this setting value. (Refer to "Fig.
variable 3.1.7.5 (b) Properties Page - [Action] Tab.")
Display Method Selection 0: Set Display 0: Set Display
1: Stacked Display
Script Check box ON / OFF OFF Specify whether to use a data calculation script.
Script entry User entry Any Blank
Series Edit Selection ON/OFF ON Exclusive of Batch Edit.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 117/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Specification Initial value Remarks


Batch Edit Selection ON/OFF OFF Exclusive of Series Edit.

Table 3.1.7.5 (d) List of Properties in Display Request Signal on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry Numerical value 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Bit Selection 0 –7 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.7.5 (e) List of Properties in Display Response Signal on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry Numerical value 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Bit Selection 0 –7 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.7.5 (f) List of Coordinate Axis Properties on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
Number of ticks User entry 0 –100 4
per division
Display Interval User entry 0 –250 100 Enter the graph display width as a ratio to the
graph width.
Max. value User entry -2147483648 - 100 When you select [1: Stacked Display] for
2147483647 [Display Method], enter a value greater than 0.
Min. value User entry -2147483648 - 0 This setting item is editable only when [0: Set
2147483647 Display] is selected for [Display Method].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 118/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.1.7.5 (g) List of Display Data Properties on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
Series Count Selection 1 – 8 1
Category Count Selection 1 –32 1 You can select any value as long as the
product of [Category Count] and [Series Count]
does not exceed 32.
When you change [Series Count] , the initial
value is selected.

Table 3.1.7.5 (h) List of Properties for Series Edit on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
Series Selection 1 –8 1
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry 0 - 99999 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Data Type Selection 0: 1 byte 0: 1 byte This setting item is editable only when [0: PMC]
1: 2 byte is selected for [Data Kind].
2: 4 byte
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

Table 3.1.7.5 (i) List of Properties for Batch Edit on the [Action] Tab
Setting item Entry type Specification Initial value Remarks
PMC Path Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
PMC Area Selection Refer to "Table 3.1 First This setting item is editable only when [0: PMC]
(b) Common candidate is selected for [Data Kind].
Setting Items."
Address User entry 0 - 99999 0 This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Data Type Selection 0: 1 byte 0: 1 byte This setting item is displayed only when [0:
1: 2 byte PMC] is selected for [Data Kind].
2: 4 byte
Symbol Check box ON / OFF OFF This setting item is editable only when [0: PMC]
is selected for [Data Kind].
Symbol Selection Any Blank This setting item is editable only when [0: PMC]
selection is selected for [Data Kind].
Variable User entry From 10000 to 10000 This setting item is editable only when [1: P
Number 89999 code macro variable] is selected for [Data Kind].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 119/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
The PMC address and variable number of each data setting is controlled as follows.
- Series Edit
99999 (maximum PMC address) - ("Number of categories" × "Data type" byte count)
16000 (maximum variable number) - ("Number of categories")
89999 (maximum number) - "Number of categories"
- Batch Edit
99999 (maximum PMC address) - ("Number of categories" × "Number of series"
× "Data type" byte count)
89999 (maximum variable number) - ("Number of categories" × "Number of series")

[Data Color] tab

Fig. 3.1.7.5 (d) Properties Page - [Data Color] Tab

Table 3.1.7.5 (j) List of Properties on the [Data Color] Tab


Setting item Entry type Specification Initial value Remarks
Series 1 Palette Color selection Red Data display color for Series 1
Series 2 Palette Color selection Red Data display color for Series 2
Series 3 Palette Color selection Red Data display color for Series 3
Series 4 Palette Color selection Red Data display color for Series 4
Series 5 Palette Color selection Red Data display color for Series 5
Series 6 Palette Color selection Red Data display color for Series 6
Series 7 Palette Color selection Red Data display color for Series 7
Series 8 Palette Color selection Red Data display color for Series 8

- Sample display
An image for eight series in one category is displayed.
The settings in "Display Method" on the action tab and "Direction" on the [Image] tab are applied.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 120/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Image] tab

Fig. 3.1.7.5 (e) Properties Page - [Image] Tab

Table 3.1.7.5 (k) List of Properties on the [Image] Tab


Setting item Entry type Specification Initial value Remarks
Image File Name User entry Any FPBarChart.fig Specify the Fig file that describes the
style of the bar graph.
Style Selection Any 0: XXXX Select a style from those in the specified
Fig file.
Direction Selection 0: Vertical 0: Vertical Select the display direction of the bar
1: Horizontal graph.
Back Color Palette Color specification Blue
Graduations Back Color Palette Color specification Gray -
Graduations Color Palette Color selection Black

3.1.7.6 List display

The setting items that can be edited in the list display are shown below.
The setting tabs and setting items are the corresponding tab and item names on the Property screen.

For details about the item display conditions, refer to "Table 3.1.7.6 (b) List of Item Display Conditions."

Table 3.1.7.6 (a) List of Properties in the List Display


Item name Settings tab Setting item Specification Item display conditions
Object ID General Object ID -
Tab index - - Any -
Comment - - Any -
X General X -
Y General Y -
Width General Width -

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 121/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Height General Height -
Data Kind Action Data Kind 0: PMC -
1: P code macro variable
Graph Display Action Display Method 0: Set Display -
Method 1: Stacked Display
Script Used Action Script 0: OFF 1: ON -
Flag
Script Action Script entry No. 1
Display Action Symbol 0: OFF 1: ON No. 2
Request
symbol flag
Display Action Symbol selection No. 3
Request
symbol
Display Action PMC Path No. 4
Request PMC PMC Area
Address
Bit
Display Action Variable Number No. 5
Request
Variable
Number
Display Action Symbol 0: OFF 1: ON No. 2
Response
symbol flag
Display Action Symbol selection No. 6
Response
symbol
Display Action PMC Path No. 7
Response PMC PMC Area
Address
Bit
Display Action Variable Number No. 5
Response
Variable
Number
Display data Action Series Edit 0: Series Edit -
setting Batch Edit 1: Batch Edit
Number of tics Action Number of ticks 0 –100 -
per division per division
Display Interval Action Display Interval 0 –250 -
Max. value Action Max. value -2147483648 - 2147483647
Min. value Action Min. value -2147483648 - 2147483647 No. 8
Category Count Action Category Count 1 –n -
n is the maximum number for
which the product of the number
of series and the number of
categories does not exceed 32.
Series Count Action Series Count 1 –8 -
Batch Edit Action Symbol 0: OFF 1: ON No. 9
Symbol flag

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 122/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Batch Edit Action Symbol selection No. 10
Symbol
Batch Edit First Action PMC Path Refer to "Table 3.1 (b) Common No. 11
PMC PMC Area Setting Items."
Address
Batch Edit Data Action Data Type Refer to "Table 3.1 (b) Common No. 9
Type Setting Items."
Batch Edit First Action Variable Number Any No. 12
Variable
Number
Series 1 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 1 Action Symbol selection No. 14
Symbol
Series 1 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 1 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 1 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 2 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 2 Action Symbol selection No. 14
Symbol
Series 2 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 2 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 2 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 3 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 3 Action Symbol selection No. 14
Symbol
Series 3 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 3 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 3 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First variable Setting Items."
number
Series 4 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 4 Action Symbol selection No. 14
Symbol

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 123/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Series 4 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 4 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 4 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 5 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 5 Action Symbol selection No. 14
Symbol
Series 5 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 5 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 5 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First variable Setting Items."
number
Series 6 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 6 Action Symbol selection No. 14
Symbol
Series 6 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 6 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 6 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 7 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 7 Action Symbol selection No. 14
Symbol
Series 7 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address
Series 7 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 7 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 8 Action Symbol 0: OFF 1: ON No. 13
Symbol flag
Series 8 Action Symbol selection No. 14
Symbol
Series 8 Action PMC Path Refer to "Table 3.1 (b) Common No. 15
First PMC PMC Area Setting Items."
Address

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 124/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item name Settings tab Setting item Specification Item display conditions
Series 8 Action Data Type Refer to "Table 3.1 (b) Common No. 13
Data Type Setting Items."
Series 8 Action Variable Number Refer to "Table 3.1 (b) Common No. 16
First Variable Setting Items."
number
Series 1 Color Data Color Series 1 -
Series 2 Color Data Color Series 2 -
Series 3 Color Data Color Series 3 -
Series 4 Color Data Color Series 4 -
Series 5 Color Data Color Series 5 -
Series 6 Color Data Color Series 6 -
Series 7 Color Data Color Series 7 -
Series 8 Color Data Color Series 8 -
Image file Image Image File Name -
name
Style Image Style -
Graph Display Image Direction 0: Vertical -
Direction 1: Horizontal
Background Image Back Color -
Color
Graduations Image Graduations Back -
Back Color Color
Graduations Image Graduations Color -
Color

Table 3.1.7.6 (b) List of Item Display Conditions


No. Display condition
1 Flag for script use: ON
2 Data Kind: PMC
3 Data Kind: PMC
Display request signal symbol flag: ON
4 Data Kind: PMC
Display request signal symbol flag: OFF
5 Data Kind: P code macro variable
6 Data Kind: PMC
Display response signal symbol flag: ON
7 Data Kind: PMC
Display response signal symbol flag: OFF
8 Display Method: Set Display
9 Data Kind: PMC
Display data setting: Batch Edit
10 Data Kind: PMC
Display data setting: Batch Edit
Data symbol flag: ON
11 Data Kind: PMC
Display data setting: Batch Edit
Data symbol flag: OFF
12 Data Kind: P code macro variable
Display data setting: Batch Edit

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 125/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Display condition


13 Data Kind: PMC
Display data setting: Series Edit
Series Count: n or more (n is the series number to be set up.)
14 Data Kind: PMC
Display data setting: Series Edit
Series n symbol flag: ON (n: 1 to 8)
15 Data Kind: PMC
Display data setting: Series Edit
Series n symbol flag: OFF (n: 1 to 8)
16 Data Kind: P code macro variable
Display data setting: Series Edit
Series Count: n or more (n is the series number to be set up.)

3.1.7.7 Batch editing

The same items as those in the list display can be specified.


3.1.7.8 List of messages

There is no specific message displayed when setting this control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 126/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2 DESIGN CUSTOMIZATION

3.2.1 [Image File List] Screen

The functions to edit FP control image files and the [Image File List] screen have been added.
The [Image File List] screen has the following functions.

Table 3.2.1 (a) List of Functions on the [Image File List] Screen
Function Description
Listing image files and - The file name list displays image file names. The shape list displays the shapes
shapes selected in the file name list.
- The files directly below the image file storage folder (Figure folder) are
collectively displayed.
Creating a shape - Selecting [New...] from [Shape operations] opens the [Make new shape] dialog
box. When you enter a shape name and select [OK], the image file edit screen
appears.
Adding a shape - Selecting [Entry...] from [Shape operations] opens the [Select additional shape]
dialog box. When you select an image file name and shape and select [OK],
the shape is added to the image file selected in the image file list.
Deleting a shape - Selecting [Delete] from [Shape operations] deletes the shape from the selected
image file.
Editing a shape - Selecting [Edit] from [Shape operations] displays the shape in the selected
image file on the image file edit screen. You can also double-click a shape to
display it on the image file edit screen.
Copying a shape - Selecting [Copy] from [Shape operations] opens the [Make copied shape]
dialog box. When you enter a shape name and select [OK], the selected shape
is copied and saved under the entered file name.
Creating a file - Selecting [New...] from [File] opens the [Make new file] dialog box. When you
enter a file name and select [OK], the image file edit screen appears.
Adding a file - Selecting [Entry...] from [File] opens the file selection dialog box, where you
can add an external image file.
Deleting a file - Selecting [Delete] from [File] deletes the selected image file.
Copying a file - Selecting [Copy] from [File] opens the [Make copied file] dialog box. When you
enter a file name and select [OK], the selected image file is saved under the
entered file name.

NOTE
The design customization function applies to image files directly below the image
file storage folder (Figure folder). If you want to edit the created project or screen
data on another PC, copy the Figure folder as well.

3.2.1.1 Listing image files

When you select [Edit image file] from the [Project] menu, the [Image File List] screen appears.
The [Image File List] screen displays the image files directly below the image file storage folder (Figure folder).
The image file list in the left part of the screen displays the "file names" of the image files. The shape list in the
right part of the screen displays the "shapes" in the image file selected in the image file list.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 127/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The image file list can display up to 1000 image files.


The shape list can display up to 255 shapes.

Fig. 3.2.1.1 (a) [Image File List] Screen

3.2.1.2 Creating a shape

When you select an image file in the image file list and select [Shape operations] > [New...] from the menu, the
[Make new shape] dialog box appears.
For the items in the [Make new shape] dialog box, refer to "Table 3.2.1.2 (a) List of Items in the [Make new
shape] Dialog Box."
[New...] cannot be selected unless an image file is selected.
-

Fig. 3.2.1.2 (a) [Make new shape] Dialog Box

Table 3.2.1.2 (a) List of Items in the [Make new shape] Dialog Box
Setting item Entry type Specification Initial value Note
Shape Name User entry Arbitrary (up to Blank Enter a name for the shape you want to create.
200 characters)
OK button - - - Closes the dialog box and displays the image file edit
screen.
× button - - - Closes the dialog box.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 128/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

When you enter a shape name in the [Make new shape] dialog box and select [OK], the shape is created under
the entered shape name and the image file edit screen appears.
When you select [OK], the shape name is checked. If there are any errors, an error dialog box appears.
For the messages in the error dialog box, refer to "Table 3.2.1.2 (b) List of Error Messages That May Appear at
Shape Name Check."
For the image file edit screen, refer to "3.2.2 Image File Edit Screen."

Table 3.2.1.2 (b) List of Error Messages That May Appear at Shape Name Check
Cause Timing Message
The shape name contains When [OK] is selected The shape name contains
characters that cannot be unsupported characters.
used in the file name. (Refer to "Table 3.1.1.2 (c)
Restrictions on Shape Names.")
Editing failed when you tried When [OK] is selected Failed to create the shape.
to add a shape.
You tried to add a shape When [New...] is selected No more shapes can be added.
though there were already from [Shape operations]
255 shapes.

Characters prohibited for use in shape names


The following restrictions apply to the shape name.

Table 3.2.1.2 (c) Restrictions on Shape Names


Item Description
2-byte characters Can be used
Prohibited The following characters (single-byte) cannot be used.
characters ¥ / : * ? ”< > |

3.2.1.3 Adding a shape

When you select an image file in the image file list and select [Shape operations] > [Entry...] from the menu, the
[Select additional shape] dialog box appears.
[Entry...] cannot be selected unless an image file is selected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 129/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.2.1.3 (a) [Select additional shape] Dialog Box

Table 3.2.1.3 (a) List of Items in the [Select additional shape] Dialog Box
Setting item Entry type Specification Initial value Note
ImageFile - - Blank Displays the full path of the selected image file.
Image file selection - - - Selecting […] opens the file selection dialog box.
Shape selection Selection - First shape The shapes in the specified image file are
registered in the combo box.
Preview - - - Displays the sample of the selected shape.
OK button - - - Closes the dialog box and adds the selected
shape to the image file.
× button - - - Closes the dialog box.

When you select an image file and shape and select [OK], the shape is added to the file selected in the image file
list.
If there are any errors, an error dialog box appears when you select the image file or shape.
For the messages in the error dialog box, refer to "Table 3.2.1.3 (b) List of Error Messages That May Appear at
Shape Selection."

Table 3.2.1.3 (b) List of Error Messages That May Appear at Shape Selection
Cause Timing Message
The image file is opened using When [OK] is selected Failed to add the shape.
an external editor or other tool.
You tried to add a shape though When [Entry...] is selected No more shapes can be
there were already 255 shapes. from [Shape operations] added.

3.2.1.4 Deleting a shape

When you select an image file in the image file list, select a shape in the shape list, and select [Shape
operations] > [Delete] from the menu, the deletion confirmation dialog box appears.
You can also display the deletion confirmation dialog box by pressing the <DEL> key instead of using the
menu.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 130/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

When you select [OK] in the deletion confirmation dialog box, the selected shape is deleted from the image file.
If you try to delete a shape from the file opened using an external editor, the deletion error dialog box appears.
For the messages in the error dialog box, refer to "Table 3.2.1.4 (a) List of Messages That May Appear at File
Deletion."

Fig. 3.2.1.4 (a) Deletion Confirmation Dialog Box

Fig. 3.2.1.4 (b) Deletion Error Dialog Box

Table 3.2.1.4 (a) List of Messages at File Deletion


Cause Timing Message
The image file is opened using an When [OK] is selected The currently edited shape
external editor or other tool. cannot be deleted.

3.2.1.5 Editing a shape

When you select an image file in the image file list, select a shape in the shape list, and select [Shape
operations] > [Edit] from the menu, the shapes in the selected image file are displayed in the image file edit
screen.
You can also display a shape in the selected image file on the image file edit screen by double-clicking it in the
shape list instead of using the menu.

Double-clicking a listed shape displays the shape in the selected image file on the image file edit screen.
Double-clicking a shape preview in the [Control Properties] window on the FANUC PICTURE side also
displays the image file edit screen.

Table 3.2.1.5 (a) List of Messages That May Appear at Shape Editing
Cause Timing Message
The edit tool failed to start. When [Edit] is selected from The edit tool failed to start.
[Shape operations]

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 131/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.1.6 Copying a shape

When you select an image file in the image file list, select a shape in the shape list, and select [Shape
operations] > [Copy] from the menu, the [Make copied shape] dialog box appears.
When you enter a shape name and select [OK], the selected shape is saved under the entered shape name.
You can also make a copy by selecting a shape, pressing the <Ctrl> + <C> keys, and then pressing the <Ctrl> +
<V> keys.

Fig. 3.2.1.6 (a) [Make copied shape] Dialog Box

Table 3.2.1.6 (a) List of Items in the [Make copied shape] Dialog Box
Setting item Entry type Specification Initial value Note
Shape Name User entry Arbitrary (up to Blank Enter a name for the shape you want to copy.
200 characters)
OK button - - - The shape in the selected image file is saved under
the entered shape name.
× button - - - Closes the dialog box.

When you enter a shape name and select [OK] in the [Make copied shape] dialog box, the selected shape is
copied and saved under the entered shape name.
When you select [OK], the shape name is checked. If there are any errors, an error dialog box appears. For the
messages in the error dialog box, refer to "Table 3.2.1.6 (b) List of Error Messages That May Appear at Shape
Name Check."

Table 3.2.1.6 (b) List of Error Messages that may appear at Shape Name Check
Cause Timing Message
The shape name contains When [OK] is selected The shape name contains
characters that cannot be unsupported characters.
used in the file name. (Refer to "Table 3.1.1.2 (c)
Restrictions on Shape Names.")
The image file is opened When [OK] is selected The currently edited shape cannot
using an external editor or be copied.
other tool.
You tried to add a shape When [Copy] is selected from No more shapes can be added.
though there were already [Shape operations]
255 shapes.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 132/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.1.7 Menu bar and toolbar

The menu bar on the [Image File List] screen is shown below.

Fig. 3.2.1.7 (a) Menu Bar on the [Image File List] Screen

The menu configuration is shown in "Table 3.2.1.7 (a) List of Functions on the Menu Bar."

Table 3.2.1.7 (a) List of Functions on the Menu Bar


Parent menu item
Description
Child menu item
File
New - Opens the [Make new file] dialog box. When you enter a file name and select
[OK], an image file is created under the entered file name.
Entry - Opens the file selection dialog box. When you select a file and select [Open],
the external image file is added.
Delete - Deletes the selected image file.
Copy - Opens the [Make copied shape] dialog box. When you enter a file name and
select [OK], the selected image file is saved under the entered file name.
Close - Closes the [Image File List] screen.
Shape operations
New - Opens the [Make new shape] dialog box. When you enter a shape name and
select [OK], the image file edit screen appears.
Entry - Opens the [Select additional shape] dialog box. When you select an image file
and shape and select [OK], the shape is added to the selected image file.
Delete - Deletes the shape from the selected image file.
Edit - Displays the shape in the selected image file on the image file edit screen.
Double-clicking a listed shape also displays the shape in the selected image
file on the image file edit screen.
Copy - Opens the [Make copied shape] dialog box. When you enter a shape name
and select [OK], the shape selected in the list is saved under the entered
shape name.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 133/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.1.8 Creating a file

Selecting [File] > [New...] from the menu on the [Image File List] screen opens the [Make new file] dialog box.
For the items in the [Make new file] dialog box, refer to "Table 3.2.1.8 (a) List of Items in the [Make new file]
Dialog Box."

Fig. 3.2.1.8 (a) [Make new file] Dialog Box

Table 3.2.1.8 (a) List of Items in the [Make new file] Dialog Box
Setting item Entry type Specification Initial value Note
File name User entry Arbitrary (up to Blank Enter a name for the image file you want to create.
59 characters)
OK button - - - Closes the dialog box and creates an image file
under the entered file name.
× button - - - Closes the dialog box.

When you enter an image file name in the [Make new file] dialog box and select [OK], an image file is created
under the entered file name.
When you select [OK], the image file name is checked. If there are any errors, an error dialog box appears. For
the messages in the error dialog box, refer to "Table 3.2.1.8 (b) List of Error Messages That May Appear at
Image File Name Check."

Table 3.2.1.8 (b) List of Error Messages that may appear at Image File Name Check
Cause Timing Message
The image file name is the same When [OK] is selected The file name the same as the
as an already registered file name. image file name exists.
The image file name contains When [OK] is selected The image file name contains
characters that cannot be used in unsupported characters.
the file name. (Refer to "Table 3.2.1.8 (c)
Restrictions on Image File Names.")
The image file name including the When [OK] is selected The image file name including the
path exceeds 256 characters. path exceeds 256 characters.
The number of image files When [New...] is selected No more files can be added.
exceeds 1000. from [File]

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 134/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Characters prohibited for use in image file names


The following restrictions apply to the image file name.

Table 3.2.1.8 (c) Restrictions on Image File Names


Item Description
2-byte characters Can be used
Prohibited characters The following characters (single-byte) cannot be used.
¥ / : * ? ”< > |

3.2.1.9 Adding a file

Selecting [File] > [Entry...] from the menu on the [Image File List] screen opens the file selection dialog box.

Fig. 3.2.1.9 (a) File Selection Dialog Box

File selection dialog box


For information on how to add an image file, refer to "Table 3.2.1.9 (a) List of Addition Operations."
If you click [Cancel] or [x], the file will not be added and you will return to the [Image File List] screen.
You can only select one file in the file selection dialog box.

Table 3.2.1.9 (a) List of Addition Operations


Type of the file that can be added Operation
A file with a .fig extension An image file is registered in the project. The added file is added to
[Image File List].
A file with an extension other than .fig An error dialog box appears. For details about errors, refer to "Table
3.2.1.9 (b) List of Messages That May Appear at Addition."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 135/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.2.1.9 (b) Example of the Error Dialog Box

Errors
When you select [OK] in an error dialog box, the file will not be added and you will return to the [Image File
List] screen.
For the messages in the error dialog box, refer to "Table 3.2.1.9 (b) List of Messages That May Appear at
Addition."

Table 3.2.1.9 (b) List of Messages That May Appear at Addition


Cause Timing Message
The number of image files exceeds 1000. When [Entry...] is selected from [File] No more files can be added.
The image file name exceeds 59 When [OK] is selected The image file name exceeds 59
characters. characters.
The image file name including the path When [OK] is selected The image file name including the
exceeds 256 characters. path exceeds 256 characters.
The selected file is not an image file. When [OK] is selected Select an image file.
Copy of an image file is failed. When [OK] is selected Addition of an image file is failed.

3.2.1.10 Deleting a file

When you select an image file in the list on the [Image File List] screen and select [File] > [Delete] from the
menu, the deletion confirmation dialog box appears.
When you select [OK] in the deletion confirmation dialog box, the selected image file is deleted.
If you try to delete a file opened using an external editor, the deletion error dialog box appears. For the messages
in the error dialog box, refer to "Table 3.2.1.10 (a) List of Messages That May Appear at File Deletion."

Fig. 3.2.1.10 (a) Deletion Confirmation Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 136/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.2.1.10 (b) Deletion Error Dialog Box

Table 3.2.1.10 (a) List of Messages at File Deletion


Cause Timing Message
The image file is opened using an When [OK] is selected Failed to delete the image file.
external editor or other tool.

3.2.1.11 Copying a file

When you select an image file in the list on the [Image File List] screen and select [File] > [Copy] from the
menu, the [Make copied shape] dialog box appears.
When you enter a file name and select [OK], the selected image file is saved under the entered file name.

Fig. 3.2.1.11 (a) [Make copied shape] Dialog Box

Table 3.2.1.11 (a) List of Items in the [Make copied shape] Dialog Box
Setting item Entry type Specification Initial value Note
File name User entry Arbitrary (up to Blank Enter a name for the image file you want to copy.
59 characters)
OK button - - - Saves the selected image file under the entered file
name.
× button - - - Closes the dialog box.

When you enter an image file name in the [Make copied shape] dialog box and select [OK], the selected image
file is saved under the entered file name.
When you select [OK], the image file name is checked. If there are any errors, an error dialog box appears.
For the messages in the error dialog box, refer to "Table 3.2.1.11 (b) List of Error Messages That May Appear at
Image File Name Check."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 137/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 3.2.1.11 (b) List of Error Messages That May Appear at Image File Name Check
Cause Timing Message
The image file name is the When [OK] is selected The file name the same as the
same as an already image file name exists.
registered file name.
The image file name contains When [OK] is selected The image file name contains
characters that cannot be unsupported characters.
used in the file name. (Refer to "Table 3.1.1.8 (c)
Restrictions on Image File Names.")
The number of image files When [Copy] is selected from No more files can be added.
exceeds 1000. [File]
The image file name including When [OK] is selected The image file name including the
the path exceeds 256 path exceeds 256 characters.
characters.
Copy of an image file is failed. When [OK] is selected Failed to copy the image file.

3.2.2 Image File Edit Screen

The image file edit screen to edit control image files is added.

The configuration of the image file edit screen is shown in "Table 3.2.2 (a) Configuration List of the Image File
Edit Screen."
You can change whether to display the toolbar, control bar, configuration tree, or properties on the screen and
their display positions.

Table 3.2.2 (a) Configuration List of the Image File Edit Screen
Function Description
Menu bar The file, edit, and display menus are displayed for each function.
Toolbar The icons for some functions on the menu bar are displayed.
Control bar The icons for controls are displayed.
Configuration tree The commands making up the shape are displayed in the tree view.
Drawing area A control is displayed according to the commands.
Properties Used to display and specify detailed control settings.

3.2.2.1 Startup of the image file edit screen

When editing image file is selected, this screen starts up.If the shape you want to edit contains errors, an error
dialog box appears at the time of starting this screen
For the messages on the error screen, refer to "Table 3.2.2.1 (a) List of Error Messages That May Appear at
Startup."

Table 3.2.2.1 (a) List of Error Messages That May Appear at Startup
Cause Timing Message
The selected shape contains When the Image File Editor is The processing is aborted because the
uneditable commands or started target shape contains commands out of
properties. the target or format errors.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 138/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.2.2 Menu bar and toolbar

The menu bar and toolbar are displayed at the top of the image file edit screen.
The icons for some functions on the menu bar are displayed on the toolbar.

Fig. 3.2.2.2 (a) Menu Bar

Each configuration is shown in "Table 3.2.2.2 (b) List of Functions on the Menu Bar."

If there are any errors, an error dialog box appears when [File] > [Save] is selected from the menu on the image
file edit screen or when [OK] is selected in the save confirmation dialog box.
For the messages in the error dialog box, refer to "Table 3.2.2.2 (a) List of Error Messages That May Appear at
Saving."

Table 3.2.2.2 (a) List of Error Messages That May Appear at Saving
Cause Timing Message
The coordinate parameter When you try to save the The parameter contains an error
contains an error value. parameter value and cannot be saved.

Table 3.2.2.2 (b) List of Functions on the Menu Bar


Parent menu item
Child menu item Toolbar
Description
Grandchild Icon
menu item
File
Save - Saves currently edited data to a file.
If the parameter contains an error value, the error message appears.
End - Closes the image file edit screen.
Edit
Undo - Goes back before the last operation.
Redo - Restores the status before editing.
Cut - Cuts the currently selected control.
Copy - Copies the currently selected control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 139/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Parent menu item


Child menu item Toolbar
Description
Grandchild Icon
menu item
Paste - Pastes the cut or copied control.
Delete - Deletes the currently selected control.
Insert - Opens the [Select additional shape] dialog box.
(Refer to "[Select additional shape] dialog box.")
Align
Align the left - Aligns the left side of each selected control rectangle to the left position
sides of the reference control.
Align the right - Aligns the right side of each selected control rectangle to the right
sides position of the reference control.
Horizontal - Aligns the horizontal center of each selected control rectangle to the
centering horizontal center of the reference control.
Vertical - Aligns the vertical center of each selected control rectangle to the
centering vertical center of the reference control.
Align the top - Aligns the top side of each selected control rectangle to the top side of
sides the reference control.
Align the bottom - Aligns the bottom side of each selected control rectangle to the bottom
sides side of the reference control.
Horizontally - Changes the display positions of each selected control rectangle so that
evenly align they have the same horizontal interval.
Vertically evenly - Changes the display positions of each selected control rectangle so that
align they have the same vertical interval.
Match width - Matches the width of each selected control rectangle to that of the
reference control.
Match height - Matches the height of each selected control rectangle to that of the
reference control.
Order
Foreground - Moves the overlapping display of each selected control to the forefront
(the top layer).
Background - Moves the overlapping display of each selected control to the
background (the bottom layer).
Front - Moves the overlapping display of each selected control to frontward (an
upper layer).
Back - Moves the overlapping display of each selected control to backward (a
lower layer).
Display
Toolbar - Displays/hides the toolbar.
Control bar - Displays/hides the control toolbar.
Configuration tree - Displays/hides the configuration tree.
List editor - Displays/hides the list editor.
Grid - Displays/hides the grid.
Zoom - Opens the zoom dialog box.
- Specify the display magnification.

[Select additional shape] dialog box


Selecting [Insert] on the menu bar or toolbar opens the [Select additional shape] dialog box.
For the items in the [Select additional shape] dialog box, refer to "Table 3.2.2.2 (c) List of Items in the [Select
additional shape] Dialog Box."
[Shape] and [OK] cannot be selected unless an image file is selected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 140/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.2.2.2 (b) [Select additional shape] Dialog Box

Table 3.2.2.2 (c) List of Items in the [Select additional shape] Dialog Box
Setting item Entry type Specification Initial value Note
ImageFile - - Blank Displays the full path of the selected image file.
Image file selection - - - Selecting […] opens the file selection dialog box.
Shape Selection - First shape The shapes in the specified image file are
registered in the combo box.
Preview - - - Displays the sample of the selected shape.
OK button - - - Closes the dialog box and updates the
configuration tree and drawing area.
× button - - - Closes the dialog box.

When you select a shape and select [OK], the shape in the image file is registered and the configuration tree
and drawing area are updated.
If there are any errors, an error dialog box appears when you select [OK]. For the messages in the error dialog
box, refer to "Table 3.2.2.2 (d) List of Error Messages That May Appear at Added Shape Selection."

Table 3.2.2.2 (d) List of Error Messages That May Appear at Added Shape Selection
Cause Timing Message
The selected shape contains When [OK] is selected The shape could not be inserted
uneditable commands. because the target shape contains
commands out of the target or
format errors.

3.2.2.3 Control bar

The control bar is displayed at the top of the image file edit screen.
The icons for available functions are displayed on the control bar.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 141/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.2.2.3 (a) Toolbar

The functions of the icons on the control bar are shown in "Table 3.2.2.3 (a) List of Functions on the Control
Bar."

Table 3.2.2.3 (a) List of Functions on the Control Bar


Display Command Standard iHMI Function
monitor mode
mode
L Yes Yes Draws a straight line.
C2 Yes Yes Draws an ellipse (not filled).
C Yes Yes Draws a circle (not filled).
A Yes Yes Draws an arc or fan shape (not filled).
R Yes Yes Draws a rectangle (not filled).
R2 Yes Yes Draws a rectangle (not filled, line thickness specified).
O No Yes Draws a rectangle with round corners (not filled).
I No Yes Draws a PNG image (without color specification).
c2 Yes Yes Draws an ellipse (filled).
c Yes Yes Draws a circle (filled).
a Yes Yes Draws an arc or fan shape (filled).
r Yes Yes Draws a rectangle (filled).
r2 Yes Yes Draws a rectangle (filled, line thickness specified).
Og No Yes Draws a rectangle with round corners (filled).
Yg No Yes Draws a rectangle without corners (filled).
Im No Yes Draws a PNG image (with color specification).
P Yes No Fill
rb Yes Yes Rectangle for radio button and check box (filled)

Select the control icon you want to draw and draw it in the drawing area.
After drawing, the configuration tree and property list are updated.
When using the P (Fill) command, the color pallet appears when you select the drawing position.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 142/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.2.4 Configuration tree


The configuration tree is displayed in the left part of the image file edit screen.
The configuration tree displays the controls drawn in the drawing area in tree format.

Fig. 3.2.2.4 (a) Configuration Tree

The controls in the drawing area are displayed in the drawing order regarding the selected shape name as the
parent node. (The top is the back side.)
When you select a child node, the relevant control is selected and the property list is updated.
Right-clicking a node displays a menu. For details about menus, refer to "Table 3.2.2.4 (a) List of Menus in the
Configuration Tree."
If you move or delete a child node, the drawing area is updated.

When you select [Insert comment] or [Edit comment], the [Enter comment] dialog box appears.
A comment is inserted on the selected control. [Edit comment] cannot be selected when you select an item other
than the comment.

Multiple items cannot be selected in the configuration tree.

Table 3.2.2.4 (a) List of Menus in the Configuration Tree


Item Function
To foreground Moves the currently selected child node to the foreground.
To background Moves the currently selected child node to the background.
To front Moves the currently selected child node to frontward.
To back Moves the currently selected child node to backward.
Insert comment Inserts a comment (not displayed in the drawing area).
Edit comment Edits a comment (not displayed in the drawing area).
Delete Deletes the currently selected child node.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 143/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Enter comment] dialog box


When you select [Insert comment] or [Edit comment] in the configuration tree, the [Enter comment] dialog box
appears.
For the items in the [Enter comment] dialog box, refer to "Table 3.2.2.4 (b) List of Items in the [Enter comment]
Dialog Box."
[OK] cannot be selected unless a comment is not entered.

Fig. 3.2.2.4 (b) [Enter comment] Dialog Box

Table 3.2.2.4 (b) List of the Items in the [Enter comment] Dialog Box
Setting item Entry type Specification Initial value Note
Comment User entry Arbitrary Blank Enter a comment.
The maximum number of characters you can enter is 199.
OK button - - - Closes the dialog box and updates the configuration tree.
× button - - - Closes the dialog box.

When you enter a comment in the [Enter comment] dialog box and select [OK], the entered comment is
registered in the configuration tree and the configuration tree is updated.
The comment is checked when you select [OK]. If there are any errors, an error dialog box appears.
For the messages in the error dialog box, refer to "Table 3.2.2.4 (c) List of Error Messages That May Appear at
Comment Check."

Table 3.2.2.4 (c) List of Error Messages That May Appear at Comment Check
Cause Timing Message
You tried to register a comment that When [OK] is selected The comment can contain up
contains 200 or more characters. to 199 characters.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 144/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.2.5 Drawing area

The center part of the image file edit screen is the drawing area.
In the drawing area, the controls selected on the control bar are drawn.
The controls are drawn according to the order in the configuration tree.

Fig. 3.2.2.5 (a) Drawing Area

Select the control you want to draw from the control bar and draw it, adjusting the drawing size by dragging.
You can select the drawn control by clicking it to adjust the position or size.
When you select a control, the property list in the right part of the screen is updated.

Right-clicking in the drawing area displays a menu. The menu items in the drawing area are shown in "Table
3.2.2.5 (a) List of Menus in the Drawing Area."
When you perform an operation such as addition, deletion, resizing or reposition of control or relocation
between levels, the configuration tree and property list are updated.

Table 3.2.2.5 (a) List of Menus in the Drawing Area


Major item Minor item Function
Copy - Copies the currently selected control.
Paste - Pastes the copied or cut control.
Cut - Cuts the currently selected control.
Delete - Deletes the currently selected control.
To foreground Moves the currently selected control to the foreground.
To background Moves the currently selected control to the background.
Order
To front Moves the currently selected control to frontward.
To back Moves the currently selected control to backward.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 145/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.2.2.6 Property list

The property list is displayed in the right part of the image file edit screen.
The property list displays the properties of the selected control.

Fig. 3.2.2.6 (a) Property List

[Property] displays the setting values related to the currently selected control.
The displayed setting items differ depending on the control.
The setting items are shown in "Table 3.2.2.6 (a) List of Line Figure Commands" and "Table 3.2.2.6 (b) List of
Surface Figure Commands."
*The setting value between parentheses is the value without scaling.

Table 3.2.2.6 (a) List of Line Figure Commands


Command
Item Specification Function
L R R2 A C C2 I O
Yes Yes Yes Yes Left top Specify the reference point for
Right top specifying dot coordinates at the
Start reference point
Bottom right start point.
Bottom left
Yes Yes Yes Left top Specify the reference point for
Right top specifying dot coordinates.
Reference point
Bottom right
Bottom left
X-coordinate of start Yes Yes Yes Yes Specified Specify whether to use scaling at
point - coordinates Not specified the X-coordinate of the start point.
specification
Yes Yes Yes Yes 0 to X-coordinate of Specify the X-coordinate of the
X-coordinate of start end point drawing start point.
point *For L, 0 to 10000
(500)
Y-coordinate of start Yes Yes Yes Yes Specified Specify whether to use scaling at
point - coordinates Not specified the Y-coordinate of the start point.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 146/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Command
Item Specification Function
L R R2 A C C2 I O
specification
Yes Yes Yes Yes 0 to Y-coordinate of Specify the Y-coordinate of the
Y-coordinate of start end point drawing start point.
point *For L, 0 to 10000
(500)
Yes Yes Yes Yes Left top Specify the reference point for
Right top specifying dot coordinates at the
End reference point
Bottom right end point.
Bottom left
X-coordinate of end Yes Yes Yes Yes Specified Specify whether to use scaling at
point - coordinates Not specified the X-coordinate of the end point.
specification
Yes Yes Yes Yes X-coordinate of Specify the X-coordinate of the
start point to 10000 drawing end point.
X-coordinate of end
(500)
point
*For L, 0 to 10000
(500)
Y-coordinate of end Yes Yes Yes Yes Specified Specify whether to use scaling at
point - coordinates Not specified the Y-coordinate of the end point.
specification
Yes Yes Yes Yes Y-coordinate of Specify the Y-coordinate of the
start point to 10000 drawing end point.
Y-coordinate of end
(500)
point
*For L, 0 to 10000
(500)
X-coordinate of Yes Yes Yes Specified Specify whether to use scaling at
center - coordinates Not specified the X-coordinate of the center.
specification
X-coordinate of Yes Yes Yes 0 to 10000 (500) Specify the X-coordinate of the
center center.
Y-coordinate of Yes Yes Yes Specified Specify whether to use scaling at
center - coordinates Not specified the Y-coordinate of the center.
specification
Y-coordinate of center Yes Yes Yes 0 to 10000 (500) Specify the Y-coordinate of the center.
Radius - coordinates Yes Yes Specified Specify whether to use the circle
specification Not specified radius scaling.
Yes Yes 0 to 5000 (250) Specify the radius of circle.
Radius *For A, 0 to 10000
(500)
Radius in the Yes Yes Specified Specify whether to use the scaling
horizontal direction - Not specified for the radius in the horizontal
coordinates direction.
specification
Yes Yes 0 to 5000 (250) Specify the radius in the lateral
Radius in the *For O, 0 to direction.
horizontal direction X-coordinate of the
end point
Radius in the vertical Yes Yes Specified Specify whether to use the scaling
direction - coordinates Not specified for the radius in the vertical
specification direction.
Radius in the Yes Yes 0 to 5000 (250) Specify the deformation in the

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 147/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Command
Item Specification Function
L R R2 A C C2 I O
vertical direction *For O, 0 to longitudinal direction.
coordinate of the
end point
Yes None Subtracts 1 from the coordinates of
Top section the start and end points according
Border adjustment Bottom section to the setting value.
Left section
Right section
Start angle Yes 0 to 3600 Specify the start angle.
End angle Yes 0 to 3600 Specify the end angle.
Yes ON Prevents collapse of round corners
Arc equivalence flag
OFF due to the control form.
Yes Fixed Fits the image display to the
Expansion/contracti
Expanded/ rectangle.
on mode
contracted
Yes File selection Specify the name of the image file
dialog box you want to display.
*Files that contain spaces are not
File name
displayed.
*The files must be saved in
FigureEx¥img.
Yes Yes Yes Yes Yes Solid line Specify the type of the line you want
Broken line to draw.
Dotted line
Line type
Dashed-dotted line
Dashed-two dotted
line
Line color Yes Yes Yes Yes Yes Yes Color pallet Specify the line color.
Yes Yes Yes Yes Yes Yes none Specify the name of the property of
BackColor which line color you want to
BorderColor replace.
Properties BorderColor1
BorderColor2
MainColor
NAColor
Width Yes 1 to 500 Specify the border width in dots.
Line color 1 Yes Color pallet Specify the color.
Line color 2 Yes Color pallet Specify the color.
Yes none Specify the name of the property of
BackColor which line color 1 you want to
BorderColor replace.
Property 1 BorderColor1
BorderColor2
MainColor
NAColor
Yes none Specify the name of the property of
BackColor which line color 2 you want to
BorderColor replace.
Property 2
BorderColor1
BorderColor2
MainColor

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 148/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Command
Item Specification Function
L R R2 A C C2 I O
NAColor

Table 3.2.2.6 (b) List of Surface Figure Commands


Command
Item Specification Function
r r2 a c c2 Yg Im O rb P
Yes Yes Yes Yes Left top Specify the reference point for
Start reference Right top specifying dot coordinates at
point Bottom right the start point.
Bottom left
Yes Yes Yes Yes Left top Specify the reference point for
Right top specifying dot coordinates.
Reference point
Bottom right
Bottom left
X-coordinate - Yes Specified Specify whether to use
coordinates Not specified scaling at the X-coordinate.
specification
X-coordinate Yes 0 to 10000 (500) Specify the X-coordinate.
X-coordinate of Yes Yes Yes Yes Specified Specify whether to use
start point - Not specified scaling at the X-coordinate of
coordinates the start point.
specification
X-coordinate of Yes Yes Yes Yes 0 to X-coordinate of Specify the X-coordinate of
start point end point the drawing start point.
Y-coordinate - Yes Specified Specify whether to use
coordinates Not specified scaling at the Y-coordinate.
specification
Y-coordinate Yes 0 to 10000 (500) Specify the Y-coordinate.
Y-coordinate of Yes Yes Yes Yes 0 to Y-coordinate of Specify the Y-coordinate of
start point end point the drawing start point.
Yes Yes Yes Yes Left top Specify the reference point for
End reference Right top specifying dot coordinates at
point Bottom right the end point.
Bottom left
X-coordinate of Yes Yes Yes Yes Specified Specify whether to use
end point - Not specified scaling at the X-coordinate of
coordinates the end point.
specification
X-coordinate of Yes Yes Yes Yes X-coordinate of start Specify the X-coordinate of
end point point to 10000 (500) the drawing end point.
Y-coordinate of Yes Yes Yes Yes Specified Specify whether to use
end point - Not specified scaling at the Y-coordinate of
coordinates the end point.
specification
Y-coordinate of Yes Yes Yes Yes Y-coordinate of start Specify the Y-coordinate of
end point point to 10000 (500) the drawing end point.
X-coordinate of Yes Yes Yes Specified Specify whether to use
center - Not specified scaling at the X-coordinate of
coordinates the center.
specification
X-coordinate of Yes Yes Yes 0 to 10000 (500) Specify the X-coordinate of
center the center.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 149/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Command
Item Specification Function
r r2 a c c2 Yg Im O rb P
Y-coordinate of Yes Yes Yes Specified Specify whether to use
center - Not specified scaling at the Y-coordinate of
coordinates the center.
specification
Y-coordinate of Yes Yes Yes 0 to 10000 (500) Specify the Y-coordinate of
center the center.
Radius - Yes Yes Specified Specify whether to use the
coordinates Not specified circle radius scaling.
specification
Yes Yes 0 to 5000 (250) Specify the radius of circle.
Radius *For a, 0 to 10000
(500)
Radius in the Yes Yes Yes Specified Specify whether to use the
horizontal Not specified scaling for the radius in the
direction - horizontal direction.
coordinates
specification
Yes Yes Yes 0 to 5000 (250) Specify the radius in the
Radius in the
*For Yg and O, 0 to lateral direction.
horizontal
X-coordinate of the
direction
end point
Radius in the Yes Yes Yes Specified Specify whether to use the
vertical direction Not specified scaling for the radius in the
- coordinates horizontal direction.
specification
Yes Yes Yes 0 to 5000 (250) Specify the deformation in the
Radius in the *For Yg and O, 0 to longitudinal direction.
vertical direction Y-coordinate of the
end point
Start angle Yes 0 to 3600 Specify the start angle.
End angle Yes 0 to 3600 Specify the end angle.
Arc equivalence Yes ON Prevents collapse of round
flag OFF corners due to the control form.
Expansion/ Yes Fixed Fits the image display to the
contraction mode Expanded/contracted rectangle.
Yes File selection dialog Specify the name of the
box image file you want to display.
*Files that contain spaces are
File name
not displayed.
*The files must be saved in
FigureEx¥img.
Yes 1 to 250 Specify the border width in
Width
dots.
Yes Yes Specify whether there is the
Left top
None corner at the left top.
Yes Yes Specify whether there is the
Right top
None corner at the right top.
Yes Yes Specify whether there is the
Bottom left
None corner at the bottom left.
Yes Yes Specify whether there is the
Bottom right
None corner at the bottom right.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 150/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Command
Item Specification Function
r r2 a c c2 Yg Im O rb P
Border Color Yes Color pallet Specify the color.
Surface color Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Color pallet Specify the color.
Yes Yes Yes Yes Yes Yes Yes Yes Yes none Specify the name of the
BackColor property of which surface
BorderColor color you want to replace.
Properties BorderColor1
BorderColor2
MainColor
NAColor
Yes Yes Yes Yes Yes Yes Specify whether to use
Gradation
None gradation.
X-coordinate of Yes Yes Specified Specify whether to use
gradation start Not specified scaling at the X-coordinate of
point - coordinates the gradation start point.
specification
X-coordinate of Yes Yes Left end to right end Specify the X-coordinate of
gradation start of circle the gradation start point.
point
Y-coordinate of Yes Yes Specified Specify whether to use
gradation start Not specified scaling at the Y-coordinate of
point - coordinates the gradation start point.
specification
Y-coordinate of Yes Yes Top end to bottom Specify the Y-coordinate of
gradation start end of circle the gradation start point.
point
Yes Yes Yes Yes Yes Yes Top down Specify the gradation pattern.
Left to right
Left top to bottom
Pattern right
Right top to bottom
left
Fill
Brightness at the Yes Yes Yes Yes Yes Yes 0 to 100 Specify the starting
start point concentration of the gradation.
Brightness at the Yes Yes Yes Yes Yes Yes 0 to 100 Specify the ending
end point concentration of the gradation.

When you click the following value columns, the color pallet is displayed:
Line color, line color 1, line color 2, surface color, and border color
In the following value columns, the pull-down menu displays options.
Start reference point, end reference point, reference point, each type of coordinates specification item,
border adjustment, line orientation, arc equivalence flag, expansion/contraction mode, line type, property,
property 1, property 2, left top, right top, bottom left, bottom right, and gradation
In the following value columns, the file selection dialog box appears.
File name
If an invalid value is entered, the value is returned to the value before entry.
[Fill], a setting value in [Pattern], only applies to commands c and c2.
The horizontal direction radius and vertical direction radius of the Yg and O commands are automatically
adjusted to the maximum size of rectangle.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 151/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.3 IMPROVEMENT OF PROPERTY SETTING OF FP CONTROL

3.3.1 Display of Setting Value Names

3.3.1.1 Function

As on the property setting screen, the setting value in the property list is displayed as the name.
Select the value for the item whose name is displayed list from the pull-down menu.

3.3.1.2 Relevant items

The following items are relevant:


- Check box
- Pull-down menu
- Radio button

3.3.1.3 Diagram

An example of multiple relevant items is shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 152/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 3.3.1.3 (a) Display Image of Relevant Items and Corresponding Setting Values in the Property List

Fig. 3.3.1.3 (b) Image of Changing the Value of a Name Display Item in the Pull-down Menu

3.3.1.4 Operation

This section describes the display operation in the property list for each relevant item on the property setting
screen.

■ Display operation of each relevant item


- Check box: "OFF" is displayed when the check box is cleared. "ON" is displayed when the check box is
selected.
- Pull-down menu: The name of the selected item is displayed as is as the setting value in the property list.
- Radio button: The name of the selected item is displayed as is as the setting value in the property list.

3.3.2 Changing FP Control Property from a Ruby Script

3.3.2.1 Function

You can change property values of FP control from a Ruby script. You can also view or operate the state of
controls from a Ruby script.
- For the relevant items, refer to "Table 3.3.2.3 (h) List of Property Change Operation Names."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 153/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.3.2.2 Operation

Changes to the settings of each control are reflected when the control is redrawn at the drawing cycle after the
Ruby script operation ends.

NOTE
1 In FANUC PICTURE 8.0 or later (iHMI version), all characters in the rectangle are
deleted when redrawing the control to enable caption change. Therefore, if
control overlaps, the caption may not be displayed depending on the placement
order. In that case, place the control with the caption on the front.
2 In standard display, changing the character control's properties changes the
background color of the character control to the screen background color.
3 If you change the properties of "text color" or "background color" with the focus on
the radio button and check box, the display will be temporarily without focus.
4 Do not change the property for color when setting "Use 7 colors" by Lamp,
Number or string, Number entry display, and Numeric keypad entry.

3.3.2.3 Function

This section describes the specifications of FP function for setting the properties.

[Function]
FpSetProperty

[Syntax with arguments]


FpSetProperty(scrn_no, objname,ope_no, setstr, index)

[Arguments]
This function has the following arguments.

Table 3.3.2.3 (a) Arguments of the FpSetProperty Function


Name Type Description
scrn_no Numerical Screen No. (1 to N)
value
objname String Object ID
ope_no Reserved Operation No. (Refer to *1 in "Table 3.3.2.3 (h) List of Property Change Operation Names.")
word
setstr String Setting value (Refer to *2 in "Table 3.3.2.3 (h) List of Property Change Operation Names.")
index Numerical Index
value 0-N: When adding an element (specifying an index)/deleting an element
(specifying an index)
Fixed to 0: Other than above.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 154/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Returns]
This function has the following return values.

Table 3.3.2.3 (b) Value to Be Stored in the Return Value of the FpSetProperty Function
Type Description
Numerical Result
value For details, refer to "Table 3.3.2.3 (c) Details of Result."

Table 3.3.2.3 (c) Details of Result


Value Description
0 Normal
-1 Invalid screen No. (The specified screen does not exist.)
-2 Invalid object ID (The object ID name is invalid.)
-3 No relevant object ID (The object ID does not contain the specified component.)
-4 Invalid operation No. (The specified operation No. is out of the operation No. range in "Table
3.3.2.3 (h) List of Property Change Operation Names.")
-5 Operation not allowed (The operation of the specified operation No. is out of the control operation
target.)
-6 Invalid setting value (At the time of setting only. The setting value is invalid.)
-7 Invalid index (At the time of setting only. The index is out of the range.)
-9 The list box does not contain options.
-10 Acquisition impossible. (At the time of acquisition only. The value cannot be acquired when the
status is disabled or the disable signal is received.)
-11 Other error
-12 It was failed to reserve the memory area.
However, the properties of the control cannot be changed from the script when it is disabled, when the
disable signal is ON for it or when it is interlocked.

[Description]
Changes the property of the specified control.

[Example]
When specifying the ON caption text on Button 1 on Screen 1
ret = FpSetProperty( 1, “FPButton1”, SET_ONCAPTION, “New button name”, 0 )

- This section describes the specifications of the functions for acquiring the properties added as FP functions.

[Function]
FpGetPropertyValue

[Syntax with arguments]


FpGetPropertyValue(scrn_no, objname,ope_no)

[Arguments]
This function has the following arguments.

Table 3.3.2.3 (d) Arguments of the FpGetPropertyValue Function


Name Type Description
scrn_no Numerical Screen No. (1 to N)
value
objname String Object ID or radio button group No. (String in the fixed format RadioGroup[No.])

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 155/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


ope_no Reserved Operation No. (Refer to *1 in "3.3.2.3 (h) List of Property Change Operation
word Names.")

[Returns]
An array that contains n + 1 elements (n: Number of acquired values. 0 in case of error.) is returned as the
return value.
This function has the following return values.

Table 3.3.2.3 (e) Value to Be Stored in the Return Value of the FpGetPropertyValue Function
Element Type Description
1st element Numerical Result
value For details, refer to "Table 3.3.2.3 (c) Details of Result."
2nd and Numerical Acquired value
subsequent value Status of check box/selection status of radio button/index of list box/index of
elements combo box

[Description]
Acquires the status of the specified control in the numerical format.
Only the check box, radio button, list box, or combo box only can be specified.

[Example]
- When acquiring the status of the radio button in Group number 1 on Screen 2
statusList = FpGetPropertyValue( 2, “RadioGroup1”, GET_RADIOSTATE)
if statusList[0] == 0 then
#Any radio button is not selected.
elsif statusList[0] > 0 then
radioState = statusList[1]
else
errcode = statusList[0]
end

- When acquiring the status of Check box 1 on Screen 1


statusList = FpGetPropertyValue( 1, “FPCheckBox1”, GET_CHKSTATE );
if statusList[0] >= 0 then
checkState = statusList[1]
else
errcode = statusList[0]
end

- When acquiring the value selected in List box 1 on Screen 1


statusList = FpGetPropertyValue( 1, “FPListBox1”, GET_SELINDEX );
kosu = statusList[0]
if kosu == 0 then
# Any list box is not selected.
elsif kosu > 0 then
for i in 1 .. kosu do
select = statusList[i]
end
else

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 156/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

errcode = kosu
end

[Function]
FpGetPropertyStr

[Syntax with arguments]


FpGetPropertyStr(scrn_no, objname,ope_no, index)

[Arguments]
This function has the following arguments.

Table 3.3.2.3 (f) Arguments of the FpGetPropertyStr Function


Name Type Description
scrn_no Numerical value Screen No. (1 to N)
axis String Object ID
ope_no Reserved word Operation No. (Refer to *1 in "Table 3.3.2.3 (h) List of Property Change
Operation Names.")
index Numerical value Index of list box or combo box (Fixed to 0 for other controls than the list box
or combo box.)

[Returns]
Details of the return values are as shown below.

Table 3.3.2.3 (g) Value to Be Stored in the Return Value of the FpGetPropertyStr Function
Type Description
String Element string in the list box
The result is set to the first three characters as the string.
For details of the result, refer to "Table 3.3.2.3 (c) Details of Result."
(Example)
When the result is normal, the return value is "000 Element string in the list box."
When the result is the invalid screen No., the return value is "-01."

[Description]
Acquires the setting value of the specified control in the string format.
Only the list box or combo box only can be specified.

[Example]
- When acquiring the string selected in List box 1 on Screen 1
strdata = FpGetPropertyStr( 1, “FPListBox1”, GET_SELSTR, 0 );

Table 3.3.2.3 (h) List of Property Change Operation Names


Operation No. (*1) Operation name Specification (*2) Note
SET_ONCAPTION ON caption setting ON caption text
SET_OFFCAPTION OFF caption setting OFF caption text
SET_CAPTION Caption setting Caption text
SET_ONCAPCOLOR ON text color (focus text color) setting ON text color
SET_OFFCAPCOLOR OFF text color (focus off text color) setting OFF text color
SET_CAPCOLOR Text color setting Text color
SET_ONBKCOLOR On state color setting ON state color
SET_OFFBKCOLOR Off state color setting Off state color

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 157/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Operation No. (*1) Operation name Specification (*2) Note


SET_IMGBKCOLOR Image background color setting Image background
color
ET_BKCOLOR State color setting State Color
SET_BORDER1COLOR Image border color 1 setting Image border color 1
SET_BORDER2COLOR Image border color 2 setting Image border color 2
SET_ONBKCOLOR2 On state color 2 setting ON state color 2
SET_OFFBKCOLOR2 Off state color 2 setting Off state color 2
SET_IMGBKCOLOR2 Image background color 2 setting Image background
color 2
SET_BTNCOLOR Button color setting Button color
SET_BARCOLOR Bar color setting Bar color
SET_MAXVAL Maximum value setting Max. value
SET_MINVAL Minimum value setting Min. value
SET_ADDINDEX Element addition (index specification) Element string
SET_DELINDEX Element deletion (index specification) NULL
GET_CHKSTATE Acquisition of check status - For acquiring properties
(A numerical value is
acquired.)
GET_RADIOSTATE Acquisition of selected control - For acquiring properties
(A numerical value is
acquired.)
GET_SELINDEX Acquisition of selected value (index) - For acquiring properties
(A numerical value is
acquired.)
GET_SELSTR Acquisition of selected value (element - For acquiring properties
string) (A string is acquired.)

Table 3.3.2.3 (i) List of Possible Operations by Control


Control Operation name
Element addition (index specification)
Element deletion (index specification)

Acquisition of selected value (index)


Image background color 2 setting
Image background color setting

Acquisition of selected control

Acquisition of selected value


Image border color 1 setting
Image border color 2 setting

Acquisition of check status


Off state color 2 setting
On state color 2 setting
Maximum value setting
Minimum value setting
OFF text color setting

Off state color setting


On state color setting
ON text color setting

Button color setting


OFF caption setting
ON caption setting

State color setting


Text color setting

Bar color setting

(element string)
Caption setting

Screen switch Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Button Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Framed button Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Button with image Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Lamp Yes Yes No Yes Yes No Yes Yes Yes No Yes Yes No No No No No No No No No No No No No
Lamp with image No No No No No No No No Yes Yes Yes Yes No No No No No No No No No No No No No
Image No No No No No No No No No No No No No No No No No No No No No No No No No
Screen switch
Yes Yes No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
button with image

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 158/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Label Yes No No Yes No No No No Yes No Yes Yes No No No No No No No No No No No No No


Number or string No No No Yes No No No No Yes No Yes Yes No No No No No No No No No No No No No
PMC string No No No Yes Yes No Yes No Yes No Yes Yes No No No No No No No No No No No No No
Number entry
No No No Yes Yes No Yes Yes No No Yes Yes Yes Yes No No No No No No No No No No No
display
Key in No No No Yes No No No No Yes No Yes Yes No No No No No No No No No No No No No
Numeric keypad
No No No Yes Yes No Yes Yes No No Yes Yes Yes Yes No No No No No No No No No No No
entry
MDI key No No No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Keyboard No No No Yes Yes No Yes Yes No No Yes Yes No No No No No No No No No No No No No
Clock No No No Yes No No No No Yes No Yes Yes No No No No No No No No No No No No No
Message No No No No No No No No Yes No Yes Yes No No No No No No No No No No No No No
Text No No No No No No No No Yes No Yes Yes No No No No No No No No No No No No No
Combined
No No No No No No No No Yes No Yes Yes No No No No No No No No No No No No No
message
History message No No No No No No No No Yes No Yes Yes No No No No No No No No No No No No No
Text Yes No No Yes No No No No No No No No No No No No No No No No No No No No No
Meter No No No No No No No No Yes No Yes Yes Yes Yes No No No No No No No No No No No
Graph No No No No No No No No Yes No Yes Yes Yes Yes No No No No No No No No No No No
Line graph No No No No No No No No No No No No Yes Yes No No No No No No No No No No No
Bar graph No No No No No No No No No No No No Yes Yes No No No No No No No No No No No
Pie graph No No No No No No No No No No No No No No No No No No No No No No No No No
Line No No No No No No No No No No Yes No No No No No No No No No No No No No No
Rectangle No No No No No No No No Yes No No No No No No No No No No No No No No No No
Arc No No No No No No No No No No Yes No No No No No No No No No No No No No No
Circle No No No No No No No No Yes No No No No No No No No No No No No No No No No
Ellipse No No No No No No No No Yes No No No No No No No No No No No No No No No No
Radio button No No Yes No No Yes Yes Yes Yes No Yes Yes No No No No No No No No No No Yes No No
Check box No No Yes No No Yes Yes Yes Yes No Yes Yes No No No No No No No No No Yes No No No
List box No No No Yes Yes No Yes Yes No No Yes Yes No No Yes Yes Yes Yes Yes Yes Yes No No Yes Yes
Combo box No No No Yes Yes No Yes Yes No No Yes Yes No No Yes Yes Yes Yes Yes Yes Yes No No Yes Yes
In the table, "Yes" indicates that the operation is possible and "No" indicates that the operation is not possible.

When specifying a color from the Ruby script, use the rgb code. (For example, specify "FF0000" for red. The
color is subtracted to a similar color of 256 colors in the NC machine.)
For changes to the caption, the language string specified with the [Setting value] argument is displayed in the
language code of the multi-language key set on the NC. (Set the language string that corresponds to the
multi-language key at the time of setting on the script.)

NOTE
Number entry with the numerical keypad and the background color for the MDI
key are out of the operation target.

Table 3.3.2.3 (j) Correspondence List of Operation Names


Control Property name on the editor Property change operation name Note
Screen switch ON caption ON caption setting
Button OFF caption OFF caption setting
Framed button ON text color ON text color setting
Button with image OFF text color OFF text color setting
Screen switch button ON state color On state color setting
with image OFF state color Off state color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Image - - N/A
Lamp ON caption ON caption setting

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 159/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Control Property name on the editor Property change operation name Note
OFF caption OFF caption setting
ON text color ON text color setting
OFF text color OFF text color setting
ON state color On state color setting
OFF state color Off state color setting
Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Lamp with image Back Color Image background color setting
State Color State color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Label Caption ON caption setting
Text color ON text color setting
Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Number or string Text color ON text color setting
Key in Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
PMC string Focus text color ON text color setting
OFF text color OFF text color setting
Focus Color On state color setting
Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Number entry display Check text color ON text color setting
Numeric keypad entry OFF text color OFF text color setting
Check state color On state color setting
OFF state color Off state color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Max. value Maximum value setting
Min. value Minimum value setting
MDI key ON text color ON text color setting
Keyboard OFF text color OFF text color setting
ON state color On state color setting
OFF state color Off state color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Clock Text color ON text color setting
Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Message Back Color Image background color setting
Text Border Color1 Image border color 1 setting
Combined message Border Color2 Image border color 2 setting
History message
Text Caption ON caption setting
Text color ON text color setting

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 160/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Control Property name on the editor Property change operation name Note
Meter Back Color Image background color setting
Graph Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
Max. value Maximum value setting
Min. value Minimum value setting
Line graph Max. value Maximum value setting
Bar graph Min. value Minimum value setting
Pie graph - - N/A
Line Border Color1 Image border color 1 setting
Arc
Rectangle Back Color Image background color setting
Circle
Ellipse
Radio button Caption Caption setting
Text color Text color setting
ON state color On state color setting
OFF state color Off state color setting
Back Color Image background color setting
Border Color Image border color 1 setting
Outer Frame Color Image border color 2 setting
Check box Caption Caption setting
Text color Text color setting
Check Color On state color setting
Check Back Color Off state color setting
Back Color Image background color setting
Border Color1 Image border color 1 setting
Border Color2 Image border color 2 setting
List box Selected Color ON text color setting
Combo box Unselected Color OFF text color setting
Selected Back Color On state color setting
Unselected Back Color Off state color setting
Border Color Image border color 1 setting
Scroll border color Image border color 2 setting
Scroll ON state color On state color 2 setting
Scroll OFF state color Off state color 2 setting
Scroll background color Image background color 2 setting
Scroll button color Button color setting
Scroll bar color Bar color setting

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 161/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4 RUBY SCRIPT

In addition to FP script, generic script mruby is now available.


For basic information on mruby, refer to the following page.
- mruby API reference
http://mruby.org/docs/api/

- Ruby 1.9.3 Library Documentation(mruby is compatible with Ruby 1.9)


http://mruby.org/docs/api/

4.1 CREATION OF RUBY SCRIPT

4.1.1 Script List

The Script List screen of the FP Editor has been changed as a result of the function addition of the Ruby script.

Table4.1.1 (a) List of Changes in Functions on the [Script List] Screen


Function Description
Display script list - The "File name" and "Type" items have been added.
- Ruby script files and FP script files are displayed.
- Script numbers and check boxes are displayed under the Number item.
- The [Check All] check box has been added.
- The type of a script that is registered for Startup is indicated as "S".
- The type of a script that is registered as a Timer Script is indicated as "T".
New - The [Make new file] dialog box opens.
Entry - A Ruby script file or an FP script file can be imported.
Remove - Script files selected using the check boxes are removed.
Edit - Script files selected using the check boxes are displayed in the Script Editor.
- Double-clicking a script file shown in the list displays the script file in the [Script
Editor] dialog box.
Check syntax - The syntax of the script file selected using the check box is checked.
- The caption for the [Check all syntax] box on the [Script List] screen has been
changed to [Check syntax...].
Startup register/restore - The [Detail] button has been divided into the [Register...] button and the
[Restore...] button under the [Startup] group.
- The script files selected using the check boxes can be registered or restored from
startup. For details, refer to "Section 4.1.1.7 Startup register/restore."
Timer script - [Register...] and [Restore...] have been added under the [Timer Script] group.
register/restore - The script files selected using the check boxes can be registered or restored from
the timer script. For details, refer to "Section 4.1.1.8 Timer script register/restore."
Debug settings - Refer to "Section 4.1.7 Debug Function."

4.1.1.1 Display script list

Ruby script files and FP script files that are registered in a project are all displayed on the [Script List] screen.
The script number, type, file name, and script name of each script file are displayed on the [Script List] screen.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 162/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

For changes to the list display of scripts, refer to "Table 4.1.1.1 (a) Changes to List Display of Scripts."
For a project, you can register up to a total of 1,000 Ruby script files and FP script files.

Fig. 4.1.1.1 (a) [Script List] Screen

Table 4.1.1.1 (a) Changes to List Display of Scripts


Item Description
Number Check boxes have been added, allowing multiple script files to be selected.
The following functions allow multiple script files to be selected.
● Remove function
● Check syntax function
Selecting the [Check All] check box allows you to select or deselect all the check boxes at once.
Type ● A script registered for startup is indicated with "S".
When the registration is restored, the "S" will be removed.
● A script registered for startup is indicated with "T".
When the registration is restored, the "T" will be removed.
File name This new field shows script file names.

4.1.1.2 New

Selecting [New...] on the [Script List] screen opens the [Make new file] dialog box.
For the items in the [Make new file] dialog box, refer to "Table 4.1.1.2 (a) List of Items in the [Make new file]
Dialog Box."
If 1,000 script files have already been registered, [New...] is not available.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 163/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.1.2 (a) [Make new file] Dialog Box

Table 4.1.1.2 (a) List of Items in the [Make new file] Dialog Box
Setting item Entry type Setting value Initial value Remarks
RubyScript/FPScript Selection ON/OFF RubyScript is Select RubyScript or FPScript to make a new
selected script.
ScriptNumber User entry Numerical An unused Enter a number for the script you want to
value number is create.
entered The maximum number you can enter is 999.
automatically. Script numbers are mandatory.
ScriptName User entry Optional Blank Enter a name for the script you want to create.
The maximum number of characters you can
enter is 20.
OK button - - - Closes the Make new file dialog box and opens
the Script Editor.
× button - - - Closes the [Make new file] dialog box.

Use the RubyScript and FPScript radio buttons to select the type of script you want to create, enter the script
number and script name, and select [OK] to open the Script Editor.
For details on the Script Editor, refer to "Section 4.1.2 Enhancement of Script Editor Functions."
When you select [OK], the script number and the script name are checked. If there are any errors, an error
dialog box appears.

If you specify the same script file name as one that has been removed from the list, a dialog box appears asking
whether you want to overwrite the script. (Fig. 4.1.1.2 (b) Script Overwrite Confirmation Dialog Box)

Fig. 4.1.1.2 (b) Script Overwrite Confirmation Dialog Box

Characters prohibited for use in script names


Ruby script names have restrictions as described "Table 4.1.1.2 (b) Restrictions on Script Names.".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 164/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 4.1.1.2 (b) Restrictions on Script Names


Item FP Script Ruby Script
Maximum number of 20
characters
2-byte characters Can be used
Prohibited characters None The following characters (single-byte) cannot be used.
¥/:*?”<>|

4.1.1.3 Entry

Selecting [Entry...] in the [Script List] opens the [Open] dialog box.
If 1,000 script files have already been registered, you cannot select [Entry...].

Fig. 4.1.1.3 (a) [Open] Dialog Box

[Open] dialog box


For information on how to import an external file, refer to Table 4.1.1.3 (a) List of External File Import
Operations."
If you click [Cancel] or [x], the file will not be imported and you will return to the [Script List] screen.
You can only select one file in the [Open] dialog box at a time.

Table 4.1.1.3 (a) List of External File Import Operations


File to be Imported Operation
A file with a .rb extension The file is treated as a Ruby script file.
The character code is determined, and if a file that is not saved as unicode (with
BOM), an error dialog box appears. (Fig. 4.1.1.3 (b) [Save Script] Dialog Box)
If the character code is acceptable, the [Save Script] dialog box opens. (Fig.
4.1.1.3 (c) [Save Script] Dialog Box)
In the [Save Script] dialog box, set the "ScriptNumber" and "ScriptName" and
select [Save] to add the file to the Script List.
For information on items in the [Save Script] dialog box, refer to "Table 4.1.1.3
(b) List of Items in the [Save Script] Dialog Box."
For information on file names, refer to "Ruby script file names."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 165/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

A file with a .dat extension The file is treated as an FP script.


If there is a format error, an error dialog box appears.
If you select a file that already has a registered script number, a dialog box
opens asking whether you want to use the automatically assigned number.
A file with an extension other An error dialog box appears.
than .rb or .dat

Fig. 4.1.1.3 (b) Example of the Error Dialog Box

Fig. 4.1.1.3 (c) [Save Script] Dialog Box

Table 4.1.1.3 (b) List of Items in the [Save Script] Dialog Box
Setting item Entry type Setting value Initial value Remarks
ScriptNumber User entry Numerical An unused number is Enter the number of the script you want to save.
value entered automatically. The maximum number you can enter is 999.
Script numbers are mandatory.
ScriptName User entry Optional Enter a name for the script you want to create.
(up to 20 characters)
For details on script names, refer to "Table
4.1.1.2 (a) List of Items in the [Make new file]
Dialog Box" under "New."
Save button - - Closes the [Save Script] dialog box and
saves the script.
Cancel button - - Closes the [Save Script] dialog box.
× button - - Closes the [Save Script] dialog box.

When you select [Save] in the [Save Script] dialog box, the script number, script name, number of lines, and
number of characters are checked. If there are any errors, an error dialog box appears.
When you click [OK] in the error dialog box, you will return to the [Save Script] dialog box.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 166/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.1.3 (d) Automatic Numbering Confirmation Dialog Box

Ruby script file names


- When you set a script name for a Ruby script, the file name will be "script file name.rb".
- If you do not set a script name, the file name will be "RBSxxxx.rb". (xxxx represents a four-digit script
number)
- If the file name already exists, a number is added to the file name, as in "RBSxxxx_(n).rb".
-

Error dialog box


When you select [OK] in an error dialog box, the file will not be imported and you will return to the [Script
List] screen.

4.1.1.4 Remove

Selecting [Remove...] on the [Script List] screen opens a dialog box confirming whether you want to remove the
script ("Fig. 4.1.1.4 (a) Remove Confirmation Dialog Box").
When you select [OK] in the remove confirmation dialog box, the script files with check boxes selected under
the Number item are removed.
If you select a script file that is registered for startup, the delete error dialog box appears ("Fig. 4.1.1.4 (b)
Delete Error Dialog Box").

Fig. 4.1.1.4 (a) Remove Confirmation Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 167/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.1.4 (b) Delete Error Dialog Box

4.1.1.5 Edit

Selecting [Edit...] on the [Script List] screen displays the selected script files under the Number item in the
Script Editor.

You can also double-click a script file displayed in the list to display the file in the Script Editor.

4.1.1.6 Check syntax

Selecting [Check syntax...] on the [Script List] screen checks the syntax of the selected Ruby scripts and FP
scripts under the Number item.
For details, refer to "Section 4.1.4 Syntax Check."

4.1.1.7 Startup register/restore

Startup registration
Selecting [Register...] under the [Startup] group on the [Script List] screen opens a dialog box for confirming
whether you want to register the script file for startup. ("Fig. 4.1.1.7 (a) Startup Registration Confirmation
Dialog Box)
When you select [OK] in the startup registration confirmation dialog box, the script files with check boxes
selected under the Number item are registered for startup.

Fig. 4.1.1.7 (a) Startup Registration Confirmation Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 168/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Startup registration restoration


Selecting [Restore...] under the [Startup] group on the [Script List] screen opens a dialog box confirming
whether you want to restore from startup. ("Fig. 4.1.1.7 (b) Startup Restoration Confirmation Dialog Box")
When you select [OK] in the startup restoration confirmation dialog box, the script files with check boxes
selected under the Number item are restored from startup.

Fig. 4.1.1.7 (b) Startup Restoration Confirmation Dialog Box

Display of startup registration status


A script file that has been registered for startup is displayed on the [Script List] screen with "S" shown under the
Type item.
When the startup registration is restored, the "S" is removed.
All files displayed on the [Script List] screen can be registered for startup.

4.1.1.8 Timer script register/restore

Timer script registration


Selecting [Register...] under the [Timer Script] group on the [Script List] screen opens a dialog box for
confirming whether you want to register the script file as a timer script. ("Fig. 4.1.1.8 (a) Timer Script
Registration Confirmation Dialog Box")
When you select [OK] in the timer script registration confirmation dialog box, the script files with check boxes
selected under the Number item are registered as timer scripts.

Fig. 4.1.1.8 (a) Timer Script Registration Confirmation Dialog Box

NOTE
To use a script as a timer script, you need to register the script as a timer script
and then write the set_handler function in the script or control.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 169/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Timer script registration restoration


Selecting [Restore...] under the [Timer Script] group on the [Script List] screen opens a dialog box for
confirming whether you want to restore the script file registered as a timer script. ("Fig. 4.1.1.8 (b) Timer Script
Restoration Confirmation Dialog Box")
When you select [OK] in the timer script restoration confirmation dialog box, the script files with check boxes
selected under the Number item are restored from timer scripts.

Fig. 4.1.1.8 (b) Timer Script Restoration Confirmation Dialog Box

Display of timer script registration status


A script file that has been registered as a timer script is displayed on the [Script List] screen with "T" shown
under the Type item.
When the registration is restored, the "T" will be removed.
All files displayed on the [Script List] screen can be registered as timer scripts.

Behavior when a project is converted


In FANUC PICTURE prior to version 8.0, all scripts with numbers 900 to 999 were available as timer scripts.
For this reason, when a project is converted, all of the scripts with numbers 900 to 999 are registered as timer
scripts.

4.1.2 Enhancement of Script Editor Functions

The Script Editor has been expanded.


Table 4.1.2 (a) Enhancement contents list in FP Scripts and Ruby Scripts
Expanded/Added Function FP Script Ruby Script
Addition of the Menu Bar  
Expansion of the UNDO Function and REDO Function  
Change in the Way Script Number/Name is Changed  
Restricting the Number of Script Description Lines × 
Adding Search/Replace Functions  
Adding the Symbol Setting Menu  
Adding the FP Function Input Assistance Function  (*)  (*)
Adding the Multi-language Text Setting Function × 
*In the dialog box, the functions that are available for either FP scripts or Ruby scripts are shown in a function
list.

4.1.2.1 Addition of the Menu Bar

The appearance of the Script Editor has been changed and now all operations can be performed from the menu bar.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 170/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Some operations can also be performed with shortcut keys.


For details on each item in the dialog box, refer to "[File] menu", "[Edit] menu", and "[Tool] menu."

Fig. 4.1.2.1 (a) Script Editor

Table 4.1.2.1 (a) List of Script Editor Items


Item Description
Dialog title The type and file name of the script to be edited are shown.
"Ruby Script Edit XXXX.rb", "FP Script Edit FPSXXXX.dat"
Menu bar - [File] menu
- [Edit] menu
- [Tools] menu
Edit box This is an edit box where the script is written.
× button Closes the Script Editor.
If there is an update to the script that has not been saved, a confirmation dialog box appears.

[File] menu
The [File] menu has been added to the Script Editor.
For details on each menu item, refer to "Table 4.1.2.1 (b) List of [File] Menu Items."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 171/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.2.1 (b) Script Editor (Expanded [File] Menu)

Table 4.1.2.1 (b) List of [File] Menu Items


Item Description
Overwrite Save... Saves the script and closes the Script Editor.
Close Closes the Script Editor.
If there is an update to the script that has not been saved, a confirmation dialog box appears.

[Edit] menu
The [Edit] menu has been added to the Script Editor.
For details on each menu item, refer to "Table 4.1.2.1 (c) List of [Edit] Menu Items."

Fig. 4.1.2.1 (c) Script Editor (Expanded [Edit] Menu)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 172/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 4.1.2.1 (c) List of [Edit] Menu Items


Item Description
Undo Undoes the immediately prior operation in the edit box.
For details, refer to "Section 4.1.2.2 Expansion of the UNDO Function and REDO Function."
Redo Redoes the operation canceled with [Undo].
For details, refer to "Section 4.1.2.2 Expansion of the UNDO Function and REDO Function."
Cut... Cuts the character string selected in the edit box.
Copy... Copies the character string selected in the edit box.
Paste... Pastes the character string stored by the cut or copy operation.
Delete... Deletes the character string selected in the edit box.
Search... Opens the [Search] dialog box.
For details, refer to "Section 4.1.2.5 Adding Search/Replace Functions."
Replace... Opens the [Replace] dialog box.
For details, refer to "Section 4.1.2.5 Adding Search/Replace Functions.."

[Tools] menu
The [Tools] menu has been added to the Script Editor.
For details on each menu item, refer to "Table 4.1.2.1 (d) List of [Tools] Menu Items."

Fig. 4.1.2.1 (d) Script Editor (Expanded [Tools] Menu)

Table 4.1.2.1 (d) List of [Tools] Menu Items


Item Description
Enter FP Function... Opens the [FP Function Input Assistance] dialog box.
For details, refer to "Section 4.1.2.7 Adding the FP Function Input Assistance Function."
Syntax Check... Performs a syntax check.
For details, refer to "Section 4.1.1.6 Check syntax."
Script Name Change... Opens the [Change of ScriptName] dialog box.
For details, refer to "Section 4.1.2.3 Change in the Way Script Number/Name is Changed."
Enter International Opens the [Multi-language Text Setting] dialog box.
Language Text... For details, refer to "List of Items in the [Multi-language Text Setting] Dialog Box."
You cannot select this item if no multi-language keys have been set.
This item is not shown when an FP script file is being edited.
Symbol Register... As in the case of the [File] menu of the FP Editor, the [PMC...] and [DEFINE...] menus are
displayed, which open list dialog boxes for PMC symbols and Define symbols.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 173/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.1.2.2 Expansion of the UNDO Function and REDO Function

The UNDO function and the REDO function have been expanded.
The UNDO function and the REDO function, which previously supported only a single operation, now support
multiple operations.

Details of the UNDO and REDO functions


When you select [Edit] > [Undo] from the menu bar of the Script Editor, the immediately prior operation is
undone.
When you select [Edit] > [Redo] from the menu bar, the operation that has been undone by the UNDO function
is redone.

The UNDO function and the REDO function can be used from the following shortcut keys.Shortcut key
assignment for the UNDO function: <Ctrl> + <Z>
Shortcut key assignment for the REDO function: <Ctrl> + <U>

If there is not enough memory, an error dialog box appears.


When this happens, follow the instructions in the dialog box to close all other programs and then retry the
operation.

Fig. 4.1.2.2 (a) Memory Allocation Error Dialog Box

4.1.2.3 Change in the Way Script Number/Name is Changed

The script number/name can be changed from the [Change of ScriptName] dialog box, which is displayed by
selecting [File] > [Change of ScriptName] from the menu bar of the Script Editor.
For details on each item in the dialog, refer to "Table 4.1.2.3 (a) List of Items in the [Change of ScriptName]
Dialog Box."

Fig. 4.1.2.3 (a) [Change of ScriptName] Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 174/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 4.1.2.3 (a) List of Items in the [Change of ScriptName] Dialog Box
Setting item Entry type Setting value Initial value Description
ScriptNumber User entry Numerical Script number Enter if you want to change the script number.
value before change The maximum number you can enter is 999.
Entry is required.
ScriptName User entry Optional Script name Enter if you want to change the script name.
before change Entry is optional.
With Ruby scripts, the name entered becomes
the file name. If a prohibited character is
entered, an error dialog box is displayed when
[OK] is selected.
For script naming rules, refer to "4.1.1.3 Entry."
OK button - - - Changes the script number/name and closes
the dialog box.
For the behavior when there is a duplicate script
number/name, refer to "4.1.1.3 Entry."
Cancel button - - - Closes the dialog box without changing the
script number/name.
× button - - - Closes the dialog box without changing the
script number/name.

Changing the Script Number


When a script number is changed, the file is duplicated.
File names may change as a result of changing a script number. For details, refer to "Table 4.1.2.3 (b) Behavior
When the Script Number is Changed."

Table 4.1.2.3 (b) Behavior When the Script Number is Changed


Changes Overlapping Name Same Ruby script FP script
numbers after setting name
the change
Change No No - Change in file name Change in file name
number Example) RBS0000.rb → Example) FPS0000.dat →
RBS0001.rb FPS0001.dat
Yes No Creates a file using the script name
as the file name
Example) Sample.rb → Yomple.rb
Yes Duplicate file name error
Yes No - The automatic numbering confirmation The automatic numbering
dialog box appears confirmation dialog box
→ If [OK], file name is changed appears
Example) RBS0000.rb → → If [OK], file name is changed
RBS0002.rb Example) FPS0000.dat →
Yes No The automatic numbering confirmation FPS0002.dat
dialog box appears
→ If [OK], creates a file using the script
name as the file name
Example) Sample.rb → Yomple.rb
Yes Duplicate script name error
For details on automatic numbering confirmation dialog box, refer to "4.1.1.3 Entry," "Fig. 4.1.2.3 (b)
Automatic Numbering Confirmation Dialog Box."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 175/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Changing the Script Name


When the script name is changed, the file name changes in Ruby script and the file is replaced.
For details, refer to "Table 4.1.2.3 (c) Ruby Script Behavior When Changing the Script Name."
With FP script, the file name does not change when the script name is changed.

Table 4.1.2.3 (c) Ruby Script Behavior When Changing the Script Name
Changes Name before Same name Ruby script behavior
the change after the change
Set name No No Creates a file using the script name
Creates a file and deletes the original file
Example) RBS0000.rb → Sample.rb
Yes Duplicate file name error
Change Yes No Creates a file using the script name
name Creates a file and deletes the original file
Example) Sample.rb → Sample2.rb
Yes Duplicate file name error
Delete Yes No Create a file with a file name based on the script
name number, and delete the original file
Example) Sample.rb → RBS0000.rb
Yes (Note) Sequential number assigned to file name
Example) Sample.rb → RBS0000_(2).rb
If a file with the same name as the name after the change exists in the destination folder for saving, the script
overwrite confirmation dialog box is displayed. For details, see "4.1.1.2 New," "Fig. 4.1.1.2 (b) Script Overwrite
Confirmation Dialog."

NOTE
Deleting the file name automatically changes the file name in Ruby script.
If a file with the same name already exists, a number is assigned.

4.1.2.4 Restricting the Number of Script Description Lines

A Ruby script can contain up to 9,999 lines or 100,000 characters.


Entries, pastes, or replacements exceeding this will cause an error dialog box to be displayed. If this occurs,
delete extra lines or reduce the processes.
For the range available for describing FP script files and Ruby script files, refer to "Table 4.1.2.4 (a) List of
Ranges Available for Writing Scripts."

Fig. 4.1.2.4 (a) Lines/Characters Exceeded Error Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 176/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 4.1.2.4 (a) List of Ranges Available for Script Description


Description range FP script file Ruby script file
Up to line 100 Can be written Can be written
Line 101 to line 200 Can be written. However, a warning is Can be written.
displayed at the bottom of the dialog box No warning displayed.
Line 201 to line 9999 Cannot be written. An error dialog box Can be written.
appears An error dialog box does not appear.
Line 10000 and beyond Cannot be written. An error dialog box Cannot be written.
appears An error dialog box appears.

With FP scripts, when the number of script lines exceed 101, a warning message appears on the status bar.
When the number of script lines exceed 201, an error dialog box appears.

Fig. 4.1.2.4 (b) Script Editor (Warning Displayed)

4.1.2.5 Adding Search/Replace Functions

Specified character strings can be searched/replaced from the Script Editor.

Search Function
Select [Edit] > [Search] from the menu bar of the Script Editor to display the [Search] dialog box. ("Fig. 4.1.2.5
(a) [Search] Dialog Box")
For items in the [Search] dialog box, refer to "Table 4.1.2.5 (a) List of Items in the [Search] Dialog Box."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 177/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.2.5 (a) [Search] Dialog Box

Table 4.1.2.5 (a) List of Items in the [Search] Dialog Box


Setting item Entry type Setting value Initial value Description
String to User entry Optional Blank Enter the string to search for.
search combo The maximum number of characters you can enter is 255.
box A history of the 10 most recent searches is recorded.
Search option Check ON/OFF OFF An option for distinguishing between uppercase and
settings lowercase letters in the search string.
check box If ON, searches are case-sensitive.
If OFF, searches are not case-sensitive.
The initial value is OFF.
Backward - - - Search is performed upward from the current cursor position.
button Cannot be selected if the string to search combo box is blank.
Forward button - - - The search is performed downward from the current cursor
position.
Cannot be selected if the string to search combo box is blank.
Close button - - - Closes the [Search] dialog box.
× button - - - Closes the [Search] dialog box.

Details of the search function operation


- The [Search] dialog box can be displayed using the shortcut key as well.
Assigned key: <Ctrl> + <F>

- Enter the search string in the combo box of the [Search] dialog box and select [Backward] or [Forward] to
start the search.

- Selecting [Backward] searches upward from the current cursor position, while selecting [Forward] searches
downward.

- If there is a search string that matches completely, the cursor moves to that string and the string is selected.

Fig. 4.1.2.5 (b) Image of Selected State

- If there are no matching strings, the search result dialog box is displayed. (Fig. 4.1.2.5 (c) "Search Result
Dialog Box (No Matching Strings)")

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 178/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.2.5 (c) Search Result Dialog Box (No Matching Strings)

- If the search is repeated and has been completed to the end in the specified direction, a continue search
confirmation dialog box appears. ("Fig. 4.1.2.5 (d) Continue Search Confirmation Dialog Box")

Fig. 4.1.2.5 (d) Continue Search Confirmation Dialog Box

Selecting [Yes] in the continue search confirmation dialog searches the area that has not yet been searched.
- If a search was performed by selecting the [Backward] button,
the search is performed from the end of the file to the position of the cursor when [Backward] was
selected.
- If a search was performed by selecting [Forward],
the search is performed from the beginning of the file to the position of the cursor when [Forward]
was selected.

Select [No] in the continue search confirmation dialog to close the dialog box and return to the Script
Editor.

- When search is continued and the search advances to the position of the cursor when the search began, the
continued search result dialog box is displayed. ("Fig. 4.1.2.5 (e) Continued Search Result Dialog Box")

Fig. 4.1.2.5 (e) Continued Search Result Dialog Box

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 179/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Replacement Function
Select [Edit] > [Replace] from the menu bar of the Script Editor to display the [Replace] dialog box. ("Fig.
4.1.2.5 (f) [Replace] Dialog Box")

Fig. 4.1.2.5 (f) [Replace] Dialog Box

Table 4.1.2.5 (b) [Replace] Dialog Box Setting Items


Setting item Entry type Setting value Initial value Remarks
String to User entry Optional Blank Enter the string to search for.
search The maximum number of characters you can enter
is 255.
A history of the 10 most recent searches is
recorded.
Search option Check ON/OFF OFF An option for distinguishing between uppercase and
lowercase letters in the search string.
If ON, searches are case-sensitive.
If OFF, searches are not case-sensitive.
To User entry Optional Blank Enter the replace string.
The maximum number of characters you can enter
is 255.
A history of the 10 most recent searches is
recorded.
Backward - - - Search is performed upward from the current cursor
button position.
Cannot be selected if the string to search combo
box is blank.
Forward - - - The search is performed downward from the current
button cursor position.
Cannot be selected if the string to search combo
box is blank.
Replace - - - Replaces the search string with the specified string.
button Cannot be selected if the string to search combo
box is blank.
Replace all - - - Replaces all instances of the search string found in
button the file with the specified string.
Cannot be selected if the string to search combo
box is blank.
Close button - - - Closes the [Replace] dialog box.
× button - - Closes the [Replace] dialog box.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 180/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Details of the replacement function operation


- Enter the search string in the string to search combo box of the [Replace] dialog box and select [Backward]
or [Forward] to start the string search.

- If there is a matching string, the replace string is selected. Selecting [Replace] in this state replaces the
replace string with what is specified in "To:."

- After replacing the string, the string search is performed toward the end of the file. If there is a string that
matches, the replace string is selected.

- When [Replace all] is selected, all matching strings in the file are replaced with the string in "To:." When
the replacement is complete, the replacement result dialog box appears. ("Fig. 4.1.2.5 (g) Replacement
Result Dialog Box")
For information on the search function, see "Adding Search/Replace Functions," "Search Function."

Fig.4.1.2.5 (g) Replacement Result Dialog Box

- The "Replace" dialog box can be displayed using the shortcut key.
Assigned key: <Ctrl> + <H>

- When a search has run to the end in the specified direction after selecting [Replace], a continue search
confirmation dialog box appears. ("Fig. 4.1.2.5 (d) Continue Search Confirmation Dialog")
Selecting [Yes] in the continue search confirmation dialog searches the area that has not yet been searched.

4.1.2.6 Adding the Symbol Setting Menu

Selecting [Tool] > [Symbol] from the menu bar of the Script Editor displays the [PMC] and [Symbol] menus.
As in the case of the [File] menu of the FP Editor, selecting them displays the PMC symbol list dialog box and
constant symbol list dialog box and the symbols can be edited.

4.1.2.7 Adding the FP Function Input Assistance Function

Select [Script] > [FP function input] from the menu bar of the Script Editor to display the [FP Function Input
Assistance] dialog box. ("Fig. 4.1.2.7 (a) [FP Function Input Assistance] Dialog Box")
For items in the [FP Function Input Assistance] dialog box, refer to "Table 4.1.2.7 (a) [FP Function Input
Assistance] Dialog Box Setting Items."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 181/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.2.7 (a) [FP Function Input Assistance] Dialog Box

Table 4.1.2.7 (a) [FP Function Input Assistance] Dialog Box Setting Items
Setting item Entry type Setting value Initial value Description
FP Function Selection - No selection FP functions available in the target script file are
List displayed. When an FP function is selected, the function
is automatically entered in the FP function edit box.
FP function User entry Optional Blank Edit box for editing the FP function.
Description - - Blank Description of the function selected in the FP Function
List list box is displayed.
OK button - The function in the FP function edit box is inserted in the
Script Editor cursor position, and the [FP Function Input
Assistance] dialog box closes after the insertion.
Cancel button - Closes the [FP Function Input Assistance] dialog box.
× button - Closes the [FP Function Input Assistance] dialog box.

When an FP function is selected from the [FP Function List] list box in the [FP Function Input Assistance]
dialog box, a template for the function is automatically entered in the FP function edit box. Description of the
selected FP function is displayed in the [Description] list box.
The FP function edit box can be edited freely.
When [OK] is selected, the content of the FP function edit box is inserted in the Script Editor cursor position,
and the [FP Function Input Assistance] dialog box closes.
Selecting [Cancel] discards the edited content and the [FP Function Input Assistance] dialog box closes.

The functions available in the FP script and Ruby script being edited are listed in the [FP Function List].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 182/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.1.2.8 Adding the Multi-language Text Setting Function

Select [Tool] > [Multi-language text setting] from the menu bar of the Script Editor to display the
[Multi-language Text Setting] dialog box. ("Fig. 4.1.2.8 (a) [Multi-language Text Setting] Dialog Box")
In the [Multi-language Text Setting] dialog box, multi-language text used in the Ruby script file can be
specified.
For the items, refer to "Table 4.1.2.8 (a) List of Items in the [Multi-language Text Setting] Dialog Box."
Multi-language text allows the text of multiple languages to be specified for any string specified by the user in
the script file.
By allowing multi-language texts to be specified, appropriate strings for the language can be used when the
language is switched.

Fig.4.1.2.8 (a) [Multi-language Text Setting] Dialog Box

Table 4.1.2.8 (a) List of Items in the [Multi-language Text Setting] Dialog Box
Setting item Entry type Setting value Initial value Description
Add row - - - The [Add row] dialog box is displayed. (Fig. 4.1.2.8 (b)
button [Add Row] Dialog Box)
Use this dialog box to add a record at the bottom.
Insert Row - - - The [Insert Row] dialog box is displayed. (Fig. 4.1.2.8 (c)
button [Insert Row] Dialog Box)
Use this dialog box to insert a record above the cursor
position.
Delete Rows - - - The deletion confirmation dialog box appears. (Fig.
button 4.1.2.8 (d) Row Deletion Confirmation Dialog Box)
Use this dialog box to delete the record at the cursor
position.
Import button - - - Imports and displays the CSV file where multi-language
text is listed.
The character code of the CSV file must be Unicode
(with BOM).
Export button - - - The displayed multi-language text data is saved in a CSV

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 183/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Setting value Initial value Description


file.
The character code of the CSV file will be Unicode (with
BOM).
Search button - - - The [Search] dialog box is displayed. (4.1.2.5 (a)
[Search] Dialog Box)
Use this dialog box to search for the specified text.
Character - - - Specifies the target character type for character check
type button when selecting a row.
Not displayed in the iHMI mode.
Check - - - Checks if the character code is displayable.
character box Not displayed in the iHMI mode.
Text edit User entry Optional Blank Text ID and multi-language text can be edited.
The numbers of characters are as follows.
- Text IDs must be 20 bytes or less
- Each multi-language text must be 128 bytes or less
* Half-size characters are 1 byte and full-size characters
are 2 bytes.
OK button - - Checks if the character code is displayable for the
character type ANK. If the check result is OK, the
changes are saved and the dialog box closes.
Cancel button - - - The changes are discarded and the dialog box closes.
× button - - - The changes are discarded and the dialog box closes.

NOTE
1 If no multi-language key is set, the [Multi-language Text Setting] in the menu of
the Script Editor cannot be used.
2 Multi-language key operations cannot be performed using the [Multi-language
Text Setting] dialog box. Multi-language key setting must be performed using the
"Multi-language setting sheet" in the "Setting of Project dialog box" as before.
3 If the multi-language key is deleted, the settings will be deleted.
4 If entry exceeds the maximum number of bytes that can be specified, the entry
beyond the maximum bytes will be invalid.

Text ID
Text ID is an index for multi-language text that can be specified by the user.
By setting the corresponding multi-language text for the text ID, strings corresponding to the language specified
in the system can be used.

[Multi-language Text Setting] Dialog Box Details


- On the text edit data sheet, enter the text ID in the Text ID field and the corresponding strings in the
multi-language text field, and select [OK] to save the setting.
However, if no text ID is specified, the corresponding records will be deleted. ("Table 4.1.2.8 (b) Record
Operations When Saving Multi-language Text")

Table 4.1.2.8 (b) Record Operations When Saving Multi-language Text


Text ID Multi-language text Operation performed on record
Data exists Data exists Save the record
Data exists Blank Save the record
Blank Data exists Delete the record

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 184/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Blank Blank Delete the record

- Up to 65535 rows of multi-language texts can be registered.

- Selecting [Add row] displays the [Add row] dialog box. ("Fig. 4.1.2.8 (b) [Add row] Dialog Box")
Entering the number of rows and selecting [OK] adds a blank row at the bottom of the text edit data sheet.
If the entered numerical value results in the number of rows exceeding 65535 rows after the addition, an
error dialog box is displayed.
Select [Cancel] or [×] to return to the [Multi-language Text Setting] dialog box.

Fig. 4.1.2.8 (b) [Add Row] Dialog Box

- Selecting [Insert row] displays the [Insert Row] dialog box. ("Fig. 4.1.2.8 (c) [Insert Row] Dialog Box")
Entering a number of rows and selecting [OK] inserts blank rows above the cursor position of the text edit
data sheet.
If the entered numerical value results in the number of rows exceeding 65535 rows after the insertion, an
error dialog box is displayed. Select [Cancel] or [×] to return to the [Multi-language Text Setting] dialog
box.

Fig. 4.1.2.8 (c) [Insert Row] Dialog Box

- Selecting [Delete row] displays the row deletion confirmation dialog box. ("Fig. 4.1.2.8 (d) Row Deletion
Confirmation Dialog Box")
Select [Yes] to delete the row where the cursor is positioned.
Select [No] to return to the [Multi-language Text Setting] dialog box.

Fig. 4.1.2.8 (d) Row Deletion Confirmation Dialog Box

- Selecting [Import] displays the [Open] dialog box. ("Fig. 4.1.2.8 (e) [Open] Dialog Box")
Selecting a CSV format file from the [Open] dialog box adds the file to the text edit data sheet if the
character code is Unicode (with BOM).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 185/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

If an error occurs during the import, an error dialog box appears.


Selecting [Cancel] or [×] closes the [Open] dialog box.

Fig. 4.1.2.8 (e) [Open] Dialog Box

- Selecting [Export] displays the [Save As] dialog box. ("Fig. 4.1.2.8 (f) [Save As] Dialog Box")
Selecting "Save" after editing the file name in the [Save As] dialog box saves the content of the text edit
data sheet as a CSV format file (character code).
Selecting [Cancel] or [×] closes the [Save As] dialog box.

Fig. 4.1.2.8 (f) [Save As] Dialog Box

- Selecting [Search] displays the [Search] dialog box. ("Fig. 4.1.2.8 (g) [Search] Dialog Box")
This dialog box behaves similar to the search function for Script Editor. For details, refer to "4.1.2.5
Adding Search/Replace Functions."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 186/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.2.8 (g) [Search] Dialog Box

- Selecting [Check char] checks the character specified in the multi-language text to see if it is a displayable
character code.
- If no row is selected, the check is performed on whether the character code is displayable with the
ANK character type.
If a character type other than ANK is specified with the character type button, the following dialog
box is displayed. When [OK] is selected, character code check is performed after ANK is specified
for the content of the character type button.

Fig. 4.1.2.8 (h) Character Code Check Notification Dialog Box

- If a row is selected, the check is performed on whether the character code is displayable with the
character type specified with the button.

If everything is displayable, the following dialog box appears.

Fig. 4.1.2.8 (i) Character Code Check Result OK Dialog Box

If a character code that is not displayable was specified, an error dialog box appears and the background of
all error cells turn gray.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 187/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Using the Multi-language Text


To use multi-language texts, write the LangCaption function in the Ruby script.
The LangCaption function receives the text ID and whether or not multi-language text is used as the argument,
and it returns the text in the language specified as the return value.

[Function]
LangCaption
[Syntax with arguments]
LangCaption( textid , mltlanguse )
[Arguments]
The arguments of this function are as shown below.

Table 4.1.2.8 (c) Arguments of the LangCaption Function


Name Type Description
textid String String specified by the user
mltlanguse True/false true: Use multi-language input
false: Do not use multi-language input
[Return]
Details of the return values are as shown below.

Table 4.1.2.8 (d) Value to Be Stored in the Return Value of the LangCaption Function
Type Description
String When using multi-language input (mltlanguse = true), a string corresponding to the language specified in the
system (*)
When not using multi-language input (mltlanguse = false), a string corresponding to the language with "*" on
the language key in the multi-language text input dialog box
If the text ID specified for the argument textid does not exist, "textid not found" is specified as the return value.

* If there is no multi-language key corresponding to the language specified in the system, the string
corresponding to the default language set for the multi-language key will be the return value.
[Description]
Calls the multi-language text specified in advance.
[Example]
msgText = LangCaption(“ErrorMessage1”, true);
titleText = LangCaption(“ErrorTitle1”, true);
MsgBoxShow( msgText, 0, titleText);

Or

MsgBoxShow(LangCaption("ErrorMessage1", true), 0, LangCaption("ErrorTitle1", true));

* Since the MsgBoxShow function displays the string for the 1st argument, the string corresponding to the
language specified in the system can be displayed by using the LangCaption function.

4.1.3 Conversion Function

To open a project created in a version of FANUC PICTURE that is older than ver. 8.0 (old FP) in FP ver. 8.0 or
later (new FP), it is necessary to convert the project.

Conversion is performed for "FP scripts" and "Project."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 188/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The converted file cannot be opened with an old FP editor.

NOTE
Conversion from FP script to Ruby script is only to help creation.Therefore,
please confirm the contents after conversion and confirm the operation.
FP script is supported after edition 8.0. Conversion to Ruby script is not
mandatory, so implement it as necessary.

An outline of the conversion is described in the figure below.

Existing FP editor New FP editor


Old FP project New FP project
• The argument specification method for FP
functions is changed.
• The name of the function for calling a script
from control is changed.
• The extension of the project is changed.

FP script

FP script Ruby script


• The FP script syntaxes are changed.
• A mark is added to GOTO statements and labels.
• The extension is changed to "rb."
• The debug information is deleted.

Fig. 4.1.3 (a) Outline of conversion

The timing and processing for conversion of FP scripts and projects are as follows.

Table 4.1.3 (a) Conversion processing for each target


Target Timing Conversion processing
Project - When an old FP project is opened (1) The name of the function for calling a
- When [Project] > [Add screen ...] is script from control is changed.
selected from the Menu bar (2) The argument specification method
- When [File] > [Screen], and then [Open] is for FP functions is changed.
selected from the Menu bar (3) The extension of the project is
- When [Open] is selected from the tool bar changed.
FP script - When an old FP project is opened (4) The FP script syntaxes are changed.
- When [Project] > [Convert to Ruby script...] (5) A mark is added to GOTO statements
is selected from the Menu bar and labels.
(6) The extension is changed to "rb."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 189/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(7) The debug information is deleted.

The flow of conversion is as follows. ("Fig. 4.1.3 (b) Flowchart up to the completion of conversion")
For the details of each process, refer to "4.1.3.1 Conversion of a Project" and later.

Start

The project conversion wizard appears.

No
Convert the project

Yes

(1) Change the name of the function for calling a script from control
(2) Change the argument specification method for FP functions
(3) Change the extension of the project

No
Convert the scripts

Yes

(4) Change the FP script syntaxes


(5) Add a mark to GOTO statements and labels
(6) Change the extension to "rb"
(7) Delete the debug information

Open the project

End
Fig. 4.1.3 (b) Flowchart up to the completion of conversion

When an old FP project is opened, the confirmation wizard for conversion of the project appears.
The project will be converted when you follow the steps in the wizard. (Refer to "4.1.3.1 Conversion of a
Project.")
After the project conversion is completed, you can move on to conversion of scripts.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 190/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

When moving on to conversion of scripts, the wizard closes and the conversion confirmation dialog box
appears.
In the conversion confirmation dialog box, all the FP scripts registered in the projects are displayed, and you can
convert all the selected scripts into Ruby scripts.
The converted FP script files remain in the original files. (Refer to "4.1.3.2 Conversion of Scripts.")
You can convert scripts by opening the project. Otherwise, you can convert them later by selecting [Project] >
[Convert to Ruby script...] on the Menu bar and then converting them.
After [Convert to Ruby script...] is selected, the conversion confirmation dialog appears.

Fig. 4.1.3 (c) Conversion to Ruby script

In addition, project conversion is performed when importing a screen created with an old FP editor into a new
FP editor. For information on the conversion of projects, refer to "4.1.3.1 Conversion of a Project."

4.1.3.1 Conversion of a Project

When an old FP project is opened, the project conversion wizard appears.


The project will be converted when you follow the instructions in the wizard, and the following procedures will
be performed.
- The name of the function for calling a script from control is changed.
- The argument specification method for FP functions is changed.
- The extension of the project is changed.

In addition, conversion of the project is also performed when the following procedures are performed to import
a screen into the FP editor.
- When [Project] > [Add screen ...] is selected from the Menu bar
- When [File] > [Screen], and then [Open] is selected from the Menu bar
- When [Open] is selected from the Menu bar
- When a file is dragged and dropped onto the editor
At this time, the following procedures are performed for the selected folder.
- The name of the function for calling a script from control is changed.
- The argument specification method for FP functions is changed.

When opening a screen file by dragging and dropping it on a place other than the project window of the editor, a
dialog box such as that shown below appears ("Fig. 4.1.3.1 (a) Screen file conversion confirmation dialog box
displayed when dragged and dropped").

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 191/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

If you select [Yes] in this dialog box, conversion of the screen file will be performed and the target screen will
open.

In addition, when it is necessary to convert a project, the project conversion wizard appears.
For details, refer to "Project wizard."

Fig. 4.1.3.1 (a) Screen file conversion confirmation dialog box displayed when dragged and dropped

NOTE
In FANUC PICTURE 8.0 or later (iHMI version), all characters in the rectangle are
deleted when redrawing the control to enable caption change. Therefore, if
control overlaps, the caption may not be displayed depending on the placement
order. In that case, place the control with the caption on the front.

Project conversion wizard


When project conversion is performed, the project conversion wizard ([FANUC PICTURE PROJECT
CONVERT] screen) appears.
The project conversion will be completed by following the steps in this wizard.
In the wizard that appears when the project is opened, you can continue to perform script conversion by
selecting the [rubyscript convert] check box on the screen that appears after the conversion is completed.

Fig. 4.1.3.1 (b) Project conversion wizard (before the conversion starts)

NOTE
The converted file can not be restored. Please obtain backup in advance.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 192/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.3.1 (c) Project conversion wizard (after the conversion is completed)

Fig. 4.1.3.1 (d) Project conversion wizard (when importing a screen)

Table 4.1.3.1 (a) Details of the project conversion wizard


Item Entry Setting Initial value Description
type value
Description - - - Displays the description of the dialog.
field The display is updated according to the situation.
When importing a screen, the conversion target file name
is displayed.
Progress bar - - - Displays the progress of the conversion.
Next button - - -- Click this button to start the conversion.
(OK button) This button will be hidden after the conversion is
complete.
Cancel button - - - Click this button to stop opening the project and close the
wizard.
If you click this button in the middle of the conversion, the
conversion will be stopped and the project will be restored
to the state before the conversion, and then the wizard will
be closed.
This button will be hidden after the conversion is
complete.
rubyscript Check ON/OFF OFF Displayed after the conversion is complete.
convert check If you click the Complete button with this check box
box selected, the conversion confirmation dialog box appears
and you can move on to the conversion of scripts.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 193/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Item Entry Setting Initial value Description


type value
This check box cannot be selected for projects that do not
contain scripts.
Complete - -- - Click this button to close the project conversion wizard
button and open the converted project.

When the conversion target is a screen file, the following dialog box appears and the screen file becomes
operable with the editor.

Fig. 4.1.3.1 (e) Screen file conversion completion dialog box

When conversion of a project fails, the following dialog box appears.


Click [OK] to stop the conversion and restore the project to the state before the conversion.

Fig. 4.1.3.1 (f) Project conversion error dialog box

Changing the name of the function for calling scripts from control
In old FP projects, only FP scripts could be called, so the call functions were specified by "FP_Script + script
no.", as in "FP_Script[100_…]."
In new FP projects, both Ruby scripts and FP scripts are called using the same FP function "Script", so the call
function has been changed to be specified by "Script+script no.", as in "Script("script no.", …)".
For this reason, if the call function is specified by "FP_Script[100_…]," an error occurs during MEM file
creation.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 194/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.3.1 (g) Example of the change of the function for calling scripts from control

Changing the argument specification method for FP functions


In old FP projects, arguments were specified in the form of "[Argument 1_Argument 2_Argument 3]."
After conversion, it is changed so that arguments are specified in the form of "(Argument 1, Argument 2,
Argument 3)" according to the Ruby description rules.

Fig. 4.1.3.1 (h) Example of the change of argument specification method for functions

Changing the project extension


In the new FP editor, a new extension is used for project files.
Therefore, the extension is also changed when a project is converted.
The following shows how the extension is changed for the standard display mode and iHMI mode.

Table 4.1.3.1 (b) Extension conversion correspondence table


Target mode Before conversion After conversion
Standard display .fpp .fp2
iHMI .fppx .fp2x

4.1.3.2 Conversion of Scripts

When script conversion is performed, the conversion confirmation dialog box appears.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 195/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The following conversion processing is performed for the FP scripts selected in the conversion confirmation
dialog box.
- The FP script syntaxes are changed.
- A mark is added to GOTO statements and labels.
- The extension is changed to "rb" when the conversion is completed.
- The debug information is deleted.

NOTE
Conversion from FP script to Ruby script is only to help creation.Therefore,
please confirm the contents after conversion and confirm the operation.

Conversion is performed at the following timing.


- When an old FP project is opened
- When [Project] > [Convert to Ruby script...] is selected from the Menu bar

Conversion confirmation dialog box


When script conversion is performed, the conversion confirmation dialog shown below appears.
Select the scripts to be converted from the FP script list and click [OK]. The conversion of the selected FP
scripts will then start.

Fig. 4.1.3.2 (a) [Convert to Ruby Script ...] dialog box

Table 4.1.3.2 (a) List of the items in the dialog box


Setting item Entry type Setting value Initial value Remarks
Check All Check ON/OFF - Scripts are collectively selected or unselected.
When this check box is selected, all the unselected
check boxes will become selected.
When all the check boxes are selected, they will all
become unselected.
List Check box Check ON/OFF ON The scripts to be converted are selected.
Number - - - The registered script numbers are displayed.
The numbers are set by the user when registering the

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 196/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Setting item Entry type Setting value Initial value Remarks


scripts.
Script - - - The names of the registered scripts are displayed.
name The names are set by the user when registering the
scripts.
Remarks *There are - A comment is displayed when there is a GOTO
unprocessed statement in the script.
processes.
Progress bar - - - The progress of the script or project conversion
processing is displayed.
OK button - - - Click this button to perform the processing. After the
processing is complete, the dialog box will be closed
automatically.
Cancel button - - - For details, refer to "Table 4.1.3.2(b) Dialog box display
timing and relations between each operation."
The display timing and corresponding operations, and content of this dialog box are as shown below.

Table 4.1.3.2 (b) Dialog box display timing and relations between each operation
Display timing Title OK processing Cancellation processing Displayed list
When an old FP Converted to When you select scripts Starts FANUC PICTURE All the FP scripts
project is opened Ruby script and click [OK], the script without converting the registered in the old
files will be converted. scripts. FP project
When no scripts are If clicked during the
selected, you cannot click conversion, the conversion
[OK]. is stopped and the scripts
are restored to the state
before conversion.
When you select Returns to the original All the FP scripts
[Convert to Ruby screen without performing registered in the
script...] the conversion. new FP project
If clicked during the
conversion, the conversion
is stopped and the scripts
are restored to the state
before conversion.

When the conversion is successfully completed, the following dialog box appears.

Fig. 4.1.3.2 (b) Script conversion completion dialog box

If the conversion fails, the following dialog box appears. The conversion processing is stopped and the same
processing as the cancellation processing is performed.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 197/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.3.2 (c) Conversion error dialog box

Changing the FP script syntaxes

Fig. 4.1.3.2 (d) Example of the changes from a FP script to a Ruby script

In the conversion processing from an FP script to a Ruby script, there are "syntaxes not requiring conversion"
and "syntaxes requiring conversion."
The syntaxes not requiring conversion are as follows.
(1) Those that have the same meaning in FP scripts and Ruby scripts
(2) Those that are unique to FP scripts but can be used in Ruby scripts without modification

The syntaxes requiring conversion are as follows.


(3) Those that are unique to FP scripts and need modification when used in Ruby scripts
(4) Those that are written differently but have the same meaning in FP scripts and Ruby scripts
(5) Those that have a different meaning in Ruby scripts when written in the description method for FP scripts
(6) Those that are not necessary in Ruby scripts

For (1), operators, etc., fall under this category. Conversion processing is not performed for these syntaxes.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 198/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.3.2 (e) Example in which the same syntax can be used in FP scripts and Ruby scripts (operator)

Syntaxes that fall under this category are as follows.

Table 4.1.3.2 (c) Syntaxes that can be used without modification in FP scripts and Ruby scripts
Category 1 Category 2 Syntax Description
Operators Arithmetic operators + Addition
- Subtraction
* Multiplication
/ Division
% Remainder of division
= Assignment operator
Comparison operator && Logical AND
|| Logical OR
! Logical NOT
> Less than
< Greater than
<= Less than or equal to
>= Greater than or equal to
!= Not equal to
== Equal to
Bitwise operator << Bit shift right
>> Bit shift left
| Bitwise OR
& Bitwise AND
^ Exclusive OR
Operator command () Operator command
Numerical Decimal numbers NN Decimal numerical value
values Hexadecimal number 0xNN Hexadecimal numerical value

NOTE
0 Numbers at the beginning are treated as decimal numbers in FP Script, but in
Ruby Script it is treated as octal numbers. Please note that automatic conversion
can not be done on this point.
For example:
If it is described as 0101, it becomes decimal number 101 in FP Script, but in
Ruby Script it becomes 101 of octal number, and when converted to decimal
number it becomes 65.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 199/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

For (2), symbol variables, etc., fall under this category. Conversion processing is not performed for these
syntaxes.

Fig. 4.1.3.2 (f) Example of syntaxes that are unique to FP scripts but can be used in Ruby scripts without
modification (symbol variable)

Variables and constants that fall under this category are as follows.

Table 4.1.3.2 (d) Syntaxes that are unique to FP scripts but can be used in Ruby scripts without modification
Category 1 Category 2 Syntax Meaning
Variables/constants Symbol variables :temp: Symbol variables
Input variables INPUT_BVAL Byte type input variable
INPUT_WVAL Word type input variable
INPUT_LVAL Long type input variable
INPUT_UBVAL Unsigned byte type input variable
INPUT_UWVAL Unsigned word type input variable
INPUT_ULVAL Unsigned long type input variable
INPUT_DVAL Floating point type input variable
READ_VAL Long type input variable
(Only from line graph control)
Variables/constants Display variables DISP_VAL Floating point type display variable
Argument reference ARG[0~4] Signed
variables long type argument reference variable
Constants for PI The ratio of the circumference of a circle
arithmetic operation to its diameter
NAN Not-a-number (used in association with
FP functions)
HUGE_VAL Variable displayed when an overflow
occurs (used in association with FP
functions)
EDOM An argument of an arithmetic operation
function is outside the defined range.
ERANGE An arithmetic function operation resulted
in an overflow.
Variables for timer ERROR_TYPE Type of an error that has occurred in an
activation FP script
operation function ERROR_SCRIPT_NO Number of the FP script in which the
error has occurred
ERROR_FPFUNUC_NO Number of the FP function in which the
error has occurred
Variables/constants Variables for timer ERROR_FPFUNUC_CODE Error code for the FP function in which
activation the error has occurred

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 200/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Category 1 Category 2 Syntax Meaning


operation function ERROR_MACRO_NO Number of the macro variable in which
the error has occurred
SCREEN_NO Screen number of the screen being
displayed
FOCUS_NO Identification number of the control
where the input focus is located

For (3), "macro variables" and "function call" fall under this category. The conversion processing is performed,
and the syntaxes are replaced by the applicable syntaxes.
Although custom macro variables and program macro variables were specified by "#..." in FP scripts, they are
specified by comments in Ruby scripts; therefore, they are converted. After the conversion, they are specified by
"#[...]".
As the method to pass arguments for calling functions, they were specified in the form of "[Argument 1_
Argument 2_ Argument 3]" in FP functions. However, after the conversion processing, they are specified in the
form of "Argument 1, Argument 2, Argument 3" according to the Ruby script description rules.

Fig. 4.1.3.2 (g) Example in which a syntax unique to FP scripts requires conversion before being used in Ruby
scripts (function call)

Syntaxes that fall under this category are as follows.

Table 4.1.3.2 (e) Syntaxes unique to FP scripts requiring conversion before being used in a Ruby script
Syntax Before conversion After conversion
Macro variable #[100], #100 #[100]
FP function wdpmc[9_500_0] wdpmc(9,500,0)
User function usr_pmc[3_101_2] usr_pmc(3,101,2)

NOTE
In FP script, even wrong descriptions that enclose arguments of FP function and
user function in parentheses, sometimes worked correctly. However, conversion
is not done normally because it is not in the correct format.

For (4), comment statements, etc., fall under this category. The conversion processing is performed, and the
syntaxes are replaced by the applicable syntaxes.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 201/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.3.2 (h) Example of syntaxes that are written differently but have the same meaning in FP scripts and Ruby
scripts

Syntaxes that fall under this category are as follows.

Table 4.1.3.2 (f) Syntaxes that are written differently but have the same meaning in FP scripts and Ruby scripts
Syntax Before conversion After conversion
Comment // #
Return command RETURN return
If statement if(decision statement 1){ if(decision statement 1) then
Processing statement 1 Processing statement 1
}else if(decision statement 2){ elsif(decision statement 2) then
Processing statement 2 Processing statement 2
}else{ else
Processing statement 3 Processing statement 3
} end

For (5), temporary variables fall under this category. The conversion processing is performed, and the syntaxes
are replaced by those that perform the same processing.

Fig. 4.1.3.2 (i) Example of syntaxes that have a different meaning in Ruby scripts when written in the description
method for FP scripts (temporary variables)

Syntaxes that fall under this category are as follows.

Table 4.1.3.2 (g) Syntaxes that have a different meaning in Ruby scripts when written in the description method for
FP scripts
Syntax Before conversion After conversion
Byte type temporary variable BVAL[0~9] BVAL0,BVAL2,⋅⋅⋅,BVAL9
Word type temporary variable WVAL[0~9] WVAL0,WVAL2,⋅⋅⋅,WVAL9
Long type temporary variable LVAL[0~9] LVAL0,LVAL2,⋅⋅⋅,LVAL9

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 202/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Syntax Before conversion After conversion


Unsigned byte type temporary variable UBVAL[0~9] UBVAL0,UBVAL2,⋅⋅⋅,UBVAL9
Unsigned word type temporary variable UWVAL[0~9] UWVAL0,UWVAL2,⋅⋅⋅,UWVAL9
Unsigned long type temporary variable ULVAL[0~9] ULVAL0,ULVAL2,⋅⋅⋅,ULVAL9
* ".to_f" is added to the right side.
Floating point type temporary variable DVAL[0~9] DVAL0,DVAL2,⋅⋅⋅,DVAL9
* ".to_f" is added to the right side.

For (6), the semicolons at the end of lines fall under this category. They are removed in Ruby scripts as they are
not necessary.
If two or more statements are described on one line, the semicolon between them is not deleted.

Fig. 4.1.3.2 (j) Example of syntaxes that are unnecessary in Ruby scripts (semicolon at the end of a line)

Adding a mark to GOTO statements or labels


If a GOTO statement is included in an FP script, a mark "[replace goto]" is added to the target command and
label, as it is impossible to replace it with an equivalent process in a Ruby script.

Fig. 4.1.3.2 (k) Example in which replacement is impossible and a mark is added (jump command)

Changing the extension to "rb"


The ".dat" extension of FP scripts is converted to ".rb," which is the extension of a Ruby script, when the
conversion processing is completed.

Deleting the debug information


If the target script has been set to be debugged the setting is canceled.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 203/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.1.4 Syntax Check

The syntax check function is provided as a tool to help with the development of Ruby scripts.
For the timing and target files of syntax check, refer to "Table 4.1.4 (a) Timing of syntax check and files
targeted by it."

Table 4.1.4 (a) Timing of syntax check and files targeted by it


Timing of syntax check Target script files
Select the scripts to be checked in the Script List
Selected script files
dialog box and select [Check syntax...].
Select [Check syntax...] from the Script Editor menu. Script files being edited

If no errors are found as a result of the syntax check, the syntax check result OK dialog box appears. ("Fig. 4.1.4
(a) Ruby script syntax check result OK dialog box")
If any errors are found as a result of the syntax check, the syntax check result error dialog box appears. ("Fig.
4.1.4 (b) Ruby script syntax check result error dialog box")

Fig. 4.1.4 (a) Ruby script syntax check result OK dialog box

Fig. 4.1.4 (b) Ruby script syntax check result error dialog

If you select "Yes" in the syntax check result error dialog box, the error log file appears in a separate window.

4.1.4.1 Syntax Check from the Script Editor

To perform a syntax check from the Script Editor, select [Check syntax...] from the Script Editor menu.
For the content of the syntax check, refer to "4.1.4.2 Content of the Syntax Check."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 204/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

All the buttons on the Script Editor are disabled while the syntax check is being executed.
(For the Script Editor, refer to "4.1.2 Enhancement of Script Editor Functions.")

4.1.4.2 Content of the Syntax Check

The following are examples of cases in which a syntax check error occurs.
- A closing bracket is missing or an if statement is not closed.
- The string specified in a here document is not described.
- A double-byte space is in a portion other than a comment.
- Four or more symbols (@, =, etc.) appear consecutively.
- A variable name starts with a number.

NOTE
The following content will not cause a syntax check error due to the specification
of Ruby.
- An unknown function is described.
- A new line is started in the middle of a function name or variable name.
- The number of arguments of a function definition is incorrect.
For the syntaxes of Ruby scripts, refer to the references, etc. for Ruby scripts.

4.1.5 Checking for Characters Unavailable for Symbol Names

With the addition of Ruby scripts, certain symbols can no longer be used in a PMC symbol name or constant
symbol name.
For details, refer to "Table 4.1.5 (a) Symbol name specifications."

Table 4.1.5 (a) Symbol name specifications


Type New specification Previous specification
Available characters A to Z, a to z, 0 to 9 A to Z, a to z, 0 to 9
_ _
Characters that are available ( ) ? @ ‘{ } ~ ! ” # ’& ( ) * + , - < = > ? @ [ / ] ^ ‘ { | } ~
but not recommended
Characters that cannot be (None) %$
used at the beginning
Unavailable characters !"#'&*+,-<=>[/]^|¥%$:;. Blank, double-byte characters, :, ;, .
Blank, double-byte characters

If a PMC symbol name or constant symbol name is defined using an unavailable character, the error dialog box
appears. ("Fig. 4.1.5 (a) Symbol name check error dialog box")
In addition, symbol names are checked when they are imported from each symbol dialog box, and the error log
is displayed if an unavailable character is used.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 205/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.5 (a) Symbol name check error dialog box

An error also occurs when you attempt to open a project file containing a symbol name containing an
unavailable character.
For details, refer to "4.1.8 . Changes Due to Edition 8.0"

NOTE
If you open an existing project file containing a symbol name containing an
unavailable character in FANUC PICTURE 8.0 or later, please correct once to
use only characters that can be used in FANUC PICTURE earlier than 8.0.
Please confirm that MEM file creation is possible with FANUC PICTURE earlier
than 8.0 when correcting.( Operation can not be guaranteed if the project file that
becomes an error in MEM creation is converted and used 8.0 or later.)

4.1.6 MEM File Creation

You can create the MEM file by selecting [OK] in the MEM file creation dialog.

MEM file creation dialog box

Select [OK].

Error check
MEM file creation processing

The MEM file creation


processing completes.

MEM file

Fig. 4.1.6 (a) Overall image of MEM file creation

If an FP function listed in "Table 4.1.6 (a) List of FP functions that cannot be used in a timed script" is used in a
timed script, an error log will be output.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 206/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The MEM file creation failure dialog box appears. Select [Yes] to display the error log content.

Table 4.1.6 (a) List of FP functions that cannot be used in a timed script
Function name Description
sysinfo Reads the CNC system information
rdproginfo Reads the program information
skip Reads the skip position of a controlled axis
srvdelay Reads the servo delay amount of a controlled axis
accdecdly Reads the acceleration/deceleration delay amount for a controlled axis
statinfo Reads CNC status information
rdtofs Reads tool offset amount
rdzofs Reads work zero offset
rdparam Reads parameter
rdset Reads setting parameter
rdpitchr Reads pitch error compensation data
diagnoss Reads diagnostics data
rdgrpid Reads tool life management data (tool group number)
rdngrp Reads tool life management data (number of tool groups)
rdntool Reads tool life management data (number of tools)
rdlife Reads tool life management data (tool life)
rdcount Reads tool life management data (tool life counter)
rd1length Reads tool life management data (tool length compensation number 1)
rd2length Reads tool life management data (tool length compensation number 2)
rd1radius Reads tool life management data (tool radius compensation number 1)
rd2radius Reads tool life management data (tool radius compensation number 2)
t1info Reads tool life management data (tool information 1)
t2info Reads tool life management data (tool information 2)
toolnum Reads tool life management data (tool number)
setpath Writes path index (multi-path system)
rdpmacro Reads P-CODE variable
wrpmacro Writes P-CODE variable
getpath Reads path index (multi-path system)
wrtofs Writes tool offset amount
wrset Writes setting parameter
rdmacro Reads custom macro variable
wrmacro Writes custom macro variable
rdmodal Reads modal data
rdopmsg Reads operator's message
rdprgdir Reads program directory
progdel Deletes specified program
progsrch Searches for specified program
rdexecprog Reads the program being executed
rdncstats Reads CNC status information (2)
rdmemsize Reads D-RAM memory usage
GetDrvVersion Reads FP driver version
idrdtofs2 Reads tool offset amount (specified indirectly)
idwrtofs Writes tool offset amount (specified indirectly)
idrdmac Reads custom macro variable (specified indirectly)
idwrmac Writes custom macro variable (specified indirectly)
idprogdel Deletes specified program (specified indirectly)
idprogsrch Searches for specified program (specified indirectly)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 207/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Description


idrdset2 Reads setting parameter (specified indirectly)
idwrset Writes setting parameter (specified indirectly)
idrdpmac2 Reads P-CODE variable (specified indirectly)
idwrpmac2 Writes P-CODE variable (specified indirectly)
absolute2 Reads the absolute position of a controlled axis (type 2)
relative2 Reads the relative position of a controlled axis (type 2)
settimer Presets the calendar/clock
rdalminfo Reads the CNC alarm
msghis Reads the history message display data
rdprgdir2 Reads program directory (2)
setrdprgtop Increments/decrements the rdprgdir2 display pointer
copyval Copies the variable data
movrlap Reads manual overlapped motion value
rdopmsg2 Reads operator's message (2)
setproperty Reads/sets the control property
GetFPinfo Reads the FANUC PICTURE edition
swscreen Switches the screen
rdcursor Reads the cursor number
wrcursor Writes the cursor number
actf3 Reads the actual feed rate (F) of a controlled axis (3)
absolute3 Reads the absolute position of a controlled axis (type 3)
machine3 Reads the machine position of a controlled axis (type 3)
relative3 Reads the relative position of a controlled axis (type 3)
distance3 Reads the distance-yet-to-go of a controlled axis (type 3)
skip3 Reads the skip position of a controlled axis (type 3)
srvdelay3 Reads the servo delay amount of a controlled axis (type 3)
accdecdly3 Reads the acceleration/deceleration delay amount for a controlled axis (type 3)
rdtofs3 Reads tool offset amount (type 3)
rdzofs3 Reads work zero offset (type 3)
movrlap3 Reads manual overlapped motion value (type 3)
wrtool Writes the tool management data
deltool Deletes the tool management data
scroll Scrolls the message
chgtxtmsg Inputs/outputs text messages
wrparam Writes parameters
idrdpmcb Reads PMC (bit) (specified indirectly)
idwrpmcb Writes PMC (bit) (specified indirectly)
idrdpmc Reads PMC (1/2/4 bytes) (specified indirectly)
idwrpmc Writes PMC (1/2/4 bytes) (specified indirectly)
rdpmcbr Reads PMC arbitrary bit length
wrpmcbr Writes PMC arbitrary bit length
idxrdval Reads the array type record variable data
idxrdvalb Reads the array type record variable bit data
idxwrval Writes the array type record variable data
idxwrvalb Writes the array type record variable bit data
idxmvval Copies the array type record variable data
idxwridx Writes the array index number
idxrdvalbr2 Reads the array type record variable arbitrary bit data
idxwrvalbr2 Writes the array type record variable arbitrary bit data
setdecimal Changes the number of decimal places of the control
setmaxlimit Changes the maximum value of the control

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 208/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Description


setminlimit Changes the minimum value of the control
errno Reads the error code
seterrno Sets the error code
isnan Determines if it is NaN
acos Calculates the arc cosine
asin Calculates the arcsine
atan Calculates the arctangent
atan2 Calculates the arctangent (type 2)
ceil Rounds up to the nearest integer
cos Calculates the cosine
cosh Calculates the hyperbolic cosine
exp Calculates an exponential function
fabs Calculates the absolute value of a floating-point number
floor Discards decimal places
fmod Calculates the remainder of a floating-point number
frexp_mantissa Reads the mantissa part of a floating-point number
frexp_exponent Reads the exponent part of a floating-point number
ldexp Calculates the product of 2 raised to a power
log Calculates the natural logarithm
log10 Calculates the common logarithm
modf_integer Reads the integer part of a floating-point number
modf_decimal Reads the fractional part of a floating-point number
pow Calculates the power
sin Calculates the sine
sinh Calculates the hyperbolic sine
sqrt Calculates the square root
tan Calculates the tangent
tanh Calculates the hyperbolic tangent
settenkeypos Changes the ten key display position
FpSetProperty Sets properties
FpGetPropertyValue Function for reading properties (reading numerical values)
FpGetPropertyStr Function for reading properties (reading strings)

4.1.7 Debug Function

The same debug function as that for the FP script is provided in Ruby script as a tool to help with script
development.
Since the basic function is the same as the FP script, refer to "E3275_FANUC PICTURE FP Script Debug
Function" for details. In this chapter, only the differences from the debugging function of FP script are
described.
4.1.7.1 Setting the Break Types

When debugging Ruby scripts, select "Specified steps of specified scripts" for "Break occurs at:" and set the
breakpoints and break conditions.
If you select "First and last step of all scripts" or "All steps of all scripts," debugging of Ruby scripts cannot be
performed. For FP scripts, debugging can be performed with any break type settings, as before.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 209/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.1.7.2 [Debug settings] Dialog Box

In the [Debug settings] dialog box, you can set breakpoints in Ruby scripts, as well as in FP scripts.
For the [Debug settings] dialog box, refer to "Fig. 4.1.7.2 (a) [Debug settings] dialog box (scripts other than
timed scripts)" and "Fig. 4.1.7.2 (b) [Debug settings] dialog box (timed scripts)."

Fig. 4.1.7.2 (a) [Debug settings] dialog box (scripts other than timed scripts)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 210/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.7.2 (b) [Debug settings] dialog box (timed scripts)

Table 4.1.7.2 (a) Changes made to the [Debug setting] dialog box
Location Before change After change
- The display also includes Ruby scripts and
- FP scripts are displayed in order of
Contents of the script list displays them in order of script number.
script number.
(Refer to "Contents of Script List."
Display contents of the - All the scripts registered as timed scripts in the
- All the FP scripts with script numbers
script list on the [Timed Script List are displayed.
900 to 999 are displayed.
script] tab (Refer to "Contents of Script List."
- FP script: Set by the step address
Setting breakpoints - Set by the step address. - Ruby script: Set by the line number
(Refer to "Breakpoint setting.")
- The contents set in Ruby scripts are also
displayed.
- The contents set in FP scripts are - The Display Variable field has been added.
Contents of the debug list
displayed. This field is blank for FP scripts as display variables
cannot be set for FP scripts.
(Refer to "Contents of the debug list.")
[Debug operation signal] - Only WORD type and DWORD type symbols
- All registered symbols are displayed.
combo box on the [Script are displayed.
- Editable.
called from object] tab - Not editable.
[Debug operation signal]
- All registered symbols are displayed. - Only WORD type symbols are displayed.
combo box on the [Timed
- Editable. - Not editable.
script] tab
Settings for [Variable - The font used for displaying temporary variables
(No setting item)
display language setting] can be set by each multi-language key.
[Debug setting file - All registered symbols are displayed. - Only WORD type symbols are displayed.
operation] combo box - Editable. - Not editable.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 211/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Contents of the script list


Ruby scripts are displayed in addition to FP scripts.
Scripts are displayed in order of script number, as in the case of the Script List dialog box.
On the [Timed script] tab, all the scripts registered as timed scripts are displayed in the script list.

Fig. 4.1.7.2 (c) Script list

Setting breakpoints
In FP scripts, breakpoints are set by the step addresses. In Ruby scripts, they are set by line numbers including
comment lines and blank lines.
NOTE
Breaks do not occur if a comment line or blank line is specified as a breakpoint.

Fig. 4.1.7.2 (d) Breakpoint setting


Contents of the debug list
In addition to the step address, condition of arguments, condition of execution count, and debug target enable
signal that were displayed for FP scripts, the temporary variables that are output during the debug execution
when the break occurs (Display Variable) are displayed separated by commas.
This field is displayed for Ruby scripts when the variables are set; however, it is always left blank for FP scripts
because these variables cannot be set for FP scripts.
For how to set the display variables, refer to "4.1.7.3 [Break detail settings] Dialog Box."

Fig. 4.1.7.2 (e) Breakpoint setting

Debug operation signal / Debug setting file operation signal combo box
In the [Debug operation signal]/[Debug setting file operation signal] combo box, where all the symbols
registered in FP Script, only WORD type symbols are displayed in Ruby Script.
DWORD type symbols are also displayed only in the [Debug operation signal] combo box, which is displayed
when the [Script called from object] tab is selected.
These combo boxes cannot be edited.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 212/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.7.2 (f) Debug operation signal pull-down contents

Changes made to the debug screen for Ruby scripts depending on the debug
operation signal setting
When performing step execution when debugging Ruby scripts, create the debug setting file by setting a
DWORD type symbol for the debug operation signal.
When using this debug setting file, the [STEP] button appears in the debug window when debugging Ruby
scripts.
For information on the debug window, refer to "Debug Window and Log Output ."
For detailed information on the debug operation signal, refer to "4.1.7.5 Extension of the Debug Signal."

When breakpoints in Ruby scripts are enabled and a WORD type symbol is set as the debug operation signal, a
warning appears when [Output debug setting file...] is selected in the [Debug setting] dialog box.

Fig. 4.1.7.2 (g) Warning dialog box

Select [OK] to continue creation of the debug setting file.


Select [Cancel] to stop creation of the debug setting file.

Table 4.1.7.2 (b) Output content of the new warning displayed at the time of debug setting file output
Warning message Output timing How to cancel the Target script
warning
Ruby script STEP execution When the break Set a DWORD type Only for Ruby
cannot be performed points in the Ruby symbol as the debug scripts
because the debug script set as the operation signal.
operation signal symbol in script called from
the script called from object object are enabled
is WORD. and a WORD type
symbol is set as the
debug operation
signal.

4.1.7.3 [Break detail settings] Dialog Box

To set the break conditions, double-click the target line of the step list of the break list in the [Debug settings]
dialog box to display the [Break detail settings] dialog box.
The script type is displayed in the title of this dialog box.
For Ruby scripts, temporary variables to be output during the debug execution can be specified in addition to the
break conditions.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 213/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.7.3 (a) [Break detail settings] dialog box (Ruby script)

Table 4.1.7.3 (a) Changes made to the [Break detail settings] dialog box
Location FP script Ruby script
Specification of [Condition of
Specify inside the ( ) separated by commas.
arguments]
[Debug target enable signal] Only BOOL type symbols are displayed.
combo box Not editable.
Up to 10 variables to be output by the CNC
Specification of temporary Cannot be specified (same as the previous
can be specified.
variables ([Display variable]) dialog box).
*It is not required to specify these variables.

Specification of the condition of arguments


The condition of arguments is set in [Condition of arguments] in the [Break detail settings] dialog box, as in the
existing dialog box. However, the method for specifying argument reference variables has been changed to
surround them in round brackets and separate each of them by a comma.
If the specification of the condition of arguments is incorrect, an error occurs when [Output debug setting file...]
is selected in the [Debug settings] dialog box.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 214/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.7.3 (b) The debug setting file output error dialog boxes

Setting of the temporary variables to be displayed


To output temporary variables to the debug window log file when the break occurs, set the variable names in
Display Variable 1 through 10 in the [Break detail settings] dialog box.

4.1.7.4 Debug Window and Log Output

Debug window
When the specified break conditions are satisfied, the debug window is displayed if the log file output signal is
"0" and the debug target is something other than timer scripts.

Ruby script number and


the number of the line at which a break
occurred are displayed.

The values of the specified temporary


variables are displayed in the specified
font.

The execution history


is displayed using
line numbers.

The [CONTINUE] button shrinks and


the [STEP] button is displayed.

Fig. 4.1.7.4 (a) Debug window in the "Small(14inch)" font (extension signal ON)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 215/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Ruby script number and


the number of the line at which a break
occurred are displayed.

The values of the specified temporary


variables are displayed in the specified
font.

The execution history


is displayed using
line numbers.

Fig. 4.1.7.4 (b) Debug window in the "Small(14inch)" font (extension signal OFF)

Ruby script number and


the number of the line at which a break
occurred are displayed.

The values of the specified temporary


variables are displayed in the specified font.

The [STEP] button is displayed.

Fig. 4.1.7.4 (c) Debug window in the "Big(9inch)" font (extension signal ON) - Page 1

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 216/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The execution history


is displayed using
line numbers.

Fig. 4.1.7.4 (d) Debug window in the "Big(9inch)" font (extension signal ON) - Page 2

Ruby script number and


the number of the line at which a break
occurred are displayed.

The values of the specified temporary


variables are displayed in the specified font.

Fig. 4.1.7.4 (e) Debug window in the "Big(9inch)" font (extension signal OFF) - Page 1

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 217/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The execution history


is displayed using
line numbers.

Fig. 4.1.7.4 (f) Debug window in the "Big(9inch)" font (extension signal OFF) - Page 2

Table 4.1.7.4 (a) List of differences between the debug window contents
Displayed content FP script Ruby script
Item name at the beginning FPS# RBS#
Execution history or Line number 65535 is displayed for the debug information after
step address
breakpoints execution of the last line.
- General
- Only the variables specified in [Display variable] in the
[Break detail settings] dialog box are displayed.
- Variable name and variable value are divided by a colon ":".
- When the number of variables specified in [Display variable]
is less than 10, "-:-" is displayed in the line for the unset
items.

- Content displayed for variable names


- Characters are left-aligned up to eight characters.
All the temporary - When the variable name has more than eight characters, the
Temporary variables variables are eighth and subsequent characters are abbreviated as "˜".
displayed. - Content displayed for variable values
- Up to 56 characters are displayed for the "Small(14inch)"
font, and 26 characters for the "Big(9inch)" font, aligned to
the left. The portion exceeding the display range is
abbreviated as "˜".
- If variables exist in the script but are not defined, they are
displayed as nil.
- When no variables exist in the script, the following is
displayed.
NoMethodError: undefined method '(variable name)' for
(object name)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 218/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Displayed content FP script Ruby script


- When the extension signal is ON
[STEP] button
Buttons in ‘Small(14inch) ’font [CONTINUE]
[COUNT] button
display button
- When the extension signal is OFF
[CONT.] button
- When the extension signal ls ON
[STEP] button
[CONT.] button
[CONT.] button [PG-DW] button
Buttons in ‘Big(9inch) ’font
[PG-DW] button [PG-UP] button
display
[PG-UP] button - When the extension signal ls OFF
[CONT.] button
[PG-DW] button
[PG-UP] button

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 219/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Changes to the button content and button operations


If the extension signal is ON when the debug window for Ruby scripts is displayed, you can select operations
with the [STEP] and [CONT.] button.
Select [STEP]: The processing proceeds to the following step and the debug window is displayed.
Select [CONT.]: The processing proceeds to the next breakpoint and the debug window is displayed.

Valid range of the displayed temporary variables


The content of the temporary variables displayed when the [STEP] button is selected are those that were set for
the breakpoint at which a break occurred before starting the STEP execution.
However, if the destination reached after the STEP execution is set as another breakpoint, the content changes to
that that was set for the breakpoint at the destination.
At this time, even if the settings of the condition of arguments, condition of execution count, and debug target
enable signal are different, the break is performed without applying them.

Log file output


When the specified break condition is satisfied, the log file is output in text format to the memory card in the
following cases.
- When the log file output signal is "1"
- When the target is timer scripts

The output of the log file is the same as the content displayed in the "Small(14inch)" font.
Unicode is used as the character code.

Log file name


The log file name is different for each script type.

Table 4.1.7.4 (b) Types and log file names for Ruby scripts
Script type Log file name (*)
FP script: FPSxxx.nnn
Other than timer scripts
Ruby script: RBSxxx.nnn
FP script: TFPSxxx.nnn
Timer scripts
Ruby script: TRBSxxx.nnn
xxx: Script number
nnn: The extension is a three-digit serial number combining numbers starting from 000 and alphabetical
letters.

Each time the break condition is satisfied, a separate log file is output.
When a file with the same name already exists or the log file could not be output to the memory card, the
information of the first line of the first three items (FPS#... or RBS#…) is retained without outputting the file,
and the debug processing is continued.

4.1.7.5 Extension of the Debug Signal

When using the extension signal for the debug operation signal, the debug operation signal is extended to the
DWORD type.
The content of the extended range is as follows.
No change has been made to the content of the first and second byte of the debug operation signal.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 220/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

#7 #6 #5 #4 #3 #2 #1 #0
3rd byte STEP
(Input signal) -
Upper stage: Signal for the screen display scripts
Lower stage: Signal for timer-activated scripts

Step execution signal STEP


[Category] Input signal
[Function] Advance the processing to the next step.
[Operation] When this signal is set to "0" → "1" → "0," the current debug window is closed and the
processing is advanced to the next step. After that, the debug window is displayed again.
The following shortcut key also performs the same operation.
Shortcut key: MDI key <1>

4.1.8 Changes Due to Edition 8.0

The following changes were made to the [Create project] and [Open project] menu items.

Extension
The new FP Editor supports the following extensions.

Table 4.1.8 (a) Mode and Extension Correspondence Table


Target mode Create project Open project
Standard display .fp2 .fpp *, .fp2
iHMI .fp2x .fppx *, .fp2x
*: Extension for projects created with the old FP Editor. If selected with the new editor, they will be converted.
For more information on coversion, refer to "Conversion Function."

Error when executing "Open project"


When opening a project with FP Editor, if the project is not supported, an error occurs and the project cannot be
opened.

The [Open project] operation performed by FP Editor will be as follows.

Table 4.1.8 (b) Editor and Project Correspondence Table


Type of project to be opened Support for [Open project] Operation
Projects created with an old × Not supported Open error *
version of FP Editor  Supported Conversion performed
Projects created with the new FP × Not supported Open error *
Editor  Supported Open
* If a script file is operated on directly from Explorer or some other program, a script not supported by
the FP Editor may be included in the project. A script version error occurs for the project and it cannot
be opened with the FP Editor.

Open error
If an attempt is made to use FP Editor to open an unsupported project, an open error occurs and the following
dialog is shown. In this case, the project cannot be opened.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 221/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.1.8 (a) Project Open Error Dialog

Script version error


If an attempt is made to use FP Editor to open a project that includes an unsupported FP script, a script version
error occurs and the following dialog is shown. In this case, the project cannot be opened.

Fig. 4.1.8 (b) Script Version Error Dialog

Symbol definition check error


In the new FP Editor, if a character that cannot be used is included in the PMC symbol name or constant symbol
name, a symbol definition check error occurs when opening the project.
In this case, the following dialog is displayed and the project cannot be opened.
For more information, see "Checking for Characters Unavailable for Symbol Names."

Fig. 4.1.8 (c) Symbol Definition Check Error Dialog

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 222/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
If you open an existing project file containing a symbol name containing an
unavailable character in FANUC PICTURE 8.0 or later, please correct once to
use only characters that can be used in FANUC PICTURE earlier than 8.0.
Please confirm that MEM file creation is possible with FANUC PICTURE earlier
than 8.0 when correcting.( Operation can not be guaranteed if the project file that
becomes an error in MEM creation is converted and used 8.0 or later.)

4.1.9 Other Functions

Function name symbol function


FP function symbols can be used from Ruby scripts as well.

- Formats for FP function symbols are shown below. If the format is not followed, an error occurs.

Table 4.1.9 (a) FP Function Symbol Formats for the New FANUC PICTURE
Location used Symbol format Example Value format Example value
symbol
FP script End it with “[“ TEST[ - Only one “[“ exists rdpmc[5_100_
- Arguments are separated with ”_”
Ruby script End it with “(“ TEST( - Only one “(“ exists rdpmc(5,100,
control action - Arguments are separated with ”,”

- If an FP function symbol is already registered at the time of project conversion, the FP function symbol is
additionally registered in the format for Ruby script control action.

FP function for reading and writing character strings and character string variables
In Ruby scripts, FP functions (rdstr, wrstr) for reading and writing character strings and character string
variables (SVAL0 to SVAL9) can be used.
This allows character strings stored in the PMC area, P-CODE variable, or key-in buffer to be read with Ruby
scripts by using the FP function for reading character strings (rdstr). Once the character strings are edited within
the Ruby script, the character string can be stored in the PMC area, P-CODE variable, or key-in buffer again by
using the FP function for writing character strings (wrstr). Additionally, edited character strings can be
displayed in the numerical value character string display control.

There were no changes to the function specifications for the FP functions for reading and writing character
strings. For details, refer to FANUC PICTURE MANUAL (Edition 06.2 or later)(A-40712).
The following syntaxes can be used in Ruby scripts using the FP functions for reading and writing character
strings and character string variables.

Table 4.1.9 (b) Examples of Supported Ruby Script Syntaxes


Syntax Description Difference compared to FP
script
temp = rdstr(400, 0, 0, 10, 99, 0) Read 10 bytes from the key-in buffer and Yes
store in the temporary variable "temp." Character strings can be
stored in an arbitrary
temporary variable.
SVAL0 = rdstr(105, 1000, 0, 20, 9, 3000) Read 1 byte each of character strings from Yes
R1000 to R1021 and store in the character Character strings can be

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 223/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Syntax Description Difference compared to FP


script
string variable "SVAL0." Notify D3000 of stored in SVAL0 to 9.
the processing results.
SVAL1 = SVAL0 + "123" + temp.to_s Add "123" to the content of the temporary Yes
variable temp and the character string The read character string
variable SVAL0, then store the resultant can be edited.
character string in character string variable
SVAL1.
DISP_VAL = SVAL1 Store the content stored in character string No
variable SVAL1 in variable DISP_VAL for
displaying the numerical value/character
string display control.
wrstr(300, 10000, 0, 50, 1, 99, 0) Write 1 byte each of the character string No
stored in the character string variable
SVAL1 to P-CODE variables 10000 to
10049.

Syntaxes that are normally supported in Ruby script but that return an error (there is code that cannot be used in
the program) when creating MEM in Ruby script using the FP functions for reading and writing character
strings and character string variables, and response examples are shown below.

Table4.1.9 (c) Examples of Ruby Script Syntaxes that Return a Script Error
Syntax Description Examples of responses to errors
SVAL0 += "123" Write the script by omitting the "store the Do not omit this part.
character string resulting from adding "123" SVAL0 = SVAL0 + "123"
to the current content of the character string
variable SVAL0 in SVAL0."
DISP_VAL = temp.to_s + "123" Store the character string resulting from Store temp.to_s + "123" in SVAL1
adding "123" to the content stored in the and store SVAL1 in DISP_VAL.
temporary variable temp directly in variable SVAL1 = temp.to_s + "123"
DISP_VAL for displaying the numerical DISP_VAL = SVAL1
value/character string display control.
DISP_VAL = SVAL0 + "123" Store the character string resulting from Store SVAL0 + "123" in SVAL1 and
adding "123" to the character string variable store SVAL1 in DISP_VAL.
SVAL0 directly in variable DISP_VAL for SVAL1 = SVAL0 + "123"
displaying the numerical value/character DISP_VAL = SVAL1
string display control.
DISP_VAL = "123" Store "123" directly in variable DISP_VAL for Store "123" in SVAL1 and store
displaying the numerical value/character SVAL1 in DISP_VAL.
string display control. SVAL1 = "123"
DISP_VAL = SVAL1

NOTE
If a character string-type temporary variable other than character string variables SVAL0
to 9 is stored in DISP_VAL, an error is returned when the script is executed.
Syntax example)
temp=”123”
DISP_VAL=temp

Character string variables are SVAL0 to SVAL9 in Ruby script. If they were described as SVAL[0] to SVAL[9]
in an FP script, they are converted to SVAL0 to SVAL9.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 224/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
SVAL0 to SVAL9 are reserved words indicating "character string variables." Therefore,
they cannot be used in Ruby scripts as constants.

Normally, Ruby scripts can handle character strings. SVAL0 to 9 exist so that compatibility with FP script
syntaxes is maintained when conversion to a Ruby script is performed. For Ruby scripts, we recommend the
following usage when reflecting character strings in the control using the FP functions for reading or writing
character strings (rdstr, wrstr).
[Examples of use in Ruby script]
Overview: Periodically reflect the character string written in the PMC in the label control caption.
1 Place the label control "FPLabel1" on the screen. The screen on which it was placed is screen 1.
2 Create a script to read the character string from the key-in buffer control, save it in the PMC, and register it
to start from button control.
Syntax example)
wrstr(105, 1000, 0, 50, 400, 99, 0) # Read characters from key-in buffer and write 50 bytes from R1000
3 Read the character string saved in the PMC, create a script to change the label control caption, and register
it as a startup script so that it starts up periodically as a timer-activated script.
Syntax example)
str = rdstr(105, 1000, 0, 50, 99, 0) # Read 50 bytes from R1000 to variable str.
FpSetProperty(1, "FPLabel1", SET_ONCAPTION, str, 0) # Change the caption for "FPLabel1" on screen
1 to the content of the variable str

4.2 Functional Difference with FP Script

4.2.1 List of FP functions that can be used in Ruby scripts

Refer to the following list of functions to find out whether or not an FP function can be used in a Ruby script.

NOTE
For function specifications and compatible models, see "FANUC PICTURE
OPERATOR'S MANUAL (B-66284EN_09.pdf)."

[FP function for CNC window]


Table4.2.1 (a) List of FP Functions for CNC Window
No. API name Description Script Script call
usability
<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP

1. sysinfo Reads the CNC system information ×     


2. rdproginfo Reads the program information    ×  
3. rdprgnum Reads the program number of the      
program being executed
4. rdseqnum Reads the sequence number of the      
sequence being executed
5. actf Reads the actual feed rate (F) of a      

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 225/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Script Script call


usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
controlled axis
6. acts Reads actual spindle speed (S)      
7. absolute Reads the absolute position of a      
controlled axis
8. machine Reads the machine position of a      
controlled axis
9. relative Reads the relative position of a      
controlled axis
10. distance Reads the distance-yet-to-go of a      
controlled axis
11. skip Reads the skip position of a controlled    ×  
axis
12. srvdelay Reads the servo delay amount of a    ×  
controlled axis
13. accdecdly Reads the acceleration/deceleration    ×  
delay amount for a controlled axis
14. statinfo Reads CNC status information    ×  
15. alarm Reads alarm status      
16. rdtofs Reads tool offset amount    ×  
17. rdzofs Reads work zero offset    ×  
18. rdparam Reads parameter    ×  
19. rdset Reads setting parameter    ×  
20. rdpitchr Reads pitch error compensation data    ×  
21. diagnoss Reads diagnostics data    ×  
22. adcnv Reads A/D conversion data      
23. rdgrpid Reads tool life management data (tool    ×  
group number)
24. rdngrp Reads tool life management data    ×  
(number of tool groups)
25. rdntool Reads tool life management data    ×  
(number of tools)
26. rdlife Reads tool life management data (tool life)    ×  
27. rdcount Reads tool life management data (tool    ×  
life counter)
28. rd1length Reads tool life management data (tool    ×  
length compensation number 1)
29. rd2length Reads tool life management data (tool    ×  
length compensation number 2)
30. rd1radius Reads tool life management data (tool    ×  
radius compensation number 1)
31. rd2radius Reads tool life management data (tool    ×  
radius compensation number 2)
32. t1info Reads tool life management data (tool    ×  
information 1)
33. t2info Reads tool life management data (tool    ×  
information 2)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 226/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Script Script call


usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
34. toolnum Reads tool life management data (tool    ×  
number)
35. setpath Writes path index (multi-path system)    ×  
36. rdpmacro Reads P-CODE variable × × × × × ×
37. wrpmacro Writes P-CODE variable × × × × × ×
38. loadtorq Reads abnormal load torque (estimated      
load torque) data
39. getpath Reads path index (multi-path system)    ×  
40. wrtofs Writes tool offset amount    ×  
41. wrset Writes setting parameter    ×  
42. rdmacro Reads custom macro variable × × × × × ×
43. wrmacro Writes custom macro variable × × × × × ×
44. rdmodal Reads modal data ×     
45. rdopmsg Reads operator's message ×     
46. rdprgdir Reads program directory ×     
47. progdel Deletes specified program    ×  
48. progsrch Searches specified program    ×  
49. rdexecprog Reads the program being executed ×     
50. rdncstats Reads CNC status information (2) ×     
51. rdmemsize Reads D-RAM memory usage    ×  
52. GetDrvVersion Reads FP driver version ×     
53. idrdtofs2 Reads tool offset amount (specified × × × × × ×
indirectly)
54. idwrtofs Writes tool offset amount (specified × × × × × ×
indirectly)
55. idrdmac Reads custom macro variable × × × × × ×
(specified indirectly)
56. idwrmac Writes custom macro variable × × × × × ×
(specified indirectly)
57. idprogdel Deletes specified program (specified × × × × × ×
indirectly)
58. idprogsrch Searches specified program (specified × × × × × ×
indirectly)
59. idrdset2 Reads setting parameter (specified × × × × × ×
indirectly)
60. idwrset Writes setting parameter (specified × × × × × ×
indirectly)
61. idrdpmac2 Reads P-CODE variable (specified × × × × × ×
indirectly)
62. idwrpmac2 Writes P-CODE variable (specified × × × × × ×
indirectly)
63. absolute2 Reads the absolute position of a    ×  
controlled axis (type 2)
64. relative2 Reads the relative position of a    ×  
controlled axis (type 2)
65. settimer Presets the calendar/clock   × × × 

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 227/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Script Script call


usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
66. rdalminfo Reads the CNC alarm ×     
67. msghis Reads the history message display data ×     
68. rdprgdir2 Reads program directory (2) ×     
69. setrdprgtop Increments/decrements the rdprgdir2   × × × 
display pointer
70. copyval Copies the variable data × × × × × ×
71. movrlap Reads manual overlapped motion value    ×  
72. rdopmsg2 Reads operator's message (2) ×     
73. setproperty Reads/sets the control property    ×  
74. GetFPinfo Reads the FANUC PICTURE edition ×     
75. swscreen Switches the screen   × ×  
76. rdcursor Reads the cursor number   × ×  
77. wrcursor Writes the cursor number   × × × 
78. acts2 Reads actual spindle speed (S) (2)      
79. actf3 Reads the actual feed rate (F) of a   × × × 
controlled axis (3)
80. absolute3 Reads the absolute position of a   × × × 
controlled axis (type 3)
81. machine3 Reads the machine position of a   × × × 
controlled axis (type 3)
82. relative3 Reads the relative position of a   × × × 
controlled axis (type 3)
83. distance3 Reads the distance-yet-to-go of a   × × × 
controlled axis (type 3)
84. skip3 Reads the skip position of a controlled   × × × 
axis (type 3)
85. srvdelay3 Reads the servo delay amount of a   × × × 
controlled axis (type 3)
86. accdecdly3 Reads the acceleration/deceleration   × × × 
delay amount for a controlled axis (type 3)
87. rdtofs3 Reads tool offset amount (type 3)   × × × 
88. rdzofs3 Reads work zero offset (type 3)   × × × 
89. movrlap3 Reads manual overlapped motion value   × × × 
(type 3)
90. swpath Switches the CNC/PMC path      
91. rdspload Reads information about the load on      
the serial spindle
92. fetchtool Fetches the tool management data      
93. rdtool Reads the tool management data      
94. unfetchtool Releases the tool management data      
95. wrtool Writes the tool management data    ×  
96. deltool Deletes the tool management data    ×  
97. scroll Scrolls the message    ×  
98. chgtxtmsg Inputs/outputs text messages    ×  
99. wrparam Writes parameters    ×  

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 228/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[FP function for PMC window]


Table4.2.1 (b) List of FP Functions for PMC Window
No. API name Description Script Script call
usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
1. wrpmcb Writes PMC (bit)      
2. rdpmc Reads PMC (1/2/4 bytes)      
3. wrpmc Writes PMC (1/2/4 bytes)      
4. rdpmcb Reads PMC (bit)      
5. idrdpmcb Reads PMC (bit) (specified indirectly) × × × × × ×
6. idwrpmcb Writes PMC (bit) (specified indirectly) × × × × × ×
7. idrdpmc Reads PMC (1/2/4 bytes) (specified × × × × × ×
indirectly)
8. idwrpmc Writes PMC (1/2/4 bytes) (specified × × × × × ×
indirectly)
9. rdpmcbr Reads the PMC arbitrary bit length    ×  
10. wrpmcbr Writes the PMC arbitrary bit length    ×  

[FP function for input/output of array type record variable data]


Table4.2.1 (c) List of FP functions for Input/Output of Array Type Record Variable Data
No. API name Description Script Script call
usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP

1. idxrdval Reads the array type record variable data    ×  


2. idxrdvalb Reads the array type record variable bit data    ×  
3. idxwrval Writes the array type record variable data    ×  
4. idxwrvalb Writes the array type record variable bit data    ×  
5. idxmvval Copies the array type record variable data    ×  
6. idxwridx Writes the array index number    ×  
7. idxrdvalbr2 Reads the array type record variable    ×  
arbitrary bit data
8. idxwrvalbr2 Writes the array type record variable    ×  
arbitrary bit data

[Script-specific FP Functions]
Table4.2.1 (d) List of Script-specific FP Functions
No API name Description Script Script call
. usability
<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP

1. setdecimal Changes the number of decimal places   × × × 


of the control
2. setmaxlimit Changes the maximum value of the control   × × × 

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 229/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No API name Description Script Script call


. usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
3. setminlimit Changes the minimum value of the control   × × × 
4. getmacval Reads macro variable      
5. setmacval Writes macro variable      
6. errno Reads the error code    ×  
7. seterrno Sets the error code    ×  
8. isnan Determines if it is NaN    ×  
9. acos Calculates the arc cosine    ×  
10. asin Calculates the arcsine    ×  
11. atan Calculates the arctangent    ×  
12. atan2 Calculates the arctangent (type 2)    ×  
13. ceil Rounds upward to an integer    ×  
14. cos Calculates the cosine    ×  
15. cosh Calculates the hyperbolic cosine    ×  
16. exp Calculates an exponential function    ×  
17. fabs Calculates the absolute value of a    ×  
floating-point number
18. floor Discards decimal places    ×  
19. fmod Calculates the remainder of a    ×  
floating-point number
20. frexp_mantissa Reads the mantissa part of a    ×  
floating-point number
21. frexp_exponent Reads the exponent part of a    ×  
floating-point number
22. ldexp Calculates the product of 2 raised to a power    ×  
23. log Calculates the natural logarithm    ×  
24. log10 Calculates the common logarithm    ×  
25. modf_integer Reads the integer part of a floating-point    ×  
number
26. modf_decimal Reads the fractional part of a    ×  
floating-point number
27. pow Calculates the power    ×  
28. sin Calculates the sine    ×  
29. sinh Calculates the hyperbolic sine    ×  
30. sqrt Calculates the square root    ×  
31. tan Calculates the tangent    ×  
32. tanh Calculates the hyperbolic tangent    ×  
33. set_handler Executes the FP script after every      
specified time period
34. remove_handler Remove the FP script number setting set      
in set_handler
35. settenkeypos Changes the ten key display position    ×  
36. rdstr Function for reading strings      
37. wrstr Function for writing strings      
38. str_keyinput Inputs keys    ×  
39. sleep Stops tasks for a specific time period (msec)      

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 230/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

* str_keyinput can only be used in FANUC PICTURE for iHMI version.

[Ruby Script-specific FP Functions]


Table4.2.1 (e) List of Ruby Script-specific FP Functions
No. API name Description Script Script call
usability

<delete>

Control
Startup

Timer
script

script

script

script

Event
script

script
Ruby
FP
1. MsgBoxShow Function for showing the message box ×     
2. FpSetProperty Function for setting a property ×     
3. FpGetProperty Function for reading a property (reading ×     
Value numerical values)
4. FpGetProperty Function for reading a property (reading ×     
Str strings)
5. LangCaption Reads strings corresponding to the ×     
language set by the system

4.2.2 Using User Functions in Ruby Script

User functions can be used in the same way as in FP script.


For details on how to use user functions, see "FANUC PICTURE OPERATOR'S MANUAL
(B-66284EN_09.pdf)."

4.3 mruby LICENSE DISPLAY

4.3.1 Overview

FP driver is equipped with mruby, which is under MIT license. Therefore, the "copyright notice and this license
display" for mruby must be shown to the user.

In the FANUC PICTURE, "copyright notice and this license display" can be displayed by default, but if "No
setting" is selected for the License Key Code, the license screen will not be displayed. In this case, "copyright
notice and this license display" for mruby must be performed separately to meet the conditions of the MIT
license.
4.3.2 Diagram

The license display screen pops up in the center of the screen.


The full MIT license text (MITL.txt) is copied to the memory card when [OUTPUT] is selected or the input
<INPUT> key is selected.
The license display screen is hidden when [Close] is selected or the cancel <CAN> key is selected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 231/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 4.3.2 (a) License Display Screen (Small Font)

Fig. 4.3.2 (b) License Display Screen (Big Font)

Fig. 4.3.2 (c) License Display Screen (iHMI version)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 232/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.3.3 Operation

Selecting the license screen display key (set value) multiple times (set value) consecutively within 3 seconds
displays the license display screen.
The license screen will not be displayed while the message box is displayed.

4.3.4 Properties

The setting for displaying the license display screen is described below.

License display screen setting


The items that can be set in the [Setting of Project] dialog related to the license display screen are shown below.

Fig. 4.3.4 (a) Image Diagram of License Display Screen Setting

Table 4.3.4 (a) List of License Display Screen Setting Properties


Setting item Entry type Setting value Initial value Remarks
License Key Code Selection No setting, O Select the key for displaying the license screen.
A to Z, 0 to 9 If "No setting" is selected, the license display screen
will not be displayed.
License Key Push Selection 5 to 10 5 Select the push count required for displaying the
Count license screen.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 233/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
If "No setting" is selected for the License Key Code, the license screen will not be
displayed. In this case, "copyright notice and this license display" for mruby must
be performed separately to meet the conditions of the MIT license.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 234/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5 LIBRARY FUNCTIONS CAN BE USED FROM


RUBY SCRIPT

The following library functions can be used in Ruby script. The library function list is shown from the next
chapter.

・CNC window library


・PMC window library
・File operation library
・Serial library
・F-ROM library
・Network library
・ANSI C standard library
・MS-C extended C standard library
・mruby extension library

5.1 LISTS OF FUNCTIONS

The available library functions are listed below.

[List of functions related to CNC window library controlled axis/spindle]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
Start up

display

Control
script

script
iHMI
PMi-A

PMi-A
Non

1.1 cnc_rddynamic Reads dynamic data.       


1.2 cnc_wrrelpos Clears or presets relative position of       
controlled axis.
1.3 cnc_exaxisname2 Reads extended axis name (2).       
1.4 cnc_rdaxisdata Reads controlled axis/spindle-related data.       
1.5 cnc_rd5axmandt Reads three-dimensional manual feed data.       
1.6 cnc_rd5axovrlap Reads machine axis travel distance in       
three-dimensional manual feed.
1.7 cnc_clr5axpls Clears three-dimensional manual feed       
pulses.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 235/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[List of functions related to CNC window library program]


No. API name Description Applicable Ruby script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
cnc_vrfstart Starts output of NC program to be       
2.1
compared.
2.2 cnc_verify Outputs NC program to be compared.       
cnc_vrfend Stops output of NC program to be       
2.3
compared.
2.4 cnc_seqsrch Searches for a sequence number.       
cnc_rdpdf_drive Reads program storage drive       
2.5
information.
2.6 cnc_rdpdf_inf Reads program storage file information.       
2.7 cnc_rdpdf_curdir Reads current directory information.       
2.8 cnc_wrpdf_curdir Sets current directory.       
2.9 cnc_rdpdf_subdir Reads subdirectory information.       
2.10 cnc_rdpdf_alldir Reads file list information.       
2.11 cnc_pdf_add Creates a directory or file.       
2.12 cnc_pdf_del Deletes a directory or file.       
2.13 cnc_pdf_rename Renames a directory or file.       
2.14 cnc_pdf_slctmain Selects the main program.       
2.15 cnc_wrpdf_attr Changes attributes of a folder or file.       
cnc_rdpdf_subdirn Gets the number of folders and files in       
2.16
the specified directory.
2.17 cnc_pdf_rdmain Gets the main program information.       
cnc_dwnstart4 Starts output of NC program to be       
2.18
registered (4).
2.19 cnc_download4 Outputs NC program to be registered (4).       
cnc_dwnend4 Stops output of NC program to be       
2.20
registered (4).
2.21 cnc_upstart4 Starts reading NC program (4).       
2.22 cnc_upload4 Reads NC program (4).       
2.23 cnc_upend4 Stops reading NC program (4).       
cnc_exeprgname Reads name of the program being       
2.24
executed.
cnc_exeprgname2 Reads name of the program being       
2.25
executed (full path format).
2.26 cnc_wrmdiprog Writes the MDI program.       
cnc_rdmdipntr Reads the execution pointer for MDI       
2.27
operation.
cnc_wrmdipntr Writes the execution pointer for MDI       
2.28
operation.
2.29 cnc_rdpdf_line Reads a program line by line.       
2.30 cnc_wrpdf_line Writes a program line by line.       
2.31 cnc_pdf_delline Deletes a program line by line.       
2.32 cnc_pdf_rdactpt Gets the program execution pointer.       
2.33 cnc_pdf_wractpt Sets the program execution pointer.       
2.34 cnc_saveprog_start Starts saving the NC program.       

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 236/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Ruby script call


equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
2.35 cnc_saveprog_end Ends saving the NC program.       

[List of functions related to CNC window library data files for NC]
No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
3.1 cnc_rdparar Reads parameters (range specified).       
3.2 cnc_wrparas Writes parameters (multiple output).       
3.3 cnc_rdwkcdshft Reads workpiece coordinate system shift.       
3.4 cnc_wrwkcdshft Writes workpiece coordinate system shift.       
3.5 cnc_rdpitchinfo Reads pitch error compensation data       
information
3.6 cnc_rdmacroinfo Reads custom macro variable       
information.
3.7 cnc_rdparanum Reads the minimum parameter number,       
maximum parameter number, and total
number of parameters.
3.8 cnc_rdsetnum Reads the minimum setting parameter       
number, maximum setting parameter
number, and total number of setting
parameters.
3.9 cnc_rdtofsinfo2 Reads tool offset information (2).       

[List of functions related to CNC window library tool life management data]
No. API name Description Applicable Script call
equipment
Standard
Timer script

Event script
display
Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non

cnc_rdtoolrng Reads tool life management data       


4.1 (number of tools, tool life, life counter)
(range specified).
cnc_wrcountr Writes tool life management data (life       
4.2
counter) (range specified).
cnc_rdusegrpid Reads tool life management data       
4.3
(number of the tool group to be used).
4.4 cnc_rdmaxgrp Reads tool life management data       

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 237/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
(maximum number of tool groups that
can be registered).
cnc_rdmaxtool Reads tool life management data       
4.5 (maximum number of tools that can be
registered in a group).
cnc_rdusetlno Reads tool life management data (ordinal       
4.6
number of the tool to be used in a group).
cnc_rd1tlifedat2 Reads tool life management data (tool       
4.7
data 1) (2).
cnc_rd2tlifedata Reads tool life management data (tool       
4.8
data 2).
cnc_wr1tlifedat2 Writes tool life management data (tool       
4.9
data 1) (2).
cnc_wr2tlifedata Writes tool life management data (tool       
4.10
data 2).
cnc_wrgrpinfo Writes tool life management data (tool       
4.11
group information).
cnc_wrgrpinfo2 Writes tool life management data (tool       
4.12
group information 2).
cnc_wrgrpinfo3 Writes tool life management data (tool       
4.13
group information 3).
cnc_deltlifegrp Deletes tool life management data (tool       
4.14
group information).

[List of functions related to CNC window library tool management data]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
Start up

display

Control
script

script
iHMI
PMi-A

PMi-A
Non

cnc_regtool_f2 Registers tool management data as a       


5.1 new entry (when customization data
items 21 to 40 are used).
cnc_wrtool_f2 Writes tool management data (when       
5.2 customization data items 21 to 40 are
used).
cnc_regmagazine Registers magazine management data       
5.3
as a new entry.
5.4 cnc_delmagazine Deletes magazine management data.       
5.5 cnc_rdmagazine Reads magazine management data.       
cnc_wrmagazine Writes individual items in magazine       
5.6
management data.
5.7 cnc_wrtoolgeom_tlm Writes tool geometry data. ×      

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 238/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
Start up
display

Control
script

script
iHMI
PMi-A

PMi-A
Non
5.8 cnc_rdtoolgeom_tlm Reads tool geometry data. ×      
5.9 cnc_rdtlgeomsize_ext Reads the tool geometry size data. ×      
cnc_wrtlgeomsize_ext Writes/Deletes the tool geometry size ×      
5.10
data.
5.11 cnc_rdmag_property Reads the magazine property data. ×      
5.12 cnc_wrmag_property Writes the magazine property data. ×      
5.13 cnc_delmag_property Deletes the magazine property data. ×      
5.14 cnc_rdpot_property Reads the pot property data. ×      
5.15 cnc_wrpot_property Writes the pot property data. ×      
5.16 cnc_delpot_property Deletes the pot property data. ×      
5.17 cnc_tool_move Moves the tool data. ×      
cnc_btlfpotsrh Searches the free pot for the oversize ×      
5.18
tool.

[List of functions related to CNC window library history data]


No. API name Description Applicable Script call
equipment
Standard

Control script
Timer script

Event script
display

Start up
script
iHMI
PMi-A

PMi-A
Non

6.1 cnc_stopophis Stops history data sampling.       


6.2 cnc_startophis Resumes history data sampling.       
cnc_rdophisno Reads the number of operation history       
6.3
data items.
6.4 cnc_clearophis Clears history data.       
cnc_rdalmhisno Reads the number of alarm history data       
6.5
items.
cnc_rdomhisno Reads the number of external operator's       
6.6
message history data items.

[List of functions related to the CNC window library data server]


No. API name Description Applicable Script call
equipment
Standard
Timer script

Event script

display
Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non

7.1 cnc_rddsfile Gets file list information.       


7.2 cnc_rddsdir Gets the current folder.       
7.3 cnc_dschdir Changes the current folder.       
7.4 cnc_dsmkdir Makes a folder.       

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 239/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
7.5 cnc_dsrmdir Deletes a folder.       
7.6 cnc_dsremove Deletes a file.       
cnc_rddsdevinfo Gets memory device information on the       
7.7
data server.
7.8 cnc_dsrename Changes a folder name or file name.       
7.9 cnc_dscopyfile Copies a file on the data server.       

[List of other functions in the CNC window library]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
cnc_getfigure Reads the maximum number of       
8.1 significant figures and the number of
decimal places.
cnc_rdsyssoft3 Reads the series and version of the       
8.2
CNC system software (3).
8.3 cnc_rddiaginfo Reads the diagnostics data information.       
Reads the minimum diagnostics data       
cnc_rddiagnum number, maximum diagnostics data
8.4
number, and total number of diagnostics
data items.
cnc_rdsyshard Reads CNC hardware configuration       
8.5
information.
8.6 cnc_sysinfo_ex Reads CNC system information (2).       
8.7 cnc_rdalmmsg Reads all alarm messages at once.       
8.8 cnc_getdtailerr Gets CNC error details.       
8.9 cnc_statinfo2 Reads CNC status information (2).       
8.10 cnc_rdcncid Reads the CNC identification number.       

[List of PMC window library functions]


No. API name Description Applicable Script call
equipment
Standard
Timer script

Event script

display
Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non

pmc_rdpmcrng Reads desired PMC data (specify input       


9.1
range).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 240/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
pmc_wrpmcrng Outputs desired PMC data (specify       
9.2 output
range).
pmc_get_current_p Gets the unit type of the PMC currently       
9.3
mc_unit being operated.
pmc_get_number_o Gets the number of PMC paths.       
9.4
f_pmc
pmc_get_pmc_unit_ Gets PMC unit types.       
9.5
types
pmc_rdkpm Reads data from the extended       
9.6
nonvolatile memory.
pmc_wrkpm Writes data to the extended nonvolatile       
9.7
memory.
pmc_kpmsiz Reads the maximum size of the       
9.8
extended nonvolatile memory.
9.9 pmc_rdpmcinfo Gets PMC address information.       
9.10 pmc_rdprmstart Starts reading parameters. ×      
9.11 pmc_rdpmcparam Reads parameters. ×      
9.12 pmc_rdprmend Ends reading parameters. ×      
9.13 pmc_wrprmstart Starts writing parameters. ×      
9.14 pmc_wrpmcparam Writes parameters. ×      
9.15 pmc_wrprmend Ends writing parameters. ×      
9.16 pmc_getdtailerr Gets PMC error details.       

[List of file operation library functions]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display
Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non

10.1 aux_file_mount Mounts memory card/USB memory.   ×    


10.2 aux_file_unmount Unmounts memory card/USB memory.   ×    
10.3 aux_file_memcinfo Gets memory card information.   ×    
10.4 aux_file_usbinfo Gets the state of the USB memory.   ×    
_dos_findfirst32 Finds the first file whose attributes   ×    
10.5 match the specified ones (supports up to
32 characters for file names).
_dos_findnext32 Finds the next file whose attributes   ×    
10.6 match the specified ones (supports up to
32 characters for file names).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 241/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[List of serial library functions]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
Start up
display

Control
script

script
iHMI
PMi-A

PMi-A
Non
11.1 rs_open Initializes the communication device.       
11.2 rs_close Terminates communication.       
rs_putc Puts one character in the       
11.3
communication buffer.
rs_getc Gets one character from the       
11.4
communication buffer.
rs_write Writes block data to the communication       
11.5
buffer.
rs_read Reads block data from the       
11.6
communication buffer.
rs_buffer Tests or manipulates the       
11.7
communication buffer.
rs_status Gets the status of the communication       
11.8
line and buffer.
11.9 rs_wait Waits for a communication event.       

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 242/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[List of F-ROM library functions]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
12.1 aux_from_open Opens the specified F-ROM file.   ×    
12.2 aux_from_close Closes the F-ROM file.   ×    
12.3 aux_from_select Selects data in the F-ROM file.   ×    
12.4 aux_from_moveptr Moves the read pointer.   ×    
12.5 aux_from_read Reads data from the F-ROM file.   ×    
aux_from_getdir Reads directory information of a F-ROM   ×    
12.6
file.
12.7 aux_from_getinfo Reads F-ROM file information.   ×    
12.8 aux_from_getc Reads a character from the F-ROM file.   ×    
12.9 aux_from_gets Reads a line from the F-ROM file.   ×    

[List of network library functions]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
eth_putopen Opens the communication line in the   ×    
13.1
transmission mode.
13.2 eth_put Transmits data to the host.   ×    
eth_putclose Closes the communication line opened   ×    
13.3
in the transmission mode.
eth_getopen Opens the communication line in the   ×    
13.4
reception mode.
13.5 eth_get Receives data from the host.   ×    
eth_getclose Closes the communication line opened   ×    
13.6
in the reception mode.
13.7 eth_open_ftp Opens the FTP communication line. × ×     
13.8 eth_put_ftp Transmits data to the host. × ×     
13.9 eth_get_ftp Receives data from the host. × ×     
13.10 eth_close_ftp Closes the FTP communication line. × ×     
eth_rdparam Reads parameters for the Ethernet ×      
13.11
function.
eth_wrparam Writes parameters for the Ethernet ×      
13.12
function.
13.13 eth_rddsmode Reads the mode of the data server. ×      
13.14 eth_wrdsmode Changes the mode of the data server. ×      
eth_rdhost Reads the connection host number of ×      
13.15
the Ethernet function.
13.16 eth_wrhost Sets the connection host number of the ×      

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 243/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
Ethernet function.
13.17 eth_comopen Opens the communication line. ×      
13.18 eth_comclose Closes the communication line. ×      
13.19 eth_comsend Sends data. ×      
13.20 eth_comrecv Receives data. ×      
eth_comstatus Reads the status of the communication ×      
13.21
line.

[List of ANSI C standard library functions]


No. API name Description Applicable Script call
equipment
Standard

Timer script

Event script
display

Start up

Control
script

script
iHMI
PMi-A

PMi-A
Non
14.1 remove Deletes a file.       
14.2 rename Changes a file name.       
14.3 tmpnam Generates a temporary file name.       
14.4 rand Generates a pseudo-random number.       
srand Seeds the pseudo-random number       
14.5
generator.
14.6 mktime Converts local time to calendar time.       
14.7 time Gets the current time.       
14.8 asctime Converts the time to a string.       
14.9 ctime Converts the time to a string.       
gmtime Converts the time to Greenwich mean       
14.10
time.
14.11 localtime Converts the time to local time.       
difftime Computes the difference between two       
14.12
times.

[List of MS-C extended C standard library functions]


No. API name Description Applicable Script call
equipment
Standard
Timer script

Event script
Start up

display
Control
script

script
iHMI
PMi-A

PMi-A
Non

_dos_findfirst Finds the first file whose attributes match   ×    


15.1
the specified ones.
15.2 _dos_findnext Finds the next file whose attributes   ×    

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 244/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. API name Description Applicable Script call


equipment
Standard

Timer script

Event script
Start up
display

Control
script

script
iHMI
PMi-A

PMi-A
Non
match the specified ones.
15.3 findfirstfile Finds the specified file. × ×     
findnextfile Finds the next instance of the specified × ×     
15.4
file.
15.5 findclose Closes the handle for finding files. × ×     
15.6 _dos_getdiskfree Acquires disk information.   ×    
15.7 getdiskfree Acquires disk information. × ×     
15.8 _chdrive Changes the current drive.       
15.9 _getdrive Acquires the current drive.       
15.10 chdir Changes the current directory.       
15.11 getcwd Acquires the current directory.       
cabs Calculates the absolute value of a       
15.12
complex number.
hypot Calculates the square root of the sum of       
15.13
two squares.
15.14 close Closes a file.       
15.15 creat Creates a file.       
lseek Moves the file pointer to a specified       
15.16
position.
15.17 mkdir Creates a new directory.       
15.18 open Opens a file.       
15.19 read Reads data from a file.       
15.20 rmdir Deletes a directory.       
tell Acquires the current position of the file       
15.21
pointer.
15.22 write Writes data to a file.       

[List of mruby extension library]


Currently, mruby extension library that can be used is as follows. Please refer to the Ruby reference manual for
the specification of the method that can be used in each library.
No. Extension library Method Description Applicable Script call
name equipment
Standard

Start up

Control
display

Timer
script

script

Event
script

script
iHMI

mruby-sprintf sprint This method equivalent      


1. to sprintf (3) in C
language.
format This method equivalent      
2. to sprintf (3) in C
language.
mruby-struct new Create a new subclass      
3.
and return it.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 245/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

No. Extension library Method Description Applicable Script call


name equipment

Standard

Start up

Control
display

Timer
script

script

Event
script

script
iHMI
members Returns an array of      
4. structure member
names.
eql? It compares each      
member and returns
5. ture if it is equal.
Otherwise it returns
false.
size Returns the number of      
6. members of the
structure.
length Returns the number of      
7. members of the
structure.
to_a It returns the value of      
8. the member of the
structure in an array.
values It returns the value of      
9. the member of the
structure in an array.
to_h Returns the member      
10. name and value pair as
Hash.
values_at Return an array of the      
value of the member
11.
specified by the
argument.
each Repeat for each      
12. member of the
structure.
each_pair Repeat execution of      
block with argument of
13. member name and
value pair of structure
as argument.
select Get elements that      
14. match the condition
expression
inspect Returns the contents of      
15. the structure as a
human-readable string
16. mruby-numeric-ex chr Retrieve the first letter.      
t div Arithmetic operator.      
17.
Returns the quotient.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 246/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
1 Use sufficient care when you write NC data which can influence how the machine
works. There is a possibility that the NC may run with settings from the wrong NC
data. In this case, it may cause unexpected machine behavior, and tools,
machines or workpieces may be damaged.

You have to make sure that writing the NC data is safe and correct when doing so
as it can influence how the machine works.
The NC data that can influence how the machine works is as follows. It may not
all be listed below after new applications or functions are released.

NC data that can influence how the machine works:


NC parameter, NC program, Tool offset value, Pitch error compensation data,
Work zero offset value, Custom macro variables, P-CODE variables,
Interference check data, Work coordinate shift value, Tool management data,
Tool life management data, Tool geometry size data

2 Use sufficient care when you write PMC data.


There is a possibility that the NC may run with the wrong PMC signal. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the PMC signal is safe and correct when
doing so.

3 The number of times machining programs can be written to the non-volatile


memory is limited.
You must use "High-speed program management" when registration and deletion
of the machining programs are frequently repeated in cases such as when the
machining programs are automatically downloaded from a personal computer at
each machining.
In "High-speed program management," the program is not saved to the
non-volatile memory during registration, modification, or deletion of programs.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 247/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.2 RETURN VALUES OF FUNCTIONS

CNC window library return values


Return value Meaning

EW_VERSION(-7) Version mismatch between the CNC/PMC and library


EW_SYSTEM(-5) System error
EW_RESET(-2) Request for a reset or stop
EW_BUSY(-1) Busy
EW_OK(0) Normal termination
EW_FUNC(1) The function is not executed or is disabled.
EW_LENGTH(2) Error in the data block length or number of data items
EW_NUMBER(3) Data number error
EW_ATTRIB(4) Data attribute error
EW_DATA(5) Data error (the specified program is not found when you are going to
delete the program, when you search for the program, or when you
start entering NC data).
EW_NOOPT(6) No CNC options
EW_PROT(7) Write protection
EW_OVRFLOW(8) CNC memory overflow
EW_PARAM(9) CNC parameter error
EW_BUFFER(10) The buffer is empty or full.
EW_PATH(11) Path number error
EW_MODE(12) CNC mode error
EW_REJECT(13) CNC processing is rejected.
EW_DTSRVR(14) Data server error
EW_ALARM(15) Alarm state
EW_STOP(16) Stopped state
EW_PASSWD(17) Data protection state

PMC window library return values


Return value Meaning

EW_VERSION(-7) Version mismatch between the CNC/PMC and library


EW_SYSTEM(-5) System error
EW_OK(0) Normal termination
EW_NOPMC(1) No PMC
EW_LENGTH(2) Error in the data block length or number of data items
EW_RANGE(3) Address range error
EW_TYPE(4) Error in the address type or data type
EW_DATA(5) Data error
EW_NOOPT(6) No CNC options
EW_BUFFER(10) The buffer is empty or full.
EW_PASSWD(17) Data protection state

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 248/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.3 FUNCTION REFERENCE


[Function reference related to CNC window library controlled axis/spindle]

1.1 Reading dynamic data

[Function]
cnc_rddynamic
[Syntax with arguments]
cnc_rddynamic(axis)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (1) Arguments of the cnc_rddynamic function


Name Type Description
axis Numerical value Axis number
Specify the following value:
(1) For each axis: 1 to maximum controlled axis number (= 32)
(2) For all axes as axis number: -1
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (2) Value to be stored in the return value of the cnc_rddynamic function
Element Type Description
1st element Numerical value Return value of the function
EW_OK
Normal termination
EW_LENGTH
Data block length error
EW_ATTRIB
A value other than values from 1 to the maximum controlled axis
number (= 32) or -1 has been specified for the axis number.
2nd element Array of 8 Dynamic data that has been read
elements For details on the value, refer to the following table "Values to be stored
in read dynamic data."

Table 5.3 (3) Values to be stored in read dynamic data


Element Type Description
1st Numerical value Axis number
element (1) For each axis: Axis number that has been read
(2) For all axes as axis number: -1
2nd Numerical value Alarm status
element
3rd Numerical value Number of the program being executed
element
4th Numerical value Program number of the main program
element
5th Numerical value Sequence number
element

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 249/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


6th Numerical value Actual feed rate
element
7th Numerical value Actual spindle speed
element
8th Array of 4 Coordinate information (for each data type)
element elements For details on the value, refer to the following table "Values to be stored in
the coordinate information (for each data type)."

Table 5.3 (4) Values to be stored in the coordinate information (for each data type)
Element Type Meaning
1st Array of m elements Coordinate information (absolute coordinates)
element (1) For each axis: m = 1 For details on the value, refer to the
(2) For all axes as axis number: m = Maximum following table "Values to be stored in the
axis number (= 32) coordinate information."
(Data for the current controlled axes is
valid.)
2nd Array of m elements Coordinate information (machine coordinates)
element
3rd Array of m elements Coordinate information (relative coordinates)
element
4th Array of m elements Coordinate information (distance to go)
element

Table5.3 (5) Values to be stored in the coordinate information


Element Type Meaning
1st to mth element Numerical value Coordinates (for each axis)

The image of the return value that will actually be returned is as follows.

(1) When 1 is specified for the axis number (For each axis)
[
0, # Return value of the function (0 = EW_OK)
[ # Dynamic data that has been read
1, # Axis number
0, # Alarm status
0, # Number of the program being executed
3, # Program number of the main program
0, # Sequence number
0, # Actual feed rate
0, # Actual spindle speed
[ # Coordinate information (for each data type)
[-2182005], # Coordinate information (absolute coordinates,
coordinates where the number of elements is 1)
[0], # Coordinate information (machine coordinates, same as
above)
[0], # Coordinate information (relative coordinates, same as
above)
[0] # Coordinate information (distance to go, same as above)
]
]

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 250/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

]
(2) When -1 is specified for the axis number (For all axes as axis number)
[
0, # Return value of the function (0 = EW_OK)
[ # Dynamic data that has been read
-1, # Axis number
0, # Alarm status
0, # Number of the program being executed
3, # Program number of the main program
0, # Sequence number
0, # Actual feed rate
0, # Actual spindle speed
[ # Coordinate information (for each data type)
[-2182005, 3233365, 1232230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
# Coordinate information (absolute coordinates,
coordinates of the number of elements = maximum
controlled axis number (= 32))
# (Data for the current controlled axes is valid.)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
# Coordinate information (machine coordinates, same as
above)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
# Coordinate information (relative coordinates, same as
above)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
# Coordinate information (distance to go, same as above)
]
]
]
[Description]
Reads different kinds of data that changes with the operation of the NC program at the same time.
This function is used for getting data to display the current position screen or the monitoring screen, etc.
Relationship between read dynamic data and the functions used for reading individually is as follows.

Table 5.3 (6) Relationship between read dynamic data and the functions used for reading individually
Data Function used for reading individually
Axis number None
Alarm status alarm
Number of the program being executed rdprgnum
Program number of the main program rdprgnum
Sequence number rdseqnum
Actual feed rate actf
Actual spindle speed acts
Absolute position data of controlled axis absolute
Machine position data of controlled axis machine
Relative position data of controlled axis relative
Distance to go of controlled axis distance

The formats of each data item are the same as those shown in "Function used for reading individually".
[Example]
When -1 is specified as the axis number (axis) and dynamic data for all axes as axis number are read

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 251/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

ret= cnc_rddynamic(-1)

if ret[0] != EW_OK then # ret[0]: Return value of the function


MsgBoxShow("ERROR", 0)
end

1.2 Clearing or presetting the relative position of the controlled axis

[Function]
cnc_wrrelpos
[Syntax with arguments]
cnc_wrrelpos(preset)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (7) Arguments of the cnc_wrrelpos function


Name Type Description
preset Array of 2 Preset data
elements For details on the value to be specified, refer to the following table
"Values to be set to preset data."

Table 5.3 (8) Values to be set to preset data


Element Type Description
1st element Numerical value Axis number
Specify the following value:
(1) Specifies one axis: 1 to maximum controlled axis
number (= 32)
(2) Specifies all axes: -1
2nd Array of m elements Values to be preset (for each axis)
element (1) Specifies one axis: m = 1 The preset values at the relative position are stored in
(2) Specifies all axes: m = order starting from the first element of the array. If 0 is
maximum controlled axis specified as the preset value, it will be the origin of the
number (= 32) relative position.
[Return]
The return values from this function are as follows.

Table 5.3 (9) Return values from the cnc_wrrelpos function


Type Description
Numerical value Return value of the function
EW_OK
Normal termination
EW_LENGTH
The number of elements for the value to be preset (for each axis)
is incorrect.
EW_ATTRIB
A value other than values from 1 to maximum controlled axis
number (= 32) or -1 has been specified for the axis number.
EW_DATA
The preset value is out of the specifiable range.
EW_REJECT

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 252/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
NC execution rejected.
[Description]
Presets (resets) the relative position of the axis specified for the first element of the preset data.
[Example]
(1) When 1 is specified as the axis number and 20000 is set as the preset value at the relative position of
the first axis
data=Array.new(1,20000) # Creates an array of the value to be preset (for each axis)
(number of elements = 1, preset value = 20000).

preset = Array.new # Creates an array of the preset data.


preset.push(1) # 1st element: Axis number = 1
preset.push(data) # 2nd element: Values to be preset (for each axis)

ret=cnc_wrrelpos(preset)
if ret != EW_OK then # ret: Return value of the function
MsgBoxShow("ERROR",0)
end

(2) When -1 is specified as the axis number and the relative positions of the 1st to 32nd axes are all set at
once
MAX _AXIS=32 # MAX_AXIS: Maximum controlled axis number

data=Array.new(MAX_AXIS,0) # Creates an array of the values to be preset (for each axis)


(number of elements = MAX_AXIS, preset value = 0).
data[0]=20000 # Specifies 20000 as the preset value for the 1st axis (data[0]).
data[1]=30000 # Specifies 30000 as the preset value for the 2nd axis (data[1]).
data[2]=30000 # Specifies 30000 as the preset value for the 3rd axis (data[2]).
data[3]=10000 # Specifies 10000 as the preset value for the 4th axis (data[3]).
data[4]=10000 # Specifies 10000 as the preset value for the 5th axis (data[4]).
# 0 (origin of the relative position) is specified as the preset value for axes other than
the 1st to 5th axes.
preset = Array.new # Creates an array of the preset data.
preset.push(-1) # 1st element (preset[0]): Axis number = -1
preset.push(data) # 2nd element (preset[1]): Array of the values to be preset

ret=cnc_wrrelpos(preset)
if ret != EW_OK then # ret: Return value of the function
MsgBoxShow("ERROR",0)
end

1.3 Reading extended axis name (2)

[Function]
cnc_exaxisname2
[Syntax with arguments]
cnc_exaxisname2(type, absolute, num)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 253/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (10) Arguments of the cnc_exaxisname2 function


Name Type Description
type Numerical value Specify the type of axis names to be read.
0: Controlled axis name
1: Spindle name
absolute Numerical value Set whether to specify axes as relative axes or absolute axes.
0: Specifies relative axes.
1: Specifies absolute axes.
num Numerical value Specify the number of axes to be read.
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (11) Value to be stored in the return value of the cnc_exaxisname2 function
Element Type Description
1st Numerical value Execution result
element EW_OK
Normal termination
EW_LENGTH
The number of axes (num) is 0 or less.
EW_ATTRIB
Data attribute error. The specified data type (type) is invalid.
2nd Numerical value The number of axes actually read is set.
element When a value larger than the current number of axes is specified in the
num argument
The number of currently valid axes actually read is set.
When a value smaller than the number of valid axes is specified in the
num argument
As many data items as the specified number of axes are read, and the
number of axes specified in the num argument is set.
3rd Array of n Array of axis names (up to three characters)
element elements (n = The acquired axis name is in the form of an ASCII string.
number of axes
actually acquired)
[Description]
This function reads as many controlled axis and spindle axis names as specified in (num), starting with the
first axis.
This function allows the user to specify whether to acquire information from only the current path in the
CNC or from the entire CNC.
In the absolute argument, whether the information acquisition is limited to the current path (relative) or is
performed through the entire CNC (absolute) can be specified.
[Example]
When the controlled axis name and relative axis are specified and 6 is set as the number of axes to acquire
the axis name

ret = cnc_exaxisname2( 0, 0, 6 )
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 254/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1.4 Reading controlled axis/spindle-related data

[Function]
cnc_rdaxisdata
[Syntax with arguments]
cnc_rdaxisdata(cls, type, num, len)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (12) Arguments of the cnc_rdaxisdata function


Name Type Description
cls Numerical value Specify the class of data to be read.
1: Coordinates
2: Servo
3: Spindle
4: Spindle currently selected
5: Speed
type Array of n Array for which the type of data to be read is specified
elements (up to The following values can be specified according to the value of cls:
4) <cls = 1 (coordinate value)>
0: Absolute coordinates
1: Machine coordinates
2: Relative coordinates
3: Distance to go
4: Handle interrupt amount (input unit)
5: Handle interrupt amount (output unit)
6: Program restart position
7: Distance to go at the time of program restart
8: Block restart position
9: Distance to go at the time of block restart
10: Absolute coordinate value (for offset and graphic screens)
11: Relative coordinate value (for offset and graphic screens)
* 0 and 2 follow bit 0 (MDXx) of parameter No. 8163.
10 and 11 are always equivalent to 0 without following bit 0 (MDXx) of
parameter No. 8163.
<cls = 2 (servo)>
0: Servo load meter
1: Load current (%)
2: Load current (A)
<cls = 3 (spindle)>
0: Spindle load meter
1: Spindle motor speed
2: Spindle speed (value set according to bit 2 (ASDs) of parameter No. 3799)
3: Spindle speed (value obtained from the spindle motor speed)
4: Spindle load meter (average of values obtained every 250 ms)
<cls = 4 (spindle being selected)>
* (Same as the specifications as those of cls = 3)
<cls = 5 (speed)>
0: Composite feedrate (F)
1: Spindle speed (S)
2: Jog feedrate/dry run feedrate
num Numerical value Specify the number of type arrays.
len Numerical value Specify the number of axes to be read.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 255/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (13) Value to be stored in the return value of the cnc_rdaxisdata function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_LENGTH
Error in the data block length. Alternatively, the number of axes (len) is 0 or
less.
EW_NUMBER
Data attribute error. The specified data class (cls) is invalid.
EW_ATTRIB
Data attribute error. The specified data type (type) is invalid.
Alternatively, the number of types (num) exceeds 4.
EW_NOOPT
A required option is not provided.
2nd element Numerical The number of axes actually read is set.
value
3rd element Array of n Array of various axis- and spindle-related data
elements Array of as many data items as the number of axes specified by "num × len"
For details on the value, refer to the following table "Various axis- and
spindle-related data."

Table 5.3 (14) Various axis- and spindle-related data


Element Type Description
1st element String Axis name (up to three characters)
Axis names are stored in ASCII format.
2nd element Numerical Data
value
3rd element Numerical Decimal point position of the data
value When the 4th element (unit of data) explained below is 5 (rpm) or 8 (%), there is
no data in decimal positions, and 0 is stored.
4th element Numerical Unit of data
value 0: Millimeters (coordinate value)
1: Inches (coordinate value)
2: Degrees (coordinate value)
3: Millimeters/minute (composite feedrate, jog/dry run feedrate)
4: Inches/minute (composite feedrate, jog/dry run feedrate)
5: rpm (spindle speed, spindle motor speed)
6: Millimeters/time (composite feedrate, jog/dry run feedrate)
7: Inches/time (composite feedrate, jog/dry run feedrate)
8: % (load meter, load current)
9: Ampere (load current)
5th element Numerical Flags
value Flags are set according to the cls value as follows:
<cls = 1 (coordinate value)>
#0: Display status
1 = Displayed on the CNC screen
0 = Not displayed on the CNC screen
#1: Axis detachment

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 256/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


1 = Enabled
0 = Disabled
#2: Interlock
1 = Enabled
0 = Disabled
#3: Machine lock
1 = Enabled
0 = Disabled
#4: Servo off
1 = Enabled
0 = Disabled
#5: In-position check
1 = Not in the in-position check state
0 = In the in-position check state
#6: Mirror image
1 = Enabled
0 = Disabled
#7 to 31: Not used
<cls = 5 (speed)>
#0: Spindle speed
1 = Spindle present
0 = Spindle not present
#1: Jog feedrate/dry run feedrate
1 = Dry run feedrate
0 = Jog feedrate
#2 to 31: Not used
<cls = Other>
Not used
[Description]
This function reads axis- and spindle-related data.

Specify the class of data to be read in the cls argument, and specify the type of data to be read in a short
array (type[]).
The number of arrays is specified in the num argument. Up to four types of data can be read at a time. If an
attempt is made to read more than four types of data, the EW_ATTRIB error results.

The number of axes to be read is specified in the (len) argument. According to the value of data class cls,
(len) is set as follows:

1. When cls is set to a coordinate value (=1), servo (=2), or spindle (=3)
Data for as many axes as specified in (len), starting with the first axis is read.
After the function is executed, if (len) is greater than the number of currently valid axes, the number
of actual axes is set to the 2nd element of the return value.
If (len) is smaller than the number of currently valid axes, data for as many axes as specified in (len)
is read.
2. When cls is set to the selected spindle (=4) or speed (=5)
Data for one axis is read at all times.
However, if no spindle is selected when the selected spindle is specified, 0 is set to the 2nd element of
the return value.
The read data are stored in the array of the 3rd element of the return value.
The read data is stored in units of the size specified in (len) in the order specified in type[] as follows:
(* 3rd element of the return value: Described as axdata)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 257/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

type[0] data: axdata[ 0] to axdata[ len-1]


type[1] data: axdata[ len] to axdata[ 2×len-1]
type[2] data: axdata[ 2×len] to axdata[ 3×len-1]
type[3] data: axdata[ 3×len] to axdata[ 4×len-1]

Even if the number specified in (len) is smaller than the actual number of axes, data is stored according to
the value specified in (len) when the function is called.

The following parameters are related to this function:

Parameter Nos. 1020, 1025, and 1026


Parameter Nos. 3131, 3132, and 3133
Bits 0, 4, 5, 6, and 7 (MCN, DRL, DRC, DAL, and DAC) of parameter No. 3104
Bits 0 and 1 (NDPx and NDAx) of parameter No. 3115
Bit 2 (ASDs) of parameter No. 3799
Bit 0 (MDXx) of parameter No. 8163

For details on parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,


B-64610EN) of the CNC.
[Example]
When the coordinate value is specified as the class of data, absolute coordinates (for one data) as the type,
and 6 as the number of axes to acquire various axis- and spindle-related data

ret = cnc_rdaxisdata( 0, [0], 1, 6 )


if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end

1.5 Reading three-dimensional manual feed data

[Function]
cnc_rd5axmandt
[Syntax with arguments]
cnc_rd5axmandt()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (15) Value to be stored in the return value of the cnc_rd5axmandt function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NOOPT
No options
Related option: Three-dimensional manual feed function
2nd element Array of 14 Machine axis travel distance in three-dimensional manual feed of each controlled axis

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 258/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


elements For details on the value, refer to the following table "Three-dimensional manual
feed information."

Table 5.3 (16) Three-dimensional manual feed information


Element Type Description
1st element Numerical value Axis number of the first linear axis
2nd element Numerical value Axis number of the second linear axis
3rd element Numerical value Axis number of the third linear axis
4th element Numerical value Tool tip position of the first linear axis
The coordinates of the tool tip are set.
The unit for the absolute coordinates of the axis that is set for the 1st element is used.
5th element Numerical value Tool tip position of the second linear axis
The coordinates of the tool tip are set.
The unit for the absolute coordinates of the axis that is set for the 2nd element is used.
6th element Numerical value Tool tip position of the third linear axis
The coordinates of the tool tip are set.
The unit for the absolute coordinates of the axis that is set for the 3rd element is used.
7th element Numerical value The number of pulses at tool tip center C1 is set.
The unit for the absolute coordinates of the axis that is set for parameter No. 19681 is
used.
8th element Numerical value The number of pulses at tool tip center C2 is set.
The unit for the absolute coordinates of the axis that is set for parameter No.19686 is
used.
9th element Numerical value The number of pulses at tool axis reference position TD is set.
10th element Numerical value The number of pulses at tool axis reference position R1 is set.
11th element Numerical value The number of pulses at tool axis reference position R2 is set.
12th element Numerical value The number of pulses at table reference position VR is set.
13th element Numerical value The number of pulses at table reference position H1 is set.
14th element Numerical value The number of pulses at table reference position H2 is set.
[Description]
Reads three-dimensional manual feed data.

Various types of information items are stored in the 2nd element array of the return value.
The unit of the machine axis travel distance is the same as for that of absolute coordinates.
The units of td, r1, r2, vr, h1, and h2 differ depending on the value of parameter No. 19697.
The unit for the absolute coordinates of the corresponding axis that is set for type1, type2, or type3 is used.

Table 5.3 (17) Correspondence between parameters and types


Parameter No. 19697
td and vr r1 and h1 r2 and h2
setting
1 type1 type2 type3
2 type2 type3 type1
3 type3 type1 type2
[Example]
When three-dimensional manual feed data are to be acquired

ret = cnc_rd5axmandt()
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 259/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1.6 Reading machine axis travel distance in three-dimensional manual feed

[Function]
cnc_rd5axovrlap
[Syntax with arguments]
cnc_rd5axovrlap(axis)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (18) Arguments of the cnc_rd5axovrlap function


Name Type Description
axis Numerical Specifies the axis number for which to read the distance.
value ALL_AXES: Specifies all axes (ALL_AXES: -1)
1 to m: Specifies one axis (m: Current number of controlled axes)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (19) Value to be stored in the return value of the cnc_rd5axovrlap function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_ATTRIB
The specified axis is invalid.
EW_NOOPT
No options. Related option: - Three-dimensional manual feed function
2nd Array of 2 Machine axis travel distance in three-dimensional manual feed of each controlled axis
element elements For details on the value, refer to the following table "Information on machine
axis travel distance in three-dimensional manual feed."

Table 5.3 (20) Machine axis travel distance in three-dimensional manual feed
Element Type Description
1st Numerical value Axis number
element
2nd Numerical value Array of machine axis travel distance data
element array with number of n = Maximum axis number when specification of all axes (-1) is made for
elements n (n = See axis (Data for the current controlled axes is valid).
the Description n = 1 when specification of one axis (1 to m (m: current number of
column.) controlled axes)) is made for axis.
[Description]
Reads the machine axis travel distance in three-dimensional manual feed.
Specify one of the values from 1 to the maximum controlled axis number for each axis or -1 for all axes as
axis number in "axis".
[Example]
When specifying all axes to acquire the machine axis travel distance in three-dimensional manual feed

ret = cnc_rd5axovrlap( -1 )
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 260/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

MsgBoxShow( msg_txt, 0 )
end

1.7 Clearing three-dimensional manual feed pulses

[Function]
cnc_clr5axpls
[Syntax with arguments]
cnc_clr5axpls(type)

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (21) Arguments of the cnc_clr5axpls function


Name Type Description
type Numeric Specify the number of pulses to be cleared.
al value 1: Tool tip center C1
2: Tool tip center C2
3: Tool axis reference position TD
4: Tool axis reference position R1
5: Tool axis reference position R2
6: Table reference position VR
7: Table reference position H1
8: Table reference position H2
-1: All pulses
[Return]
Details of the return values are as shown below.
Table 5.3 (22) Return value of the cnc_clr5axpls function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NUMBER
The specified type is invalid.
EW_NOOPT
No options.
Related option: Three-dimensional manual feed function
[Description]
Clears three-dimensional manual feed pulses.

CAUTION
Use sufficient care when you clear the three-dimensional manual feed pulses.
There is a possibility that the NC may run with the wrong three-dimensional
manual feed pulses. In this case, it may cause unexpected machine behavior,
and tools, machines or workpieces may be damaged. You have to make sure that
clearing the three-dimensional manual feed pulses is safe and correct when
doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 261/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC window library program-related function reference]

2.1 Starting output NC program to be compared

[Function]
cnc_vrfstart
[Syntax with arguments]
cnc_vrfstart()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (23) Value to be stored in the return value of the cnc_vrfstart function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Start command for output of NC program to be compared has been rejected.
This code is returned under one of the following conditions.
- The CNC is performing other command processing (downloading, collating, uploading, or
program number list reading).
- Background editing is in progress or the MDI mode has been entered.
- Alarm PW0000 or alarm PS0101 is issued.
[Description]
It is possible to compare an NC program already registered with the CNC and a program that is output by
the application program.
This function requests CNC to start comparing the NC programs.
[Example]
Refer to example of "Output NC program to be compared (cnc_verify function)."

2.2 Outputting NC program to be compared

[Function]
cnc_verify
[Syntax with arguments]
cnc_verify(data, number)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (24) Arguments of the cnc_verify function


Name Type Description
data Numerical value NC program data (ASCII string)
number Numerical value Character number of NC program data (1 to 256)
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 262/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (25) Value to be stored in the return value of the cnc_verify function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
The start-up procedure for output of the NC program to be compared has not been
completed on the CNC, or no start-up command has been issued.
EW_LENGTH
The specified data length is invalid.
EW_DATA
Incorrect NC program data. This code is returned under one of the following conditions.
- A difference was detected during the comparison process.
- The program on the CNC that is to be compared has been selected in the foreground.
- A character that cannot be used in NC programs has been detected.
- When TV check is enabled, a block that includes odd characters (including "LF" at the end
of the block) is detected.
[Description]
Outputs the NC program to be compared with one already registered with the CNC.
If data cannot be output because the CNC data processing is delayed, this function waits in the library until
data can be output.
Moreover, "Stopping output NC program to be compared. (cnc_vrfend function)" is returned as an error of
the data for several-times before the end.
The following shows the comparison procedure.

Fig. 5.3 (a) Procedure for outputting the NC program to be compared


[Example]
- O1234 program
O1234 ;
G1F0.3W10.;
M30;
%
When the above program and an NC program already registered with the CNC are compared

data = "¥nO1234¥nG1F0.3W10.¥nM30¥n%"
number = 27

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 263/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

ret = cnc_vrfstart()
if ret == EW_OK then
ret = cnc_verify(data, number)
end

cnc_vrfend()

2.3 Stopping output of NC program to be compared

[Function]
cnc_vrfend

[Syntax with arguments]


cnc_vrfend()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (26) Value to be stored in the return value of the cnc_vrfend function
Type Description
Numerical value Return value of the function
EW_OK
Normal termination
EW_FUNC
The start-up procedure for output of the NC program to be compared has not been
completed on the CNC, or no start-up command has been issued.
EW_DATA
The previously output NC program data is incorrect. This code is returned under one of
the following conditions.
- A difference was detected during the comparison process.
- The program on the CNC that is to be compared has been selected in the
foreground.
- A character that cannot be used in NC programs has been detected.
- When TV check is enabled, a block that includes odd characters (including "LF" at
the end of the block) is detected.
[Description]
Sends notification of the end of the comparison of the NC programs to the CNC.
'%' must be output as NC program data before calling this function.
An error (such as EW_DATA or EW_OVRFLOW) in the cnc_verify function may be returned by this
function.
Control is not returned from this function until the registration of data output by the cnc_verify function is
completed.
Control is not returned from this function until the CNC comparison process completes.
The comparison process is completed even if the return code is not "0".
[Example]
Refer to example of "Output NC program to be compared (cnc_verify function)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 264/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2.4 Searching for a sequence number

[Function]
cnc_seqsrch
[Syntax with arguments]
cnc_seqsrch(seq_no)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (27) Arguments of the cnc_seqsrch function


Name Type Description
seq_no Numerical value Sequence number
[Return]
Details of the return values are as shown below.

Table 5.3 (28) Value to be stored in the return value of the cnc_seqsrch function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
The specified sequence number does not exist.
EW_MODE
CNC mode error
The function can only be used in MEM mode.
EW_REJECT
CNC processing is rejected.
- Being edited
- No machining program is registered.
[Description]
Searches the machining program currently selected in the CNC for the sequence number specified by
"seq_no".

2.5 Reading program storage drive information

[Function]
cnc_rdpdf_drive
[Syntax with arguments]
cnc_rdpdf_drive()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (29) Value to be stored in the return value of the cnc_rdpdf_drive function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 265/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd Array Program storage drive information
element For details on the value, refer to the following table "Values to be stored in program
storage drive information."

Table 5.3 (30) Values to be stored in program storage drive information


Element Type Description
1st Numerical Number of drives that have been read
element value Up to 16 drives can be returned.
2nd Array Drive name string
element As many drive name strings as drives that have been read are stored.
(Array[0] to Array[maximum number of drive names - 1]) is valid.
Up to 8 characters can be used as a drive name.
[Description]
Reads the program storage drive information.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
[Example]
When the first drive name string that has been read is displayed

ret_values = cnc_rdpdf_drive()
if ret_values [0] == EW_OK then
array = ret[1] # Program storage drive information
drive_name = array[1] # Drive name string
if array[0] > 0 then
MsgBoxShow(drive_name[0], 0) # First drive name string that has been read
end
end

2.6 Reading program storage file information

[Function]
cnc_rdpdf_inf
[Syntax with arguments]
cnc_rdpdf_ inf(drive, size_kind)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (31) Arguments of the cnc_rdpdf_inf function


Name Type Description
drive String Drive name string
Up to 8 characters can be used.
size_kind Numerical Unit of data
value 0: Page
1: Byte
2: kByte(1kByte=1024Byte)
3: MByte(1MByte=1024kByte)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 266/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (32) Value to be stored in the return value of the cnc_rdpdf_inf function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_DATA
The drive specified by the data "drive" does not exist.
2nd Array Program storage drive information
element For details on the value, refer to the following table "Values to be stored in program
storage drive information."

Table 5.3 (33) Values to be stored in program storage drive information


Element Type Description
1st element Numerical value Program storage in use
2nd element Numerical value Total program storage
The unused program storage is obtained by (2nd element - 1st element).
3rd element Numerical value Number of directories being used
4th element Numerical value Total number of directories
The number of unused directories is obtained by (4th element - 3rd element).
[Description]
Reads the information about the program storage file on the specified drive.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
[Example]
When the program storage drive information in the "CNC_MEM" drive is read

drive = "CNC_MEM" # Name of the drive to be read


size_kind = 1 # Unit of data (byte)
ret_values = cnc_rdpdf_inf( drive, size_kind )
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0 )
end

2.7 Reading current directory information

[Function]
cnc_rdpdf_curdir
[Syntax with arguments]
cnc_rdpdf_curdir(dir_kind)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (34) Arguments of the cnc_rdpdf_curdir function


Name Type Description
dir_kind Numerical Type of current directory to be read
value 1: Foreground
2: Background
[Return]
For this function, the return value is an array of 2 elements.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 267/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Details of the return values are as shown below.

Table 5.3 (35) Value to be stored in the return value of the cnc_rdpdf_curdir function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_ATTRIB
Incorrect data "dir_kind".
2nd element String Information of the acquired current directory
String of the read current directory drive + directory
Up to 210 characters can be used.
If a problem has occurred, null characters are set.
[Description]
Reads current directory information.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
[Example]
When the foreground current directory information is read

dir_kind = 1
ret = cnc_rdpdf_curdir(dir_kind)
#[100] = ret[0].to_i
MsgBoxShow(ret[1],0)

2.8 Setting the current directory

[Function]
cnc_wrpdf_curdir
[Syntax with arguments]
cnc_wrpdf_curdir(dir_kind, dir_name)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (36) Arguments of the cnc_wrpdf_curdir function


Name Type Description
dir_kind Numerical Type of current directory to be set
value 1: Foreground
2: Background
dir_name Numerical String of the current directory drive + directory to be set
value Up to 210 characters can be used.
[Return]
Details of the return values are as shown below.

Table 5.3 (37) Value to be stored in the return value of the cnc_wrpdf_curdir function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_ATTRIB
Incorrect data "dir_kind".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 268/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
EW_DATA
The directory specified by the data "dir_name" does not exist.
EW_REJECT
CNC processing is rejected.
[Description]
Sets the current directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.

2.9 Reading subdirectory information

[Function]
cnc_rdpdf_subdir
[Syntax with arguments]
cnc_rdpdf_subdir(num_dir, path, req_num)

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (38) Arguments of the cnc_rdpdf_subdir function


Name Type Description
num_dir Numerical Maximum number of directories to be read
value
path String Path name character string
Set the drive name + directory name string.
Up to 212 characters can be used.
req_num Numerical Required entry number
value "req_num" sets the ordinal number of the subdirectory for which you want to get
information.
Normally, start with 0 and increment the number by 1. (The first subdirectory is
"0".)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 269/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (39) Value to be stored in the return value of the cnc_rdpdf_subdir function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_BUSY
The CNC is in use.
EW_NUMBER
Data error
No subfolder for the required entry number (req_num) exists.
EW_DATA
Data error
Incorrect format for the path name character string "path".
EW_PROT
Protect
The specified directory cannot be displayed.
EW_REJECT
CNC processing is rejected.
2nd element Numerical value Number of directories that have actually been read
3rd element Array Subdirectory information
For details on the value, refer to the following table "Values to be stored in
the subdirectory information."

Table 5.3 (40) Values to be stored in the subdirectory information


Element Type Description
1st element Numerical value Whether a subdirectory exists or not
Whether a subdirectory (sub-subdirectory) exists or not in the subdirectory
that has been output is expressed using a bit.
#0 :
0 = No subdirectory exists.
1 = A subdirectory exists.
#1 :
0 = No file exists.
1 = A file exists.
2nd element String Subdirectory name string
Up to 36 characters can be used.
[Description]
Reads information on subdirectories in the specified directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
When subdirectory editing such as creation or deletion is performed during the time from the first request
until the last request, data is returned based on the data present when a request is made.
[Example]
When up to 5 pieces of subdirectory information in the "//CNC_MEM/USER/" path are read and the first
piece of the information is returned

num_dir = 5 # Maximum number of directories to be read


path = "//CNC_MEM/USER/" # Path name character string
req_num = 1 # Required entry number
ret_values = cnc_rdpdf_subdir(num_dir, path, req_num)
# Executes reading of the subdirectory information.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 270/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

if ret_values[0] != EW_OK then


MsgBoxShow("ERROR", 0)
end

2.10 Reading file list information

[Function]
cnc_rdpdf_alldir
[Syntax with arguments]
cnc_rdpdf_alldir(num_prog, path, req_num, size_kind, type)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (41) Arguments of the cnc_rdpdf_alldir function


Name Type Description
num_prog Numerical Maximum number of programs to be read
value
path String Path name character string
Set the drive name + directory name string.
Up to 212 characters can be used.
Set the string of drive name + directory name to "path".
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory
of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
req_num Numerical Required entry number
value "req_num" sets the ordinal number of the directory/file for which you want to get
information.
Normally, start with 0 and increment the number by 1. (The first subdirectory is
"0".)
size_kind Numerical Size output method
value Set the unit of data.
0: Page
1: Byte
2: kByte(1kByte=1024Byte)
3: MByte(1MByte=1024kByte)
type Numerical Format of program list
value Specify the format of a list of programs to be read.
0: Does not acquire the size, comment, and machining time stamp.
1: Acquires the size, comment, and machining time stamp.
(Specifying 0 allows faster operation.)
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 271/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (42) Value to be stored in the return value of the cnc_rdpdf_alldir function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_BUSY
The CNC is in use.
EW_NUMBER
Data number error
No subdirectory for the required entry number (req_num) exists.
EW_ATTRIB
The specified size output method (size_kind) or type of program list (type)
is invalid.
EW_DATA
The path name character string (path) data is invalid.
EW_REJECT
CNC processing is rejected.
2nd element Numerical Number of programs that have actually been read
value
3rd element Array Directory list information
For details on the value, refer to the following table "Values to be stored in the
directory list information."

Table 5.3 (43) Values to be stored in the directory list information


Element Type Description
1st element Numerical Data type
value 0: Folder
1: File
2nd element Numerical Last Edit Year
value It is valid only for files.
3rd element Numerical Last Edit Month
value It is valid only for files.
4th element Numerical Last Edit Day
value It is valid only for files.
5th element Numerical Last Edit Hour
value It is valid only for files.
6th element Numerical Last Edit Minutes
value It is valid only for files.
7th element Numerical Last Edit Seconds
value It is valid only for files.
8th element Numerical File size ("0" to "99999999")
value It is valid only for files.
It is valid when the type argument is set to "1".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 272/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


9th element Numerical File/folder attribution
value Folder attribute
#0: Editing disable attribute 0: Enabled, 1: Disabled
#1: Editing/display disable attribute 0: Enabled, 1: Disabled
File attribute
#0: Editing disable attribute 0: Enabled, 1: Disabled
#1: Editing/display disable attribute 0: Enabled, 1: Disabled
#2: Encryption attribute 0: OFF 1: ON
#8 to #10: Change protection level
Numeric value from "0" to "7" where #10 is the MSB and #8 is
the LSB
#12 to #14: Output protection level
Numeric value from "0" to "7" where #14 is the MSB and #12 is
the LSB
The bits other than the bits described above are ignored.
10th String Folder/file name character string
element Up to 35 characters can be used.
11th String Comment
element A comment recorded immediately after the program number is stored.
A comment consists of up to 48 characters (up to 50 characters when the
parentheses before and after the comment are included).
If a comment consisting of more than 48 characters is recorded, the 49th and
subsequent characters of the comment are not output.
When a program has no comment, only parentheses ("()") are stored.
It is valid only for files.
It is valid when the type argument is set to "1".
12th String Machining time stamp
element The machining time stamp (a comment in the format of "(xxxHxxMxxS)")
recorded immediately after the program number is stored.
It is valid only for files.
It is valid when the type argument is set to "1".
[Description]
Reads file list information in a folder.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
When folder or file editing such as creation or deletion is performed during the time from the first request
until the last request, data is returned based on the data present when a request is made.
[Example]
When up to 2 pieces of file list information in the "//CNC_MEM/USER/PATH1/" path are read and the
first piece of the information is returned

num_prog = 2 # Maximum number of programs to be read


path = "//CNC_MEM/USER/PATH1/" # Path name character string
req_num = 1 # Required entry number
size_kind = 1 # Unit of data (byte)
type = 0 # Program list type
ret_values = cnc_rdpdf_alldir(num_prog, path, req_num, size_kind, type)
# Executes reading of the subdirectory information.

if ret_values[0] != EW_OK then


MsgBoxShow("ERROR", 0)
end
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 273/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2.11 Creating a directory or file

[Function]
cnc_pdf_add
[Syntax with arguments]
cnc_pdf_add(file_path)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (44) Arguments of the cnc_pdf_add function


Name Type Description
file_path String Path of the directory/file to be created
Set the drive name + directory name + file name string.
Up to 241 characters can be used.
When specifying a directory name, place "/" at the end of the string.
If "/" is not present, it assumes a file name is being specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory of the
CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
[Return]
Details of the return values are as shown below.

Table 5.3 (45) Value to be stored in the return value of the cnc_pdf_add function
Type Description
Nume Return value of the function
rical EW_OK
value Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or directory name format error
2: The specified directory name is not found.
3: The maximum allowable number of registered files is exceeded.
4: The same file name is already present.
5: The specified file or directory name is selected by the NC.
EW_PROT
Write protection
The specified file or directory is write-protected.
EW_OVRFLOW
Memory overflow
File or folder creation is impossible because of insufficient memory space.
[Description]
Creates a directory or file in a specified directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 274/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

wait state.
The directory or file cannot be created in the following cases:
- A file with an existing number or name
- A directory with an existing name
- Directory in write-protected attribute

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program.
In this case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.

2.12 Deleting directory or file

[Function]
cnc_pdf_del
[Syntax with arguments]
cnc_pdf_del(file_path)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (46) Arguments of the cnc_pdf_del function


Name Type Description
file_path String Path of the directory/file to be deleted
Set the drive name + directory name + file name string.
Up to 241 characters can be used.
When specifying a directory name, place "/" at the end of the string.
If "/" is not present, it assumes a file name is being specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory of the
CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 275/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (47) Value to be stored in the return value of the cnc_pdf_del function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or directory name format error
2: The specified directory name is not found.
5: The specified file or directory name is selected by the NC. Alternatively, when a directory
is deleted, the directory is not empty.
EW_PROT
Write protection
The specified file or directory is write-protected.
EW_REJECT
CNC processing is rejected.
The NC is operating.
[Description]
Deletes a directory or file in a specified directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
The directory or file cannot be deleted in the following cases:
- The specified file is being used for operation or is selected in the foreground.
- The specified file is protected.
- The specified directory is selected as the current directory.
- The specified directory is not empty.

CAUTION
Use sufficient care when you delete the NC program. There is a possibility that
the NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that deleting the NC program is safe and correct when
doing so.

2.13 Renaming directory or file

[Function]
cnc_pdf_rename
[Syntax with arguments]
cnc_pdf_rename(file_path, after_name)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 276/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (48) Arguments of the cnc_pdf_rename function


Name Type Description
file_path String Path of the directory/file to be renamed
Set the drive name + directory name + file name string.
Up to 241 characters can be used.
When specifying a directory name, place "/" at the end of the string.
If "/" is not present, it assumes a file name is being specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory of the
CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
after_name String String of the directory/file name after the change
Up to 32 characters can be used.
[Return]
Details of the return values are as shown below.

Table 5.3 (49) Value to be stored in the return value of the cnc_pdf_rename function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or directory name format error
2: The specified directory name is not found.
4: The same file name is already present.
5: The specified file or directory name is selected by the NC.
EW_PROT
Write protection
The specified file or directory is write-protected.
EW_REJECT
CNC processing is rejected.
- The CNC is operating.
- The emergency stop state is engaged.
[Description]
Renames a directory or file in a specified directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
The directory or file cannot be renamed in the following cases:
- The specified file is being used for operation or is selected in the foreground.
- The specified file is protected.
- The specified directory is selected as the current directory or a directory above the current directory.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 277/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program.
In this case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.

2.14 Selecting the main program

[Function]
cnc_pdf_slctmain
[Syntax with arguments]
cnc_pdf_slctmain(file_path)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (50) Arguments of the cnc_pdf_slctmain function


Name Type Description
file_path String Program path with drive-name + path-name + file-name.
Up to 241 characters can be used.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths for the program folder of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
[Return]
Details of the return values are as shown below.

Table 5.3 (51) Value to be stored in the return value of the cnc_pdf_slctmain function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or folder name format error
2: The specified folder name is not found.
EW_MODE
CNC mode error
This function can be used only in the EDIT/MEM mode.
[Description]
Selects a file in a specified folder as the main program.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 278/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When the program "//CNC_MEM/USER/PATH1/O1234" is set as the main program

ret = cnc_pdf_slctmain("//CNC_MEM/USER/PATH1/O1234")
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end

2.15 Changing attribute of folder or file

[Function]
cnc_wrpdf_attr
[Syntax with arguments]
cnc_wrpdf_attr(file_path, slct, attr)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (52) Arguments of the cnc_wrpdf_attr function


Name Type Description
file_path String Drive name + directory name + file name
Up to 241 characters can be used.
When specifying a directory name, place "/" at the end of the string.
If "/" is not present, it assumes a file name is being specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory of
the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
slct Numerical Selection
value Set 1 only to the bits to be changed. Set bits other than the described bits to "0".
attr Numerical Setting data
value Attribute data applied after the change is set. The bit that is set to "1" in slct is
changed to the data set in attr.
Directory attribute
#0: Editing disable attribute 0: Enabled, 1: Disabled
#1: Editing/display disable attribute 0: Enabled, 1: Disabled
File attribute
#0: Editing disable attribute 0: Enabled, 1: Disabled
#1: Editing/display disable attribute 0: Enabled, 1: Disabled
#2: Encryption attribute 0: OFF 1: ON
#8 to #10: Change protection level
Numeric value from "0" to "7" where #10 is the MSB and #8 is the LSB.
#12 to #14: Output protection level
Numeric value from "0" to "7" where #14 is the MSB and #12 is the LSB.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 279/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (53) Value to be stored in the return value of the cnc_wrpdf_attr function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or directory name format error
2: The specified directory name is not found.
5: The specified file or directory name is selected by the NC.
EW_PROT
Write protection
The specified file or directory is write-protected.
Alternatively, the file or directory is protected with a protection level.
EW_REJECT
CNC processing is rejected.
[Description]
Changes the attribute of a directory or file in the specified directory.
When editing (including background editing) on the CNC, the execution of this function is placed in the
wait state.
When a specified directory is selected as the current directory, its attribute cannot be changed.
When changing the change protection level or output protection level, set all three of the relevant bits in
slct to "1".
[Example]
When the attribute of the "//CNC_MEM/USER/PATH1/O0001" file is changed to "Editing/display disable
attribute"

file_path = "//CNC_MEM/USER/PATH1/O0001" # Path name character string


slct = 1 # Bit of the attribute to be changed
attr = 1 # Attribute data applied after the change
ret_values = cnc_wrpdf_attr( file_path, slct, attr) # Executes the change of directory/file attribute.

if ret_values[0] != EW_OK then


MsgBoxShow("ERROR", 0)
end

2.16 Getting the number of folders and files in the specified directory

[Function]
cnc_rdpdf_subdirn
[Syntax with arguments]
cnc_rdpdf_subdirn(dir_name)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 280/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (54) Arguments of the cnc_rdpdf_subdirn function


Name Type Description
dir_name String String of the current drive + directory to be acquired
Up to 210 characters can be used.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths when selecting a program in the program directory
of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table5.3 (55) Value to be stored in the return value of the cnc_rdpdf_subdirn function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_DATA
Data error
To get more detailed information on this return value, execute
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or directory name format error
2: The specified directory name is not found.
EW_REJECT
CNC processing is rejected.
The NC is operating.
2nd element Array List of the number of directories/files
For details on the value, refer to the following table "List of the number of
directories/files."

Table 5.3 (56) List of the number of directories/files


Element Type Description
1st element Numerical Number of directories
value
2nd element Numerical Number of files
value
[Description]
Gets the number of subdirectories and files in the specified directory.
[Example]
When the number of subdirectories and files in the "//CNC_MEM/USER/" path is acquired.

dir_name = "//CNC_MEM/USER/" # Path name character string


ret_values = cnc_rdpdf_subdirn( dir_name ) # Gets the number of folders and files in the specified
directory.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 281/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2.17 Getting main program information

[Function]
cnc_pdf_rdmain
[Syntax with arguments]
cnc_pdf_rdmain()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (57) Value to be stored in the return value of the cnc_pdf_rdmain function
Element Type Description
1st element Numeric Return value of the function
al value EW_OK
Normal termination
EW_REJECT
CNC processing is rejected.
2nd element String Main program information that has been acquired
It is a string of the current drive + folder.
Up to 242 characters can be used.
If a problem has occurred, null characters are set.
[Description]
Reads information about the file currently selected as the main program.
[Example]
When the main program name is output to the message box

ret = cnc_pdf_rdmain()
if ret[0] == EW_OK then
msg_txt = "Program name:" + ret[1]
MsgBoxShow(msg_txt,0)
end

2.18 Starting output of the NC program to be registered (4)

[Function]
cnc_dwnstart4
[Syntax with arguments]
cnc_dwnstart4(type, file_name)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 282/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (58) Arguments of the cnc_dwnstart4 function


Name Type Description
type Numerical Specify the type of CNC data to be registered.
value 0: NC program
1: Tool offset amount
2: Parameter
3: Pitch error compensation amount
4: Custom macro variable value
5: Work origin offset
file_name String Drive name and folder name (up to 241 characters) of a program.
Valid only when type = "0" (NC program).
[Return]
Details of the return values are as shown below.

Table 5.3 (59) Value to be stored in the return value of the cnc_dwnstart4 function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Start command for output of NC program to be compared has been rejected.
Cnc_dwnstart4 function (cnc_vrfstart function) has already been executed.
Use cnc_dwnend4 function (cnc_vrfend function) to end the previous output operation.
EW_ATTRIB
The specified type is invalid.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: Folder name error
EW_NOOPT
A required option is not provided.
When a custom macro variable, work origin offset, or pitch error data is registered, an option
is required.
EW_PARAM
CNC parameter error
When parameter data is registered, parameter writing must be enabled by setting.
EW_MODE
The mode of the CNC is incorrect.
- When registering tool offset or custom macro variable data, set the emergency stop state.
- When registering parameter, pitch error, or work origin offset data, set the emergency stop
state.
- When background editing (NC program) is being performed in the CNC, end the
background editing.
EW_REJECT
CNC processing is rejected.
The CNC is operating. Registration of data except NC programs is not permitted during
operation.
EW_ALARM
Alarm state
Alarm PW0000 is issued in the CNC. Cancel the alarm in the CNC.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 283/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Requests the CNC to start registering (downloading) NC data (such as an NC program, tool offsets, or
parameters).
(This function must be executed before downloading is performed.)
If the cnc_download4 or cnc_dwnend4 function is executed without executing this function, EW_FUNC is
returned.
The basic downloading procedure is shown below.

Fig. 5.3 (b) Procedure for outputting NC programs to be registered

Specify a program with a folder and a file name.


So, it is impossible to download more than one program by specifying a range.
When data is to be output to a memory card or data server, the full path of an output destination folder
must be set in the 'file_name' argument of the cnc_dwnstart4 function.
To access a data server, specify and execute the function as shown in the following example:
Example) Output to DATA_SV
ret = cnc_dwnstart4(0, "//DATA_SV/")
[Example]
Refer to the example of "Output NC program to be registered (4) (cnc_download4 function)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 284/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the NC data which can influence how the
machine works. There is a possibility that the NC may run with values from the
wrong NC data. In this case, it may cause unexpected machine behavior, and
tools, machines or workpieces may be damaged.
You have to make sure that writing the NC data is safe and correct when doing so
as it can influence how the machine works.
The NC data that can influence how the machine works is as follows. It may not
all be listed below after new applications or functions are released.

NC data that can influence how the machine works:


NC parameter, NC program, Tool offset value, Pitch error compensation data,
Work origin offset value, Custom macro variables

2.19 Outputting an NC program to be registered (4)

[Function]
cnc_download4
[Syntax with arguments]
cnc_download4(length, data)
[Arguments]
Table 5.3 (60) Arguments of the cnc_download4 function
Name Type Description
length Numerical value Number of characters of the NC data to be output
data Numerical value NC program to be output
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (61) Value to be stored in the return value of the cnc_download4 function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_RESET
The CNC has been reset.
Call the cnc_dwnend4 function.
EW_FUNC
The start processing for outputting the NC program to be registered has
not been completed in the CNC or the cnc_dwnstart4 function has not
been executed.
EW_LENGTH
The specified data length is invalid. A negative value is specified as the
number of output characters.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: Syntax error in NC data

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 285/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2: When the TV check is enabled, a block that consists of an odd
number of characters (including LF at the end of the block) is detected.
3: The maximum allowable number of registered NC programs has
been exceeded.
4: The same program number has already been registered.
5: The same program number is selected by the NC.
EW_PROT
Write protection is applied.
CNC parameters (protection or encryption of programs in the eight or
nine thousands) are write-protected. For the timing of the occurrence of
this error, see [Description].
EW_OVRFLOW
The part program storage area of the CNC becomes full, so data cannot
be registered any more.
For the timing of the occurrence of this error, see [Description].
EW_BUFFER
Buffer full The buffer is full. Retry.
For the timing of the occurrence of this error, see [Description].
2nd element Numerical Number of characters of the NC data that has actually been output
value If the free space of the buffer for data transfer to the CNC is smaller than the
number of characters specified, an amount of data equivalent to the size of
the free space is output and set.
[Description]
Outputs (downloads) an NC program to be registered.
If even one character cannot be output, EW_BUFFER is returned to the first place in the return value list.
When this value is returned, the function must be called again.
Return of the error (EW_DATA and EW_OVRFLOW, etc.) is generally delayed because priority is given
to the transfer speed of the data to the CNC. This means that an error output at a certain point in time is
sometimes due to data that was output in several data output operations preceding that point.
An error that occurs in several data output operations preceding the end of the function is returned by
cnc_dwnend4.
[Example]
- O1234 program
O1234 ;
G1F0.3W10.;
M30;
%
When the above program is output as many times as the number of specified characters

type = 0
file_name = "//CNC_MEM/USER/PATH1/"
length = 27
data = "¥nO1234¥nG1F0.3W10.¥nM30¥n%"

ret1 = cnc_dwnstart4(type, file_name)


if ret1 == EW_OK then
ret2 = cnc_download4(length, data)
end
cnc_dwnend4()
if ret2 == EW_OK then
#[100] = ret2[0].to_i # Execution result

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 286/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

#[101] = ret2[1].to_i # Number of characters of the NC data that has actually been output
end

CAUTION
Use sufficient care when you write the NC data which can influence how the
machine works. There is a possibility that the NC may run with values from the
wrong NC data. In this case, it may cause unexpected machine behavior, and
tools, machines or workpieces may be damaged.
You have to make sure that writing the NC data is safe and correct when doing so
as it can influence how the machine works.
The NC data that can influence how the machine works is as follows. It may not
all be listed below after new applications or functions are released.

NC data that can influence how the machine works:


NC parameter, NC program, Tool offset value, Pitch error compensation data,
Work origin offset value, Custom macro variables

2.20 Stopping output of NC program to be registered (4)

[Function]
cnc_dwnend4
[Syntax with arguments]
cnc_dwnend4()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (62) Value to be stored in the return value of the cnc_dwnend4 function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
The start processing for outputting the NC program to be registered has not been
completed in the CNC or the cnc_dwnstart4 function has not been executed.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: Syntax error in NC data
2: When the TV check is enabled, a block that consists of an odd number of characters
(including LF at the end of the block) is detected.
3: The maximum allowable number of registered NC programs has been exceeded.
4: The same program number has already been registered.
5: The same program number is selected by the NC.
EW_PROT
Write protection is applied.
CNC parameters (protection or encryption of programs in the eight or nine thousands) are
write-protected. For the timing of the occurrence of this error, see [Description].

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 287/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
EW_OVRFLOW
The part program storage area of the CNC becomes full, so data cannot be registered any
more.
For the timing of the occurrence of this error, see [Description].
[Description]
Notifies the CNC of the end of NC data registration. (This function must be used after downloading ends.)
An error (such as EW_DATA or EW_OVRFLOW) in the cnc_download4 function may be returned by this
function.
Control is not returned from this function until the registration of data output by the cnc_download4
function is completed.
[Example]
Refer to the example of "Output NC program to be registered (4) (cnc_download4 function)."

CAUTION
Use sufficient care when you write the NC data which can influence how the
machine works. There is a possibility that the NC may run with values from the
wrong NC data. In this case, it may cause unexpected machine behavior, and
tools, machines or workpieces may be damaged.
You have to make sure that writing the NC data is safe and correct when doing so
as it can influence how the machine works.
The NC data that can influence how the machine works is as follows. It may not
all be listed below after new applications or functions are released.

NC data that can influence how the machine works:


NC parameter, NC program, Tool offset value, Pitch error compensation data,
Work origin offset value, Custom macro variables

2.21 Starting reading NC program (4)

[Function]
cnc_upstart4
[Syntax with arguments]
cnc_upstart4(type, file_name)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (63) Arguments of the cnc_upstart4 function


Name Type Description
type Numerical Specify the type of CNC data to be read.
value 0: NC program
1: Tool offset amount
2: Parameter
3: Pitch error compensation amount
4: Custom macro variable value
5: Work origin offset
7: Operation history data
file_name String Drive name, folder name, and file name (up to 241 characters) of a program
Valid only when type = "0" (NC program).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 288/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return]
Details of the return values are as shown below.

Table 5.3 (64) Value to be stored in the return value of the cnc_upstart4 function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Start command for output of NC program to be compared has been rejected.
Cnc_upstart4 function has already been executed. Use cnc_upend4 function to end the
previous output operation.
EW_ATTRIB
The specified type is invalid.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
1: File or folder name error
EW_NOOPT
A required option is not provided.
When a custom macro variable, work origin offset, or pitch error data is registered, an option
is required.
EW_MODE
The mode of the CNC is incorrect.
Set the CNC mode to something other than the MDI mode.
End background editing in the CNC.
EW_REJECT
CNC processing is rejected.
The CNC is operating. Reading data other than NC programs is not permitted during
operation.
EW_ALARM
Alarm state
Alarm PW0000 is issued in the CNC. Cancel the alarm in the CNC.
[Description]
Requests the CNC to start reading (uploading) NC data (such as an NC program, tool offsets, or
parameters) specified with a path name and file name. (This function must be executed before
downloading is performed.)
If the cnc_upload4 function or cnc_upend4 function is executed without executing this function,
EW_FUNC is returned.
The basic uploading procedure is shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 289/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 5.3 (c) Procedure for reading NC program (4)

Specify a program with a folder and a file name. So, it is impossible to upload more than one program by
specifying a range. When data is to be read from a memory card or data server, the full path of a program
name must be set in the 'file_name' argument of the cnc_upstart4 function.
To access a data server, specify and execute the function as shown in the following example:
Example) Read program O1234:
ret = cnc_upstart4(0, "//DATA_SV/O1234") ;
[Example]
Refer to the example of "Reading NC program (4) (cnc_upload4 function)."

2.22 Reading NC program (4)

[Function]
cnc_upload4
[Syntax with arguments]
cnc_upload4(length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (65) Arguments of the cnc_upload4 function


Name Type Description
length Numerical Number of characters to be read
value In this variable (length), set the number of characters to be input by one read
operation.
The number of characters must be a multiple of 256.
If a value smaller than 256 is specified as the number of characters to be read,
EW_LENGTH is returned.
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 290/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (66) Value to be stored in the return value of the cnc_upload4 function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_RESET
The CNC has been reset. Call the cnc_upend4 function.
EW_FUNC
The start processing for outputting the NC program to be registered has not
been completed in the CNC or the cnc_upstart4 function has not been
executed.
EW_LENGTH
The specified data length is invalid.
The specified number of NC data characters to be read (length) is less than
256.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array:
2: No program is registered within a specified range.
3: The NC program area is corrupt.
EW_PROT
Write protection is applied.
CNC parameters (protection or encryption of programs in the eight or nine
thousands) are read-protected. For the timing of the occurrence of this
error, see [Description].
EW_BUFFER
The buffer is empty. Retry.
For the timing of the occurrence of this error, see [Description].
2nd element String Number of NC data characters that have actually been read
After the end of a read operation, the number of characters actually read is set
again.
3rd element Numerical NC data that has actually been read
value
[Description]
Reads (uploads) NC data.
This function inputs as many characters as specified in length. When the CNC data processing is delayed,
and data that can be read is shorter than the specified number of characters, the data that can be read is read,
and the number of characters of the read data is set in the second place in the list.
The actually read data is stored in the third place in the list of the return value. If even one character cannot
be read, EW_BUFFER is returned as the return value to the first place in the list. When this value is
returned, the function must be called again.
Because priority is given to the speed of data transfer to the CNC, an error (such as EW_DATA) is
generally returned with a delay. This means that an error output at a certain point in time is sometimes due
to data that was output in several data output operations preceding that point. An error that occurs in
several data output operations preceding the end of the function is returned by the cnc_upend4 function.
When read, NC data ends with '%'. Use this character, '%', as the condition for ending a read operation.
When an attempt is made to perform a read operation after '%' is received, the function ends with an error
(EW_RESET).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 291/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Input data format


The format of the NC data that is read from CNC is as follows:
% LF bloc-1 LF block-2 LF ... LF block-n LF %
where, LF = 0x0A('¥n')
Or
% LF CR CR block-1 LF CR CR ... LF CR CR block-n LF CR CR %
where, CR = 0x0D ('¥r') and LF = 0x0A ('¥n')
The format to be used is determined by the setting of bit 3 (NCR) of NC parameter No. 0100.
Because of the TV check, a space (' ') may be added before LF.
For details, refer to Section 13.2, "PROGRAM SECTION CONFIGURATION" in "OPERATOR’S
MANUAL (Common to Lathe System/Machining Center System)" (B-63944EN, B-64484EN,
B-64604EN) of the CNC.
[Example]
When up to 256 characters of the NC program O1234 are read

type = 0
file_name = "//CNC_MEM/USER/PATH1/O1234"
length = 256

ret1 = cnc_upstart4(type, file_name)


if ret1 == EW_OK then
ret2 = cnc_upload4(length)
end

cnc_upend4()
#[100] = ret2[0].to_i # Execution result
#[101] = ret2[1].to_i # Number of NC program characters that have actually been read
MsgBoxShow(ret2[2].to_s, 0) # NC program that has actually been read

2.23 Stopping reading NC program (4)

[Function]
cnc_upend4
[Syntax with arguments]
cnc_upend4()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (67) Value to be stored in the return value of the cnc_upend4 function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
The start processing for outputting the NC program to be registered has not been
completed in the CNC or the cnc_upstart4 function has not been executed.
EW_DATA
The data is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 292/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
The following is set in "Detail status" in the return value array:
2: No program is registered within a specified range.
3: The NC program area is corrupt.
EW_PROT
Write protection is applied.
CNC parameters (protection or encryption of programs in the eight or nine thousands) are
write-protected.
For the timing of the occurrence of this error, see [Description].
[Description]
Posts the end of reading (uploading) of NC data. (This function must be executed after uploading.)
An error (such as EW_DATA) in the cnc_upload4 function may be returned by this function.
[Example]
Refer to the example of "Reading NC program (4) (cnc_upload4 function)."

2.24 Reading the name of the program being executed

[Function]
cnc_exeprgname
[Syntax with arguments]
cnc_exeprgname()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (68) Value to be stored in the return value of the cnc_exeprgname function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_FUNC
Not available
2nd element Array Name of program being executed
For details on the value, refer to the following table "Name of program being
executed."

Table 5.3 (69) Name of program being executed


Element Type Description
1st element String Name of program being executed (Up to 31 characters can be used.)
2nd element Numerical Number of the program being executed
value
[Description]
Reads the name of a machining program currently selected in the CNC.
A program name is stored as a string consisting of up to 31 characters.
- Storage of the "Name of program being executed" array for O-number programs:
1st element (string): An ASCII code indicating "O" and a number such as "O123" is stored.
2nd element (numerical value): Binary data indicating an "O" number such as "123" is stored.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 293/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- Storage of the "Name of program being executed" array for programs other than O-number programs:
1st element (string): An ASCII code indicating a program name such as "ABC" is stored.
2nd element (numerical value): Binary data indicating an "0" is stored.
[Example]
When the name of the program being executed and program number are acquired

ret_values = cnc_exeprgname() # Executes reading of the name of the program being executed.

if ret_values[0] != EW_OK then


MsgBoxShow("ERROR", 0)
end

2.25 Reading the name of the program being executed (full path format)

[Function]
cnc_exeprgname2
[Syntax with arguments]
cnc_exeprgname2()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (70) Value to be stored in the return value of the cnc_exeprgname2 function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
Not available
2nd element String Full path of the name of the program being executed
Up to 256 characters can be used.
[Description]
Reads the name of a machining program currently selected in the CNC in the full path format.
A program name consists of up to 256 characters and is stored in the second place in the list.
- O-number programs:
"//CNC_MEM/USER/PATH1/O123"
- Programs other than O-number programs:
"//CNC_MEM/USER/PATH1/ABC"
[Example]
When the name of a machining program currently selected in the CNC is acquired in the full path format

ret = cnc_exeprgname2()
#[100] = ret2[0].to_i # Execution result
MsgBoxShow(ret2[1].to_i, 0) # Number of characters of the NC data that has actually been output

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 294/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

2.26 Writing MDI program

[Function]
cnc_wrmdiprog
[Syntax with arguments]
cnc_wrmdiprog(length, data)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (71) Arguments of the cnc_wrmdiprog function


Name Type Description
length Numerical Number of characters in the MDI program to be written
value
data String MDI program data to be written
Up to 499 characters can be used as a string of MDI program data.
[Return]
Details of the return values are as shown below.

Table 5.3 (72) Value to be stored in the return value of the cnc_wrmdiprog function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_LENGTH
The number of characters in the MDI program (length) is invalid.
EW_DATA
A character that is unavailable for NC programs is detected.
EW_MODE
The function is executed in an unavailable CNC mode.
Set the CNC mode to MDI.
EW_REJECT
MDI operation is being executed or the CNC is in the emergency stop status.
[Description]
Writes an MDI program to the CNC. This function must be used in the MDI mode.
The written data format is shown below.

MDI program data registered to the CNC is an ASCII code string in the following format:
LF Block1 LF Block2 LF ... LF %
[Example]
- MDI program
M03 S2000 ;
G28 U0 W0 ;
T0101 ;
G00 X35.0 Z-10.0 ;

When the above program is written to the CNC

length = 45
data = "¥nM03S2000¥nG28U0W0¥nT0101¥nG00X35.0Z-10.0¥n%"

ret = cnc_wrmdiprog(length, data)


#[100] = ret # Execution result

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 295/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the MDI program. There is a possibility that the
NC may run with the wrong MDI program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the MDI program is safe and correct when
doing so.

2.27 Reading an execution pointer for MDI operation

[Function]
cnc_rdmdipntr
[Syntax with arguments]
cnc_rdmdipntr()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (73) Value to be stored in the return value of the cnc_rdmdipntr function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_MODE
The function is executed in an unavailable CNC mode.
Set the CNC mode to MDI.
2nd element Array Execution pointer information
For details on the value, refer to the following table "Execution pointer
information."

Table 5.3 (74) Execution pointer information


Element Type Description
1st element Numerical Number of program being executed
value For MDI operation, this value is basically 0.
When the program being executed is a subprogram, the subprogram number is
indicated.
2nd element Numerical Execution block pointer
value Pointer to the block currently being executed.
3rd element Numerical Buffered program number
value Number of the buffered program.
For MDI operation, this value is basically 0. When a subprogram is buffered, the
subprogram number is indicated.
4th element Numerical Buffered block pointer
value Pointer to the last block of the program that is buffered.
[Description]
Reads the execution pointer for MDI operation.
This function must be used in the MDI mode.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 296/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When the execution pointer for MDI operation is acquired

ret_values = cnc_ rdmdipntr() # Executes reading of the execution pointer for MDI operation.

if ret_values[0] != EW_OK then


MsgBoxShow("ERROR", 0)
end

2.28 Writing an execution pointer for MDI operation

[Function]
cnc_wrmdipntr
[Syntax with arguments]
cnc_wrmdipntr(crntpntr)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (75) Arguments of the cnc_wrmdipntr function


Name Type Description
crntpntr Numerical Execution start block pointer
value Specify the execution start block pointer with an absolute pointer value (block
number indicated when the number of the first block of the program is 0).
[Return]
Details of the return values are as shown below.

Table 5.3 (76) Value to be stored in the return value of the cnc_wrmdipntr function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
The specified execution start block pointer (crntpntr) is invalid.
EW_MODE
The function is executed in an unavailable CNC mode.
Set the CNC mode to MDI.
EW_REJECT
MDI operation is being executed or the CNC is in the emergency stop status.
[Description]
Specifies the execution pointer for MDI operation. (The pointer cannot be directly manipulated while a
program is being executed.)
Before executing this function, register an MDI program using the cnc_wrmdiprog function.
This function must be used in the MDI mode.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 297/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the execution pointer for MDI operation. There
is a possibility that the NC may run with the wrong execution pointer for MDI
operation. In this case, it may cause unexpected machine behavior, and tools,
machines or workpieces may be damaged.
You have to make sure that writing the execution pointer for MDI operation is safe
and correct when doing so.

2.29 Reading programs line by line

[Function]
cnc_rdpdf_line
[Syntax with arguments]
cnc_rdpdf_line(prog_name, line_no, line_len, data_len)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (77) Arguments of the cnc_rdpdf_line function
Name Type Description
prog_name String Program path with drive-name + path-name + file-name.
When prog_name data is "" (null character), the name of the last
accessed program is assumed to be specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths for the program folder of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Patch 10: "//CNC_MEM/USER/PATH10/”
For an MDI program, specify "MDI".
line_no Numerical Line number from which reading starts
value For the first line of the program, specify 0.
If the specified number exceeds the number of registered lines, an error
(EW_DATA) is returned.
line_len Numerical Number of lines to be read in the program
value
data_len Numerical Number of characters to be read in the program
value
[Return]
For this function, the return value is an array of 4 elements.
Details of the return values are as shown below.

Table 5.3 (78) Value to be stored in the return value of the cnc_rdpdf_line function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Busy
- During the execution of a search.
EW_DATA
Data error

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 298/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


To get more detailed information on this return value, execute the
cnc_getdtailerr function. The following is set to "Detail status" of the return
value array:
1: Program path (prog_name) error.
2: Read start line number (line_no) error.
3: Error in the number of lines to be read (line_len).
EW_PROT
Write protection
- CNC parameters No. 8000 to No. 8999 or No. 9000 to No. 9999 (for
protection or encryption) are write-protected.
EW_MODE
CNC mode error.
The emergency stop engaged.
2nd element Numerical Contents of the program that has been read
value Strings of the specified line, number of lines, and number of characters
If a problem occurs, a NULL character is set.
3rd element Numerical Number of characters that have been read
value The number of characters that have actually been read.
If a problem has occurred, -1 is set.
[Description]
Reads the specified program line by line.

This function attempts to read the number of lines in the program as is specified by (line_len). However, if
the number of characters that is specified for (data_len) is reached, the function stops reading the program.
When the end of the line (EOB (‘¥n’)) is not read, the line is not counted as having been read, however.

Example) If you want to read lines 1 to 3 of the following program, you must specify at least 33 for the
number of characters to be read. If a value of 30 is specified for the number of characters to be read, a
value of 2 is set for the number of read lines because line 3 cannot be read to the end. However, the return
value is 30 (characters).
O1234 ;
N001 G01 X0. F100 ;
N002 X20. ;
N003 X50. ;
N004 X80. ;
N005 M30 ;
%

The following table shows the relationships between each CNC mode and target program (MDI program,
selected program, and unselected program):
Table 5.3 (79) CNC modes and target programs
MDI mode Other modes
MDI program  ×
Selected program  
Unselected program  
: Can be executed. ×: Cannot be executed (EW_MODE is returned).

When this function is executed for an MDI program or selected program, the execution pointer goes to the
beginning of the line specified for line_no in the following cases:
- When an MDI program is specified in the MDI mode

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 299/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- When the selected program is specified in the EDIT mode


- When the selected program is specified in the TJOG/THND mode with a playback option
[Example]
When 30 characters between the 1st and 3rd lines of the program "//CNC_MEM/USER/PATH1/O1234"
are read.

ret = cnc_rdpdf_line("//CNC_MEM/USER/PATH1/O1234",1,3,30)
if ret[0] == EW_OK then
msg_txt = "Contents to be read:" + ret[1] + "¥n" + "Lines to be read:" + ret[2].to_s + "¥n" + "Number
of characters to be read:" + ret[3].to_s
MsgBoxShow(msg_txt,0)
end

2.30 Writing programs line by line

[Function]
cnc_wrpdf_line
[Syntax with arguments]
cnc_wrpdf_line( prog_name, line_no, prog_data, data_len)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (80) Arguments of the cnc_wrpdf_line function


Name Type Description
prog_name String Specify the program path with drive-name + path-name + file-name.
When prog_name data is "" (null character), the name of the last accessed
program is assumed to be specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths for the program folder of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
For an MDI program, specify "MDI".
line_no Numerical Line number to be written
value Line 0 is the first line (line containing a program name and program number) of a
program.
prog_data String Program string to be written
Pay attention to the following points when making this specification:
- Codes other than those significant to the NC are ignored.
- Lowercase alphabetic characters are ignored.
- '%' (EOR) is ignored.
Even when the specified string contains multiple EOB characters ('¥n'), the
registered line with the specified line number is replaced with the specified string.
data_len Numerical Number of characters to be written
value Before data is written, the unused space in the NC is checked. If the size of the
space is smaller than that for the number of characters to be written + 100
characters, data is not written and an error (EW_OVRFLOW) is returned.
The maximum number of characters that can be written at a time is 200
characters in Series 30i/31i/32i-A, and 1740 characters in Series 30i/31i/32i/35i
-B, Series 0i -F, and PMi -A.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 300/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return]
Details of the return values are as shown below.

Table 5.3 (81) Value to be stored in the return value of the cnc_wrpdf_line function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Busy
- During the execution of a search.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
1: Program path (prog_name) error.
2: Write start line number (line_no) error.
3: Error in the number of characters to be written (data_len).
4: An attempt was made to change the O number at the beginning.
5: The first character of the string is invalid.
6: An error occurred during deletion of the write start line.
7: An error occurred during writing.
EW_PROT
Write protection
- CNC parameters No. 8000 to No. 8999 or No. 9000 to No. 9999 (for protection or
encryption) are write-protected.
EW_OVRFLOW
Memory overflow
- There is insufficient unused space on the NC. Allocate the required space.
EW_MODE
CNC mode error.
EW_REJECT
CNC processing is rejected.
- During MDI or background editing.
[Description]
Writes the specified program line by line.

The file name on the first line cannot be changed. If an attempt is made to rewrite the file name, an error
(EW_DATA) is returned.
The following table shows the relationships between each CNC mode and target program (MDI program,
selected program, or unselected program):
Table 5.3 (82) CNC modes and target programs
EDIT mode MDI mode Other modes
MDI program ×  ×
Selected program  × ×
Unselected program   
: Can be executed. ×: Cannot be executed (EW_MODE is returned).

When a playback option is enabled, TJOG/THND mode is assumed to be the same as EDIT mode.

Even when the OP signal is set to 1, this function can be executed if the STL signal is set to 0 (in statuses
such as feed hold stopped or single block stopped).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 301/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

When this function is executed for an MDI program or selected program, the execution pointer goes to the
beginning of the line specified for line_no in the following cases:
- When an MDI program is specified in the MDI mode
- When the selected program is specified in the EDIT mode
- When the selected program is specified in the TJOG/THND mode with a playback option

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.
[Example]
When "TEST" is written on the 2nd line of the program "//CNC_MEM/USER/PATH1/O1234"

ret = cnc_wrpdf_line("//CNC_MEM/USER/PATH1/O1234",2,"TEST",4)
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end

2.31 Deleting programs line by line

[Function]
cnc_pdf_delline
[Syntax with arguments]
cnc_pdf_delline( prog_name, line_no, line_len)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (83) Arguments of the cnc_pdf_delline function


Name Type Description
prog_name String Program path with drive-name + path-name + file-name.
When prog_name data is "" (null character), the name of the last accessed
program is assumed to be specified.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths for the program folder of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
For an MDI program, specify "MDI".
line_no Numerical Line number from which deletion starts
value For the first line of the program, specify 0.
If the specified number exceeds the number of registered lines, an error
(EW_DATA) is returned.
line_len Numerical Number of lines in the program that are to be deleted.
value If the specified number exceeds the number of registered lines, all lines from
the specified line number to the line before last are deleted. The last line (%) is
not deleted.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 302/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return]
Details of the return values are as shown below.

Table 5.3 (84) Value to be stored in the return value of the cnc_pdf_delline function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Busy
- During the execution of a search.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
1: Program path (prog_name) error.
2: Deletion start line number (line_no) error.
3: Error in the number of lines to be deleted (line_len).
EW_PROT
Write protection
- CNC parameters No. 8000 to No. 8999 or No. 9000 to No. 9999 (for protection or
encryption) are write-protected.
EW_MODE
CNC mode error.
EW_REJECT
CNC processing is rejected.
- The emergency stop is engaged.
[Description]
Deletes the specified program line by line.

When the number of the line containing the file name ("Oxxxx" or "<xxxx>") is specified for the deletion
start line number, the data following the file name to the end of the line ('¥n') is deleted, but the file name is
not deleted.

Example)
Deletes the following program line by line:
O1234(TEST PROGRAM) ;
G010. F100 ;
X20. ;
M30 ;
%

When three lines starting from line 0 in the program are deleted, the result is:
O1234 M30 ;
%

The following table shows the relationships between each CNC mode and target program (MDI program,
selected program, or unselected program):
Table 5.3 (85) CNC modes and target programs
EDIT mode MDI mode Other modes
MDI program ×  ×
Selected program  × ×

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 303/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Unselected program   
: Can be executed. ×: Cannot be executed (EW_MODE is returned).

When a playback option is enabled, TJOG/THND mode is assumed to be the same as EDIT mode.

Even when the OP signal is set to 1, this function can be executed if the STL signal is set to 0 (in statuses
such as feed hold stopped or single block stopped).

When this function is executed for an MDI program or selected program, the execution pointer goes to the
beginning of the line specified for line_no in the following cases:
- When an MDI program is specified in the MDI mode
- When the selected program is specified in the EDIT mode
- When the selected program is specified in the TJOG/THND mode with a playback option

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.
[Example]
When lines 0 to 3 of the program "//CNC_MEM/USER/PATH1/O1234" are deleted

ret = WrpCncPrgApi::cnc_pdf_delline("//CNC_MEM/USER/PATH1/O1234",0,4)
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end

2.32 Getting program execution pointer

[Function]
cnc_pdf_rdactpt
[Syntax with arguments]
cnc_pdf_rdactpt()
[Arguments]
None
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (86) Value to be stored in the return value of the cnc_pdf_rdactpt function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_MODE
CNC mode error
- The function is executed in a mode other than the MDI, MEM,
EDIT, TJOG, or THND mode.
EW_REJECT

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 304/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Pointer get processing is rejected.
Incorrect parameter number "number".
- Currently, the target program does not exist.
- The CNC is performing DNC or M198 operation.
- The STL signal is on.
- The emergency stop is engaged.
2nd element String Current program name
When an MDI program is executed, "MDI" is set.
3rd element Numerical Number of the first block of the program
value If a problem has occurred, -1 is set.
[Description]
Gets the current program name and block number in the MDI or MEM mode and EDIT, TJOG, or THND
mode.
The following restrictions apply to execution of this function:
- During DNC or M198 operation, EW_REJECT is returned.
- When the STL signal is on, EW_REJECT is returned.
- When the program is buffered, the number of the block following the buffered block is obtained.
[Example]
When the current program name and block number are obtained and then displayed in the message box

ret = cnc_pdf_rdactpt()
if ret[0] == EW_OK then
msg_txt = "Program name:" + ret[1] + "n" + "Block number:" + ret[2].to_s
MsgBoxShow(msg_txt,0)
end

2.33 Setting program execution pointer

[Function]
cnc_pdf_wractpt
[Syntax with arguments]
cnc_pdf_wractpt(prog_name, type, blk_no)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (87) Arguments of the cnc_pdf_wractpt function


Name Type Description
prog_name String Program that sets the executing block number
Specify it with drive name + path name + file name.
The drive name of the memory card is "//MEMCARD/".
The drive name of the data server is "//DATA_SV/".
Specify the following paths for the program folder of the CNC memory.
Path 1: "//CNC_MEM/USER/PATH1/"
:
Path 10: "//CNC_MEM/USER/PATH10/"
For an MDI program, specify "MDI".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 305/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


type Numerical Execution pointer type.
value 0: Absolute pointer
(The number of the first block of the program is 0.)
1: Relative pointer
(Relative value to the current execution pointer)
blk_no Numerical Block number to be set
value When type = 0
- Specify the block number indicated when the number of the first block of the
program is 0.
When type = 1
- Specify the value relative to the current execution pointer.
- If 0 is specified, the execution pointer is not changed.

The following table shows values of the absolute pointer and relative pointer when the execution block is
"X20. Z15.;".
Table 5.3 (88) Method for specifying the absolute pointer and relative pointer
Selected NC command program Absolute pointer Relative pointer
01234 0 -3
G00 X0. Z0.; 1 -2
G01 X10. Z5. F100. ; 2 -1
X20. Z15.; 3 0
X35.; 4 1
Z20; 5 2
M30; 6 3
% 7 4
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (89) Value to be stored in the return value of the cnc_pdf_wractpt function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_ATTRIB
Data attribute error
- An invalid value is specified for type.
EW_DATA
Data error
- The specified program name is invalid or does not exist.
- The specified block number is invalid or does not exist.
EW_MODE
CNC mode error
- The function is executed in a mode other than the EDIT, MEM, or MDI mode.
- In the EDIT mode, "" (null character) is specified for prog_name.
EW_REJECT
CNC processing is rejected.
- During operation.
- No MDI program exists.
- No program is selected.
- An alarm is issued.
- Emergency stop is engaged.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 306/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical Execution pointer
value When 1 (relative value setting) is set as the execution pointer type and 0 is set as
the block number, the absolute value of the pointer to be executed next is set.
[Description]
Sets the next block number to be executed for a program for MDI or memory operation.

When a block has been buffered, the buffered block is executed before the block number set with this
function is executed.

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.
[Example]
When 2 is set as the absolute pointer

ret = cnc_pdf_wractpt("//CNC_MEM/USER/PATH1/O1234",0,2)
if (ret[0] != EW_OK ) then
MsgBoxShow(ret[0].to_s,0) # Error display
end

When the absolute value of the pointer to be executed next is to be acquired


ret = cnc_pdf_wractpt("//CNC_MEM/USER/PATH1/O1234",1,0)
if (ret[0] == EW_OK ) then
MsgBoxShow(ret[1].to_s,0) # The absolute value of the pointer to be executed next is displayed.
end

2.34 Starting to save NC programs

[Function]
cnc_saveprog_start
[Syntax with arguments]
cnc_saveprog_start()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (90) Value to be stored in the return value of the cnc_saveprog_start function
Type Description
Numer Return value of the function
ical EW_OK
value Normal termination
EW_REJECT
CNC processing is rejected.
The cnc_saveprog_start function has been executed. Finish saving NC programs to nonvolatile
memory by using the cnc_saveprog_end function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 307/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Saving NC programs to nonvolatile memory is started when High-speed program management is valid (bit
7 (HPM) of parameter No.11354 is 1).
Although saving NC programs to nonvolatile memory can only be executed when all paths are in EDIT
mode, this function returns "EW_OK" even if one of the paths is not in EDIT mode.
If the NC program is not saved to nonvolatile memory because it is in the wrong operation mode or
because of mistaken parameter settings, the value corresponding to the result of saving the NC program is
set in the second place of the list as the return value of the cnc_saveprog_end function.
The procedure for saving NC programs to nonvolatile memory is shown below.

Fig. 5.3 (d) Flow for saving NC programs

For details about High-speed program management, refer to the "OPERATOR'S MANUAL (Common to
Lathe System/Machining Center System) (B-64484EN, B-64604EN) III.11.16 HIGH-SPEED PROGRAM
MANAGEMENT "

CAUTION
Use sufficient care when you write the NC program. There is a possibility that the
NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the NC program is safe and correct when
doing so.

2.35 Ending save of NC programs

[Function]
cnc_saveprog_end
[Syntax with arguments]
cnc_saveprog_end()
[Arguments]
None

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 308/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (91) Value to be stored in the return value of the cnc_saveprog_end function
Element Type Description
1st Numerical Return value of the function
element value EW_OK
Normal termination
EW_BUSY
In a Busy state.
An NC program is being saved to nonvolatile memory.
EW_FUNC
The cnc_saveprog_start function has not been executed.
2nd Numerical Result of saving an NC program to nonvolatile memory
element value If the first return value of this function is "EW_OK", the following values
corresponding to the NC program being saved to nonvolatile memory are set.
EW_OK Saving the NC program has completed normally.
EW_PARAM Parameter error
EW_MODE CNC mode error
EW_REJECT CNC processing is rejected. (If this function cannot be executed
by the CNC, the return value is this error.)
[Description]
Ends saving the NC program to nonvolatile memory.
If an NC program is being saved to nonvolatile memory, "EW_BUSY" is returned as the return value to
the first place in the list. Execute this function repeatedly until the NC program is completely saved to the
nonvolatile memory.
Once the NC program has been saved to nonvolatile memory, "EW_OK" is set to both the first place and
second place in the return value list.
If a value other than "EW_OK" is set to the second place of the list, saving the NC program to the
nonvolatile memory has failed. Confirm the settings of the CNC (for example, operation mode and
parameter settings), execute the cnc_saveprog_start function again, and retry saving the NC program to the
nonvolatile memory.

CAUTION
If the power supply of the CNC is interrupted while saving an NC program to
nonvolatile memory, alarm (PS0519) is displayed the next time the power supply
is turned, and all NC programs are cleared.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 309/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC window library NC data file-related function reference]

3.1 Reading parameters (range specified)

[Function]
cnc_rdparar
[Syntax with arguments]
cnc_rdparar(s_number, axis, e_number, length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (92) Arguments of the cnc_rdparar function


Name Type Description
s_number Numerical Start parameter number
value Specifies the parameter number to start reading data.
axis Numerical Axis number
value Specifies the following value:
(1) Non-axis parameter: 0
(2) Axis parameter, one axis: 1 to maximum controlled axis number (32)
(3) Axis parameter, all axes: -1

A non-axis parameter is read regardless of which value is specified as the axis


number. When a non-axis parameter (0) is specified and an axis parameter
exists within a range specified with the start parameter number and end
parameter number, however, an error occurs. For the details of an error, refer to
"Value to be stored in the return value of the cnc_rdparar function" for the return
value.
e_number Numerical End parameter number
value Specifies the parameter number to stop reading data.
length Numerical Data block length
value Specifies the data block length of the parameter to be read. For details on the
value, see the descriptions below.

The size per parameter is as shown in the table below. Because the sizes are arranged in ascending order
with respect to the number of parameters in the range from the start parameter number to the end parameter
number, the data block length (length) to be specified is the sum of them.

Table 5.3 (93) Size per parameter


Specified axis number (axis) Formula
Non-axis parameter (0), 4 + (byte size of the parameter)
Axis parameter, one axis (1 to
maximum controlled axis number (32))
Axis parameter, all axes (-1) 4 + (byte size of the parameter) × (maximum
controlled axis number (32))

There are the following types of parameters with different type and axis attributes, and the byte size is
different for each parameter to be specified. It is impossible to read a bit parameter one bit at a time. The
values of the specified parameters are read all at once 8 bits (1 byte) at a time.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 310/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (94) Parameter types and byte sizes


Parameter type Description Byte size
Bit parameter Every bit has a meaning. 1
Bit parameter with axis Every bit has a meaning (each axis). 1
Byte parameter 1-byte data is stored. 1
Byte parameter with axis 1-byte data is stored (each axis). 1
Word parameter 2-byte data is stored. 2
Word parameter with axis 2-byte data is stored (each axis). 2
2-Word parameter 4-byte data is stored. 4
2-Word parameter with axis 4-byte data is stored (each axis). 4
Real parameter 4-byte data that indicates the value of a variable 8
and 4-byte data that indicates the number of
decimal places are stored.
Real parameter with axis 4-byte data that indicates the value of a variable 8
and 4-byte data that indicates the number of
decimal places are stored (each axis).

If the size per parameter is not a multiple of 4, it needs to be made a multiple of 4.

(Example) When reading word parameters using non-axis parameters (axis = 0), the size of one parameter will
be "4 + 2 bytes = 6", which is not a multiple of 4. Therefore, add two bytes as dummy bytes to
make up the difference so that the size will be "8".
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (95) Value to be stored in the return value of the cnc_rdparar function
Element Type Description
1st Numerical value Return value of the function
element EW_OK
Normal termination
EW_LENGTH
Incorrect data block length "length".
EW_NUMBER
Incorrect parameter number "number".
EW_ATTRIB
A value other than 0, values from 1 to maximum controlled axis
number (32), or -1 has been specified for the axis number. Or, an
axis parameter existed within a range specified with the start
parameter number and end parameter number.
2nd Numerical value Number of parameters that have actually been read
element The number of parameters that have actually been read may not be
the same as the number of parameters in the range from the start
parameter number to the end parameter number.
For example, when 1421 and 1423 are specified as the start
parameter number and the end parameter number, the number of
parameters in this range should be 3. However, there is no parameter
whose number is 1422 so only the two parameters (1421 and 1423)
are read; therefore, the value to be stored will be 2.
3rd Array of m elements Parameters that have been read (per parameter number)
element (m = Number of For details on the value, refer to the following table "Values to be
parameters that stored in parameters that have been read (per parameter number)."
have actually been

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 311/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


read)

Table 5.3 (96) Values to be stored in parameters that have been read (per parameter number)
Element Type Description
1st Numerical Parameter number
element value
2nd Numerical Data type
element value (1) Upper byte: Type attribute
Bit type: 0
Byte type: 1
Word type: 2
2-word type: 3
Real type: 4
(2) Lower byte: Axis number
Non-axis parameter: 0
Axis parameter, one axis: Axis number that has been read
Axis parameter, all axes: -1
3rd Variable array Values of the parameters that have been read
element For details on the value, refer to the following table "Values to be stored in
parameters that have been read."

For the read parameter values, the array elements become variable according to the type attribute and axis
number each parameter has, as shown below. When the all axes specification for axis data (-1) is made and
the type of the parameters that have been read is the axis type, the data for the current controlled axes will
be valid.
In addition, spindle-related parameters are also handled as axis parameters, but the data for the current
spindles will be valid.

Table 5.3 (97) Values to be stored in parameters that have been read
Type attribute Specified axis number Number of Description
that parameters elements in
have the array
Bit type (0), Non-axis parameter (0), 1 Bit/byte/word/2-word type parameters or axis parameters
Byte type (1), Axis parameter, one axis (one axis)
Word type (2), (1 to maximum controlled For details on the value, refer to the following table
2-word type (3) axis number (32)) "Values to be stored in bit/byte/word/2-word type
parameters or axis parameters (one axis)."
Axis parameter, all axes Maximum Bit/byte/word/2-word type axis parameters (for each axis)
(-1) number of For details on the value, refer to the following table
controlled "Values to be stored in bit/byte/word/2-word type axis
axes (32) parameters (for each axis)."
Real type (4) Non-axis parameter (0), 2 Real parameters or axis parameters (one axis)
Axis parameter, one axis For details on the value, refer to the following table
(1 to maximum controlled "Values to be stored in real parameters or axis
axis number (32)) parameters (one axis)."
Axis parameter, all axes Maximum Real parameters with axis (for each axis)
(-1) number of For details on the value, refer to the following table
controlled "Values to be stored in real parameters with axis (for
axes (32) each axis)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 312/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (98) Values to be stored in bit/byte/word/2-word type parameters or axis parameters (one axis)
Element Type Description
1st element Numerical Value of the bit/byte/word/2-word type parameter or axis parameter (one axis)
value

Table 5.3 (99) Values to be stored in bit/byte/word/2-word type axis parameters (for each axis)
Element Type Description
1st to nth elements Numerical Value of the bit/byte/word/2-word type axis parameter (for each axis)
(n = Maximum number of value
controlled axes (32))

Table 5.3 (100) Values to be stored in real parameters or axis parameters (one axis)
Element Type Description
1st Numerical Data of the real parameter or axis parameter (one axis)
element value For details on the value, refer to the descriptions of real parameters shown
below.
2nd Numerical Number of decimal places of the real parameter or axis parameter (one axis)
element value

Table 5.3 (101) Values to be stored in real parameters with axis (for each axis)
Element Type Description
1st to nth Array of 2 Real parameters with axis (for each axis)
elements elements The details on the values are the same as those shown in the above
table "Values to be stored in real parameters or axis parameters (one
axis)".

A real parameter contains a data section and a section for the number of decimal places, which are
expressed in the following format:

Real parameter (data section)×10-(number of decimal places)

(Example) When the data is 12345 and the number of decimal places is 3, the real parameter is expressed
as "12345×10-3 = 12.345".

A conceptual image of the return value that will actually be returned is shown below.

(1) When parameter numbers 6080 and 6081 (which are 2-word parameters) are read using non-axis
parameters (axis = 0)
[
0, # Processing result (0 = EW_OK)
2, # Number of parameters that have actually been read
[ # Parameters that have been read (per parameter number)
[ # First parameter
6080, # Parameter number
768, # Data type (768(dec) = 0x0300(hex), upper byte = 3, lower byte = 0)
[0] # Value of the bit/byte/word/2-word type axis parameter (array of 1 element)
],
[ # Second parameter
6081, # Parameter number
768, # Data type
[0] # Value of the bit/byte/word/2-word type axis parameter

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 313/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

]
]
]
(2) When parameter numbers 1425 (real parameter with axis) and 1426 (real parameter) are read by
specifying all axes for axis parameters (axis = -1)
[
0, # Processing result (0 = EW_OK)
2, # Number of parameters that have actually been read
[ # Parameters that have been read (per parameter number)
[ # First parameter
1425, # Parameter number
1279, # Data type (1279(dec) = 0x04FF(hex), upper byte = 4, lower byte = -1)
[ # Real parameter with axis
[100000, 4], # Value of the real parameter of the 1st axis (array of 2 elements)
[100000, 4], # Value of the real parameter of the 2nd axis (same as above)
[100000, 4], # Value of the real parameter of the 3rd axis (same as above)
... # The following is repeated to the maximum number of controlled axes (32).
# (Data for the current number of controlled axes or spindles will be valid.)
]
],
[ # Second parameter
1426, # Parameter number
1024, # Data type (1024(dec) = 0x0400(hex), upper byte = 4, lower byte = 0)
[ # Real parameter
[0, 4] # Value of the real parameter (array of 2 elements)
]
]
]
]
[Description]
Reads the parameters in the specified range at the same time based on the start parameter number
(s_number), end parameter number (e_number), and axis number (axis).

Parameters may be added because of, for example, the addition of CNC software functions. For example, if
a parameter is added within the read range, an error may occur (return value of the function:
EW_LENGTH) or the application program may not operate correctly. To prevent these problems, specify a
read range containing only a set of consecutive parameter numbers.

For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When non-axis parameters (axis = 0) for parameter numbers 6080 and 6081 are read at the same time

sno=6080 # Input parameter start number (s_number) = 6080


eno=6081 # Input parameter end number (e_number) = 6081
axis=0 # Axis number (axis) = 0
len=(4+2+2)*2 # Data block length (length) = (4 + byte size: 2 + dummy: 2) × two parameters

ret = cnc_rdparar(sno, axis, eno, len)

if ret[0] != EW_OK then # ret[0]: Processing result

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 314/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

MsgBoxShow("ERROR",0)
end

3.2 Writing parameters (multiple output)

[Function]
cnc_wrparas
[Syntax with arguments]
cnc_wrparas(length, param)

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (102) Arguments of the cnc_wrparas function


Name Type Description
length Numerical value Data block length
Details of the value to be specified are the same as those of
the data block length shown in "Arguments of the cnc_rdparar
function."
param Array of m elements Parameters to be rewritten (for each parameter number)
(m = Number of The number of elements required is the number of parameters
parameters to be to be rewritten. For details on the value to be specified, refer to
rewritten) the following table "Values to be set to parameters to be
rewritten (for each parameter number)."

Table 5.3 (103) Values to be set to parameters to be rewritten (for each parameter number)
Element Type Description
1st to mth Array of 3 Parameters to be rewritten (1st to mth)
elements elements For details on the value to be specified, refer to the following
table "Values to be set to parameters to be rewritten."

Table 5.3 (104) Values to be set to parameters to be rewritten


Element Type Description
1st element Numerical Parameter number
value Specify the number of the parameter to be rewritten.
2nd element Numerical Data type
value Specify a value of the type attribute as an upper byte and a value of the
axis number as a lower byte. Details of the values to be specified are the
same as those of "Values to be stored in parameters that have been
read (per parameter number)" for the cnc_rdparar function.
3rd element Variable array Value of the parameter to be rewritten
Details of the values to be specified are the same as those of "Values to
be stored in parameters that have been read" for the cnc_rdparar
function.
[Return]
The return values from this function are as follows.

Table 5.3 (105) Return values from the cnc_wrparas function


Type Description
Numerical value Return value of the function
EW_OK

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 315/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
Normal termination
EW_LENGTH
The number of elements for the value to be preset (for each axis) is
incorrect.
EW_NUMBER
Incorrect parameter number "number".
EW_ATTRIB
A value other than 0, values from 1 to maximum controlled axis number
(32), or -1 has been specified for the axis number.
EW_PROT
Write operation is prohibited.
[Description]
Rewrites multiples parameters in the specified input range at the same time based on the parameter
numbers, data type, and parameter values set to the param argument.

For some parameters, alarm PW0000 "POWER MUST BE OFF" may be issued when the data is rewritten.
If parameters whose write operation is prohibited (for example, parameters whose numbers are in the nine
thousands) exist in the specified parameter range, an error occurs. However, the other parameters are
rewritten.
[Example]
When parameter numbers 6080 and 6081 (which are 2-word parameters) are rewritten at the same time

type=(0x03 << 8 | 0x00) # Data type (upper byte: 3 and lower byte: 0)
param=Array.new # Creates an array of parameters to be rewritten.
param.push([6080, type, [[3]]]) # Sets "3" to the 1st parameter (parameter number: 6080).
param.push([6081, type, [[3]]]) # Sets "3" to the 2nd parameter (parameter number: 6081).
len=(4+2+2)*2 # Data block length (length) = (4 + byte size: 2 + dummy: 2) × two parameters

ret = cnc_wrparas( len, param )


if ret != EW_OK then # ret: Processing results
MsgBoxShow("ERROR",0)
End

3.3 Reading workpiece coordinate system shift

[Function]
cnc_rdwkcdshft
[Syntax with arguments]
cnc_rdwkcdshft(axis)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (106) Arguments of the cnc_rdwkcdshft function


Name Type Description
axis Numerical Axis number (= (1 to the maximum number of controlled axes), or -1)
value 1~m: Specifies one axis (m: Current number of controlled axes)
-1: Specifies all axes
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 316/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (107) Return value of the cnc_rdwkcdshft function


Element Type Description
1st Numerical value Return value of the function
element EW_OK
Normal termination
EW_FUNC
Not available
This function cannot be used for the M series.
EW_ATTRIB
The specified axis number is invalid.
EW_PARAM
CNC parameter error.
Set bit 6 (NWS) of parameter No. 1201 to 0.
2nd Array of 2 Workpiece coordinate system shift data
element elements For details, refer to "Workpiece coordinate system shift data" below.

Table 5.3 (108) Workpiece coordinate system shift data


Element Type Description
1st element Numerical value Axis number
Tool management data number of the tool to be stored
2nd Array of N Workpiece coordinate system shift array (maximum number of controlled
element elements (N is 1 axes (32))
or 32.) The number of elements in the array depends on the value specified by
the axis number.
Array of 1 element for one axis (1 to m)
Array of 32 elements for all axes (-1)
[Description]
Reads the workpiece coordinate system shift of the axis specified by "axis".
The workpiece coordinate system shift data is stored in the workpiece coordinate system shift array in
workpiece coordinate system shift data in signed binary format.
The data of all axes can be read at once by setting -1 for the axis number.
The decimal point of the workpiece coordinate system shift data is read by using the cnc_getfigure
function.
[Example]
When the workpiece coordinate system shift data of axis number "1" is read

ret = cnc_rdwkcdshft (1)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

3.4 Writing workpiece coordinate system shift

[Function]
cnc_wrwkcdshft
[Syntax with arguments]
cnc_wrwkcdshft(type, data)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 317/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (109) Arguments of the cnc_wrwkcdshft function


Element Type Description
type Numerical Axis number
value 1 to m: Specifies one axis (m: Current number of controlled axes)
-1: Specifies all axes
data Array of N Workpiece coordinate system shift data (maximum number of controlled axes (32))
elements The number of elements in the array depends on the value specified by the
(N is 1 or 32.) axis number.
Array of 1 element for one axis (1 to m)
Array of 32 elements for all axes (-1)

[Return]
Details of the return values are as shown below.

Table 5.3 (110) Return value of the cnc_wrwkcdshft function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
Not available
This function cannot be used for the M series.
EW_ATTRIB
The specified axis number is invalid.
EW_DATA
Incorrect NC program data.
The workpiece coordinate system shift is out of the specifiable range.
EW_PROT
Write protection.
Set bit 3 (WZO) of parameter No. 3290 to 0.
EW_PARAM
CNC parameter error.
Set bit 6 (NWS) of parameter No. 1201 to 0.
EW_REJECT
CNC processing is rejected.
The automatic operation start signal STL <F0000.5> is 1.
[Description]
Writes the workpiece coordinate system shift of the axis specified by the axis number.
The workpiece coordinate system shift data is set to the workpiece coordinate system shift array in signed
binary format.
The data of all axes can be written at once by setting -1 to the axis number.
The shift units are the same as those of the cnc_rdwkcdshft function described in "Reads workpiece
coordinate system shift." Refer to the explanation of that function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 318/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the workpiece coordinate system shift data.
There is a possibility that the NC may run with the wrong workpiece coordinate
system shift data. In this case, it may cause unexpected machine behavior, and
tools, machines or workpieces may be damaged.
You have to make sure that writing the workpiece coordinate system shift data is
safe and correct when doing so.
[Example]
When the workpiece coordinate system shift data "123" is set to axis number "1"

ret = cnc_wrwkcdshft (1,123)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

3.5 Reading pitch error compensation data information

[Function]
cnc_rdpitchinfo
[Syntax with arguments]
cnc_rdpitchinfo()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (111) Value to be stored in the return value of the cnc_rdpitchinfo function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NOOPT
No options
The pitch error compensation function is required.
2nd element Numerical Number of pitch error compensation data items to be read
value
[Description]
Reads the number of usable pitch error compensation data items.
[Example]
When the number of usable pitch error compensation data items is read

ret_values = cnc_rdpitchinfo() # Reads the number of usable pitch error compensation data items.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 319/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

3.6 Reading custom macro variable information

[Function]
cnc_rdmacroinfo
[Syntax with arguments]
cnc_rdmacroinfo()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (112) Value to be stored in the return value of the cnc_rdmacroinfo function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NOOPT
A required option is not specified.
The custom macro function is required.
2nd element Array Custom macro variable information
For details on the value, refer to the following table "Custom macro variable
information."

Table 5.3 (113) Custom macro variable information


Element Type Description
1st element Numerical Number of local variables
value The number of available local variables is stored.
It is always 33.
2nd element Numerical Range of common variables
value A value indicating the range of available common variables is stored.
0: 100 to 149, 500 to 531
1: 100 to 199, 500 to 999
2: 100 to 199, 500 to 599
[Description]
Reads the number of custom macro local variables and the number of available common variables.
[Example]
When the number of custom macro local variables and the range of available common variables are read

ret_values = cnc_rdmacroinfo()
# Reads the number of custom macro local variables and the number of available common variables.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

3.7 Reading the minimum parameter number, maximum parameter number, and total number of parameters

[Function]
cnc_rdparanum
[Syntax with arguments]
cnc_ rdparanum()

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 320/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (114) Value to be stored in the return value of the cnc_rdparanum function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
2nd Array Information on the maximum parameter number, minimum parameter number, and total
element number of parameters
For details on the value, see the following "Information on the maximum parameter
number, minimum parameter number, and total number of parameters".

Table 5.3 (115) Information on the maximum parameter number, minimum parameter number, and total number of
parameters
Element Type Description
1st element Numerical value Maximum parameter number
2nd element Numerical value Minimum parameter number
3rd element Numerical value Total number of parameters
[Description]
Reads the minimum CNC parameter number, the maximum CNC parameter number, and the total number
of CNC parameters.
The distribution of CNC parameters varies from model to model, and additional parameters may be
provided through function expansion.
[Example]
When the minimum CNC parameter number, the maximum CNC parameter number, and the total number
of CNC parameters are read.

ret_values = cnc_rdparanum() # Reads the minimum CNC parameter number, the maximum CNC
parameter number, and the total number of CNC parameters.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

3.8 Reading the minimum setting parameter number, maximum setting parameter number, and total number of
setting parameters

[Function]
cnc_rdsetnum
[Syntax with arguments]
cnc_rdsetnum()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 321/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (116) Value to be stored in the return value of the cnc_rdsetnum function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
2nd element Array Information on the maximum setting parameter number, minimum setting parameter
number, and total number of setting parameters
For details on the value, see the following "Information on the maximum setting
parameter number, minimum setting parameter number, and total number of
setting parameters".

Table 5.3 (117) Information on maximum setting parameter number, minimum setting parameter number, and total
number of setting parameters
Element Type Description
1st element Numerical value Maximum setting parameter number
2nd element Numerical value Minimum setting parameter number
3rd element Numerical value Total number of setting parameters
[Description]
Reads the minimum CNC setting parameter number, the maximum CNC setting parameter number, and
the total number of CNC setting parameters.
The distribution of CNC setting parameters varies from model to model, and additional parameters may be
provided through function expansion.
[Example]
When the minimum CNC setting parameter number, the maximum CNC setting parameter number, and the
total number of CNC setting parameters are read.

ret_values = cnc_rdsetnum() # Reads the minimum CNC setting parameter number, the maximum
CNC setting parameter number, and the total number of CNC setting
parameters.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

3.9 Reading tool offset information (2)

[Function]
cnc_rdtofsinfo2
[Syntax with arguments]
cnc_rdtofsinfo2()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 322/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (118) Value to be stored in the return value of the cnc_rdtofsinfo2 function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NOOPT
A required option is not specified.
M series Number of tool offsets: (16)/32/64/99/200/400/499/999/2000 sets
Tool offset memory (A)/B/C
Tool radius and tool-nose radius compensation
T series Number of tool offsets: (16)/32/64/99/200/400/499/999/2000 sets
Tool geometry and wear compensation
Tool radius and tool-nose radius compensation
Y-axis offset
Second geometry tool offset
2nd Array Tool offset information
element For details on the value, refer to the following table "Tool offset information."

Table 5.3 (119) Tool offset information


Element Type Description
1st element Numerical Offset memory type
value - Machining center:
0: Memory type A
1: Memory type B
2: Memory type C
- Lathe:
0: No tool geometry or wear compensation performed.
1: Tool geometry or wear compensation performed.
2nd Numerical Number of available offsets
element value 0 to 999 sets
3rd element Numerical Type of usable offsets
value #0: X-axis offset Usable = "1"/not usable = "0"
#1: Y-axis offset Usable = "1"/not usable = "0"
#2: Z-axis offset Usable = "1"/not usable = "0"
#3: Tool-nose radius compensation Usable= "1"/not usable = "0"
#4: Virtual tool tip Usable= "1"/not usable = "0"
#5: Second geometry compensation Usable= "1"/not usable = "0"
#6~#15: (Not used)
[Description]
Reads the tool offset memory type and the number of usable offsets.
The following parameters are related to this function:
Bit 5 of parameter No. 5009 (for the M series only) and parameter No. 5024
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When the tool offset memory type and the number of usable offsets are read

ret_values = cnc_rdtofsinfo2() # Reads the tool offset information.


if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 323/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC window library tool life management data-related function reference]

4.1 Reading tool life management data (number of tools, tool life, life counter) (range specified)

[Function]
cnc_rdtoolrng
[Syntax with arguments]
cnc_rdtoolrng(s_number, e_number)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (120) Arguments of the cnc_rdtoolrng function


Name Type Description
s_number Numerical value Read start tool group number.
e_number Numerical value Read end tool group number.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (121) Value to be stored in the return value of the cnc_rdtoolrng function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (s_number or e_number) is invalid.
EW_NOOPT
No options.
The tool life management function is required.
2nd element Array Information on the number of tools, tool life value, and tool life counter
For details on the value, refer to the following table "Information on the number
of tools, tool life value, and tool life counter."

Table 5.3 (122) Information on the number of tools, tool life value, and tool life counter
Element Type Description
1st element Numerical value Read start tool group number.
2nd element Numerical value Read end tool group number.
3rd element Array of N elements Tool life management data that has been read
(N = Number of tool As many tool life management data items as tool groups that have been
groups that have read are stored in an array. For details on the value, refer to the following
been read) table "Tool life management data that has been read."

Table 5.3 (123) Tool life management data that has been read
Element Type Description
1st element Numerical value Number of tools
2nd element Numerical value Tool life value
3rd element Numerical value Tool life counter
[Description]
Reads the number of tools, tool life value, and tool life counter value of each tool group within the
specified range.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 324/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The units of the tool life value and tool life counter value are [minutes] or [times].
Which unit is used depends on the setting of bit 2 (LTM) of parameter No. 6800 on the CNC.
The number of tools, tool life value, and tool life counter value of each tool group within the specified
range are stored in the number of tools, tool life value, and tool life counter respectively in binary format.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
- Bit 4 (LFB) of parameter No. 6805.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When the number of tools, tool life value, and tool life counter value of tool groups 10 to 12 are read

s_number = 10 # Read start tool group number


e_number = 12 # Read end tool group number
# Reads the number of tools, tool life value, and tool life counter value of the group.
ret_values = cnc_rdtoolrng( s_number, e_number )
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.2 Writing tool life management data (life counter) (range specified)

[Function]
cnc_wrcountr
[Syntax with arguments]
cnc_wrcountr(datano_s, datano_e, data)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (124) Arguments of the cnc_wrcountr function


Name Type Description
datano_s Numerical Write start tool group number
value
datano_e Numerical Write end tool group number
value

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 325/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


data Array Tool life counter of the groups in the specified range
The tool life counter value is stored in the array in binary format.
The number of elements in the array is the number of tool groups in the specified
range.
The unit of the tool life counter value is [minutes] or [times]. Which unit is used
depends on the setting of bit 2 (LTM) of parameter No. 6800 on the CNC.
The maximum life counter value is as follows:
When bit 4 (LFB) of parameter No. 6805 is set to disable the tool life management
B function :
For the count specification : 65535 times
For the time specification : 4300 minutes
When bit 4 (LFB) of parameter No. 6805 is set to enable the tool life management
B function :
For the count specification : 99999999 times
For the time specification : 100000 minutes
60000 minutes (0.1-second life count intervals)
[Return]
Details of the return values are as shown below.

Table 5.3 (125) Value to be stored in the return value of the cnc_wrcountr function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (datano_s or datano_e) is invalid.
EW_DATA
The tool life counter value is beyond the limit.
EW_NOOPT
No options.
The tool life management function is required.
[Description]
Rewrites the tool life counter value of each tool group within the specified range.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 1 (TC1) of parameter No. 6804.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When the tool life counter values of tool group numbers 10 to 12 are rewritten
Each tool life counter type is as shown below.
Tool group number: 10, 12 Tool life counter type: Times
Tool group number: 11 Tool life counter type: Minutes

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 326/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

datano_s = 10 # Write start tool group number


datano_e = 12 # Write end tool group number
data = [65535, 4300, 65535] # Tool life counter values of tool group numbers 10 to 12
# Rewrites the tool life counter values of the specified tool groups.
ret_value = cnc_wrcountr( datano_s, datano_e, data )
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.3 Reading tool life management data (number of tool group being used or to be used)

[Function]
cnc_rdusegrpid
[Syntax with arguments]
cnc_rdusegrpid()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (126) Value to be stored in the return value of the cnc_rdusegrpid function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NOOPT
No options.
The tool life management function is required.
2nd element Array Information on the numbers of the tool groups to be used
For details on the value, refer to the following table "Information on the
numbers of the tool groups to be used."

Table 5.3 (127) Information on the numbers of the tool groups to be used
Element Type Description
1st element Numerical value Number of the next tool group to be used.
2nd element Numerical value Number of the tool group being used.
3rd element Numerical value Number of the selected tool group.
[Description]
Reads the numbers of the tool groups being used and to be used.
Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 327/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When the numbers of the tool groups to be used are read

ret_values = cnc_rdusegrpid( ) # Reads the numbers of the tool groups to be used.


if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.4 Reading tool life management data (maximum number of tool groups that can be registered)

[Function]
cnc_rdmaxgrp
[Syntax with arguments]
cnc_rdmaxgrp()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (128) Value to be stored in the return value of the cnc_rdmaxgrp function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NOOPT
No options.
The tool life management function is required.
2nd element Numerical value Maximum number of tool groups that can be registered
[Description]
Reads the maximum number of tool groups that can be registered.
Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 328/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When the maximum number of tool groups that can be registered is read

ret_values = cnc_rdmaxgrp( ) # Reads the maximum number of tool groups that can be registered.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.5 Reading tool life management data (maximum number of tools that can be registered in a group)

[Function]
cnc_rdmaxtool
[Syntax with arguments]
cnc_rdmaxtool()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (129) Value to be stored in the return value of the cnc_rdmaxtool function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NOOPT
No options.
The tool life management function is required.
2nd element Numerical value Maximum number of tools that can be registered in a group
[Description]
Reads the maximum number of tools that can be registered in a group.
Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When the maximum number of tools that can be registered in a group is read

ret_values = cnc_rdmaxtool( ) # Reads the maximum number of tools that can be registered in a group.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 329/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

4.6 Reading tool life management data (ordinal number of the tool to be used in a group)

[Function]
cnc_rdusetlno
[Syntax with arguments]
cnc_rdusetlno(s_grp, e_grp)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (130) Arguments of the cnc_rdusetlno function


Name Type Description
s_grp Numerical value Read start tool group number.
e_grp Numerical value Read end tool group number.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (131) Value to be stored in the return value of the cnc_rdusetlno function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NUMBER
Data number error
Tool group number (s_grp or e_grp)
EW_NOOPT
No options.
The tool life management function is required.
2nd element Array Ordinal number of tools
For details on the value, refer to the following table "Ordinal number of tools."

Table 5.3 (132) Ordinal number of tools


Element Type Description
1st element Numerical value Read start tool group number.
2nd element Numerical value Read end tool group number.
3rd element Array Ordinal number of the tool to be used in each group
As many tool ordinal numbers as tool groups that have been read
are stored in an array.
The number of elements in the array is the number of tool groups.
[Description]
Reads the ordinal numbers of tools to be used in a group.
Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 330/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

When the ordinal numbers of tools to be used in tool group numbers 10 to 12 are read

s_grp = 10 # Read start tool group number


e_grp = 12 # Read end tool group number
ret_values = cnc_rdusetlno( s_grp, e_grp ) # Reads the ordinal numbers of tools to be used in the groups.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.7 Reading tool life management data (tool data 1) (2)

[Function]
cnc_rd1tlifedat2
[Syntax with arguments]
cnc_rd1tlifedat2(grp_num, tool_num)

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (133) Arguments of the cnc_rd1tlifedat2 function


Name Type Description
grp_num Numerical value Tool group number
tool_num Numerical value Tool number
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (134) Value to be stored in the return value of the cnc_rd1tlifedat2 function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (grp_num) is invalid.
EW_ATTRIB
Data attribute error
The specified tool number (tool_num) is invalid.
EW_NOOPT
No options.
The tool life management function is required.
2nd element Array All tool information
For details on the value, refer to the table "All tool information" below.

Table 5.3 (135) All tool information


Element Type Description
1st element Numerical value Tool group number
2nd element Numerical value Tool number
3rd element Numerical value Tool length compensation number ("0" is always read for the lathe system (T
series).)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 331/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


4th element Numerical value Tool radius compensation number ("0" is always read for the lathe system (T
series).)
5th element Numerical value Tool information
0: (See below.)
1: The tool is registered.
2: The life of the tool ends.
3: The tool is skipped.
When "0" is specified for grp_num or tool_num, the tool group or tool currently
being used is referenced, respectively. When no tool group number has been
specified since power-on, however, "0" is stored.
[Description]
Reads all tool information.
Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When all tool information of tool number "1001" in tool group number "10" is read

grp_num = 10 # Tool group number


tool_num = 1001 # Tool number
ret_values = cnc_rd1tlifedat2( grp_num, tool_num ) # Acquires all tool information.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.8 Reading tool life management data (tool data 2)

[Function]
cnc_rd2tlifedata
[Syntax with arguments]
cnc_rd2tlifedata(grp_no, use_no)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (136) Arguments of the cnc_rd2tlifedata function


Name Type Description
grp_no Numerical value Tool group number
use_no Numerical value Tool ordinal number
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 332/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (137) Value to be stored in the return value of the cnc_rd2tlifedata function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (grp_no) is invalid.
EW_ATTRIB
Data attribute error
The specified tool ordinal number (use_no) is invalid.
EW_NOOPT
No options.
The tool life management function is required.
2nd element Array All tool information
For details on the value, refer to the table "All tool information" below.

Table 5.3 (138) All tool information


Element Type Description
1st element Numerical value Tool group number
2nd element Numerical value Tool ordinal number
3rd element Numerical value Tool number
4th element Numerical value Tool length compensation number ("0" is always read for the lathe system
(T series).)
5th element Numerical value Tool radius compensation number ("0" is always read for the lathe system
(T series).)
6th element Numerical value Tool information
0: (See below.)
1: The tool is registered.
2: The life of the tool ends.
3: The tool is skipped.
When "0" is specified for grp_no, the tool group currently being used is
referenced. When no tool group number has been specified since
power-on, however, "0" is stored.
When "0" is specified for use_no, the tool currently being used is referenced
for the number of a tool group already used or the first tool is referenced for
the number of a tool group that has not yet been used.
[Description]
Reads all tool information.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When all tool information of tool ordinal number "3" in tool group number "10" is read

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 333/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

grp_no = 10 # Tool group number


use_no = 3 # Tool ordinal number
ret_values = cnc_rd2tlifedata( grp_no, use_no ) # Acquires all tool information.
if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

4.9 Writing tool life management data (tool data 1) (2)

[Function]
cnc_wr1tlifedat2
[Syntax with arguments]
cnc_wr1tlifedat2(datano, type, tool_num, h_code, d_code, tool_inf)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (139) Arguments of the cnc_wr1tlifedat2 function


Name Type Description
datano Numerical value Tool group number
type Numerical value (Current) tool number
tool_num Numerical value (New) tool number
h_code Numerical value Tool length compensation number ("0" is always read for the lathe system (T series).)
d_code Numerical value Tool radius compensation number ("0" is always read for the lathe system (T series).)
tool_inf Numerical value Tool information
1: The tool is registered.
2: The life of the tool ends.
3: The tool is skipped.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 334/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (140) Value to be stored in the return value of the cnc_wr1tlifedat2 function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (datano) is invalid.
EW_ATTRIB
Data attribute error
The specified current tool number (type) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: New tool number (tool_num) error.
2: Tool length compensation number (h_code) error.
3: Tool radius compensation number (d_code) error.
4: Tool information (tool_inf) error.
EW_NOOPT
No options
The tool life management function is required.
EW_REJECT
CNC processing is rejected.
For a normal call :
An attempt was made to rewrite data of the tool group currently being used or the next tool
group to be used.
[Description]
Writes all tool information.

When all of the following conditions are satisfied for a normal call, error EW_REJECT(13) is returned:
- During automatic operation (OP = "1").
- The tool group with the target number is being used or is to be used next.
- Bit 1 (TCO) of parameter No. 6802 = "0".
When all of the following conditions are satisfied for a normal call, the tool status cannot be changed to the
cleared state:
- During automatic operation (OP = "1").
- The tool group with the target number is being used or is to be used next.
- The tool with the target number is being used.
- Bit 1 (TCO) of parameter No. 6802 = "1".
- Bit 2 (E17) of parameter No. 6802 = "1".

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 1 (TCO) of parameter No. 6802.
- Bit 2 (E17) of parameter No. 6802.
- Bit 1 (TC1) of parameter No. 6804.
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 335/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- Parameter No. 6813.


For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When all tool information of tool number "1001" in tool group number "10" is written

datano = 10 # Tool group number


type = 1001 # Current tool number
tool_num = 1010 # New tool number
h_code = 11 # Tool length compensation number
d_code = 11 # Tool radius compensation number
tool_inf = 2 # Tool information (2: The life of the tool ends.)
ret_value = cnc_wr1tlifedat2( datano, type, tool_num, h_code, d_code, tool_inf )
# Writes all tool information.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.10 Writing tool life management data (tool data 2)

[Function]
cnc_wr2tlifedata
[Syntax with arguments]
cnc_wr2tlifedata(datano, type, tool_num, h_code, d_code, tool_inf)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (141) Arguments of the cnc_wr2tlifedata function


Name Type Description
datano Numerical value Tool group number
type Numerical value Tool ordinal number
tool_num Numerical value (New) tool number
h_code Numerical value Tool length compensation number ("0" is always read for the lathe system (T
series).)
d_code Numerical value Tool radius compensation number ("0" is always read for the lathe system (T
series).)
tool_inf Numerical value Tool information
1: The tool is registered.
2: The life of the tool ends.
3: The tool is skipped.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 336/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (142) Value to be stored in the return value of the cnc_wr2tlifedata function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (datano) is invalid.
EW_ATTRIB
Data attribute error
The specified tool ordinal number (type) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: New tool number (tool_num) error.
2: Tool length compensation number (h_code) error.
3: Tool radius compensation number (d_code) error.
4: Tool information (tool_inf) error.
EW_NOOPT
No options
The tool life management function is required.
EW_REJECT
CNC processing is rejected.
For a normal call :
An attempt was made to rewrite data of the tool group currently being used or the next tool
group to be used.
[Description]
Writes all tool information.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 1 (TCO) of parameter No. 6802.
- Bit 2 (E17) of parameter No. 6802.
- Bit 1 (TC1) of parameter No. 6804.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When all tool information of tool ordinal number "3" in tool group number "10" is written

datano = 10 # Tool group number


type = 3 # Tool ordinal number
tool_num = 1010 # New tool number
h_code = 11 # Tool length compensation number
d_code = 11 # Tool radius compensation number
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 337/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

tool_inf = 2 # Tool information (2: The life of the tool ends.)


ret_value = cnc_wr2tlifedata( datano, type, tool_num, h_code, d_code, tool_inf )
# Writes all tool information.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.11 Writing tool life management data (tool group information)

[Function]
cnc_wrgrpinfo
[Syntax with arguments]
cnc_wrgrpinfo(s_grp, e_grp, data)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (143) Arguments of the cnc_wrgrpinfo function


Name Type Description
s_grp Numerical value Read start tool group number.
e_grp Numerical value Read end tool group number.
data Array of N elements Array of tool group information
(N = Number of tool For details on the value, refer to the following table "Tool group
groups to be written) information."

Table 5.3 (144) Tool group information


Element Type Description
1st element Numerical value Tool life value
2nd element Numerical value Tool life counter
3rd element Numerical value Tool life counter type
0: Number of times
1: Time
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 338/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (145) Value to be stored in the return value of the cnc_wrgrpinfo function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (s_grp or e_grp) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: Tool life value (count_value) error.
2: Tool life counter value (counter) error.
3: Tool life counter type (count_type) error.
5: During automatic operation.
6: Next group to be used or group being used.
(No items other than the life counter value can be changed.)
Moreover, the block number including illegal data (0 or greater) is set in "Error data
number" in the return value array.
The tool group number is set.
EW_NOOPT
No options
The tool life management function is required.
EW_REJECT
CNC processing is rejected.
For a normal call :
An attempt was made to rewrite data of the tool group currently being used or the next tool
group to be used.
[Description]
Writes tool group information.

The maximum life value and life counter value are as follows:
When bit 4 (LFB) of parameter No. 6805 is set to disable the tool life management B function :
For the count specification : 65535 times
For the time specification : 4300 minutes
When bit 4 (LFB) of parameter No. 6805 is set to enable the tool life management B function :
For the count specification : 99999999 times
For the time specification : 100000 minutes
60000 minutes (0.1-second life count intervals)

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 1 (TC1) of parameter No. 6804.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 339/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When the tool group information of tool group numbers "10" and "11" is written

s_grp = 10 # Read start tool group number


e_grp = 11 # Read end tool group number
data = [[10, 5, 0], [11, 5, 1]] # Tool group information to be written
ret_value = cnc_wrgrpinfo( s_grp, e_grp,data ) # Writes tool group information.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.12 Writing tool life management data (tool group information 2)

[Function]
cnc_wrgrpinfo2
[Syntax with arguments]
cnc_wrgrpinfo2(s_grp, e_grp, opt_grpno)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (146) Arguments of the cnc_wrgrpinfo2 function


Name Type Description
s_grp Numerical value Read start tool group number.
e_grp Numerical value Read end tool group number.
opt_grpno Array Arbitrary group number
As many arbitrary group numbers as tool group numbers to be written are
stored in the array.
The number of elements is the number of tool groups to be written.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 340/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (147) Value to be stored in the return value of the cnc_wrgrpinfo2 function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (s_grp or e_grp) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: Arbitrary group number (opt_grpno) error.
Moreover, the block number including illegal data (0 or greater) is set in "Error data
number" in the return value array.
The tool group number is set.
EW_NOOPT
No options
The tool life management function is required.
EW_PARAM
No parameter
Parameters of the tool life management B function and arbitrary group number function must
be specified.
EW_REJECT
CNC processing is rejected.
For a normal call :
An attempt was made to rewrite data of the tool group currently being used or the next tool
group to be used.
[Description]
Writes tool group information 2.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 2 (LTM) of parameter No. 6800.
- Bit 1 (TC1) of parameter No. 6804.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When arbitrary group numbers of tool group numbers "10" to "11" are written

s_grp = 10 # Read start tool group number


e_grp = 11 # Read end tool group number
opt_grpno = [5, 6] # Arbitrary group numbers to be written
ret_value = cnc_wrgrpinfo2( s_grp, e_grp,opt_grpno ) # Writes arbitrary group numbers.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 341/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

end

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.13 Writing tool life management data (tool group information 3)

[Function]
cnc_wrgrpinfo3
[Syntax with arguments]
cnc_wrgrpinfo3(s_grp, e_grp, life_rest)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (148) Arguments of the cnc_wrgrpinfo3 function


Name Type Description
s_grp Numerical value Read start tool group number.
e_grp Numerical value Read end tool group number.
life_rest Array Remaining life setting
The remaining life settings for as many tool groups as written are stored in the
array.
The number of elements is the number of tool groups to be written.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 342/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (149) Value to be stored in the return value of the cnc_wrgrpinfo3 function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (s_grp or e_grp) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: Remaining life setting (life_rest) error.
Moreover, the block number including illegal data (0 or greater) is set in "Error data
number" in the return value array.
The tool group number is set.
EW_NOOPT
No options
The tool life management function is required.
EW_PARAM
No parameter
Parameters of the tool life management B function must be specified.
EW_REJECT
CNC processing is rejected.
For a normal call :
An attempt was made to rewrite data of the tool group currently being used or the next tool
group to be used.
[Description]
Writes tool group information 3.

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Bit 2 (LTM) of parameter No. 6800.
- Bit 1 (TC1) of parameter No. 6804.
- Bit 4 (LFB) of parameter No. 6805.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When arbitrary group numbers of tool group numbers "10" to "11" are written

s_grp = 10 # Read start tool group number


e_grp = 11 # Read end tool group number
life_rest = [5, 6] # Remaining life settings
ret_value = cnc_wrgrpinfo3( s_grp, e_grp, life_rest ) # Writes remaining life settings.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 343/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool life management data is safe and
correct when doing so.

4.14 Deleting tool life management data (tool group information)

[Function]
cnc_deltlifegrp
[Syntax with arguments]
cnc_deltlifegrp(number)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (150) Arguments of the cnc_deltlifegrp function


Name Type Description
number Numerical value Tool group number
[Return]
Details of the return values are as shown below.

Table 5.3 (151) Value to be stored in the return value of the cnc_deltlifegrp function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
Data number error
The tool group number (number) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
5: During automatic operation.
6: Next group to be used or group being used.
EW_NOOPT
No options
The tool life management function is required.
EW_REJECT
CNC processing is rejected.
No data can be written because processing is being executed for the group, the group is
selected, or data of the group is being buffered.
[Description]
Deletes a tool group.
Information belonging to the specified group is all cleared.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 344/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Up to 256 sets (for both the M and T series) are available for tool life management throughout the entire
system. When additional tool set options for tool life management are added, the number of sets is
extended to 1024 (for both the M and T series) throughout the entire system.

The following parameters are related to this function:


- Bit 0 (GS1) of parameter No. 6800.
- Bit 1 (GS2) of parameter No. 6800.
- Parameter No. 6813.
For details on the parameters, refer to the "PARAMATER MANUAL" (B-63950EN, B-64490EN,
B-64610EN) of the CNC.
[Example]
When tool group information of tool group number "15" is deleted

number = 15 # Tool group number


ret_value = cnc_wrgrpinfo3( s_grp, e_grp, life_rest ) # Deletes the tool group information.
if ret_value != EW_OK then
MsgBoxShow("ERROR", 0)
end

CAUTION
Use sufficient care when you delete the tool life management data. There is a
possibility that the NC may run with the wrong tool life management data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that deleting the tool life management data is safe and
correct when doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 345/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC window library tool management data-related function reference]

5.1 Registering tool management data as a new entry (when customization data items 21 to 40 are used)

[Function]
cnc_regtool_f2
[Syntax with arguments]
cnc_regtool_f2(s_number, data_num, tool)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (152) Arguments of the cnc_regtool_f2 function


Name Type Description
s_number Numerical value Start data number for registering data with the tool management data table
data_num Numerical value Number of registered data items
Set a value larger than 1 as the number of registered data items.
tool Array of N elements Array of tool management data to be registered
(N = Number of For details on the value, refer to the following table "Tool management
registered data data to be registered/set."
items)

Table 5.3 (153) Tool management data to be registered/set


Element Type Description
1st element Numerical value Tool type number (T)
(Input range: 0 to 99999999)
2nd element Numerical value Tool life counter
(Input range: 0 to 99999999, increment system: time)
(Input range: 0 to 3599999, increment system: second)
3rd element Numerical value Maximum tool life value
(Input range: 0 to 99999999, increment system: time)
(Input range: 0 to 3599999, increment system: second)
4th element Numerical value Remaining tool life value
(Input range: 0 to 99999999, increment system: time)
(Input range: 0 to 3599999, increment system: second)
5th element Numerical value State of tool life
0: Life is not managed.
1: Unused tool
2: Life is limited.
3: Life has expired.
4: Tool damaged (skip)
6th element Numerical value Customization (bits)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 346/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


7th element Numerical value Tool information
bit 0 : RGS
0: Tool management data is invalid.
1: Tool management data is valid.
bit 1 : TIM
0: Life is counted by counting the number of times.
1: Life is counted by counting the period of time.
bit 2 : BDT
0: Normal tool
1: Tool with a large diameter
bit 3 : LOC
0: Enables data access.
1: Disables data access.
Bits 4 to 15: Reserved
8th element Numerical value Tool length compensation No. (H)
(Input range: 0 to 999)
9th element Numerical value Tool radius compensation No. (D)
(Input range: 0 to 999)
10th element Numerical value Spindle speed (S)
(Input range: 0 to 99999, increment system : /min)
11th element Numerical value Cutting feedrate (F)
12th element Numerical value Tool geometry compensation No. (G)
(Valid only for lathe systems)
13th element Numerical value Tool wear compensation No. (W)
(Valid only for lathe systems)
14th element Numerical value Tool geometry number
15th element Numerical value Edge group number
16th element Numerical value Edge number
17th element Numerical value Storage destination magazine number
18th element Numerical value Storage destination pot number
19th element Numerical value Customizing data 1
(Input range: -99999999 to 99999999)
20th element Numerical value Customizing data 2
(Input range: -99999999 to 99999999)
21st element Numerical value Customizing data 3
(Input range: -99999999 to 99999999)
22nd element Numerical value Customizing data 4
(Input range: -99999999 to 99999999)
23rd element Numerical value Customizing data 5
(Input range: -99999999 to 99999999)
24th element Numerical value Customizing data 6
(Input range: -99999999 to 99999999)
25th element Numerical value Customizing data 7
(Input range: -99999999 to 99999999)
26th element Numerical value Customizing data 8
(Input range: -99999999 to 99999999)
27th element Numerical value Customizing data 9
(Input range: -99999999 to 99999999)
28th element Numerical value Customizing data 10
(Input range: -99999999 to 99999999)
29th element Numerical value Customizing data 11
(Input range: -99999999 to 99999999)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 347/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


30th element Numerical value Customizing data 12
(Input range: -99999999 to 99999999)
31st element Numerical value Customizing data 13
(Input range: -99999999 to 99999999)
32nd element Numerical value Customizing data 14
(Input range: -99999999 to 99999999)
33rd element Numerical value Customizing data 15
(Input range: -99999999 to 99999999)
34th element Numerical value Customizing data 16
(Input range: -99999999 to 99999999)
35th element Numerical value Customizing data 17
(Input range: -99999999 to 99999999)
36th element Numerical value Customizing data 18
(Input range: -99999999 to 99999999)
37th element Numerical value Customizing data 19
(Input range: -99999999 to 99999999)
38th element Numerical value Customizing data 20
(Input range: -99999999 to 99999999)
39th element Numerical value Customizing data 21
(Input range: -99999999 to 99999999)
40th element Numerical value Customizing data 22
(Input range: -99999999 to 99999999)
41st element Numerical value Customizing data 23
(Input range: -99999999 to 99999999)
42nd element Numerical value Customizing data 24
(Input range: -99999999 to 99999999)
43rd element Numerical value Customizing data 25
(Input range: -99999999 to 99999999)
44th element Numerical value Customizing data 26
(Input range: -99999999 to 99999999)
45th element Numerical value Customizing data 27
(Input range: -99999999 to 99999999)
46th element Numerical value Customizing data 28
(Input range: -99999999 to 99999999)
47th element Numerical value Customizing data 29
(Input range: -99999999 to 99999999)
48th element Numerical value Customizing data 30
(Input range: -99999999 to 99999999)
49th element Numerical value Customizing data 31
(Input range: -99999999 to 99999999)
50th element Numerical value Customizing data 32
(Input range: -99999999 to 99999999)
51st element Numerical value Customizing data 33
(Input range: -99999999 to 99999999)
52nd element Numerical value Customizing data 34
(Input range: -99999999 to 99999999)
53rd element Numerical value Customizing data 35
(Input range: -99999999 to 99999999)
54th element Numerical value Customizing data 36
(Input range: -99999999 to 99999999)
55th element Numerical value Customizing data 37
(Input range: -99999999 to 99999999)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 348/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


56th element Numerical value Customizing data 38
(Input range: -99999999 to 99999999)
57th element Numerical value Customizing data 39
(Input range: -99999999 to 99999999)
58th element Numerical value Customizing data 40
(Input range: -99999999 to 99999999)

NOTE
1 For customization 5 through 20, registration and setting operations are permitted
only when equipped with the customization data expansion (5 to 20) option of the
tool management function.
2 For customization 5 through 40, registration and setting operations are permitted
only when equipped with the customization data expansion (5 to 40) option of the
tool management function.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (154) Value to be stored in the return value of the cnc_regtool_f2 function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_NUMBER
Start data number error
The start data number (s_number) is invalid. Or, an attempt was made to
exceed the valid number of data items in the tool management data table.
EW_DATA
Data error
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: Tool type number error.
2: Tool life counter error.
3: Error in the maximum tool life value.
4: Error in the tool life value reported in advance.
5: Error in the tool life status.
6: Customization 0 error.
7: Tool information error.
8: Tool length compensation number (H) error.
9: Tool radius compensation number (D) error.
10: Spindle speed (S) error.
11: Cutting feedrate (F) error.
12: Tool geometry compensation number (G) error.
13: Tool wear compensation number (W) error.
14: Tool geometry number error.
15: Edge group number error.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 349/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


16: Edge number error.
17: Error in the storage destination magazine number.
18: Error in the storage destination pot number.
27: The magazine and pot specified as the storage destination have
already been registered.
29: Multi edge data is illegal.
(There is an inconsistency in the data for a multi-edged tool in the tool
management function.)
31-70: Customization 1 to 40 error.
EW_NOOPT
Required option not specified.
The tool life management function (64, 240, or 1000 pairs) is required.
EW_PROT
Write protection
The tool management data table is write-protected.
EW_REJECT
CNC processing is rejected.
An attempt was made to register an already existing tool management data
table entry.
2nd element Numerical Number of data items actually registered
value

[Description]
In the tool management data table, it registers tool management data in the range specified with the starting
data number and the number of data items.

Tool management data items are sequentially registered one by one. If an error occurs, the subsequent
registration operations are not performed.

CAUTION
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.
[Example]
When tool data with respect to the following two tool management data items are registered starting from
start data number 10:
1 Tool type number = 20, Tool life counter = 21, Maximum tool life value = 22, Remaining tool life
value = 23, Tool life state = 3, Customization (bits) = 24, Tool information = 25, Tool length
compensation number = 26, Tool radius compensation number = 27, Spindle speed = 28, Cutting
feedrate = 29, Tool geometry compensation number = 32, Tool wear compensation number = 33,
Tool geometry number = 0, Edge group number = 0, Edge number = 0, Storage destination magazine
number = 1, Storage destination pot number = 1, Customization 1 to 40 = 0
2 Tool type number = 10, Tool life counter = 11, Maximum tool life value = 12, Remaining tool life
value = 13, Tool life state = 3, Customization (bits) = 14, Tool information = 15, Tool length
compensation number = 16, Tool radius compensation number = 17, Spindle speed = 18, Cutting
feedrate = 19, Tool geometry compensation number = 22, Tool wear compensation number = 23,

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 350/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Tool geometry number = 0, Edge group number = 0, Edge number = 0, Storage destination magazine
number = 1, Storage destination pot number = 1, Customization 1 to 40 = 0

s_number = 10 # Start data number


data_num = 2 # Number of registered data items
tool1[58]=[20,21,22,23,3,24,25,26,27,28,29,32,33,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # 1st tool management data to be registered
tool2[58]=[10,11,12,13,2,14,15,16,17,18,19,22,23,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # 2nd tool management data to be registered
tool[2] = [tool1,tool2]

ret = cnc_regtool_f2(s_number, data_num, tool )


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

5.2 Writing tool management data (when customization data items 21 to 40 are used)

[Function]
cnc_wrtool_f2
[Syntax with arguments]
cnc_wrtool_f2(number, tool)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (155) Arguments of the cnc_wrtool_f2 function


Name Type Description
number Numerical value Data number in the tool management data table
tool Array Tool management data to be set
For details on the value, refer to "Tool management data to be registered/set."
[Return]
Details of the return values are as shown below.

Table 5.3 (156) Value to be stored in the return value of the cnc_wrtool_f2 function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_NUMBER
Data number error
The start data number (number) is invalid.
EW_DATA
Data error
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
1: Tool type number error.
2: Tool life counter error.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 351/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
3: Error in the maximum tool life value.
4: Error in the tool life value reported in advance.
5: Error in the tool life status.
6: Customization 0 error.
7: Tool information error.
8: Tool length compensation number (H) error.
9: Tool radius compensation number (D) error.
10: Spindle speed (S) error.
11: Cutting feedrate (F) error.
12: Tool geometry compensation number (G) error.
13: Tool wear compensation number (W) error.
14: Tool geometry number error.
15: Edge group number error.
16: Edge number error.
17: Error in the storage destination magazine number.
18: Error in the storage destination pot number.
27: The magazine and pot specified as the storage destination have already been registered.
29: Multi edge data is illegal.
(There is an inconsistency in the data for a multi-edged tool in the tool management
function.)
31-70: Customization 1 to 40 error.
EW_NOOPT
Required option not specified.
The tool life management function (64, 240, or 1000 pairs) is required.
EW_PROT
Write protection
The tool management data table is write-protected.
[Description]
Writes a specific tool management data item in the tool management data table.
To set individual items in specific tool management data, use the wrtool function.

CAUTION
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.

5.3 Registering magazine management data as a new entry

[Function]
cnc_regmagazine
[Syntax with arguments]
cnc_regmagazine(data_num, mag)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 352/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (157) Arguments of the cnc_regmagazine function


Name Type Description
data_num Numerical value Number of registered data items
Set a value larger than 1 as the number of registered data items.
mag Array of N elements Array of tool management data
(N = Number of For details on the value, refer to "Tool management data to be
registered data items) registered."

Table 5.3 (158) Tool management data to be registered


Element Type Description
1st element Numerical Magazine number
value A spindle position and a standby position can also be specified.
In such a case, a pot number need not be specified.
(Input range: 1 to 4, 11 to 14, 21 to 24)
2nd element Numerical Pot number
value (Input range: Depends on the CNC options and CNC parameter settings.)
3rd element Numerical Tool management data number
value (Input range: 0 to 65535)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.
Table 5.3 (159) Value to be stored in the return value of the cnc_regmagazine function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_DATA
Data error
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
21: Magazine number error.
22: Pot number error.
23: Tool management data number error.
EW_NOOPT
Required option not specified.
The tool life management function (64, 240, or 1000 pairs) is required.
EW_PROT
Write protection
The tool management data table is write-protected.
EW_REJECT
CNC processing is rejected.
An attempt was made to register an already existing magazine management
table entry.
2nd element Numerical Number of data items actually registered
value
[Description]
Registers a tool management data number in the magazine management table.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 353/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

The magazine management table is searched for the magazine number and pot number, and a tool
management data number is written for each matching entry.

CAUTION
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.
[Example]
When the following two tool management data items are registered
1st item: Magazine number = 1, Pot number = 1, Tool management data number = 10
2nd item: Magazine number = 2, Pot number = 2, Tool management data number = 20

data_num = 2 # Number of registered data items


mag1[3] = [1,1,10] # 1st tool management data to be registered
mag2[3] = [2,2,20] # 2nd tool management data to be registered
mag[2] = [mag1, mag2]

ret = cnc_regmagazine(data_num, mag)


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

5.4 Deleting magazine management data

[Function]
cnc_delmagazine
[Syntax with arguments]
cnc_delmagazine(data_num, mag)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (160) Arguments of the cnc_ delmagazine function


Name Type Description
data_num Numerical value Number of data items to be deleted
Set a value larger than 1 as the number of registered data items.
mag Array of N elements Array of magazine management data to be deleted
(N = Number of data For details on the value, refer to "Magazine management data to be
items to be deleted) deleted."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 354/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (161) Magazine management data to be deleted


Element Type Description
1st element Numerical value Magazine number
A spindle position and a standby position can also be specified.
In such a case, a pot number need not be specified.
(Input range: 1 to 4, 11 to 14, 21 to 24)
2nd element Numerical value Pot number
(Input range: Depends on the CNC options and CNC parameter
settings.)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (162) Value to be stored in the return value of the cnc_ delmagazine function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_DATA
Data error
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA.
21: Magazine number error.
22: Pot number error.
EW_NOOPT
Required option not specified.
The tool life management function (64, 240, or 1000 pairs) is required.
EW_PROT
Write protection
The tool management data table is write-protected.
2nd element Numerical Number of data items actually deleted
value
[Description]
Deletes a tool management data number in the magazine management table.

The magazine management table is searched for the magazine number and pot number, and the tool
management data numbers are deleted for each matching entry.

CAUTION
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 355/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When the following two tool management data items are deleted
1st item: Magazine number = 1, Pot number = 1
2nd item: Magazine number = 2, Pot number = 2

data_num = 2 # Number of data items to be deleted


mag1[2] = [1,1] # 1st magazine management data item to be deleted
mag2[2] = [2,2] # 2nd magazine management data item to be deleted
mag[2] = [mag1, mag2]
ret = cnc_delmagazine(data_num, mag)
if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

5.5 Reading magazine management data

[Function]
cnc_rdmagazine
[Syntax with arguments]
cnc_rdmagazine(data_num, mag)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (163) Arguments of the cnc_rdmagazine function


Name Type Description
data_num Numerical value Number of data items to be read
Set a value larger than 1 as the number of registered data items.
mag Array of N elements Array of tool management data to be read
(N = Number of data For details on the value, refer to "Magazine management data to be
items to be read) read."

Table 5.3 (164) Magazine management data to be read


Element Type Description
1st element Numerical Magazine number
value A spindle position and a standby position can also be specified.
In such a case, a pot number need not be specified.
(Input range: 1 to 4, 11 to 14, 21 to 24)
2nd element Numerical Pot number
value (Input range: Depends on the CNC options and CNC parameter settings.)
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (165) Value to be stored in the return value of the cnc_rdmagazine function
Element Type Description
1st Numerical value Return value of the function
element EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 356/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


EW_DATA
Data error
To obtain more detailed information about this return value, execute
the cnc_getdtailerr function.

The following is set to "Detail status" of the return value array:


0: Error other than EW_DATA.
21: Magazine number error.
22: Pot number error.
EW_NOOPT
Required option not specified.
The tool life management function (64, 240, or 1000 pairs) is
required.
2nd Numerical value Number of data items actually read
element
3rd Array of N elements Array of tool management data
element (N = Number of data For details on the value, refer to the following table "Tool management
items to be read) data that has been read."

Table 5.3 (166) Tool management data that has been read
Element Type Description
1st element Numerical value Magazine number
The value specified for the argument is returned.
2nd element Numerical value Pot number
The value specified for the argument is returned.
3rd element Numerical value Tool management data number
[Description]
Reads a tool management data number in the magazine management table.

The magazine management table is searched for magazine number and pot number, and a tool management
data number is read for each matching entry.
[Example]
When the following two tool management data items are deleted
1st item: Magazine number = 1, Pot number = 1
2nd item: Magazine number = 2, Pot number = 2

data_num = 2 # Number of read data items


mag1[2] = [1,1] # 1st read magazine management data item
mag2[2] = [2,2] # 2nd read magazine management data item
mag[2] = [mag1, mag2]

ret = cnc_ rdmagazine(data_num, mag)


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

5.6 Writing individual items in magazine management data

[Function]
cnc_wrmagazine

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 357/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax with arguments]


cnc_wrmagazine(magazine, pot, tool_index)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (167) Arguments of the cnc_wrmagazine function


Name Type Description
magazine Numerical Specify a magazine number.
value (Input range: 1 to 4, 11 to 14, 21 to 24)
pot Numerical Specify a pot number.
value (Input range: Varies depending on the CNC options and CNC parameter settings.)
tool_index Numerical Specify a tool management data number.
value (Input range: 1 to 65535)
[Return]
Details of the return values are as shown below.

Table 5.3 (168) Return value of the cnc_wrmagazine function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_DATA
The argument is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA
21: Magazine number error
22: Pot number error
23: Tool management data number error
EW_NOOPT
A required option is not specified.
The tool management function (64, 240, or 1000 pairs) is required.
EW_PROT
Write protection is applied.
The magazine management table is write-protected.
[Description]
Writes a tool management data number in a magazine management table entry specified by a magazine
number and a pot number.
CAUTION
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 358/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When data having magazine number = 1, pot number = 1, and tool management data number = 10 is
written

ret = cnc_wrmagazine(1,1,10)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

5.8 Writing tool geometry data

[Function]
cnc_wrtoolgeom_tlm
[Syntax with arguments]
cnc_wrtoolgeom_tlm(snum, datanum, tool)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (169) Arguments of the cnc_wrtoolgeom_tlm function


Name Type Description
snum Numerical Specify a tool geometry data registration number.
value
datanum Numerical Specify the number of data items to register.
value The tool geometry data of the number of "datanum" items are registered starting
from the tool geometry data number specified by "snum".
tool Array Array in which the tool geometry data items to be registered are stored
For the elements of each item, refer to the table "Array of tool geometry data to be
registered."

Table 5.3 (170) Array of tool geometry data to be registered


Element Type Description
1st element Numerical value Set a value from 0 to 4 as the number of pots occupied to the left.
2nd element Numerical value Set a value from 0 to 4 as the number of pots occupied to the right.
3rd element Numerical value Set a value from 0 to 4 as the number of pots occupied above.
4th element Numerical value Set a value from 0 to 4 as the number of pots occupied below.
5th element Numerical value Set 0 for geometry A or 1 for geometry B.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (171) Value to be stored in the return value of the cnc_wrtoolgeom_tlm function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
Another user is accessing the same data window.
Execute this function again.
EW_LENGTH
The specification of the number of data items to register (datanum) is invalid.
EW_NUMBER

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 359/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


The registration number of tool geometry data (snum) is invalid.
EW_DATA
One of the values specified for tool geometry data is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set to "Detail status" of the return value array:
0: Error other than EW_DATA
1: Error in the number of pots occupied to the left
2: Error in the number of pots occupied to the right
3: Error in the number of pots occupied above
4: Error in the number of pots occupied below
5: Geometry error
EW_NOOPT
No options
The optional tool management function for 64, 240, or 1000 pairs and a large
radius tool supporting option are required.
EW_PROT
If the tool geometry data to be changed is registered with a tool stored in a pot,
the data is assumed to be protected, and this value is returned.
2nd element Numerical Number of data items that have been registered successfully
value
[Description]
Writes as many tool geometry data items as the number specified for datanum, starting from the tool
geometry data number specified for snum.

To enable this function, the optional tool management function for 64, 240, or 1000 pairs and a large radius
tool supporting option are required.
[Example]
When the following information is written in the tool geometry data:
- Number of the tool geometry data to be written: 1, registration number: 2
- 1st registration Number of pots occupied to the left: 1, Number of pots occupied to the right: 2,
Number of pots occupied above: 3, Number of pots occupied below: 4, Geometry B
- 2nd registration Number of pots occupied to the left: 4, Number of pots occupied to the right:
3, Number of pots occupied above: 2, Number of pots occupied below: 1, Geometry A

exv_list = [[0, 2]]


ret = cnc_wrtoolgeom_tlm(1,2,[[1,2,3,4,1], [4,3,2,1,0]])
if ret.to_s == exv_list[0].to_s then
msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 360/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
Use sufficient care when you write the tool geometry data. There is a possibility
that the NC may run with the wrong tool geometry data. In this case, it may cause
unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool geometry data is safe and correct
when doing so.

5.8 Reading tool geometry data

[Function]
cnc_rdtoolgeom_tlm
[Syntax with arguments]
cnc_rdtoolgeom_tlm(snum, datanum)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (172) Arguments of the cnc_rdtoolgeom_tlm function


Name Type Description
snum Numerical Specify the start number for reading tool geometry data.
value
datanum Numerical Specify the number of data items to be read from the tool geometry data.
value This function gets the number of tool geometry data items defined by "datanum"
starting from the tool geometry data numbers that start with "snum."
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (173) Value to be stored in the return value of the cnc_rdtoolgeom_tlm function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_BUSY
The same data window is being accessed by another user.
Execute the function again.
EW_LENGTH
The specification of the number of tool geometry data items to be acquired
("datanum") is invalid.
EW_NUMBER
Data number error.
The setting of the data number for starting acquisition ("snum") is invalid.
EW_NOOPT
No options
The optional tool management function for 64, 240, or 1000 pairs and a
large radius tool supporting option are required.
2nd element Numerical Number of data items successfully acquired.
value
3rd element Array Array for storing the read tool geometry data.
For the elements of each item, see “Array of read tool geometry data.”

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 361/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (174) Array of read tool geometry data


Element Type Description
1st element Array The number of pots occupied to the left
2nd element Array The number of pots occupied to the right
3rd element Array The number of pots occupied above
4th element Array The number of pots occupied below
5th element Array Set “0 ”for geometry A and “1 ”for geometry B.
[Description]
This function reads the number of tool geometry data items defined by datanum, starting from the tool
geometry data number specified by snum.

To enable this function, the optional tool management function for 64, 240, or 1000 pairs and a large radius
tool supporting option are required.
[Example]
To read the following information from the tool geometry data
- Read tool geometry data number: 1, Number of read data items: 2

exv_list = [[0,2,[[1,2,3,4,1],[4,3,2,1,0]]]]
ret = cnc_rdtoolgeom_tlm(1,2)
if ret.to_s == exv_list[0].to_s then
msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

5.9 Reading the tool geometry data

[Function]
cnc_rdtlgeomsize_ext
[Syntax with arguments]
cnc_rdtlgeomsize_ext(coord, s_number, data_num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (175) Arguments of the cnc_rdtlgeomsize_ext function


Name Type Description
coord Numerical Specify "0".
value
s_number Numerical Specify the data number to start acquisition.
value
data_num Numerical Specify the number of items to be acquired.
value The tool geometry size data that belongs to one data number is counted as one
acquired number.
The number of tool geometry data items defined by "data_num" are acquired
starting from the data number specified by "s_number."
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 362/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (176) Value to be stored in the return value of the cnc_rdtlgeomsize_ext function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_LENGTH
Data block length error
The specification of the number of tool geometry size data items to be
acquired ("data_num") is invalid.
EW_NUMBER
Data number error
The specified data number for starting acquisition ("s_number") is invalid.
EW_ATTRIB
Data attribute error
The specification of the program coordinate system ("coord") is invalid.
EW_NOOPT
No options
The option for the 32-pair tool geometry size data, the 100-pair tool
geometry size data, or the 300-pair tool geometry size data is required.
2nd element Numerical Number of data items acquired
value
3rd element Array An array for storing the acquired tool geometry data.
For the elements of each item, see “Array of read tool geometry size data.”

Table 5.3 (177) Array of read tool geometry size data


Element Type Description
1st element Numerical Tool data 1
value In the case of NULL, "0x7FFFFFFF" is returned.
2nd element Numerical Tool data 2
value In the case of NULL, "0x7FFFFFFF" is returned.
3rd element Numerical Tool data 3
value In the case of NULL, "0x7FFFFFFF" is returned.
4th element Numerical Tool data 4
value In the case of NULL, "0x7FFFFFFF" is returned.
5th element Numerical Tool type
value 0: Tool is not defined
10: General tool
11: Thread tool
12: Grooving tool
13: Button turning tool
14: Straight tool
15: Versatile tool
20: Drill tool
21: Chamfering tool
22: Flat end mill tool
23: Ball end mill tool
24: Tap tool
25: Reamer tool
26: Boring tool
27: Face mill tool
6th element Numerical Attachment value
value The value differs depending on the type of the tool.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 363/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


In the case of "0", the value of the attachment is not set.
0 to 16: General tool
0 to 16: Thread tool
0 to 16: Grooving tool
0 to 16: Button turning tool
0 to 12: Straight tool
0 to 16: Versatile tool
0 to 4: Drill tool
0 to 4: Chamfering tool
0 to 4: Flat end mill tool
0 to 4: Ball end mill tool
0 to 4: Tap tool
0 to 4: Reamer tool
0 to 4: Boring tool
0 to 4: Face mill tool
7th element Numerical Holder number
value The setting range is as follows.
0 to 120: 1 path system
0 to 60: 2 path system
0 to 40: 3 path system
0 to 30: 4 or more path system
8th element String Tool name
[Description]
This function acquires the tool geometry size data specified by the data number for starting acquisition
("s_number") and the number of acquired data items ("data_num").
Acquisition is performed one data number ("s_number") at a time. If an error occurs in the middle of
acquisition, the subsequent acquisition process is discontinued.
[Example]
To read the following information from the tool geometry size data
- Data number at which to start acquisition: 1, Number of data items acquired: 1

exv_list = [0,1,[[0,0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0]]]]
ret = cnc_rdtlgeomsize_ext(0,1,1)
if ret.to_s == exv_list[0].to_s then
msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

5.10 Writing/deleting the tool geometry size data

[Function]
cnc_wrtlgeomsize_ext
[Syntax with arguments]
cnc_wrtlgeomsize_ext(coord, type, s_number, data_num, tlgsext)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 364/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (178) Arguments of the cnc_wrtlgeomsize_ext function


Name Type Description
coord Numerical Specify "0".
value
type Numerical Specify the tool geometry size data to be set or deleted.
value The relationship between each data item and setting value is as follows.
0: All data
1: Data 1
2: Data 2
3: Tool type
4: Attachment
5: Tool name
6: Data 3
7: Data 4
8: Holder number
s_number Numerical Specify the data number to start setting or deleting items.
value
data_num Numerical Specify the number of items to be set or deleted.
value The tool geometry size data that belongs to one data number is counted as one
set or deleted item.
The number of tool geometry size data items defined by "data_num" are set/delete
starting from the data number specified by "s_number."
tlgsext Array An array for storing the tool geometry size data to be set/deleted.
For the elements of each item, see "Array of tool geometry size data to be
set/deleted."

Table 5.3 (179) Array of tool geometry size data to be set/deleted


Element Type Description
1st element Numerical value Tool data 1
In the case of NULL, "0x7FFFFFFF" is specified.
2nd element Numerical value Tool data 2
In the case of NULL, "0x7FFFFFFF" is specified.
3rd element Numerical value Tool data 3
In the case of NULL, "0x7FFFFFFF" is specified.
4th element Numerical value Tool data 4
In the case of NULL, "0x7FFFFFFF" is specified.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 365/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


5th element Numerical value Tool type
Specify "0" to delete the tool geometry size data.
The tool type and the setting values are as follows.
0: Delete the tool geometry size data
10: General tool
11: Thread tool
12: Grooving tool
13: Button turning tool
14: Straight tool
15: Versatile tool
20: Drill tool
21: Chamfering tool
22: Flat end mill tool
23: Ball end mill tool
24: Tap tool
25: Reamer tool
26: Boring tool
27: Face mill tool
6th element Numerical value Attachment value
The setting range depends on the tool type.
If the value of the attachment direction is not set, specify "0".
0 to 16: General tool
0 to 16: Thread tool
0 to 16: Grooving tool
0 to 16: Button turning tool
0 to 12: Straight tool
0 to 16: Versatile tool
0 to 4: Drill tool
0 to 4: Chamfering tool
0 to 4: Flat end mill tool
0 to 4: Ball end mill tool
0 to 4: Tap tool
0 to 4: Reamer tool
0 to 4: Boring tool
0 to 4: Face mill tool
7th element Numerical value Holder number
The setting range is as follows.
0 to 120: 1 path system
0 to 60: 2 path system
0 to 40: 3 path system
0 to 30: 4 or more path system
8th element String Tool name
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (180) Value to be stored in the return value of the cnc_wrtlgeomsize_ext function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_LENGTH

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 366/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Data block length error
The specification of the number of tool geometry size data items to be
set/deleted ("data_num") is invalid.
EW_NUMBER
Data number error
The data number specified for starting setting/deleting ("s_number") is
invalid.
EW_ATTRIB
Data attribute error
Specification of program coordinate system ("coord") or setting value of the
tool geometry size data
The specification of ("type") is invalid.
EW_DATA
Error of the member in the structure
A member in the structure is incorrect.
Execute the cnc_getdtailerr function to get more detailed information on this
return value.
The following is set in “Detail status ”in the return value array.
0: Error other than EW_DATA
1: Data 1 error
2: Data 2 error
3: Tool type error
4: Attachment error
5: Tool name error
6: Data 3 error
7: Data 4 error
8: Holder number error
EW_NOOPT
No options
The 32-pair tool geometry size data, the 100-pair tool geometry size data, or
the 300-pair tool geometry size data is required.
EW_PROT
Write protection is applied.
The tool geometry size table is write-protected.
2nd element Numerical The number of data items actually set or deleted is returned.
value
[Description]
This function sets/deletes the tool geometry size data specified by the data number for starting
setting/deletion ("s_number") and the number of data items to be set/deleted ("data_num").
The data numbers ("s_number") are set/deleted in order one at a time. If an error occurs, the subsequent
setting or deletion process is discontinued.
[Example]
To set the following information to the tool geometry size data
- Setting start data number: 1, Number of setting data items: 2
- First set data item: tool data 1: 2, tool data 2: 3, tool data 3: 4, tool data 4: 5, tool type: general tool,
attachment value: 5, holder number: 20, tool name: general
- Second set data item: tool data 1: 6, tool data 2: 7, tool data 3: 8, tool data 4: 9, tool type: thread tool,
attachment value: 0, holder number: 0, tool name: thread

exv_list = [[0,2]]
cnc_wrtlgeomsize_ext(0,0,1,2,[[2,3,4,5,10,5,20,"General"],[6,7,8,9,11,0,0,"Thread"]])
if ret.to_s == exv_list[0].to_s then

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 367/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

To delete the following information of the tool geometry size data


- Setting start data number: 1, number of setting data items: 3

exv_list = [[0,3]]
ret = cnc_wrtlgeomsize_ext(0,0,1,3,[[0,0,0,0,0,0,0,""],[0,0,0,0,0,0,0,""],[0,0,0,0,0,0,0,""]])
if ret.to_s == exv_list[0].to_s then
msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

NOTE
Use sufficient care when you write the tool geometry size data. There is a
possibility that the NC may run with the wrong tool geometry size data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the tool geometry size data is safe and correct
when doing so.

5.11 Reading the magazine property data

[Function]
cnc_rdmag_property
[Syntax with arguments]
cnc_rdmag_property(data_num, mag)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (181) Arguments of the cnc_rdmag_property function


Name Type Description
data_num Numerical value Number of acquired items
"1" to "8"
Specify "-1" when getting all magazine data.
mag Array of N elements Array of magazine numbers
(N = Number of (Except for reading all magazine data)
acquired items) Specify the magazine number to be acquired.
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 368/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (182) Value to be stored in the return value of the cnc_rdmag_property function
Element Type Description
1st Numerical value Return value of the function
element EW_OK
Normal termination
EW_LENGTH
Data block length error
The number of data items (data_num) is incorrect.
EW_NUMBER
Data number error
Magazine number is incorrect.
EW_NOOPT
Required option is not added.
Tool life management function (64, 240, and 1000 pairs) and the
tool management expansion B function are required.
2nd Numerical value Number of data items actually read
element
3rd Array of N elements Array of magazine property data
element (N = Number of read data For details on the value, see “Magazine property data ”below.
items)

Table 5.3 (183) Magazine property data


Element Type Description
1st element Numerical value Magazine number
2nd element Numerical value Magazine information data
3rd element Numerical value Matrix row number
4th element Numerical value Matrix column number
5th element Array An array of 4 elements that contains the customized data.
For details on the value, see “Customized data ”below.

Table 5.3 (184) Customized data


Element Type Description
1st element Numerical value Value of customized data 1
2nd element Numerical value Value of customized data 2
3rd element Numerical value Value of customized data 3
4th element Numerical value Value of customized data 4
[Description]
This function gets the specified number of magazine property data items.
[Example]
To get two magazine property data items (magazine number 1, 2)

data_num = 2 #Number of acquired items


mag[2] = [1, 2] #Magazine number to be acquired

ret = cnc_rdmag_property(data_num, mag)


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 369/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.12 Writing the magazine property data

[Function]
cnc_wrmag_property
[Syntax with arguments]
cnc_wrmag_property(data_num, magprty)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (185) Arguments of the cnc_wrmag_property function
Name Type Description
data_num Numerical value Number of setting items
"1" to "8"
Specify "-1" when setting all magazine data
magprty Array of N elements Array of magazine property data
(N = Number of For details on the value, see “Magazine property data.”
setting items)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (186) Value to be stored in the return value of the cnc_wrmag_property function
Element Type Description
1st Numerical Return value of the function
element value EW_OK
Normal termination
EW_LENGTH
Data block length error
The number of data items set (data_num) is incorrect.
EW_NUMBER
Data number error
Magazine number is incorrect.
EW_DATA
Data error.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
0: Error other than EW_DATA.
1: Magazine information error.
11 to 14: Error in customized data 1 to 4.
EW_NOOPT
Required option is not added.
Tool life management function (64, 240, and 1000 pairs) and the tool
management expansion B function are required.
2nd Numerical Number of data items actually set
element value
[Description]
This function sets the specified number of magazine property data items.
[Example]
To set the following two magazine property data items
First magazine property data item: Magazine number=1, Magazine information data=5, Matrix line
number=10, Matrix row number=1, All customized data=0

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 370/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Second magazine property data item: Magazine number=2, Magazine information data=5, Matrix line
number=20, Matrix row number=2, All customized data=0

data_num = 2 #Number of items to be set


magprty1[5] = [1,5,10,1,[0,0,0,0]] #First magazine property data to be set
magprty2[5] = [2,5,20,2,[0,0,0,0]] #First magazine property data to be set

magprty[2] = [magprty1, magprty2]

ret = cnc_wrmag_property(data_num, magprty)


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

NOTE
Use sufficient care when you write the magazine property data. There is a
possibility that the NC may run with the wrong magazine property data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing of the magazine property data is safe and
correct when doing so.

5.13 Deleting the magazine property data

[Function]
cnc_delmag_property
[Syntax with arguments]
cnc_delmag_property(data_num, magprty)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (187) Arguments of the cnc_delmag_property function
Name Type Description
data_num Numerical value Number of items to be deleted
"1" to "8"
Specify "-1" when deleting all magazine data.
magprty Array of N elements Array of magazine numbers
(N = Number of items to be (Except for when deleting all magazine data)
deleted) Specify the number of the magazine to be deleted.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (188) Value to be stored in the return value of the cnc_delmag_property function
Element Type Description
1st Numerical Return value of the function
element value EW_OK
Normal termination
EW_LENGTH
Data block length error
The number of data items deleted (data_num) is incorrect.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 371/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


EW_NUMBER
Data number error
Magazine number is incorrect.
EW_NOOPT
Required option is not added.
Tool life management function (64, 240, and 1000 pairs) and the tool
management expansion B function are required.
2nd Numerical Number of data items actually deleted
element value
[Description]
This function deletes the specified number of magazine property data items.
[Example]
To delete two magazine property data items (magazine number 1, 2)

data_num = 2 #Number of items to be deleted


magprty[2] = [1, 2]

ret = cnc_ delmag _property(data_num, magprty)


if ret[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

NOTE
Use sufficient care when you delete the magazine property data. There is a
possibility that the NC may run with the wrong magazine property data. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that deletion of the magazine property data is safe and
correct when doing so.

5.14 Reading the pot property data

[Function]
cnc_rdpot_property
[Syntax with arguments]
cnc_rdpot_property(magazine, s_number, data_num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (189) Arguments of the cnc_rdpot_property function


Name Type Description
magazine Numerical value Magazine number to be acquired
s_number Numerical value Pot number for starting acquisition
data_num Numerical value Number of acquired items
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 372/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (190) Return value of the cnc_rdpot_property function


Element Type Description
1st element Numerical value Return value of the function
EW_OK
Normal termination
EW_LENGTH
Data block length error
The specification of the number of items to be acquired ("data_num") is
invalid.
EW_NUMBER
Data number error
The specified data number for starting acquisition ("s_number") is invalid.
EW_ATTRIB
Data attribute error
The specified magazine number is invalid.
EW_NOOPT
No options
The optional tool management function for 64, 240, or 1000 pairs and the
tool management expansion B function option are required.
2nd Numerical value Number of acquired pot property data items
element
3rd Array of N Acquired pot property data
element elements (N = For details, see “Pot property data ”below.
Number of
acquired pot
property data)

Table 5.3 (191) Pot property data


Element Type Description
1st element Numerical value Tool management number
2nd element Numerical value Pot type
3rd element Numerical value Pot information 1
4th element Numerical value Pot information 2
5th element Array of 10 elements Customized data
For details, see “Customized data.”

Table 5.3 (192) Customized data


Element Type Description
1st element Numerical value Customized data 1
2nd element Numerical value Customized data 2
3rd element Numerical value Customized data 3
4th element Numerical value Customized data 4
5th element Numerical value Customized data 5
6th element Numerical value Customized data 6
7th element Numerical value Customized data 7
8th element Numerical value Customized data 8
9th element Numerical value Customized data 9
10th element Numerical value Customized data 10
[Description]
This function sets the magazine number ("magazine") and the pot number for starting acquisition
("s_number") to get the specified number of pot property data items ("data_num").

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 373/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When setting 1 for the magazine number to be acquired, 1 for the pot number for starting acquisition, and 2
for the number of items to be acquired
ret = cnc_rdpot_property(1,1,2)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

5.15 Writing pot property data

[Function]
cnc_wrpot_property
[Syntax with arguments]
cnc_wrpot_property(magazine, s_number, data_num, potprty)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (193) Arguments of the cnc_wrpot_property function


Name Type Description
magazine Numerical value Magazine number to be set
s_number Numerical value Pot number for starting setting
data_num Numerical value Number of setting items
potprty Array of 5 (N) elements Pot property data to be set
(N = Number of setting items) For details, see “Pot property data to be set ”below.

Table 5.3 (194) Pot property data to be set


Element Type Description
1st element Numerical value Tool management number
2nd element Numerical value Pot type
3rd element Numerical value Pot information 1
4th element Numerical value Pot information 2
5th element Array of 10 elements Customized data
For details, see “Customized data.”

Table 5.3 (195) Customized data


Element Type Description
1st element Numerical value Customized data 1
2nd element Numerical value Customized data 2
3rd element Numerical value Customized data 3
4th element Numerical value Customized data 4
5th element Numerical value Customized data 5
6th element Numerical value Customized data 6
7th element Numerical value Customized data 7
8th element Numerical value Customized data 8
9th element Numerical value Customized data 9
10th element Numerical value Customized data 10
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 374/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (196) Return value of the cnc_wrpot_property function


Element Type Description
1st Numerical Return value of the function
element value EW_OK
Normal termination
EW_LENGTH
Data block length error
The specification of the number of items to be set ("data_num") is invalid.
EW_NUMBER
Data number error
The data number specified for starting setting ("s_number") is invalid.
EW_ATTRIB
Data attribute error
The specified magazine number is invalid.
EW_DATA
A member of the array is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
0: Error other than EW_DATA
1: Tool management number error
2: Pot type error
3: Pot information 1 error
4: Pot information 2 error
11 to 20: Error in customized data 1 to 10
100: Tool interference
101: Multi edge error
EW_NOOPT
No options
The optional tool management function for 64, 240, or 1000 pairs and the tool
management expansion B function option are required.
2nd Numerical Number of data items actually set
element value
[Description]
This function sets the magazine number ("magazine") and the pot number for starting setting ("s_number")
to set the specified number of pot property data items ("data_num").

NOTE
Use sufficient care when you write pot property data. There is a possibility that the
NC may run with the wrong pot property data. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the pot property data is safe and correct when
doing so.
[Example]
When setting 1 for the magazine number to be set, 1 for the pot number for starting setting, 1 for the
number of items to be set, 1 for the pot property data (work management number = 1, pot type = 1, pot
information 1 = 1, pot information 2 = 1, and customized data 1 to 10 as 1 to 0)

ret = cnc_wrpot_property(1,1,1,[[1,1,1,1,[1,2,3,4,5,6,7,8,9,0]]])
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 375/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.16 Deleting pot property data

[Function]
cnc_delpot_property
[Syntax with arguments]
cnc_delpot_property(magazine, s_number, data_num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (197) Arguments of the cnc_delpot_property function


Name Type Description
magazine Numerical value Magazine numbers to be deleted ("1" to "8")
Specify "-1" when deleting all magazine pot data.
s_number Numerical value Pot number for starting deletion
data_num Numerical value Number of items to be deleted
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (198) Return value of the cnc_delpot_property function


Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_LENGTH
Data block length error
The specification of the number of items to be deleted ("data_num") is invalid.
EW_NUMBER
Data number error
The data number specified for starting deletion ("s_number") is invalid.
EW_ATTRIB
Data attribute error
The specified magazine number is invalid.
EW_NOOPT
No options
The optional tool management function for 64, 240, or 1000 pairs and the tool
management expansion B function option are required.
2nd Numerical Number of data items actually deleted
element value
[Description]
This function sets the magazine number ("magazine") and the pot number for starting deletion
("s_number") to delete the specified number of pot property data items ("data_num").

NOTE
Use sufficient care when you write pot property data. There is a possibility that the
NC may run with the wrong pot property data. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that writing the pot property data is safe and correct when
doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 376/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
When setting 1 for the magazine number to be deleted, 1 for the pot number for starting deletion, and 1 for
the number of items to be deleted

ret = cnc_delpot_property(1,1,1)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

5.17 Tool data transfer

[Function]
cnc_tool_move
[Syntax with arguments]
cnc_tool_move(src_magazine, src_pot, dest_magazine, dest_pot)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (199) Arguments of the cnc_tool_move function


Name Type Description
src_magazine Numerical Magazine number of transfer source
value A spindle position and a standby position can also be specified. In such a
case, a pot number need not be specified.
src_pot Numerical Pot number of transfer source
value
dest_magazine Numerical Magazine number of transfer destination
value A spindle position and a standby position can also be specified. In such a
case, a pot number need not be specified.
dest_pot Numerical Pot number of transfer destination
value
[Return]
Details of the return values are as shown below.

Table 5.3 (200) Value to be stored in the return value of the cnc_tool_move function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination.
EW_DATA
Structure member error.
A member in the structure is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
0: Error other than EW_DATA
1: Error in magazine number of transfer source
2: Error in pot number of transfer source
3: There is no tool in the magazine and pot of the transfer source.
4: Error in magazine number of transfer destination
5: Error in pot number of transfer destination
6: There is a tool in the magazine and pot of the transfer destination.
EW_NOOPT

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 377/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
No options.
The tool management function for 64 pairs, the tool management function for 240 pairs, or
the tool management function for 1000 pairs is required.
EW_PROT
Write protection is applied.
The magazine management data table and the tool management data table are
write-protected.
EW_REJECT
If a tool management function with large diameter support is set, the tool transfer to a
magazine or a pot in the transfer destination interferes with other tools.
[Description]
This function transfers the tool information set in the specified magazine and pot to the magazine and pot
of the transfer destination. Unlike the tool attachment function or the tool detachment tool, there is no input
or output of signals.
[Example]
To transfer the tool management data with the following information
- Transfer source magazine number: 1, transfer source pot number: 1, transfer destination magazine
number: 1, transfer destination pot number: 2

exv_list = [0]
ret = cnc_tool_move(1,1,1,2)
if ret.to_s == exv_list[0].to_s then
msg_txt = "OK¥n"
else
msg_txt = "ERROR(" + ret + ")¥n"
end
MsgBoxShow( msg_txt, 0)

NOTE
Use sufficient care when writing the tool management data. There is a possibility
that the NC may run with the wrong tool management data. In this case, it may
cause unexpected machine behavior, and tools, machines or workpieces may be
damaged.
You have to make sure that writing the tool management data is safe and correct
when doing so.

5.18 Searching the free pot for a large-diameter tool

[Function]
cnc_btlfpotsrh
[Syntax with arguments]
cnc_btlfpotsrh(type, magnum, geomnum, potnum)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 378/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (201) Arguments of the cnc_btlfpotsrh function


Name Type Description
type Numerical value Search direction of the free pot
For the relationship between each search direction and the setting value,
see “Search direction and setting value ”below.
magnum Numerical value Magazine number of search target
geomnum Numerical value Geometry number of the tool to be stored
potnum Numerical value Pot number for starting search

Table 5.3 (202) Search direction and setting value


Search direction Setting value
Reverse -1
Both 0
Forward 1
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (203) Return value of the cnc_btlfpotsrh function


Element Type Description
1st Numerical Return value of the function
element value EW_OK
Normal termination.
EW_BUSY
The same data window is being accessed by another user.
Execute the function again.
EW_NUMBER
The specified search direction ("type") is invalid.
EW_DATA
The magazine number ("magnum"), the search pot number ("potnum"), or the
tool geometry number ("geomnum") is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
0: Error other than EW_DATA
21: Magazine number error
22: Pot number error
26: Tool geometry number error.
EW_NOOPT
No options.
The optional tool management function for 64 pairs, the tool management
function for 240 pairs, or the tool management function for 1000 pairs is
required.
EW_OVRFLOW
There are no free pots.
2nd Numerical Number of pots actually searched
element value Search the free pot in which the tool with geometry specified by "geomnum" can be
stored among the magazines of the magazine number specified by "magnum."
Search is performed in the direction specified by "type," starting from the pot number
specified by "potnum."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 379/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Search the free pot that fits the specified geometry ("geomnum") in the same magazine ("magnum") based
on the specified pot position ("potnum") as a reference.
The free pot is searched in the direction specified by ("type").
[Example]
When setting -1 (reverse order) for the free pot search direction, 1 for the search target magazine number,
20 for the geometry number of the tool to be stored, and 4 for the pot number for starting search

ret = cnc_btlfpotsrh(-1,1,20,4)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 380/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC Window Library History Data Related Function Reference]

6.1 History data sampling stop

[Function]
cnc_stopophis
[Syntax with arguments]
cnc_stopophis()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (204) Value to be stored in the return value of the cnc_stopophis function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_REJECT
CNC processing is rejected.
[Description]
This function instructs the CNC to stop sampling operation history data, alarm history data, and external
operator's message history data.

6.2 History data sampling restart

[Function]
cnc_startophis
[Syntax with arguments]
cnc_startophis()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (205) Value to be stored in the return value of the cnc_startophis function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_FUNC
Function not executed
History data sampling is not stopped (cnc_stopophis).
[Description]
This function instructs the CNC to restart the sampling of the operation history data, the alarm history data,
and the external operator message history data.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 381/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

6.3 Reading the number of operation history data items

[Function]
cnc_rdophisno
[Syntax with arguments]
cnc_rdophisno()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (206) Value to be stored in the return value of the cnc_rdophisno function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_FUNC
Function not executed
History data sampling is not stopped (cnc_stopophis).
2nd Numerical Number of operation history data items
element value
[Description]
This function reads the number of operation history data items.
When reading the operation history data with the cnc_rdophistry3 function, use the cnc_rdophisno3
function instead of this function.
Before using this function, stop the history data sampling (cnc_stopophis function).
(Example)
When the following history data is displayed on the NC operation history screen, the number of
operation history data items can be read as "3" with this function.
History number Operation history
1 1999/11/22 Power ON time
12:34:56
2 PS0181
Alarm
1999/11/22
13:00:00
MDI key operation
3 [SOFT1]
[Example]
To get the number of operation history data items

ret = cnc_rdophisno()
if ret[0] == EW_OK then
msg_txt = "Number of operation history data items:" + ret[1] + "¥n"
MsgBoxShow(msg_txt,0)
end

6.4 Clearing the history data

[Function]
cnc_clearophis

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 382/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax with arguments]


cnc_clearophis(slct)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (207) Arguments of the cnc_clearophis function


Name Type Description
slct Numerical Specify the type of history data to be cleared.
value 0: Operation history data
1: Alarm history data
2: External operator message history data
[Return]
Details of the return values are as shown below.

Table 5.3 (208) Value to be stored in the return value of the cnc_clearophis function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_ATTRIB
Data attribute error
Specification of history data type (slct) is incorrect.
EW_PARAM
CNC parameter error
Define parameter EKE(No.3195#7)="1".
[Description]
The history data to be cleared depends on the parameters SAH (No.11354#2) and SOH (No.11354#3) and
the setting of the slct argument.
For details, see the following table.
Table 5.3 (209) History data to be cleared
Parameter External operator
Alarm history
SAH SOH slct argument Operation history data Message history
Data
(No.11354#2) (No.11354#3) Data
0 Cleared Cleared Cleared
0 0 1 Cleared Cleared Cleared
2 Cleared Cleared Cleared
0 Cleared Not cleared Cleared
1 0 1 Not cleared Cleared Not cleared
2 Cleared Not cleared Cleared
0 Cleared Cleared Not cleared
0 1 1 Cleared Cleared Not cleared
2 Not cleared Not cleared Cleared
0 Cleared Not cleared Not cleared
1 1 1 Not cleared Cleared Not cleared
2 Not cleared Not cleared Cleared

6.5 Reading the number of alarm history data items

[Function]
cnc_rdalmhisno

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 383/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax with arguments]


cnc_rdalmhisno()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (210) Value to be stored in the return value of the cnc_rdalmhisno function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_FUNC
Function not executed
History data sampling is not stopped (cnc_stopophis).
2nd Numerical Number of alarm history data items
element value
[Description]
This function reads the number of alarm history data items.

Before using this function, stop the history data sampling (cnc_stopophis function).
[Example]
To get the number of alarm history data items

ret = cnc_rdalmhisno()
if ret[0] == EW_OK then
msg_txt = "Number of alarm history data items:" + ret[1] + "¥n”
MsgBoxShow(msg_txt,0)
end

6.6 Reading the number of external operator message history data items

[Function]
cnc_rdomhisno
[Syntax with arguments]
cnc_rdomhisno()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (211) Value to be stored in the return value of the cnc_rdomhisno function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_FUNC
Function not executed
History data sampling is not stopped (cnc_stopophis).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 384/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


EW_PARAM
CNC parameter error
Define parameter HOM(No.3196#6)="0" and OMH(No.3112#2)="1"
2nd Numerical Number of external operator message history data items
element value
[Description]
This function reads the number of external operator message history data items.

Before using this function, stop the history data sampling (cnc_stopophis function).

This function involves the following parameters.


- Parameter OMH(No.3112#2)="1" (Be sure to set this parameter to use this function.)
- Parameter HOM(No.3196#6)="0" (Be sure to set this parameter to use this function.)
- Parameter EAH(No.3112#3)
For details on the parameters, see “PARAMETER MANUAL (B-63950EN, B-64490EN, B-64610EN) ”of
the CNC.
[Example]
To get the number of external operator message history data items

ret = cnc_ rdomhisno ()


if ret[0] == EW_OK then
msg_txt = "Number of external operator message history data items:" + ret[1] + "¥n ”
MsgBoxShow(msg_txt,0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 385/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC Window Library Data Server Related Function Reference]

7.1 Getting file list information

[Function]
cnc_rddsfile
[Syntax with arguments]
cnc_rddsfile(dev_name, ds_file_in )
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (212) Arguments of the cnc_rddsfile function


Name Type Description
dev_name String Specify the name of the device to which the file list information is acquired.
The device name that can be specified is as follows.
Data server "DATA_SV"
ds_file_in Array of 6 Specify the conditions for acquiring the file list information.
elements For details on the value, see “File list acquisition condition ”below

Table 5.3 (213) File list acquisition condition


Element Type Description
1st element String Specify the reference file name and reference folder name. (Up to 255 characters)
2nd element Numerical Specify the serial number of a file to be defined as a reference of the file list
value information.
3rd element Numerical Specify the offset from a file to be defined as a reference of the file information list.
value
4th element Numerical Specify the number of files in the file list information to be acquired. (Up to 32
value characters)
5th element Numerical Specify the data unit of the file list information to be acquired.
value 0 Pages
1 Bytes
2 KBytes (1 KByte=1024 Bytes)
3 MBytes (1 MByte=1024 KBytes)
6th element Numerical Specify whether the comment information is read with the file list information.
value 0 The comment information is not read.
1 The comment information is read.
For details of each element mentioned above, see the [Argument] column of the function reference for
the cnc_rddsfile function in the C Language Executor Programming Manual (B-63943JA-3).
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (214) Value to be stored in the return value of the cnc_rddsfile function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the
cnc_getdtailerr function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 386/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_LENGTH
The specification of the number of files in the file list information
acquired by the 4th element of the ds_file_in argument.
2nd element Array of 4 The information of the folder in which the file list information was acquired
elements For details on the value, see “File list acquisition folder information ”below.
3rd element Array of n Acquired file list information
elements Array of the file information.
(n = Number of For details on the file information, see “File information ”below.
files in the file
list information
acquired (up to
32))

Table 5.3 (215) File list acquired folder information


Element Type Description
1st element Numerical value File management format of the CF card of the data server
0 CNC file management format
2nd element Numerical value Serial number of the first file of the file list information of the 3rd element of the
return value
3rd element Numerical value Total number of files in the target folder specified by the ds_file_in argument
4th element String The full path of the folder in which the file list information was acquired is
returned. (Up to 255 characters)

Table 5.3 (216) File information


Element Type Description
1st element Numerical value Year of last edit
2nd element Numerical value Month of last edit
3rd element Numerical value Day of last edit
4th element Numerical value Hour of last edit
5th element Numerical value Minute of last edit
6th element Numerical value Second of last edit
7th element Numerical value File size. (Not used for folders)
8th element Numerical value File/folder attributes
31st bit: Always 1
30th bit 0: Folder
1: File
04th bit 0: Normal file (folder)
1: Data folder
03rd bit 0: Text
1: Binary
00th bit 0: Editable
1: Uneditable
Bits other than the above: Not used
9th element String File/folder name. ASCII character string up to 35 characters
10th element String Comment information. ASCII character string up to 127 characters
Contents of the comment block immediately after the program number is

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 387/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


stored.
It is effective only when the 6th element of the ds_file_in argument is 1 and
in the case of a file.
If a comment block does not exist, 127 character strings starting from the
beginning of the data body are returned.
This information is not returned for the program selected as the main
program.
[Description]
This function gets the list information of a file (including subfolders) in the CF card of the data server.
The file list information in the current folder is acquired when the only a file name or NULL character is
specified for the path argument.
When the full path of a file or folder is specified for the path argument, the file list information in the
folder is acquired.

For specific examples, see the [Description] column of the function reference for the cnc_rddsfile function
in the C Language Executor Programming Manual (B-63943JA-3).

[Example]
To get the file information of the folder "//DATA_SV/TEST001/"

ds_file_in = ["//DATA_SV/TEST001/TEST01",0,0,3,1,1]
/* Reference file = " TEST01 ”(serial number = 0, offset = 0)
Number of acquired files = 3
Data size units = Bytes
*/
ret = cnc_rddsfile( "DATA_SV", ds_file_in )
if ret[0] != EW_OK then
msg_txt = "ERROR(" + ret[0] + ")¥n"
MsgBoxShow(msg_txt,0)
end

NOTE
1 When the data folder is protected by a password, the folder information of the
data folder is not acquired even if the file list information in the folder including the
data folder is acquired. In this case, the serial number of the file advances by one.
2 Even if the data folder is protected by a password, the file list information in the
data folder can be acquired in the following cases.
- The data folder is set as the current folder and only the file name or a NULL
character is specified for the 1st element of the ds_file_in argument.
- The full path of the file in the data folder is specified as the 1st element of the
ds_file_in argument.
- The full path of the data folder is specified as the 1st element of the ds_file_in
argument.
3 If CNC software or communication software that does not support full path
specification for the 1st element of the ds_file_in argument is used, the file list
information is acquired based on the first file in the current folder when the full
path of the file or folder is specified.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 388/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.2 Getting the current folder

[Function]
cnc_rddsdir
[Syntax with arguments]
cnc_rddsdir(dev_name)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (217) Arguments of the cnc_rddsdir function


Name Type Description
dev_name String Device name
The device name that can be specified is as follows.
Data server "DATA_SV"
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (218) Value to be stored in the return value of the cnc_rddsdir function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Normal termination.
EW_NOOPT
No options.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted
2nd element Numerical “0 ”is set as a fixed value.
value
3rd element String Acquired current folder name
Acquired current drive + current folder name string
Maximum number of characters is 255.
If a problem occurs, a NULL character is set.
[Description]
This function gets the full path of the current folder on the CF card of the data server.
[Example]
To get the current folder of the data server

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 389/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

ret = cnc_rddsdir( "DATA_SV" )


if ret[0] != EW_OK then
msg_txt = "ERROR(" + ret[0] + ")¥n"
MsgBoxShow(msg_txt,0)
end

7.3 Changing the current folder

[Function]
cnc_dschdir
[Syntax with arguments]
cnc_dschdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (219) Arguments of the cnc_dschdir function


Name Type Description
dev_name String Specify the name of the device for which the current folder is to be changed.
The device name that can be specified is as follows.
Data server "DATA_SV"
dir String Specify the folder name to be changed.
If only the folder name is specified, that folder becomes one in the current folder.
The folder can be directly changed to the folder outside the current folder by
specifying a full path.
Example 1)
When "//DATA_SV/PROG1/PROG1_SUB" is specified, the current folder is
changed to the PROG1_SUB folder in the //DATA_SV/PROG1/ folder.
Example 2)
When "PROG1_SUB" is specified, the current folder is changed to the
PROG1_SUB folder in the current folder.
[Return]
Details of the return values are as shown below.

Table 5.3 (220) Return value of the cnc_dschdir function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination.
EW_NOOPT
No options.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 390/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
[Description]
This function changes the current folder of the CF card of the data server.
[Example]
To change the current folder of the data server to "//DATA_SV/TEST001/"

ret = cnc_dschdir( "DATA_SV" , "//DATA_SV/TEST001/" )


if ret != EW_OK then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow(msg_txt,0)
end

NOTE
1 The setting contents of the current folder synchronize with the program list screen
of the CNC. That is, when the current folder is changed by this function, the
changed content is applied to the program list screen. Specify a full path for all file
operations when the file operation is executed with the C Language Executor
Application independently from the program list screen.
2 If the data folder is set to the current folder, the information in the data folder is
displayed on the program list screen even if the data folder is protected by a
password. Use sufficient care when you set the data folder as the current folder.

7.4 Creating folders

[Function]
cnc_dsmkdir
[Syntax with arguments]
cnc_dsmkdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (221) Arguments of the cnc_dsmkdir function


Name Type Description
dev_name String Device name
The device name that can be specified is as follows.
Data server "DATA_SV"
dir String Specify a name for the folder to be created.
The maximum number of characters is 255.
A folder or file with the same name as one that already exists cannot be created.
When only a folder name is specified, a folder is created in the current folder.
A new folder can be created in a folder other than the current folder by specifying a full
path.
[Return]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 391/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (222) Return value of the cnc_dsmkdir function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
489: Failed to create a folder.
[Description]
This function creates a new folder in the CF card of the data server.
[Example]
To create the “ABCDEFG ”folder in the current folder of the data server

ret = cnc_dsmkdir( "DATA_SV", "ABCDEFG" )


if ret != EW_OK then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow(msg_txt,0)
end

7.5 Deleting folders

[Function]
cnc_dsrmdir
[Syntax with arguments]
cnc_dsrmdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (223) Arguments of the cnc_dsrmdir function


Name Type Description
dev_name String Device name
The device name that can be specified is as follows.
Data server "DATA_SV"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 392/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


dir String Specify the folder name to be deleted.
The maximum number of characters is 255.
A folder or file with the same name as one that already exists cannot be created.
When only a folder name is specified, a folder is created in the current folder.
A new folder can be created in a folder other than the current folder by specifying a full
path.
[Return]
Details of the return values are as shown below.

Table 5.3 (224) Return value of the cnc_dsrmdir function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
487: Failed to delete the folder.
[Description]
This function deletes the folder in the CF card of the data server.
[Example]
To delete the folder “ABCDEFG ”in the current folder of the data server

ret = cnc_dsrmdir("DATA_SV","ABCDEFG")
if ret != EW_OK then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow(msg_txt,0)
end

NOTE
Use sufficient care when you delete the NC program. There is a possibility that
the NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that deleting the NC program is safe and correct when
doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 393/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.6 Deleting files

[Function]
cnc_dsremove
[Syntax with arguments]
cnc_dsremove(dev_name, file)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (225) Arguments of the cnc_dsremove function


Name Type Description
dev_name String Device name
The device name that can be specified is as follows.
Data server "DATA_SV"
file String Specify the file name to be deleted.
The maximum number of characters is 255.
Specification can be made using wildcards such as ’* ’and ’?’.
(If ’* ’is used, characters after the ’* ’are invalid.)
When only the names of the files to be deleted are specified, files in the current folder
are deleted.
[Return]
Details of the return values are as shown below.

Table 5.3 (226) Return value of the cnc_dsremove function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
505: Failed to delete the files.
[Description]
This function deletes the file on the CF card of the data server.
[Example]
To delete the file “ABCDEFG ”in the current folder of the data server

ret = cnc_dsremove("DATA_SV","ABCDEFG")
if ret != EW_OK then

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 394/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

msg_txt = "ERROR(" + ret + ")¥n"


MsgBoxShow(msg_txt,0)
end

NOTE
Use sufficient care when you delete the NC program. There is a possibility that
the NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that deleting the NC program is safe and correct when
doing so.

7.7 Getting the data server storage device information

[Function]
cnc_rddsdevinfo
[Syntax with arguments]
cnc_rddsdevinfo(type)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (227) Arguments of the cnc_rddsdevinfo function


Name Type Description
type Numerical Specify the unit of information to be acquired to the lower bytes and the type of
value information to be acquired to the upper bytes as follows.
<<Lower bytes>>
- Specify the following values as the unit of the information to be acquired.
0 Pages
1 Bytes
2 KBytes (1 KByte = 1024 Bytes)
3 MBytes (1 MByte = 1024 KBytes)
<<Upper bytes>>
- Specify the following values as the type of the information to be acquired.
0 - Password protected
Information that does not include the data folder
- Password protection is disabled.
Information of the entire CF card
1 All information on the CF card
(Not affected by password protection.)
2 Information of data folder
(Not affected by password protection.)
3 Information that does not include data folder
(Not affected by password protection.)
[Return]
For this function, the return value is an array of 5 elements.
Details of the return values are as shown below.

Table 5.3 (228) Return value of the cnc_rddsdevinfo function


Element Type Description
1st element Numerical Return value of the function
value EW_OK

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 395/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: The data server function is not available.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
505: Failed to delete the files.
2nd element Numerical “Capacity used ”of the acquired CF card information of the data server is returned.
value
3rd element Numerical “Disk capacity ”of the acquired CF card information of the data server is returned.
value
4th element Numerical “Number of entries in use ”of the acquired CF card information of the data server is
value returned.
5th element Numerical “Total number of entries ”of the acquired CF card information of the data server is
value returned.
[Description]
This function deletes the file on the CF card of the data server.
[Example]
To get the data server storage device information in units of Kbytes

ret = cnc_rddsdevinfo( 2 )
if ret[0] != EW_OK then
msg_txt = "ERROR(" + ret[0] + ")¥n"
MsgBoxShow(msg_txt,0)
end

NOTE
Use sufficient care when you delete the NC program. There is a possibility that
the NC may run the wrong NC program. In this case, it may cause unexpected
machine behavior, and tools, machines or workpieces may be damaged.
You have to make sure that deleting the NC program is safe and correct when
doing so.

7.8 Changing the folder/file name

[Function]
cnc_dsrename
[Syntax with arguments]

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 396/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

cnc_dsrename(dev_name, src_name, dst_name)


[Arguments]
The arguments of this function are as shown below.

Table 5.3 (229) Arguments of the cnc_dsrename function


Name Type Description
dev_name String Device name
The device name that can be specified is as follows.
Data server "DATA_SV"
src_name String Specify the folder or file name to be changed.
The maximum number of characters is 255.
When changing a folder/file name, the full path must be specified.
When a full path is not specified, the name of the folder or file in the current folder is
changed.
dst_name String Specify the name of the folder/file after the change.
The maximum number of characters is 32.
[Return]
Details of the return values are as shown below.

Table 5.3 (230) Return value of the cnc_dsrename function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: No data server function.
26: No ATA card.
EW_BUSY
The data server is being used by other functions.
EW_DATA
The specification of the dev_name argument is incorrect.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
491: Failed to change the folder/file name.
497: The new folder/file name already exists.
[Description]
The name of the folder or file in the current folder of the ATA card of the data server function is changed.
[Example]
To change the name of folder “ABCDEFG ”of the data server to “HIJKLMN ”

ret = cnc_dsrename( "DATA_SV", "ABCDEFG", "HIJKLMN" )


if ret != EW_OK then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow(msg_txt,0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 397/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.9 Copying the data server function file

[Function]
cnc_dscopyfile
[Syntax with arguments]
cnc_dscopyfile(srcfile, dstfile)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (231) Arguments of the cnc_dscopyfile function


Name Type Description
srcfile String Specify the file name of the copy source.
The maximum number of characters is 255.
When changing a folder/file name, the full path must be specified.
If full path is not specified, the current folder file is copied.
dstfile String Specify the file name of the copy destination (attachment destination).
The maximum number of characters is 255.
A file with the same name as one that already exists cannot be specified.
When attaching to an arbitrary folder, specification of the full path is required.
It is copied to the current folder when a full path is not specified.
[Return]
Details of the return values are as shown below.

Table 5.3 (232) Return value of the cnc_dscopyfile function


Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_NOOPT
No options
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in “Detail status ”in the return value array.
22: No fast Ethernet board.
24: No data server function.
26: No ATA card.
EW_BUSY
The data server is being used by other functions.
EW_MODE
CNC mode error. The CNC is in a mode other than EDIT mode.
EW_DTSRVR
An error occurred in the data server.
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in “Detail status ”in the return value array.
464: No CF card. Or, the CF card is not formatted.
491: Failed to change the folder/file name.
497: A file with that name already exists in the copy destination.
[Description]
Copy the file in the CF card of the data server function.
Set the CNC to EDIT mode. When the CNC is not in the EDIT mode, EW_MODE(12) is returned.
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 398/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Example]
To copy the data server function file “ABCDEFG ”into “HIJKLMN ”

ret = cnc_dscopyfile( "ABCDEFG", "HIJKLMN" )


if ret != EW_OK then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow(msg_txt,0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 399/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[CNC Window Library Other Function Reference]

8.1 Reading the maximum number of significant figures and the number of decimal places.

[Function]
cnc_getfigure
[Syntax with arguments]
cnc_getfigure(data_type)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (233) Arguments of the cnc_getfigure function


Name Type Description
data_type Numerical Data type
value 0: Axis data
1: Tool offset
2: Custom macro
[Return]
For this function, the return value is an array of 4 elements.
Details of the return values are as shown below.

Table 5.3 (234) Value to be stored in the return value of the cnc_getfigure function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_ATTRIB
The specified data type (data_type) is invalid.
2nd element Numerical value Maximum number of significant figures
3rd element Array of m elements Digits after the decimal point in units of input
(m = maximum (For data other than axis data, only the beginning of the array is valid.)
number of controlled For details on the value to be set, see [Description].
axes)
4th element Array of m elements Digits after the decimal point in units of output
(m = maximum (For data other than axis data, only the beginning of the array is valid.)
number of controlled For details on the value to be set, see [Description].
axes)
[Description]
This function reads the maximum number of significant figures, input unit, and output unit of each kind of
data of the CNC.
The value that can be read by the window library is the binary data in the setting units of the CNC.
Consequently, you must set up the display of the decimal point position and other items with consideration
given to the increment system.

This function is effective when any of the following functions is used.


Table 5.3 (235) Functions that can be enabled by cnc_getfigure
Axis data
cnc_rddynamic
cnc_rdwkcdshft

The values returned from the function are as follows.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 400/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

- Maximum number of significant figures


Table 5.3 (236) Maximum number of significant figures
Axis data 9 digits
Tool offset 9 digits
Custom macro 8 digits

- Digits after the decimal point in units of input or output

1) Axis data
Table 5.3 (237) Digits after the decimal point of the axis system data
Straight axis Rotation axis
[mm] [inch] [deg]
IS-A 2 3 2
IS-B 3 4 3
IS-C 4 5 4
IS-D 5 6 5
IS-E 6 7 6
*The metric/inch of the straight axis obeys the CNC parameter.
For input unit → Input setting unit (Parameter INI (No.0000#2))
For output unit → Machine straight axis detection unit (Parameter INM (No.1001#0))

2) Tool offset
The digits after the decimal point of the output unit are invalid.
Table 5.3 (238) Digits after the decimal point of the tool offset
Parameter OFE Parameter OFD Parameter OFC Parameter OFA Straight axis Straight axis
(No.5042#3) (No.5042#2) (No.5042#1) (No.5042#0) millimeter input inch input
[mm] [inch]
0 0 0 1 2 3
0 0 0 0 3 4
0 0 1 0 4 5
0 1 0 0 5 6
1 0 0 0 6 5

3) Custom macro
The digits after the decimal point of the input units only apply to the first axis data.
The digits after the decimal point of the output units are not used.
Table 5.3 (239) Digits after the decimal point of the custom macro
[mm] [inch]
IS-A 2 3
IS-B 3 4
IS-C 4 5
IS-D 5 6
IS-E 6 7
[Example]
When setting 0 (axis data) for the data type

ret = cnc_getfigure(0)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 401/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

8.2 Reading the CNC system software series/edition (3)

[Function]
cnc_rdsyssoft3
[Syntax with arguments]
cnc_rdsyssoft3(s_id, read_num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (240) Arguments of the cnc_rdsyssoft3 function


Name Type Description
s_id Numerical Acquisition start ID of series/edition information to be read
value The ID is acquired sequentially in ascending order from the specified ID.
When reading all series/edition information, get the data whose s_id is 0. For the
second time or later, set s_id as the last acquired ID+1 and repeat the operation.
read_num Numerical Number of pieces of software to be read
value A value ranging from 1 to 40 can be specified.
If no data is read, “0 ”is returned to the 2nd element of the return value.
[Return]
For this function, the return value is an array of 4 elements.
Details of the return values are as shown below.

Table 5.3 (241) Value to be stored in the return value of the cnc_rdsyssoft3 function
Element Type Description
1st Numerical value Execution result
element EW_OK
Normal termination
2nd Numerical value Number of items actually read
element
3rd Numerical value Total number of pieces of software
element
4th Array of n elements List of acquired CNC system software series/editions
element (n = Number of Array of the series/edition information of the CNC system software
acquired system For details on the values, see “CNC system software series/edition
software information information" below.
(up to 40))

Table 5.3 (242) CNC system software series/edition information


Element Type Description
1st element Numerical Software ID
value A numerical value indicating the type of each software product is stored.
See the following software ID list.
2nd element String Software series
The software series used is stored in ASCII code (4 bytes).
3rd element String Software edition
The software edition used is stored in ASCII code (4 bytes).

Table 5.3 (243) Software ID list (for the Series 30i-A)


Value Meaning
0101H CNC basic software

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 402/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0102H CNC optional software A1
0103H CNC optional software A2
0104H CNC optional software A3
0111H CNC language display ROM English (Basic)
0112H CNC language display ROM Japanese
0113H CNC language display ROM German
0114H CNC language display ROM French
0115H CNC language display ROM Chinese (traditional characters)
0116H CNC language display ROM Italian
0117H CNC language display ROM Korean
0118H CNC language display ROM Spanish
0119H CNC language display ROM Dutch
011AH CNC language display ROM Danish
011BH CNC language display ROM Portuguese
011CH CNC language display ROM Polish
011DH CNC language display ROM Hungarian
011EH CNC language display ROM Swedish
011FH CNC language display ROM Czech
0120H CNC language display ROM Chinese (simplified characters)
0121H CNC language display ROM Russian
0122H CNC language display ROM Turkish
0123H CNC optional software A21
0124H CNC optional software A22
0141H reserve
0151H BOOT software
0201H PMC system software 1
0211H PMC ladder 1 (First ladder)
0212H PMC ladder 2 (Second ladder)
0213H PMC ladder 3 (Third ladder)
0214H PMC ladder DCS (Ladder for DUAL CHECK)
0301H Servo software 1
0302H Servo software 2
0303H Servo software 3
0304H Servo software 4
0305H Servo software 5
0306H Servo software 6
0307H Servo software 7
0308H Servo software 8
0309H Servo software 9
030AH Servo software 10
0501H 1st spindle software
0502H 2nd spindle software
0503H 3rd spindle software
0504H 4th spindle software
0505H 5th spindle software
0506H 6th spindle software
0507H 7th spindle software
0508H 8th spindle software
0601H Graphic software 1
0602H Graphic software 2
0603H Graphic software 3

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 403/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0604H Graphic software 4 (Font data)
0701H Macro executor 1
0702H Macro executor 2
0703H Macro executor 3
0704H Macro executor 4
0705H Macro executor 5
0706H Macro executor 6
0707H Macro executor 7
0708H Macro executor 8
0709H Macro executor 9
070AH Macro executor 10
070BH Macro executor 11
070CH Macro executor 12
070DH Macro executor 13
070EH Macro executor 14
070FH Macro executor 15
0710H Macro executor 16
0711H Macro executor 17
0712H Macro executor 18
0713H Macro executor 19
0714H Macro executor 20
075AH Manual Guide i (Macro Executer for Machining Center System)
075BH Manual Guide i (Macro Executer for Lathe System)
0801H Library for C language executor
0802H Application program for C language executor
0811H Library for Manual Guide i
0812H System software for Manual Guide i
0820H C language executor data file 0
0821H C language executor data file 1
0822H C language executor data file 2
0823H C language executor data file 3
0824H C language executor data file 4
0825H C language executor data file 5
0826H C language executor data file 6
0827H C language executor data file 7
0828H C language executor data file 8
0829H C language executor data file 9
0830H Data for Manual Guide i
0831H Data for Manual Guide i
0832H Data for Manual Guide i
0833H Data for Manual Guide i
0834H Data for Manual Guide i
0835H Data for Manual Guide i
0836H Data for Manual Guide i
0837H Data for Manual Guide i
0838H Data for Manual Guide i
0839H Data for Manual Guide i
0901H Network management NET
0911H Embedded Ethernet
0912H Ethernet display function
0921H PROFIBUS 1

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 404/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0922H PROFIBUS 2
0923H Device network 1
0924H Device network 2
0925H FL-net1
0926H FL-net2
0927H PROFIBUS 3
0929H FL-net/Ethernet
092AH CC-Link
0931H Data server
0A01H Customer's board System
0A02H Customer's board User

Table 5.3 (244) Software ID list (for the Series 30i-B)


Value Meaning
0101H CNC system software 1
0102H CNC system software 2
0103H CNC system software 3
0104H CNC system software 4
0111H CNC language display 1
0112H CNC language display 2
0113H CNC language display 3
0114H CNC language display 4
0115H CNC language display 5
0141H reserve
0151H BOOT software
0201H PMC system software 1
0211H PMC ladder 1 (First ladder)
0212H PMC ladder 2 (Second ladder)
0213H PMC ladder 3 (Third ladder)
0214H PMC ladder 4 (Fourth ladder)
0215H PMC ladder 5 (Fifth ladder)
0216H PMC ladder DCS (Ladder for DUAL CHECK)
0221H PMC1 message data
0222H PMC2 message data
0223H PMC3 message data
0224H PMC4 message data
0225H PMC5 message data
0231H I/O Linki assignment data
0301H Servo software 1
0302H Servo software 2
0303H Servo software 3
0304H Servo software 4
0305H Servo software 5
0306H Servo software 6
0307H Servo software 7
0308H Servo software 8
0309H Servo software 9
030AH Servo software 10
0501H 1st spindle software
0502H 2nd spindle software
0503H 3rd spindle software

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 405/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0504H 4th spindle software
0505H 5th spindle software
0506H 6th spindle software
0507H 7th spindle software
0508H 8th spindle software
0601H Graphic software 1
0602H Graphic software 2
0603H Graphic software 3
0604H Graphic software 4 (Font data)
0701H Library for Manual Guide i
0702H System software for Manual Guide i
0703H Manual Guide i (Macro Executer for Machining Center System)
0704H Manual Guide i (Macro Executer for Lathe System)
0710H Data for Manual Guide i
0711H Data for Manual Guide i
0712H Data for Manual Guide i
0713H Data for Manual Guide i
0714H Data for Manual Guide i
0715H Data for Manual Guide i
0716H Data for Manual Guide i
0717H Data for Manual Guide i
0718H Data for Manual Guide i
0719H Data for Manual Guide i
0801H Macro executor 1
0802H Macro executor 2
0803H Macro executor 3
0804H Macro executor 4
0805H Macro executor 5
0806H Macro executor 6
0807H Macro executor 7
0808H Macro executor 8
0809H Macro executor 9
080AH Macro executor 10
080BH Macro executor 11
080CH Macro executor 12
080DH Macro executor 13
080EH Macro executor 14
080FH Macro executor 15
0810H Macro executor 16
0811H Macro executor 17
0812H Macro executor 18
0813H Macro executor 19
0814H Macro executor 20
0901H Library for C language executor
0902H Application program for C language executor
0920H C language executor data file 0
0921H C language executor data file 1
0922H C language executor data file 2
0923H C language executor data file 3
0924H C language executor data file 4
0925H C language executor data file 5

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 406/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0926H C language executor data file 6
0927H C language executor data file 7
0928H C language executor data file 8
0929H C language executor data file 9
0A01H Network management NET
0A11H Embedded Ethernet
0A12H Ethernet display function
0A18H USB function
0A21H PROFIBUS 1
0A22H PROFIBUS 2
0A23H Device network 1
0A24H Device network 2
0A25H FL-net1
0A26H FL-net2
0A27H PROFIBUS 3
0A29H FL-net/Ethernet
0A2AH CC-Link
0A31H Data server
0B01H Customer's board System
0B02H Customer's board User
0101H CNC system software 1
0102H CNC system software 2
0103H CNC system software 3
0104H CNC system software 4
0111H CNC language display 1
0112H CNC language display 2
0113H CNC language display 3
0114H CNC language display 4
0115H CNC language display 5
0141H reserve
0151H BOOT software
0201H PMC system software 1
0211H PMC ladder 1 (First ladder)
0212H PMC ladder 2 (Second ladder)
0213H PMC ladder 3 (Third ladder)
0214H PMC ladder 4 (Fourth ladder)
[Description]
This function reads the CNC system software series/edition.
Each piece of information is stored in the array of the 4th element of the return value.
The series/edition of the available system software can be read.
[Example]
To read the series/edition of all CNC system software

s_id = 0
read_num = 8
total = 0
loop = 1
while loop != 0 do
ret = cnc_rdsyssoft3(s_id,read_num)
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 407/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

MsgBoxShow( msg_txt, 0 )
break
end
total += ret[1]
if ret[1] < read_num || total >= ret[2] then
loop = 0
else
list = ret[3]
data = list[ret[1] - 1]
s_id = data[0] + 1
end
end

8.3 Reading the diagnostics data information

[Function]
cnc_rddiaginfo
[Syntax with arguments]
cnc_rddiaginfo(s_number, read_no)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (245) Arguments of the cnc_rddiaginfo function


Name Type Description
s_number Numerical value Specify the data number at which to start diagnostics.
read_no Numerical value Specify the number of diagnostics data information items to be read.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (246) Value to be stored in the return value of the cnc_rddiaginfo function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
The specification of the data number for starting diagnostics (s_number) is
incorrect.
2nd element Array of 4 The acquired diagnostics data information
elements For details on the value, see “Diagnostics data information ”below.

Table 5.3 (247) Diagnostics data information


Element Type Description
1st Numerical value Number of diagnostics data information items
element Number of diagnostics data information items actually read
2nd Numerical value Previous diagnostics data number
element The first valid number before the diagnostics data information that was first
read
3rd Numerical value Next diagnostics data number
element The first valid number after the diagnostics data information that was read last

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 408/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


4th Array of n List of acquired diagnostics data number/attribute information
element elements Array of diagnostics data number/attribute information.
(n = Number of For details on the value, see “Diagnostics data number/attribute information ”
diagnostics data below.
to be acquired
(up to 10))

Table 5.3 (248) Diagnostics data number/attribute information


Element Type Description
1st Numerical Diagnostics data number
element value
2nd Numerical Attributes of diagnostics data The following attributes are set.
element value #0, 1: Geometry attribute (valid if bit3 is "0")
0: bit (8 bit)
1: byte
2: word
3: 2-word or real number
#2: Axis attribute
0: no axis
1: with axis
#3: Geometry attribute
1: bit (1 bit)
#7: Sign
0: Signed
1: Unsigned
#8: Spindle parameter
0: Other than spindle
1: Spindle
#12 : In the case of geometry attribute 3
0: Other than a real number
1: Real number
[Description]
This function reads the CNC diagnostics data information specified by s_number and read_no.
The CNC diagnostics data is basically discontinuous, and the geometry and attributes are different for each
number.
Use this function to display diagnostics data.
[Example]
To read all CNC diagnostic data

# Read the minimum number, maximum number, and total count of the diagnostics data
ret = cnc_rddiagnum()
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end
diags=ret[1]
diag_min = diags[0]
diag_max = diags[1]
diag_tot = diags[2]

# Read the CNC diagnostics data information

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 409/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

s_number = diag_min
read_num = 10
total = 0
loop = 1
while loop != 0 do
ret = cnc_rddiaginfo(s_number,read_num)
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
break
end
info = ret[1]
total += info[0]
if total >= diag_tot || info[2] <= s_number then
loop = 0
else
s_number = info[2]
end
end

8.4 Reading the minimum number, maximum number, and total count of the diagnostics data

[Function]
cnc_rddiagnum
[Syntax with arguments]
cnc_rddiagnum()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (249) Value to be stored in the return value of the cnc_rddiagnum function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
2nd Array of 3 The maximum number/minimum number of the diagnostics data and the total count of
element elements the diagnostics data items.
For details on the value, see “Information of maximum number, minimum number,
and total count of diagnostic data ”below.

Table 5.3 (250) Information of the maximum number, minimum number, and total count of diagnostic data
Element Type Description
1st element Numerical value Minimum number of diagnostics data
2nd element Numerical value Maximum number of diagnostics data
3rd element Numerical value Total count of diagnostics data

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 410/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
This function reads the minimum number/maximum number of the CNC diagnostics data and the total
count of the CNC diagnostics data items.
The CNC diagnostics data distribution varies by model and may be added to by function expansions.
[Example]
See the [Example] column for cnc_rddiaginfo (reading diagnostics data).

8.5 Reading the CNC hardware configuration information

[Function]
cnc_rdsyshard
[Syntax with arguments]
cnc_rdsyshard(hard_num, read_num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (251) Arguments of the cnc_rdsyshard function


Name Type Description
hard_num Numerical Initially, hard_num is 1.
value Data is acquired in the order of information serial numbers. The second and
subsequent acquisition operations are performed repeatedly with hard_num set
to (hard_num acquired last (5th element of the CNC hardware configuration
information) +1).
read_num Numerical Number of hardware information items to be read
value A value from 1 to 25 can be specified.
If no data is read, 0 is returned.
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (252) Value to be stored in the return value of the cnc_rdsyshard function
Element Type Description
1st Numerical value Execution result
element EW_OK
Normal termination
EW_DATA
Error in the value of hard_num or read_num.
2nd Numerical value Number of items actually read
element
3rd Array of n Array of the CNC hardware configuration information
element elements For details on the value, see “CNC hardware configuration information ”below.
(n = the number
of the hardware
information
items to be read)

Table 5.3 (253) CNC hardware configuration information


Element Type Description
1st element Numerical Hardware ID
value

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 411/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd Numerical Additional information of hardware
element value
3rd Numerical Hardware group name ID
element value A numerical value indicating the type of the group of each hardware item is stored.
(When new data is added, its ID is added.)
See the following “Group name ID list ”for the group name ID of the main
hardware.
4th element Numerical Hardware name ID
value A numerical value indicating the type of hardware is stored.
(When new data is added, its ID is added.)
For the main hardware name ID, see “Hardware name ID list ”below.
5th element Numerical Serial number of hardware information
value
6th element Numerical Slot number
value
7th element Numerical Display format of 1st element (hardware ID)
value The display format of the 1st element (hardware ID) used on the system
configuration screen is stored.
0: No display
1: Hexadecimal numbers are displayed as 2-digit binary numbers.
2: Hexadecimal numbers are displayed as 4-digit binary numbers.
3: Hexadecimal numbers are displayed as 6-digit binary numbers.
4: 2-digit hexadecimal numbers are displayed.
5: 4-digit hexadecimal numbers are displayed as shown below (Example 1).
(Example 1) 1234 -> 12/34
A slash (/) is added every two characters.
6: Hexadecimal numbers are displayed as 8-digit binary numbers.
7: 8-digit hexadecimal numbers are sorted and displayed as shown below
(Example 2).
(Example 2) 01234567 -> 56723 40 1
A space is inserted after the fifth character and the seventh character.
(Note) When a value begins with "0", "0" is also displayed.
(Example) For type_id1="3"
0002H → 0010
8th element Numerical Display format of 2nd element (additional hardware information)
value The display format of 2nd element (hardware additional information) used on the
system configuration screen is stored.
For details, see “Display format of 1st element (hardware ID) ”above.

Table 5.3 (254) Group name ID list


Value Meaning
0100H MAIN BOARD
0200H OPTION BOARD
0500H (UNKNOWN)
0600H DISPLAY
0700H OTHERS
0f00H CERTIFY ID

Table 5.3 (255) Hardware name ID list


Value Meaning
0100H MAIN BOARD
0101H CPU CARD

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 412/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value Meaning
0102H SERVO CARD
0103H PMC MODULE
0110H FROM/SRAM
0200H FAST ETHER
0210H FL-NET
0211H ETH BOARD
0212H ETH CARD
0220H PROFI MASTER
0230H PROFI SLAVE
0250H HSSB 2CH
0260H HSSB 1CH
0280H ADD SPDL
0290H ADD AXIS
02A0H DEVNT MASTER
02B0H ADD CPU
02C0H DEVNT SLAVE
02D0H CC-Link
0601H LCD BOARD
0602H DISP ID
0603H GUI CARD
0604H GUI BOARD
0605H GUI ID
0701H MDI ID
0702H B.UNIT ID
0f00H CERTIFY ID-1
0f01H CERTIFY ID-2
0f02H CERTIFY ID-3
[Description]
This function reads the CNC hardware configuration information.
Each piece of information is stored in each element of the array.
25 items of the configuration information can be read at a time.
If all information cannot be read at once, specify hard_num to read the information repeatedly.

For the acquisition data of the above CNC hardware configuration information and its display, see the
[Argument] column in the function reference for the cnc_rdsyshard function in the C Language Executor
Programming Manual (B-63943JA-3).
[Example]
To read all hardware configuration information

hard_num = 1
read_num = 10
total = 0
loop = 1
while loop != 0 do
ret = cnc_rdsyshard( hard_num,read_num )
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
break;
end
if ret[1] < read_num then

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 413/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

loop = 0
else
list = ret[2]
data = list[ret[1] - 1]
hard_num = data[4] + 1
end
end

8.6 Reading the CNC system information (2)

[Function]
cnc_sysinfo_ex
[Syntax with arguments]
cnc_sysinfo_ex()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (256) Value to be stored in the return value of the cnc_sysinfo_ex function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
2nd element Array of 11 The acquired CNC system information.
elements For details on the value, see “CNC system information ”below.

Table 5.3 (257) CNC system information


Element Type Description
1st element Numerical value Maximum number of controllable axes in the entire CNC system
2nd element Numerical value Maximum number of controllable spindles in the entire CNC system
3rd element Numerical value Maximum number of controllable paths in the entire CNC system
4th element Numerical value Maximum number of controllable machine groups in the entire CNC system
5th element Numerical value Current number of controlled axes in the entire CNC system
6th element Numerical value The current number of servo axes in the entire CNC system (*The same value as
the number of controlled axes is acquired.)
7th element Numerical value Current number of controlled spindles in the entire CNC system
8th element Numerical value Current number of paths
9th element Numerical value Current number of machine groups

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 414/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


10th Numerical value CNC additional information
element Bit3
0: without compound machining function
1: with compound machining function
Bit4
0: without transfer line function
1: with transfer line function
Bit8 to Bit15
MODEL information
0 : MODEL information not supported
1 : MODEL A
2 : MODEL B
6 : MODEL F
*For the Series 30i-A, the MODEL information is not supported. (0 is
returned.)
The bits from Bit0 to Bit31 other than the above are not used.
11th Array of n CNC system path information list
element elements Information specific to each path is stored in an array. As many arrays as the
(n = maximum maximum number of paths are used.
number of For details on the value, see “CNC system path information ”below.
paths)

Table 5.3 (258) CNC system path information


Element Type Description
1st element Numerical value System type
0x0000: None
0x204D: (= " M") Machining center
0x2054: (= " T") Lathe
2nd element Numerical value System group type
0: None
1: Machining center group
2: Lathe group
3rd element Numerical value Path attribute
0 : CNC
1: Loader
4th element Numerical value Number of controlled axes in a path
5th element Numerical value Number of servo axes in a path (*The same value as the number of controlled
axes is acquired.)
6th element Numerical value Number of spindles in a path
7th element Numerical value Machine group number
[Description]
This function reads classification (machining center system or lathe system, etc.), path information,
number of controlled axes, etc.
Use this function to confirm compatibility between the CNC's system software and the PMC's software or
to get the number of axes before reading coordinate data such as absolute coordinates or machine
coordinates from the CNC.
[Example]
To get the maximum number of paths

# Read the CNC system information (2)


ret = cnc_sysinfo_ex()
if ret[0] != 0 then

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 415/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

msg_txt = "ERROR(" + ret + ")¥n"


MsgBoxShow( msg_txt, 0 )
end

8.7 Batch reading alarm messages

[Function]
cnc_rdalmmsg
[Syntax with arguments]
cnc_rdalmmsg(type, num)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (259) Arguments of the cnc_rdalmmsg function


Name Type Description
type Numerical value Type of alarm to be read
0: Parameter write switch on (SW)
1: Power off parameter set (PW)
2: I/O error (IO)
3: Foreground P/S (PS)
4: Overtravel/External data (OT)
5: Overheat alarm (OH)
6: Servo alarm (SV)
7 : Data I/O error (SR)
8: Macro alarm (MC)
9: Spindle alarm (SP)
10: OT alarm not causing PS alarm (DS)
11: Alarm related to malfunction prevention function (IE)
12: P/S for background (BG)
13: Excessive synchronization error (SN)
14: Reserved
15: External alarm message (EX)
16: External alarm message (EX2)
17: External alarm message (EX3)
18: External alarm message (EX4)
19: PMC error (PC)
-1: All types
num Numerical value Number of alarms to be read
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (260) Value to be stored in the return value of the cnc_rdalmmsg function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
EW_LENGTH
The data length is not specified correctly.
The number of alarms (num) is "0" or less.
EW_ATTRIB

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 416/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Data attribute error
The specified type of alarm to be read (type) is invalid.
2nd element Numerical value Number of items actually read
3rd element Array of n List of acquired alarm messages
elements (n = For details on the value, see “Alarm message ”below.
Number of
acquired alarms)

Table 5.3 (261) Alarm message


Element Type Description
1st element Numerical value The alarm number is set.
2nd element Numerical value The alarm type is set.
This value is the same as the one specified by the type argument.
3rd element Numerical value The axis number is set. (1 to the maximum number of controlled axes)
For the alarms not related to axes, “0 ”is set.
4th element Numerical value The number of message characters (binary) is set. (1 to 32)
5th element String Alarm message character string (ASCII) is set. (Up to 31 characters)
[Description]
This function reads the alarm message generated by CNC. All alarm messages can be read at once.
Unlike the cnc_rdalminfo function, the axis name is inserted in the alarm message related to axes.
[Example]
To get all types of alarm messages (up to 10)

ret = cnc_rdalmmsg( -1, 10 )


if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end

8.8 Getting CNC error details

[Function]
cnc_getdtailerr
[Syntax with arguments]
cnc_getdtailerr()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (262) Value to be stored in the return value of the cnc_getdtailerr function
Element Type Description
1st element Numerical value Execution result
EW_OK
Normal termination
2nd element Array Execution pointer information
For details on the value, see “Error details ”below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 417/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (263) Error details


Element Type Description
1st element Numerical value Detailed status
2nd element Numerical value Error data number
[Description]
This function gets the detailed information of the error that occurred when the function was executed.
[Example]
To get the detailed error information at execution of the function

ret_values = cnc_getdtailerr() # Acquire CNC error details


if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

8.9 CNC status information input (2)

[Function]
cnc_statinfo2
[Syntax with arguments]
cnc_statinfo2()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (264) Value to be stored in the return value of the cnc_statinfo2 function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
2nd element Array Execution pointer information
For details on the value, see “Status information ”below.

Table 5.3 (265) Status information


Element Type Description
1st element Numerical Manual handle retrace status
value 0: Manual handle retrace status: invalid
1: M.H.RTR. (Manual handle retrace)
2: NO RVRS. (Reverse prohibition)
3: NO CHAG. (Inversion prohibition)
2nd element Numerical T/M mode selection (for compound machining function only)
value 0: T mode
1: M mode

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 418/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Numerical Automatic/manual operation mode selection
value 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
4th element Numerical Automatic operation status
value 0: ****(reset)
1: STOP
2: HOLD
3: STaRT
4: MSTR (During the return operation of tool retraction and return, repositioning,
or manual numeric command operation)
5th element Numerical Axis movement/dwell status
value 0: ***
1: MoTioN
2: DWeLl
6th element Numerical Status of M, S, T, B function
value 0: ***(Other)
1: FIN
7th element Numerical Status of emergency stop
value 0: (Cancel of emergency stop)
1: EMerGency
2: ReSET
8th element Numerical Alarm status
value 0: ***(Other)
1: ALarM
2: BATtery low(*1)
3: FAN alam
9th element Numerical Program edit state
value - Machining center
0: ****(Unedited)
1: EDIT (Editing)
2: SeaRCH (Searching)
3: OUTPUT (During data output)
4: INPUT (During data input)
5: COMPARE (Comparing)
7: ReSTaRt (During program restart)
8: HPCC (During RISC operation)
9: PTRR (During tool retraction and recovery mode)
10: RVRS (Retracing/reverse)
11: RTRY (Retracing/retry)
12: RVED (End of retracing/reverse)
14: OFfSeT (During tool length compensation measurement mode)
15: Work OFfSet (During work zero point compensation measurement mode)
16: AICC (During AI contour control operation)
23: AICC2 (During AI contour control Ⅱ operation)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 419/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


26: LEN (Manual active offset change: In the length compensation change mode)
27: RAD (Manual active offset change: In the diameter compensation change
mode)
28: WZR (change the manual active offset: in workpiece origin offset change
mode)
39: TCP (During tool tip control for 5-axis 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)
43: PRG-CHK (During high speed program check)
45: S-TCP (During smooth TCP)
- Lathe
0: ****(Unedited)
1: EDIT (Editing)
2: SeaRCH (Searching)
3: OUTPUT (During data output)
4: INPUT (During data input)
5: COMPARE (Comparing)
7: OFfSeT (In the tool length compensation write mode)
8: Work ShiFT (In the workpiece shift write mode)
9: ReSTaRt (During program restart)
10: RVRS (Retracing/reverse)
11: RTRY (Retracing/retry)
12: RVED (End of retracing/reverse)
14: PTRR (During tool retraction and recovery mode)
16: AICC (During AI contour control operation)
23: AICC2 (During AI contour control Ⅱ operation)
26: OFSX (Manual active offset change: In the X-axis compensation change
mode)
27: OFSZ (Manual active offset change: In the Z-axis compensation change
mode)
28: WZR (change the manual active offset: in workpiece origin offset change
mode)
29 OFSY (Manual active offset change: In the Y-axis compensation change
mode)
31: TOFS (Manual active offset change: In the tool compensation change mode)
39: TCP (During tool tip control for 5-axis 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)
43: PRG-CHK (During high speed program check)
45: S-TCP (During smooth TCP)
10th Numerical Warning message status
element value 0: (No warning)
1: WaRNing (start in the middle of a program)
11th Numerical Three-dimensional interference check status
element value 0: Three-dimensional interference check is not made
1: Three-dimensional interference check is being made by the standard CNC
2: Three-dimensional interference check is being made by the open CNC

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 420/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


12th Numerical State of confirming restart after program editing
element value 0: It is in one of the following states.
- The program is not being edited.
- Bit7 of parameter No.10330 is set to disable the function which displays a
confirmation message at the restart of automatic operation.
- NC not supported.
1: The program is edited.
*1: "BATtery low(2)" of the alarm includes the battery information of both the CNC and absolute position
detector.
Battery voltage drop of the CNC and absolute position detector can be determined with the following
procedures.
(1) Get the status with the cnc_statinfo2 function.
(2) Absolute position detector battery voltage drop alarm if the alarm of the status acquired with the
cnc_statinfo2 function is set to 2
The signal PBATL<Fn172.7> is acquired.
(The signal of the same path as the one in which the cnc_statinfo2 function is performed is acquired.)
(3) In the case of <Fn172.7>="1", the battery voltage drop of the absolute position detector. For other
cases, CNC battery voltage drop is indicated.
*2: For the multi-path system, each path has all status values.
[Description]
The status information of the CNC is read.
[Example]
To get the status information on the CNC side

ret_values = cnc_statinfo2() # Input the CNC status information (2)


if ret_values[0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

8.10 Reads the CNC identification number

[Function]
cnc_rdcncid
[Syntax]
cnc_rdcncid()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (266) Value to Be Stored in the Return Value of the cnc_rdcncid Function
Element Type Description
1st element Numerical Return value of the function
value EW_OK
Successful
EW_FUNC
The CNC identification number does not exist in the CNC.
2nd element Array of 4 Returns an array of 4 elements of CNC identification numbers.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 421/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


elements For details, see the following “CNC Identification Numbers.”

Table 5.3 (267) CNC Identification Numbers


Element Type Description
1st element Numerical value Returns CNC identification number 1.
2nd element Numerical value Returns CNC identification number 2.
3rd element Numerical value Returns CNC identification number 3.
4th element Numerical value Returns CNC identification number 4.
[Description]
The cnc_rdcncid function is able to read the CNC identification numbers.
By using all of CNC identification numbers 1 to 4, it becomes a unique number in every CNC.
When the hardware (main board) of the CNC is changed, the CNC identification number is changed.
[Example]
To read the CNC identification numbers:

ret = cnc_rdcncid()
if ret[0] != EW_OK then
msg_txt = "ERROR(" + ret[0] + ")¥n"
MsgBoxShow( msg_txt, 0 )
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 422/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[PMC window library function reference]

9.1 Inputting arbitrary PMC data (input range specification)

[Function]
pmc_rdpmcrng
[Syntax with arguments]
pmc_rdpmcrng(adr_type, data_type, s_number, e_number, length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (268) Arguments of the pmc_rdpmcrng Function


Name Type Description
adr_type Numerical PMC address type
value
data_type Numerical Type of PMC data
value Specifies PMC data of the same type as that of the data in the PMC.
0: Byte
1: Word
2: Long
s_number Numerical Start PMC address
value Specifies the PMC address number at which the read operation is started.
e_number Numerical End PMC address
value Specifies the PMC address number at which the read operation is ended.
Length Numerical Data block length
value When data_type is "0" (byte type) : length = 8 + N
When data_type is "1" (word type) : length = 8 + N × 2
When data_type is "2" (long type) : length = 8 + N × 4
* N is the number of data items to be read.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (269) Return Value of the pmc_rdpmcrng Function


Element Type Description
1st element Numerical Return value of the function
value EW_OK
Successful
EW_LENGTH
The specified data block length is invalid.
EW_NUMBER
The specified PMC address is invalid.
EW_ATTRIB
Incorrect kind of PMC address "adr_type" or type of PMC data
"data_type".
2nd element Array of 5 PMC data that has been read
elements For details on the value, see “PMC data array.”

Table 5.3 (270) PMC Data Array


Element Type Description
1st element Numerical value PMC address type
2nd element Numerical value Type of PMC data

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 423/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Numerical value Start PMC address
4th element Numerical value End PMC address
5th element Array of N elements PMC data
(N indicates the
number of data items
to be read.)
[Description]
Reads the PMC data at the specified PMC address or in the specified address range.
This function is used to read or write data between an application program and PMC ladder software.
The argument adr_type specifies the identification code corresponding to the type of the PMC address to
be read.

Table 5.3 (271) Type of PMC Address and Identification Code


Identification code PMC address type
0,'G' G (PMC → CNC)
1,'F' F (CNC → PMC)
2,'Y' Y (PMC → Machine)
3,'X' X (Machine→→ PMC)
4,'A' A (Message request)
5,'R' R (Internal relay / system relay)
6,'T' T (Variable timer)
7,'K' K (Keep relay)
8,'C' C (Counter)
9,'D' D (Data counter)
10,'M' M (Input signal from other PMC path)
11,'N' N (Output signal to other PMC path)
12,'E' E (Expansion relay)
13,'Z' Z (System relay)

For the referenceable area of the PMC data for each PMC address type, see "PMC Data Referenceable
Areas."

Table 5.3 (272) PMC Data Referenceable Areas (Series 30i-A)


1st, 2nd, 3rd PMC DCS PMC
Signal type Symbol
PMC memory A PMC memory B PMC memory C (NOTE 1)
Input signal from machine X X0–X127 X0–X127 X0–X127 X0–X127
to PM X200–X327 X200–X327 X200–X327
X400–X527 X400–X527 X400–X527
X600–X727 X600–X727 X600–X727
X1000–X1127 X1000–X1127 X1000–X1127
(NOTE 2) (NOTE 2) (NOTE 2)
Output signal from PMC Y Y0–Y127 Y0–Y127 Y0–Y127 Y0–Y127
to machine Y200–Y327 Y200–Y327 Y200–Y327
Y400–Y527 Y400–Y527 Y400–Y527
Y600–Y727 Y600–Y727 Y600–Y727
Y1000–Y1127 Y1000–Y1127 Y1000–Y1127
(NOTE 2) (NOTE 2) (NOTE 2)

Input signal from CNC to F F0–F767 F0–F767 F0–F767 F0–F767


PMC F1000–F1767 F1000–F1767 F1000–F1767
F2000–F2767 F2000–F2767 F2000–F2767

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 424/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

F3000–F3767 F3000–F3767 F3000–F3767


F4000–F4767 F4000–F4767 F4000–F4767
F5000–F5767 F5000–F5767 F5000–F5767
F6000–F6767 F6000–F6767 F6000–F6767
F7000–F7767 F7000–F7767 F7000–F7767
F8000–F8767 F8000–F8767 F8000–F8767
F9000–F9767 F9000–F9767 F9000–F9767
Output signal from PMC G G0–G767 G0–G767 G0–G767 G0–G767
to CNC G1000–G1767 G1000–G1767 G1000–G1767
G2000–G2767 G2000–G2767 G2000–G2767
G3000–G3767 G3000–G3767 G3000–G3767
G4000–G4767 G4000–G4767 G4000–G4767
G5000–G5767 G5000–G5767 G5000–G5767
G6000–G6767 G6000–G6767 G6000–G6767
G7000–G7767 G7000–G7767 G7000–G7767
G8000–G8767 G8000–G8767 G8000–G8767
G9000–G9767 G9000–G9767 G9000–G9767
Input signal from other M M0–M767 M0–M767 M0–M767 M0–M767
PMC path
Output signal to other N N0–N767 N0–N767 N0–N767 N0–N767
PMC path
Internal relay R R0–R1499 R0–R7999 R0–R15999 R0–R1499

System relay R/Z R9000–R9499 R9000–R9499 Z0–Z499 R9000–R9499

Expansion relay E E0–E9999 E0–E9999 E0–E9999 (NOTE 5)


(NOTE 4) (NOTE 4) (NOTE 4)

Message display A
- Display request A0–A249 A0–A249 A0–A499 A0–A249
- Display status A9000–A9249 A9000–A9249 9000–A9499 A9000–A9249
Timer T
- Variable timer T0–T79 T0–T499 T0–T999 T0–T79
- For variable timer T9000–T9079 T9000–T9499 T9000–T9999 T9000–T9079
precision (NOTE 3)
Counter C
- Variable counter C0–C79 C0–C399 C0–C799 C0–C79
- Constant counter C5000–C5039 C5000–C5199 C5000–C5399 C5000–C5039
Keep relay K
- User area K0–K19 K0–K99 K0–K199 K0–K19
- System area K900–K999 K900–K999 K900–K999 K900–K999
Data table D D0–D2999 D0–D9999 D0–D19999 D0–D2999

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 425/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
1 PMC used for the dual check safety function (optional). For details, refer to the "Dual
Check Safety CONNECTION MANUAL" (B-64003EN).
2 Area reserved for the PMC management software. No I/O can be allocated to this
area. User programs cannot use this area.
3 Area used to set the timer precision of the variable timer.
- Do not change the set time or precision setting during operation of the timer.
(Continuing to write the same value is allowed.)
- The precision setting must fall within the following specified range.
- If the above rules are not observed, normal timer operation is not guaranteed.
- The areas other than T9000 to T9499 are reserved by FANUC.
The correspondence between the precision settings and the values that can be
written to T9000 is shown below.
0: Default (8 msec / 48 msec)
1: 1 msec
2: 10 msec
3: 100 msec
4: 1 sec
5: 1 min
4 Shared memory for the multipath PMC function. Multiple programs can read and
write the same value using this memory.
5 The PMC for Dual Check Safety has no expansion relay.

It is impossible to write data to all areas of addresses F and X, R9000 to R9099,


R9118 to R9199, and K0017 to K0019. Addresses G1xxx and F1xxx are the I/O
area for the second path and addresses G2xxx and F2xxx are the I/O area for the
third path. Address Z is valid only for PMC memory C.

Table 5.3 (273) PMC Data Referenceable Areas (Series 30i/–B)


1st to 5th PMC (For 0i-F, up to the 3rd PMC are available.) DCS PMC
Signal type Symbol
PMC memory A PMC memory B PMC memory C PMC memory D (NOTE 1)
Input signal from X X0–X127 X0–X127 X0–X127 X0–X127 X0–X127
machine to PMC X200–X327 X200–X327 X200–X327 X200–X327
X400–X527 X400–X527 X400–X527 X400–X527
X600–X727 X600–X727 X600–X727 X600–X727
X1000–X1127 X1000–X1127 X1000–X1127 X1000–X1127
(NOTE 2) (NOTE 2) (NOTE 2) (NOTE 2)
Output signal Y X0–X127 X0–X127 X0–X127 X0–X127 Y0–Y127
from PMC to X200–X327 X200–X327 X200–X327 X200–X327
machine X400–X527 X400–X527 X400–X527 X400–X527
X600–X727 X600–X727 X600–X727 X600–X727
X1000–X1127 X1000–X1127 X1000–X1127 X1000–X1127
(NOTE 2) (NOTE 2) (NOTE 2) (NOTE 2)
Input signal from F F0–F767 F0–F767 F0–F767 F0–F767 F0–F767
CNC to PMC F1000–F1767 F1000–F1767 F1000–F1767 F1000–F1767
F2000–F2767 F2000–F2767 F2000–F2767 F2000–F2767
F3000–F3767 F3000–F3767 F3000–F3767 F3000–F3767
F4000–F4767 F4000–F4767 F4000–F4767 F4000–F4767
F5000–F5767 F5000–F5767 F5000–F5767 F5000–F5767

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 426/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

F6000–F6767 F6000–F6767 F6000–F6767 F6000–F6767


F7000–F7767 F7000–F7767 F7000–F7767 F7000–F7767
F8000–F8767 F8000–F8767 F8000–F8767 F8000–F8767
F9000–F9767 F9000–F9767 F9000–F9767 F9000–F9767
Output signal G G0–G767 G0–G767 G0–G767 G0–G767 G0–G767
from PMC to CNC G1000–G1767 G1000–G1767 G1000–G1767 G1000–G1767
G2000–G2767 G2000–G2767 G2000–G2767 G2000–G2767
G3000–G3767 G3000–G3767 G3000–G3767 G3000–G3767
G4000–G4767 G4000–G4767 G4000–G4767 G4000–G4767
G5000–G5767 G5000–G5767 G5000–G5767 G5000–G5767
G6000–G6767 G6000–G6767 G6000–G6767 G6000–G6767
G7000–G7767 G7000–G7767 G7000–G7767 G7000–G7767
G8000–G8767 G8000–G8767 G8000–G8767 G8000–G8767
G9000–G9767 G9000–G9767 G9000–G9767 G9000–G9767
Input signal from M M0–M767 M0–M767 M0–M767 M0–M767
other PMC path
Output signal to N N0–N767 N0–N767 N0–N767 N0–N767
other PMC path
Internal relay R R0–R1499 R0–R7999 R0–R15999 R0–R59999 R0–R1499
System relay R/Z R9000–R9499 R9000–R9499 Z0–Z499 Z0–Z499 R9000–R9499
Expansion relay E E0–E9999 E0–E9999 E0–E9999 E0–E9999 (NOTE 4)
(NOTE 3) (NOTE 3) (NOTE 3) (NOTE 3)
Message display A
- Display request A0–A249 A0–A249 A0–A499 A0–A749 A0–A249
- Display status A9000–A9249 A9000–A9249 A9000–A9499 A9000–A9749 A9000–A9249
Timer T
- Variable timer T0–T79 T0–T499 T0–T999 T0–T999 T0–T79
- For variable T9000–T9079 T9000–T9499 T9000–T9999 T9000–T9999 T9000–T9079
timer precision
(NOTE 2)
Counter C
- Variable counter C0–C79 C0–C399 C–C799 C0–C1199 C0–C79
- Constant C5000–C5039 C5000–C5039 C5000–C5039 C5000–C5599 C5000–C5039
counter
Keep relay K
- User area K0–K19 K0–K99 K0–K199 K0–K299 K0–K19
- System area K900–K999 K900–K999 K900–K999 K900–K999 K900–K999
Data table D D0–D2999 D0–D9999 D0–D19999 D0–D59999 D0–D2999
(NOTE 5) (NOTE 5)

Example of specifying arguments


(1) Reading "250" from D0100 (Word type data)
Type of PMC address "9"
Type of PMC data "1"
Start PMC address "100"
End PMC address "101"
Data block length 8+2×1 (=10)
PMC data (word type) "250"

(2) Reading R0200 through R0209 (Byte type data)


Type of PMC address "5"
Type of PMC data "0"
Start PMC address "200"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 427/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

End PMC address "209"


Data block length 8+1×10(=18)
PMC data (byte type) (0 to 9) Contents of R0200 through R0209 will be stored.

NOTE
1 PMC used for the dual check safety function (optional). For details, refer to the "Dual
Check Safety CONNECTION MANUAL" (B-64003EN).
2 Area used to set the timer precision of the variable timer.
- Do not change the set time or precision setting during operation of the timer.
(Continuing to write the same value is allowed.)
- The precision setting must fall within the following specified range.
- If the above rules are not observed, normal timer operation is not guaranteed.
- The areas other than T9000 to T9499 are reserved by FANUC.
The correspondence between the precision settings and the values that can be
written to T9000 is shown below.
0: Default (8 msec / 48 msec)
1: 1 msec
2: 10 msec
3: 100 msec
4: 1 sec
5: 1 min
3 Shared memory for the multipath PMC function. Multiple programs can read and
write the same value using this memory.
4 The PMC for Dual Check Safety has no expansion relay.
5 To use two or more PMC memory-C paths or one PMC memory-D path, specify the
option “Nonvolatile PMC data table area expansion (40KB).” If this option is not
specified, data at D10000 and subsequent addresses is not saved.
[Example]
When Identification code = 5 (R), Type of PMC data = 0 (Byte type), Start PMC address = 200, End PMC
address = 209, and Data block
length = 8+1*10

ret = pmc_rdpmcrng(5 0,200,209 ,8+1*10)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.2 Outputting arbitrary PMC data (output range specification)

[Function]
pmc_wrpmcrng
[Syntax with arguments]
pmc_wrpmcrng(length, type_a, type_d, datano_s, datano_e, data)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 428/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (274) Arguments of the pmc_wrpmcrng Function


Name Type Description
length Numerical value Data block length
When the type of PMC data is "0" (byte type) : length = 8 + N
When the type of PMC data is "1" (word type) : length = 8 + N × 2
When the type of PMC data is "2" (long type) : length = 8 + N × 4
* N is the number of data items to be written.
type_a Numerical value PMC address type
For details on the value, refer to "Inputting arbitrary PMC data (input
range specification)."
type_d Numerical value Type of PMC data
For details on the setting value, see “Type of PMC data.”
datano_s Numerical value Start PMC address
Specifies the PMC address number at which the write operation is
started.
For details on the value, refer to "Inputting arbitrary PMC data (input
range specification)."
datano_e Numerical value End PMC address
Specifies the PMC address number at which the write operation is
ended.
For details on the value, refer to "Inputting arbitrary PMC data (input
range specification)."
data Array of N PMC data
elements (N is
the number of
data items to be
written)

Table 5.3 (275) Type of PMC Data


Setting value Type of PMC data Byte size
0 Byte 1
1 Word 2
2 2-word type 4

[Return]
Details of the return values are as shown below.

Table 5.3 (276) Return Value of the pmc_wrpmcrng Function


Type Description
Numerical Return value of the function
value EW_OK
Successful
EW_NOPMC
No PMC is present.
EW_LENGTH
The specified data block length is invalid.
EW_RANGE
The specified PMC address numbers (start PMC address, end PMC address) are invalid.
EW_ATTRIB
Incorrect kind of PMC address "adr_type" or type of PMC data "data_type".
EW_PASSWD
Data in the specified range is protected and cannot be read.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 429/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Writes the PMC data at the specified PMC address or in the specified address range.
This function is used to read or write data between an application program and PMC ladder software.

Example of specifying arguments


(1) Writing "250" into D0100 (Word type data)
Type of PMC address "9" or "D"
Type of PMC data "1"
Start PMC address "100"
End PMC address "101"
Data block length 8+2×1 (=10)
PMC data (word type) "250"

(2) Writing "0" into R0200 to R0209 (Byte type data)


Type of PMC address "5" or "R"
Type of PMC data "0"
Start PMC address "200"
End PMC address "209"
Data block length 8+1×10(=18)
PMC data (byte type) "0" for all

CAUTION
Use sufficient care when writing a PMC signal.
There is a possibility that the NC may run with the wrong PMC signal. In this case, it
may cause unexpected machine behavior, and tools, machines or workpieces may
be damaged.
You have to make sure that writing the PMC signal is safe and correct when doing
so.

[Example]
When Data block length = 8+1×2 (=10), Type of PMC address = 9 (data table), Type of PMC data = 1
(word type), Start PMC address = 100, End PMC address = 101, and PMC data (word type) = 250

ret = pmc_wrpmcrng( 8+1*2, 9 ,1, 100, 101, [[250]])


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.3 Getting the unit type of the PMC currently being operated

[Function]
pmc_get_current_pmc_unit
[Syntax with arguments]
pmc_get_current_pmc_unit()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 430/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (277) Value to Be Stored in the Return Value of the pmc_get_current_pmc_unit Function
Element Type Description
1st element Numerical Execution result
value EW_OK
Successful
EW_NOPMC
No PMC is present.
2nd element Numerical Unit type of the current PMC
value For details on the value, see Table "Unit type of PMC (Series 30i/31i/32i-A)" and
"Unit type of PMC (Series 30i/31i/32i/35i-B, Series 0i-F, PMi-A)."

Table 5.3 (278) Unit Type of PMC (Series 30i/31i/32i-A)


Value Unit type
0 No PMC
PMCUNIT_PMC1(1) 1st PMC
PMCUNIT_PMC2(2) 2nd PMC
PMCUNIT_PMC3(3) 3rd PMC
PMCUNIT_DCS(9) Dual check safety PMC

Table 5.3 (279) Unit Type of PMC (Series 30i/31i/32i/35i-B, Series 0i-F, PMi-A)
Value Unit type
0 No PMC
PMCUNIT_PMC1(1) 1st PMC
PMCUNIT_PMC2(2) 2nd PMC
PMCUNIT_PMC3(3) 3rd PMC
PMCUNIT_PMC4(4) 4th PMC
PMCUNIT_PMC5(5) 5th PMC
PMCUNIT_DCS(9) Dual check safety PMC
[Description]
Gets the unit type of the PMC currently being operated.
[Example]
To get the unit type of the PMC currently being operated:

ret = pmc_get_current_pmc_unit ()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.4 Getting the number of PMC paths

[Function]
pmc_get_number_of_pmc
[Syntax with arguments]
pmc_get_number_of_pmc()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 431/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (280) Value to Be Stored in the Return Value of the pmc_get_number_of_pmc Function
Element Type Description
1st element Numerical value Execution result
EW_OK
Successful
2nd element Numerical value Number of PMC paths
[Description]
Gets the number of existing PMC paths (units).
[Example]
To get the number of PMC paths:

ret = pmc_get_number_of_pmc()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.5 Getting PMC unit types

[Function]
pmc_get_pmc_unit_types
[Syntax with arguments]
pmc_get_pmc_unit_types()
[Arguments]
None
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (281) Value to Be Stored in the Return Value of the pmc_get_pmc_unit_types Function
Element Type Description
1st element Numerical value Execution result
EW_OK
Successful
2nd element Numerical value Unit type of the PMC
At present, information is returned for up to four PMC paths.
The number of PMC paths can be acquired by the
pmc_get_number_of_pmc function.
For details on the possible values, see Table "Unit type of PMC (Series
30i/31i/32i-A)" and "Unit type of PMC (Series 30i/31i/32i/35i-B, Series 0i-F,
PMi-A)" shown below.
If this array is referenced with a PMC path number specified as an index, the
unit type of the PMC can be acquired.
3rd element Numerical value Number of elements (paths) that actually store information

Table 5.3 (282) Unit Type of PMC (Series 30i/31i/32i-A)


Value Unit type
0 No PMC
PMCUNIT_PMC1(1) 1st PMC
PMCUNIT_PMC2(2) 2nd PMC
PMCUNIT_PMC3(3) 3rd PMC
PMCUNIT_DCS(9) Dual check safety PMC

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 432/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (283) Unit Type of PMC (Series 30i/31i/32i/35i-B, Series 0i-F, PMi-A)
Value Unit type
0 No PMC
PMCUNIT_PMC1(1) 1st PMC
PMCUNIT_PMC2(2) 2nd PMC
PMCUNIT_PMC3(3) 3rd PMC
PMCUNIT_PMC4(4) 4th PMC
PMCUNIT_PMC5(5) 5th PMC
PMCUNIT_DCS(9) Dual check safety PMC
[Description]
Gets the PMC unit types of a multi-PMC system.
[Example]
To get PMC unit types:

ret = pmc_get_pmc_unit_types()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.6 Reading data from the extended nonvolatile memory.

[Function]
pmc_rdkpm
[Syntax with arguments]
pmc_rdkpm(offset, length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (284) Arguments of the pmc_rdkpm Function


Name Type Description
offset Numerical value Specifies the read start address.
The beginning of extended nonvolatile memory is indicated by 0.
length Numerical value Specifies the size of data to be read.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (285) Value to Be Stored in the Return Value of the pmc_rdkpm Function
Element Type Description
1st element Numerical value Execution result
EW_OK
Successful
EW_NOPMC
No PMC is present.
EW_LENGTH
The data block length (length) is specified incorrectly.
EW_RANGE
Address range error
The input start address (offset) specification is invalid.
EW_NOOPT

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 433/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


There is no option for extended nonvolatile memory.
2nd element String Data that has been read
Up to 65535 bytes
[Description]
Reads the amount of data in the extended nonvolatile memory specified by "length" from the address
specified by "offset".
The read data is stored in the area specified by "data" in the same format as in the PMC.
[Example]
When Read start address = 0 and Size of data to be read = 10:

ret = pmc_rdkpm(0, 10)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.7 Writing data to the extended nonvolatile memory

[Function]
pmc_wrkpm
[Syntax with arguments]
pmc_wrkpm(offset , data, length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (286) Arguments of the pmc_wrkpm Function


Name Type Description
offset Numerical value Write start address
The beginning of extended nonvolatile memory is indicated by 0.
data String Data to be written
Up to 65535 bytes
length Numerical value Size of data to be written
[Return]
Details of the return values are as shown below.

Table 5.3 (287) Value to Be Stored in the Return Value of the pmc_wrkpm Function
Type Description
Numerical Return value of the function
value EW_OK
Successful
EW_NOPMC
No PMC is present.
EW_LENGTH
The data block length (length) is specified incorrectly.
EW_RANGE
Address range error
The output start address (offset) specification is invalid.
EW_NOOPT
There is no option for extended nonvolatile memory.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 434/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Writes the amount of data in the extended nonvolatile memory specified by "length" from the address
specified by "offset".
The data is stored in the area specified by "data" in the same format as in the PMC.

9.8 Reading the maximum size of the extended nonvolatile memory

[Function]
pmc_kpmsiz
[Syntax with arguments]
pmc_kpmsiz()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (288) Value to Be Stored in the Return Value of the pmc_kpmsiz Function
Element Type Description
1st element Numerical value Execution result
EW_OK
Successful
EW_NOPMC
No PMC is present.
EW_ATTRIB
There is no option for extended nonvolatile memory.
2nd element Numerical value Maximum size
[Description]
Reads the maximum size of the extended nonvolatile memory.
[Example]
To read the maximum size of the extended nonvolatile memory:

ret = pmc_kpmsiz()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.9 Getting PMC address information

[Function]
pmc_rdpmcinfo
[Syntax with arguments]
pmc_rdpmcinfo(adr_type)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 435/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (289) Arguments of the pmc_rdpmcinfo Function


Name Type Description
adr_type Numerical PMC address type
value G:0, F:1, Y:2, X:3, A:4, R:5, T:6, K:7, C:8, D:9, E:12, Z:13, all types: -1
* PMC memory type Z is valid only for PMC memory C.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (290) Return Value of the pmc_rdpmcinfo Function


Element Type Description
1st element Numerical Return value of the function
value EW_OK
Successful
EW_LENGTH
Address type error. (The adr_type value is illegal.)
2nd element Array of 2 PMC data
elements For details on the PMC data, see the following "PMC data."

Table 5.3 (291) PMC Data


Element Type Description
1st element Numerical value PMC data information count (1 to 64)
* The same PMC address may be divided into multiple
sections.
2nd element Array of N Array of PMC data information (up to 64 items)
elements (N is the For details on the value, see “Details of PMC Data Information”
PMC data shown below.
information count)

Table 5.3 (292) Details of PMC Data Information


Element Type Description
1st element String PMC address type
Character representing a PMC address type (ASCII code)
2nd element Numerical value PMC address attribute
#7 … 0: Write protection enabled
1: Write protection disabled
#0 to #6 … Not used
3rd element Numerical value PMC address start number
4th element Numerical value PMC address end number
[Description]
Reads the PMC address attribute for each type and PMC address information of the valid range.
All data information is stored in binary format.
[Example]
When Type of PMC address = 1 ("F"):

ret = pmc_rdpmcinfo (1)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 436/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

9.10 Starting reading of PMC parameters

[Function]
pmc_rdprmstart
[Syntax with arguments]
pmc_rdprmstart()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (293) Return Value of the pmc_rdprmstart Function


Type Description
Numerical Return value of the function
value EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_BUSY
This function or the pmc_wrprmstart function has already been executed.
Or, PMC parameters are being read or written by another function.
EW_MODE
The CNC is not in EDIT mode.
[Description]
This function starts reading PMC parameters.
PMC parameters can be read by the pmc_rdpmcparam function.
The basic procedure for reading PMC parameters is as follows.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 437/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 5.3 (e) Procedures from Starting PMC Parameter Reading to Ending it

NOTE
Select the target PMC number in advance by using the pmc_select_pmc_unit
function.

9.11 Reading PMC parameters

[Function]
pmc_rdpmcparam
[Syntax with arguments]
pmc_rdpmcparam(length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (294) Arguments of the pmc_rdpmcparam Function


Name Type Description
length Numerical value Number of characters to be read
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 438/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (295) Return Value of the pmc_rdpmcparam Function


Element Type Description
1st element Numerical value Return value of the function
EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_RESET
There is no data to read. Execute the pmc_rdprmend function.
EW_FUNC
The pmc_rdprmstart function has not been executed.
EW_LENGTH
A value of 0 or less was specified in the argument "length".
EW_PATH
The PMC unit type has been changed.
EW_MODE
The CNC is not in EDIT mode.
2nd element Numerical value Number of characters actually read
3rd element String PMC parameters that have been read
This function reads PMC parameters in text format.
[Description]
This function reads PMC parameters in text format.
Set the CNC to EDIT mode when this function is executed.
This function reads the desired number of characters. However, if there is less readable data than the
specified number of characters because of a delay in the processing on the CNC side, as much data as
possible is read and that number of characters is actually read.
When all PMC parameters are read, EW_RESET is returned to the 1st element of the return value array. In
this case, end reading PMC parameters by executing the pmc_rdprmend function.

NOTE
Judge the final execution result of reading PMC parameters based on the return
value of the pmc_rdprmend function.

PMC parameters are read and written in text format.


The details on the text format of PMC parameters are as follows.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 439/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 5.3 (f) Text Format for PMC Parameters

NOTE
1 The header is 30i-B: (PMC=30I-B, MSID=1) only.
2 The header is as follows by PMC unit type.
1st PMC: PMC=30I-B, MSID=1)
2nd PMC: (PMC=30I-B, MSID=2)
3rd PMC: (PMC=30I-B, MSID=3)
Dual check safety PMC: (PMC=30I-B,MSID=9)
3 When characters cannot be read up to the EOB with the specified argument length,
the data up to the data that cannot be read is read.
[Example]
When the number of characters to be read is "10":

ret = pmc_rdpmcparam(10)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.12 Ending reading of parameters

[Function]
pmc_rdprmend
[Syntax with arguments]
pmc_rdprmend()

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 440/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (296) Return Value of the pmc_rdprmend Function


Type Description
Numerical Return value of the function
value EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_FUNC
The pmc_rdprmstart function has not been executed.
EW_PATH
The PMC unit type has been changed.
EW_MODE
The CNC is not in EDIT mode.
[Description]
This function ends the reading of PMC parameters.
After all PMC parameters are completely read by the pmc_rdpmcparam function, it is possible to execute
this function in a mode other than EDIT mode.
However, if the pmc_rdpmcparam function returns EW_MODE or EW_PATH while reading PMC
parameters, this function returns the same value.

9.13 Starting writing of PMC parameters

[Function]
pmc_wrprmstart
[Syntax with arguments]
pmc_wrprmstart()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (297) Return Value of the pmc_wrprmstart Function


Type Description
Numerical Return value of the function
value EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_BUSY
This function or the prm_rdprmstart function has already been executed.
Or, PMC parameters are being read or written by another function.
EW_PARAM
Bit 0 (PWE) of parameter No.8900#0 is set to 0.
EW_REJECT
The CNC is not in the emergency stop status.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 441/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
This function starts writing PMC parameters.
PMC parameters can be written by the pmc_wrpmcparam function.
The basic procedure for writing PMC parameters is as follows.

Fig. 5.3 (g) Procedures from Starting PMC Parameters Writing to Ending it

NOTE
Select the target PMC number in advance by using the pmc_select_pmc_unit
function.

CAUTION
Use sufficient care when writing PMC parameters.
There is a possibility that the NC may run with the wrong PMC parameters. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the PMC parameters is safe and correct when
doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 442/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

9.14 Writing PMC parameters

[Function]
pmc_wrpmcparam
[Syntax with arguments]
pmc_wrpmcparam (length, buf )
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (298) Arguments of the pmc_wrpmcparam Function


Name Type Description
length Numerical value Number of characters to be written
buf String PMC parameters to be written
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (299) Return Value of the pmc_wrpmcparam Function


Element Type Description
1st Numerical Return value of the function
element value EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_RESET
All PMC parameters have been written. Execute the pmc_wrprmend function.
EW_FUNC
The pmc_wrprmstart function has not been executed.
EW_LENGTH
A value of 0 or less was specified in the argument "length".
EW_DATA
The writing format is illegal.
Execute the pmc_getdtailerr function to get the detailed information for this
return value.
A detailed status listed in "Detail status and description" is set in “Detail
status” in the return value array. Moreover, the block number including illegal
data (0 or greater) is set in "Error data number" in the return value array.
W_PARAM
Bit 0 (PWE) of parameter No.8900#0 is set to 0.
W_PATH
The PMC unit type has been changed.
W_REJECT
The NC is not in the emergency stop status.
2nd Numerical The number of characters that have actually been written
element value

Table 5.3 (300) Detail Status and Description


Detailed status Description
1 The first character immediately after the beginning is not "%;".
2 The end of character strings is not “;” (0x0A) or “%”.
3 The block after “%;” (second block) is not header information.
4 The model name in the header information and the actual model are different.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 443/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5 The punctuation character in the model name and ID information in the header
information is not a comma “,”.
6 Character strings of ID information in the header information is not “MSID=”.
7 The ID number is different from the PMC unit type at the start.
8 The final character in the header information is not ")".
9 The start of the parameter block is not "N".
10 The address number of the parameter block is invalid (6 digits or less).
11 The address number of the parameter block is invalid.
(When the beginning of the N number is not "6")
12 The third character of the parameter block is not 0, 1, 2, 3, 4, or 9.
13 A block of group information that is larger than the total number of groups is specified.
14 The data table control information is illegal (unavailable number).
15 The beginning of character strings of setting values in parameter blocks is not “P”.
16 A character that is not a number is included in the data of the setting value
(Format of the setting value is illegal).
17 The number of characters of the bit pattern is not 8
(Format of the setting value is illegal).
18 Address range error
19 The total number of data table control information items is illegal.
20 The data table control information is illegal.
[Description]
This function writes PMC parameters in text format.
To execute this function, set 1 to bit 0 (PWE) of parameter No.8900#0 and put the CNC in the emergency
stop status.
This function writes the number of characters specified by the length argument. However, if less space is
available in the buffer for the data transfer to the CNC than the specified number of characters, the data for
the available space is output, and the number of characters is set in the length argument.

NOTE
Judge the final execution result of writing PMC parameters based on the return
value of the pmc_wrprmend function.

PMC parameters are read and written in text format.


The details on the text format of PMC parameters are as follows.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 444/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 5.3 (h) Text Format for PMC Parameters

NOTE
1 The header is 30i-B: (PMC=30I-B, MSID=1) only.
2 The header is as follows by PMC unit type.
1st PMC: (PMC=30I-B,MSID=1)
2nd PMC: (PMC=30I-B,MSID=2)
3rd PMC: (PMC=30I-B,MSID=3)
Dual check safety PMC: (PMC=30I-B,MSID=9)

CAUTION
Use sufficient care when writing PMC parameters.
There is a possibility that the NC may run with the wrong PMC parameters. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the PMC parameters is safe and correct when
doing so.
[Example]
When the PMC parameters to be written are as follows:
%
(PMC=30I-B,MSID=1)
N600000 P0
N600002 P0
%
param = "%¥n(PMC=30I-B,MSID=1) ¥nN600000 P0 ¥nN600002 P0 ¥n%"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 445/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

ret= pmc_wrpmcparam(param.size, param)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

9.15 Ending writing of PMC parameters

[Function]
pmc_wrprmend
[Syntax with arguments]
pmc_wrprmend()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (301) Return Value of the pmc_wrprmend Function


Type Description
Numerical Return value of the function
value EW_OK
Successful.
EW_VERSION
PMC management software is not available for this function.
EW_FUNC
The pmc_wrprmstart function has not been executed.
EW_DATA
The writing format is illegal.
EW_PARAM
Bit 0 (PWE) of parameter No.8900#0 is set to 0.
EW_PATH
PMC unit type has been changed.
EW_REJECT
The CNC is not in the emergency stop status.
[Description]
This function ends the writing of PMC parameters.
It is possible to execute this function even if bit 0 (PWE) of parameter No.8900#0 is set to 0 and the CNC
is not in the emergency stop status.
However, if the pmc_wrpmcparam function returns EW_DATA, EW_PARAM, EW_PATH, or
EW_REJECT while writing PMC parameters, this function returns the same value.

CAUTION
Use sufficient care when writing PMC parameters.
There is a possibility that the NC may run with the wrong PMC parameters. In this
case, it may cause unexpected machine behavior, and tools, machines or
workpieces may be damaged.
You have to make sure that writing the PMC parameters is safe and correct when
doing so.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 446/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

9.16 Getting PMC error details

[Function]
pmc_getdtailerr
[Syntax with arguments]
pmc_getdtailerr()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (302) Return Value of the pmc_getdtailerr Function


Element Type Description
1st element Numerical value Return value of the function
EW_OK
Successful.
2nd element Array of 2 elements Detailed information of the error
For details on the value, see the following “Detailed Error
Information.”

Table 5.3 (303) Detailed Error Information


Element Type Description
1st element Numerical value Detailed status
2nd element Numerical value Error data number
[Description]
This function gets the detailed information on the error that occurs when functions for PMC are executed.
The detailed information on the obtained error is stored in "Detail status" and "Error data number" in
"Error detailed information."
The stored value is different in each function. Refer to the function references of each function.
[Example]
To get the error details for PMC:

ret = pmc_getdtailerr()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 447/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[File operation library function reference]

10.1 Mounting memory cards / USB memory devices

[Function]
aux_file_mount
[Syntax with arguments]
aux_file_mount(drive)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (304) Arguments of the aux_file_mount Function


Name Type Description
drive String Drive name (B, C, or D)
When a memory card is used, specify "B" or "C" for the drive name. When a USB
memory device is used, specify "D" for the drive name.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (305) Value to Be Stored in the Return Value of the aux_file_mount Function
Element Type Description
1st element Numerical Result of mounting the memory card
value Returns 0 if the memory card or USB memory device was successfully mounted.
If it fails, a nonzero value is returned.
2nd element Numerical Detailed error (valid only when the 1st element is not "0")
value For details on the value, see "Detailed error value of the aux_file_mount
function" shown below.

Table 5.3 (306) Detailed Error Value of the aux_file_mount Function


Constant Value Meaning
ENOTMOUNT 200 Failed to mount.
ENOTINSERT 201 No memory card inserted.
EBATVOLDEC 202 Battery voltage is low.
ENOTSRAM 205 Inserted card not supported.
EDRIVENAME 204 Invalid drive name.
EAUTHREJ 206 Other software is already using the memory card slot.
[Description]
This function mounts the memory card or USB memory device.
Don't remove or reinsert the memory card or USB memory device after calling this function.
Use the aux_file_memcinfo function for a memory card and the aux_file_usbinfo function for a USB
memory device to check whether it is write-protected or not.
When mounting a memory card, the drive to which the memory card is assigned (B: or C:) depends on the
CNC monitor, monitor size, integrated type / stand-alone type, memory card slot used, and parameter
settings (No.300#0). For details, refer to "Using the drive on PC" in "C Language Executor Function" of C
Language Executor Programming Manual (B-63943EN-3).
[Example]
To mount and unmount the memory card:
When functions from aux_file_mount() to aux_file_unmount() are being executed, the mounted memory
card is accessible.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 448/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

aux_file_mount("B")
# Accessible to drive "B"
aux_file_ unmount ("B")

10.2 Unmounting memory cards / USB memory devices

[Function]
aux_file_unmount

[Syntax with arguments]


aux_file_unmount(drive)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (307) Arguments of the aux_file_unmount Function


Name Type Description
drive String Drive name (B, C, or D)
When a memory card is used, specify "B" or "C" for the drive name. When a USB
memory device is used, specify "D" for the drive name.
[Return]
Details of the return values are as shown below.

Table 5.3 (308) Value to Be Stored in the Return Value of the aux_file_unmount Function
Element Type Description
1st Numerical Result of unmounting the memory card
element value Returns 0 if the memory card or USB memory device was successfully
unmounted. If it fails, a nonzero value is returned.
2nd Numerical Detailed error (valid only when the 1st element is not "0")
element value For details on the value, see "Detailed error value of the aux_file_unmount
function" shown below.

Table 5.3 (309) Detailed Error Value of the aux_file_unmount Function


Constant Value Meaning
ENOTMOUNT 200 Failed to mount.
ENOTINSERT 201 No memory card inserted.
EBATVOLDEC 202 Battery voltage is low.
ENOTSRAM 205 Inserted card not supported.
EDRIVENAME 204 Invalid drive name.
EAUTHREJ 206 Other software is already using the memory card slot.
[Description]
This function unmounts the memory card or USB memory device.
When unmounting a memory card, the drive to which the memory card is assigned (B: or C:) depends on
the CNC monitor, monitor size, integrated type / stand-alone type, memory card slot used, and parameter
setting (No.300#0). For details, refer to "Using the drive on PC" in "C Language Executor Function" of C
Language Executor Programming Manual (B-63943EN-3).
[Example]
For an example, refer to "Example" in "Mounting memory cards."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 449/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

10.3 Getting memory card information

[Function]
aux_file_memcinfo
[Syntax with arguments]
aux_file_memcinfo()
[Arguments]
None
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (310) Value to Be Stored in the Return Value of the aux_file_memcinfo Function
Element Type Description
1st element Numerical Return value of the function
value Returns 0 if the memory card information was successfully obtained. Returns a
value other than 0 upon fail.
2nd element Numerical Memory card information
value bit 0 = 0: Memory card is inserted.
1: Memory card is not inserted.
bit 1 = 0: Writable.
1: Write-protected.
bit 5, bit 4, bit 3 For determining the memory card type
0, 0, 1 Flash ATA card, compact flash card
bit 6 – bit 31 are undefined.
[Description]
Reads the memory card information.
Call this function after mounting the memory card (using the aux_file_mount function).
When mounting a memory card, the drive to which the memory card is assigned (B: or C:) depends on the
CNC monitor, monitor size, integrated type / stand-alone type, memory card slot used, and parameter
setting (No.300#0). For details, refer to "Using the drive on PC" in "C Language Executor Function" of C
Language Executor Programming Manual (B-63943EN-3).
[Example]
To get the memory card information:

aux_file_mount("B")
ret=aux_file_memcinfo()
if ret[0] == 0 then
if ret[1] and 0x01 == 0 then
MsgBoxShow("exist memory card", 0)
end
end
aux_file_unmount("B")

10.4 Getting the state of the USB memory device

[Function]
aux_file_usbinfo
[Syntax with arguments]
aux_file_usbinfo()

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 450/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
None
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (311) Value to Be Stored in the Return Value of the aux_file_usbinfo Function
Element Type Description
1st element Numerical value Return value of the function
Returns zero if successful. Returns a value other than 0 upon fail.
2nd element Numerical value State of the USB memory device
bit 0 = 0: USB memory device is inserted.
1: USB memory device is not inserted.
bit 1 – bit 5 are undefined.
bit 6 = 0: USB memory device can be removed.
1: USB memory device cannot be removed (USB memory device is
being accessed).
bit 7 = 0: USB memory device can be used.
1: USB memory device cannot be used. (Unrecoverable error)
bit 8 – bit 31 are undefined.
[Description]
Gets the state of the USB memory device.
Execute this function after mounting the USB memory device (after execution of the aux_file_mount
function).
[Example]
To get the state of the USB memory device:

aux_file_mount("D")
ret=aux_file_usbinfo()
if ret[0] == 0 then
if ret[1] and 0x01 == 0 then
MsgBoxShow("exist usb memory card", 0)
end
end
aux_file_unmount("D")

NOTE
When an unrecoverable error occurs (bit7 = 1), it is impossible to access the USB
memory device until the power has been turned off.

10.5 Finding the first file whose attributes match the specified ones (supports up to 32 characters for file names).

[Function]
_dos_findfirst32
[Syntax with arguments]
_dos_findfirst32(filename, attrib)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 451/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (312) Arguments of the _dos_findfirst32 Function


Name Type Description
filename String Pathname of the file to be searched
attrib Numerical Attribute of a file to be searched
value For details on the value, see “File attribute.” Only the described
values can be set. If any other value is specified, it is processed as
_A_NORMAL.

Table 5.3 (313) File Attribute


Name Value Description
_A_NORMAL 0x00 Normal file
_A_RDONLY 0x01 Read only
_A_HIDDEN 0x02 Hidden file
_A_SYSTEM 0x04 System file
_A_SUBDIR 0x10 Subdirectory
_A_ARCH 0x20 Archive
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (314) Value to Be Stored in the Return Value of the _dos_findfirst32 Function
Element Type Description
1st element Numerical value Execution result
0: Successful.
If it is not 0, one of the following values is returned:
In addition, ENOENT is set to the 2nd element, indicating that
filename does not match.
5 No USB memory device is inserted.
6 No USB memory device is mounted.
9 The specified drive name is invalid.
15 No file or directory with the specified attribute found.
22 The specified file name is invalid.
31 The specified path is invalid.
2nd element Numerical value Error code (valid only when the 1st element is not "0")
3rd element Array of 9 File information
elements For details on the value, see “File Information” shown below.

Table 5.3 (315) File Information


Element Type Description
1st element Numerical value File attribute
For details on the value, see “File Attribute” above.
When a file has two or more attributes, the attribute of the file is
stored with the abovementioned values connected by a bit OR
operator ( | ).
2nd element Numerical value Year of creation (update) of the file
3rd element Numerical value Month of creation (update) of the file
4th element Numerical value Day of creation (update) of the file
5th element Numerical value Hour of creation (update) of the file
6th element Numerical value Minute of creation (update) of the file
7th element Numerical value Second of creation (update) of the file
8th element Numerical value File size [byte]
9th element String File name

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 452/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Searches for a file in a USB memory device. Execute this function after mounting the USB memory device
(after execution of the aux_file_mount function).
This function can only be used to search for files in a USB memory device.
[Example]
To get two items of ".txt" file information with the usual file attribute on the USB memory device (D
drive):

path = "D:¥¥*.txt" # File path


ret_firstvalues = _dos_findfirst32(path, _A_NORMAL) # Executes the search for the specified file
if ret_firstvalues[0] == 0 then # Searches for the file
ret_nextvalues = _dos_findnext32() # Executes the search for the file after the specified file
if ret_nextvalues[0] != 0 then
MsgBoxShow("ERROR", 0)
end
else
MsgBoxShow("ERROR", 0)
end

CAUTION
Even though a file name longer than 32 characters can be found when wildcards
are used with less than 32 characters, operations such as opening, searching,
and deleting cannot be done by specifying a file name that is 33 characters or
longer.

10.6 Finding the next file whose attributes match the specified ones (supports up to 32 characters for file
names).

[Function]
_dos_findnext32
[Syntax with arguments]
_dos_findnext32()
[Arguments]
None
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (316) Value to Be Stored in the Return Value of the _dos_findnext32 Function
Element Type Description
1st element Numerical value Execution result
0: Successful.
If it is not 0, one of the following values is returned:
In addition, ENOENT is set to the 2nd element.
-1 The _dos_findfirst32 function has not been executed.
5 No USB memory device is inserted.
6 No USB memory device is mounted.
15 A file or directory that has the specified attribute cannot be found.
2nd element Numerical value Error code (valid only when the 1st element is not "0")

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 453/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Array of 9 File information
elements For details on the value, see “File Information” shown below.

Table 5.3 (317) File Information


Element Type Description
1st element Numerical value File attribute
For details on the value, see “File Attribute.”
When a file has two or more attributes, the attribute of the file is
stored with the abovementioned values connected by a bit OR
operator ( | ).
2nd element Numerical value Year of creation (update) of the file
3rd element Numerical value Month of creation (update) of the file
4th element Numerical value Day of creation (update) of the file
5th element Numerical value Hour of creation (update) of the file
6th element Numerical value Minute of creation (update) of the file
7th element Numerical value Second of creation (update) of the file
8th element Numerical value File size [byte]
9th element String File name

Table 5.3 (318) File Attribute


Name Value Description
_A_NORMAL 0x00 Normal file
_A_RDONLY 0x01 Read only
_A_HIDDEN 0x02 Hidden file
_A_SYSTEM 0x04 System file
_A_SUBDIR 0x10 Subdirectory
_A_ARCH 0x20 Archive
[Description]
Searches for the file after the file searched for by the _dos_findfirst32 function in the USB memory device.
The path and attribute of the next file to be searched for are inherited from the information set by the
_dos_findfirst32 function. Refer to the method of setting arguments for the _dos_findfirst32 function.
This function can only be used to search for files in a USB memory device.
[Example]
Refer to "Finding the first file whose attributes match the specified ones (supports up to 32 characters for
file names)" (_dos_findfirst32).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 454/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
1 Execute the _dos_findnext32 function for searching for the next file when the
_dos_findfirst32 function is executed.
2 Execute the _dos_findnext function for searching for the next file when the
_dos_findfirst function is executed. When the following action has been
performed, "-1" is returned and no operations are executed for the USB memory
device:
- When executing the _dos_findfirst function before executing the
_dos_findnext32 function.
- When executing the _dos_findfirst32 function before executing the
_dos_findnext function.
3 Even though a file name longer than 32 characters can be found when wildcards
are used with less than 32 characters, operations such as opening, searching,
and deleting cannot be done by specifying a file name that is 33 characters or
longer.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 455/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Serial library function reference]

11.1 Initializing the communication device

[Function]
rs_open
[Syntax with arguments]
rs_open(channel, param, mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (319) Arguments of the rs_open Function


Name Type Description
channel Numerical Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
value
param Array Communication parameter
For details on the possible values, see “Communication Parameter” below.
mode Numerical Communication mode
value "r" receive mode
"w" send mode
"rw" send/receive mode

Table 5.3 (320) Communication Parameter


Name Type Description
baud Numerical value Baud rate
BAUD_0600 600 bits/second
BAUD_1200 1200 bits/second
BAUD_2400 2400 bits/second
BAUD_4800 4800 bits/second
BAUD_9600 9600 bits/second
BAUD_19200 19200 bits/second
stop_bit Numerical value Stop bit length
STOP_1 1 bit
STOP_2 2 bits
parity Numerical value Parity check
PARITY_N no parity check
PARITY_E even parity
PARITY_O odd parity
data_bit Numerical value Character length
DATA_7 7 bits
DATA_8 8 bits
hardflow Numerical value Hardware flow ctrl
0 not executed
1 both send and receive
2 send only
3 receive only
dc_enable Numerical value DC code flow ctrl
0 not executed
1 send and receive
2 send only
3 receive only

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 456/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


dc_put Numerical value Send DC code (not used in iHMI)
0 no
1 yes
dc1_code Numerical value Define DC1 code (usually 0x11)
dc2_code Numerical value Define DC2 code (usually 0x12) (not used in iHMI)
dc3_code Numerical value Define DC3 code (usually 0x13, for IDO code, 0x93)
dc4_code Numerical value Define DC4 code (usually 0x14) (not used in iHMI)
[Return]
Details of the return values are as shown below.

Table 5.3 (321) Value to Be Stored in the Return Value of the rs_open Function
Type Description
Numerical Return value of the function
value 0: Normal termination.
-1: Communication parameter invalid
12: The communication line is already open
13: The line cannot be opened (timed out)
[Description]
The specified communication port is initialized with the specified condition and the line is opened for data
transmission.
When "DC code flow ctrl" is selected, data transmission is controlled by the DC codes as follows.

(1) Transmission handshake


Stop or restart sending data, according to the DC code received from the destination device.

DC1 received: restart sending data is requested


DC3 received: stop sending data is requested

Received DC code is not passed to the application program.

(2) Receiving handshake


The DC code is used to request the source device to stop or restart sending data according to the
state of the receiving buffer.

Send DC1: request to restart sending data


Send DC3: request to stop sending data

These DC1 and DC3 codes are automatically transmitted by the serial communication driver.

If the Send DC code is set to "1", the following DC code is sent to the external device whenever the
channel is opened or closed.
In the iHMI, the DC code is not sent when the channel is opened or closed regardless of the setting.

Table 5.3 (322) DC Code to Be Sent When the Channel Is Opened/Closed


open mode when open when close
receive mode DC1 DC3
send mode DC2 DC4
send/receive mode no DC code transmitted no DC code transmitted
Application program can select one of the three communication modes, "transmit only," "receive only,"
and "transmit and receive."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 457/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(1) Transmit only mode


Only data transmission from the application program to an external device can take place in this mode.
The application program cannot use library functions for receiving data. Data other than DC codes
received from external devices are ignored.

(2) Receive only mode


Only data reception from the external device to the application program can take place in this mode.
The application program cannot use library functions for sending data. All data received from external
devices are passed to the application program.

(3) Transmit and receive mode


Data can be both sent and received in this mode. The application program can use all serial library
functions. Data code received from an external device is interpreted as follows in accordance with
the selected flow control mode.

Every parameter must have a specified value. If not, correct communication cannot take place.
If the Send DC code is set to "1" with the rs_open function, DC1 code (for receive mode) or DC2 code (for
send mode) is sent via the communication channel.
In the iHMI, the "Send DC code" setting and settings for the DC2 and DC4 codes are ignored and no code
is sent.

11.2 Terminating communication

[Function]
rs_close
[Syntax with arguments]
rs_close(channel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (323) Arguments of the rs_close Function


Name Type Description
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
Details of the return values are as shown below.

Table 5.3 (324) Value to Be Stored in the Return Value of the rs_close Function
Type Description
Numerical Return value of the function
value 0: Normal termination.
-1: Error
[Description]
Stops using the specified communication channel.
If the Send DC code is set to "1" with the rs_open function, DC3 code (for receive mode) or DC4 code (for
send mode) is sent via the communication channel.
In the iHMI, DC codes are not sent.

11.3 Putting one byte of data into the transmit buffer

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 458/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Function]
rs_putc
[Syntax with arguments]
rs_putc(c, channel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (325) Arguments of the rs_putc Function


Name Type Description
c Numerical value Output data
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
Details of the return values are as shown below.

Table 5.3 (326) Value to Be Stored in the Return Value of the rs_putc Function
Type Description
Numerical Return value of the function
value 1: Normal termination.
0: The transmit buffer is full. There is no room to accept new data.
-1: Error
[Description]
Puts one byte of data into the transmit buffer of the specified communication port.
This function outputs data to the transmit buffer. To find out if the data has actually been transmitted, read
the status of the transmit buffer with the rs_buffer function and check the vacancy of the buffer.

11.4 Getting one byte of data from the receive buffer

[Function]
rs_getc
[Syntax with arguments]
rs_getc(channel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (327) Arguments of the rs_getc Function


Name Type Description
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
Details of the return values are as shown below.

Table 5.3 (328) Value to Be Stored in the Return Value of the rs_getc Function
Type Description
Numerical Return value of the function
value Not -1 (input data): Successful
-1: Error, or there is no data in the buffer.
[Description]
Gets one byte of data from the receive buffer of the specified communication port.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 459/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

11.5 Writing block data to the communication buffer

[Function]
rs_write
[Syntax with arguments]
rs_write(buffer, size, channel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (329) Arguments of the rs_write Function


Name Type Description
buffer String output data storage area
size Numerical value output data size
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
Details of the return values are as shown below.

Table 5.3 (330) Value to Be Stored in the Return Value of the rs_write Function
Type Description
Numerical Return value of the function
value Not -1: Normal termination.
-1: Error
[Description]
Gets the specified bytes of data from the specified buffer area and puts them in the transmit buffer of the
specified port.
This function outputs data to the transmit buffer. To find out if the data has actually been transmitted, read
the status of the transmit buffer with the rs_buffer function and check the vacancy of the buffer.
※ When sending a Russian character string, specify the number of characters to be sent in "size" of the
argument.

11.6 Reading block data from the communication buffer.

[Function]
rs_read
[Syntax with arguments]
rs_read(size, channel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (331) Arguments of the rs_read Function


Name Type Description
size Numerical value output data size
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (332) Value to Be Stored in the Return Value of the rs_read Function
Element Type Description
1st element Numerical Input result

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 460/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


value Not -1: Normal termination.
-1: Error
2nd element String input data storage area
[Description]
Gets the specified bytes of data from the receive buffer of the specified port and puts them in the specified
buffer area.

11.7 Testing or manipulating the communication buffer

[Function]
rs_buffer
[Syntax with arguments]
rs_buffer(channel, cmnd)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (333) Arguments of the rs_buffer Function


Name Type Description
channel Numerical Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
value
cmnd Numerical buffer command
value RS_GET_BUF_R Returns the receive buffer size.
RS_GET_BUF_W Returns the transmit buffer size.
RS_CHK_BUF_R Returns the size of data in the receive buffer.
RS_CHK_BUF_W Returns the size of data in the transmit buffer.
RS_CLR_BUF_R Clears the receive buffer.
RS_CLR_BUF_W Clears the transmit buffer.
[Return]
Details of the return values are as shown below.

Table 5.3 (334) Value to Be Stored in the Return Value of the rs_buffer Function
Type Description
Numerical If successful:
value The RS_GET_BUF_R and RS_GET_BUF_W commands return the buffer size.
The RS_CHK_BUF_R and RS_CHK_BUF_W commands return the size of the data in the
buffer.
The RS_CLR_BUF_R and RS_CLR_BUF_W commands return zero.
If there is an error:
-1
[Description]
Tests or clears the specified buffer of the specified port.
For a standard monitor, 256 bytes is returned as the buffer size. For the iHMI, 4096 bytes is returned.

11.8 Getting the status of the communication line and buffer

[Function]
rs_status
[Syntax with arguments]
rs_status(channel)
FANUC PICTURE Specification
Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 461/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (335) Arguments of the rs_status Function


Name Type Description
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
[Return]
Details of the return values are as shown below.

Table 5.3 (336) Value to Be Stored in the Return Value of the rs_status Function
Type Description
Numerical Status of the communication line and communication buffer:
value 0x8000 transmission stopped(send)
0x4000 (reserved) (send)
0x2000 Buffer full (send)
0x1000 (reserved) (send)
0x0800 receiving stopped (receive)
0x0400 (reserved) (receive)
0x0200 Buffer empty (receive)
0x0100 Buffer overrun (receive)
0x0080 DR ON
0x0040 (reserved)
0x0020 Framing error
0x0010 Overrun error
0x0008 Parity error
0x0004 (reserved)
0x0002 (reserved)
0x0001 (reserved)
[Description]
Gets the status information of the communication interface and communication buffers of the specified
port.

11.9 Waiting for a communication event

[Function]
rs_wait
[Syntax with arguments]
rs_wait(channel, param, mode, time_out)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (337) Arguments of the rs_wait Function


Name Type Description
channel Numerical value Channel number. (= 1, 2) (For iHMI, COM port numbers 1 to 256)
param Numerical value The number of data characters or a character code
According to the mode setting, either the number of data characters or a
character code should be specified.
rtx_size number of data characters in the receive buffer
trx_size number of data characters in the transmit buffer
rtx_code character code (not used in iHMI)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 462/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Type Description


mode Numerical value Operation mode
rtx_size wait for data to be received
trx_size wait for data to be sent
rtx_code wait for specified character to come (not used in iHMI)
time_out Numerical value maximum time to wait
Set the wait time in units of msec.
When 0 is specified, the wait time is infinite.
For a standard monitor, a setting value that is not a multiple of 8 msec is
rounded up (when 9 msec is set, it is rounded up to 16 msec).
[Return]
Details of the return values are as shown below.

Table 5.3 (338) Value to Be Stored in the Return Value of the rs_wait Function
Type Description
Numerical Return value of the function
value 0 the specified condition is satisfied
EC_TIMOUT time out
rtx_size_ok When mode = rtx_size, and when the number of data bytes in the receive
buffer is greater than or equal to the specified value.
trx_size_ok When mode = trx_size, and when the number of data bytes in the transmit
buffer is less than or equal to the specified value.
Other Error
[Description]
Waits for the specified communication port to become the specified state.
After this function call, the task from which this function is called is switched to the "wait state" until the
specified condition is satisfied.
In the iHMI, it is impossible to set it to wait for specific characters to be received (rtx_code). If it is set, an
error is returned.
This function is used for the following purposes.

(1) Wait for transmit completion


ret = rs_wait( channel, param, trx_size, time_out )

This waits for the number of untransmitted characters in the transmit buffer to become less than or
equal to the specified value given by "param."

If param = 0, the above function call waits for the completion of transmission. This is used to find out
whether all the data has been sent to the destination.
By setting param as param="Tx buffer size" - "Tx data size", the above function call can be used to
find out if there is enough space in the transmit buffer to accept new data. This is useful for efficient
data transmission.

(2) Wait for data to come


ret = rs_wait(channel, param, rtx_size, time_out)

This waits for the number of received characters in the receive buffer to become greater than or equal
to the value specified by "param." This is efficient compared to the polling method.

In the case of fixed length data communication, specify param="packet size"


to find out if a whole set of data has been received.
When you want to find out if data of whatever size has been received, specify param to be "1".

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 463/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

(3) Wait for a specified character


ret = rs_wait(channel , param, rtx_code, time_out)

This function call waits for the character specified by "param" to arrive.

This function is used to be alerted of the arrival of a data packet that ends with a specific code.

The above wait state finishes when the data received after the rs_wait function is called matches the
character specified by "param." Data that arrived before the execution of this function but that have
not yet been read by the application, are also examined for character matching.

Specifying the maximum wait time by "time_out" prevents the application program from hanging when no
answer comes back from the external device. It is also possible that there is a problem in the
communication interface when a timeout error occurs. In this case, examine the state of the interface by
using the rs_buffer function or rs_status function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 464/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[F-ROM library function reference]

12.1 Opening a specified F-ROM file

[Function]
aux_from_open
[Syntax with arguments]
aux_from_open(filename, mode)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (339) Arguments of the aux_from_open Function
Name Type Description
filename String Specify the name of the F-ROM file you want to open.
mode String Specify the access mode.
The mode should always be read mode "r".
[Return]
The return values from this function are as follows.
Table 5.3 (340) Value to Be Stored in the Return Value of the aux_from_open Function
Type Description
Numerical Execution result
value 0 Successful
-3 The aux_from_open function has opened the F-ROM file. This value is also returned when
MANUAL GUIDEi executes this function while accessing the F-ROM file.
-5 The F-ROM file having the specified file name is not present.
-10 Access was denied because another function was accessing the F-ROM file.
1 A mode other than read mode "r" was specified for mode.
[Description]
This function opens a file in the F-ROM and makes it ready to be read.
The F-ROM data in a C language data file in the *.MEM format, which is created in FANUC PICTURE,
can be read.

[Example]
For an example, refer to "Example" in "Reading data from the F-ROM file."

12.2 Closing the F-ROM file

[Function]
aux_from_close
[Syntax with arguments]
aux_from_close()
[Arguments]
None
[Return]
The return values from this function are as follows.
Table 5.3 (341) Value to Be Stored in the Return Value of the aux_from_close Function
Type Description
Numerical Execution result
value 0 Successful
Not 0 When no F-ROM file is opened by the aux_from_open function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 465/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Closes the F-ROM file that has been opened.
[Example]
For an example, refer to "Example" in "Reading data from the F-ROM file."

12.3 Selecting data in the F-ROM file

[Function]
aux_from_select
[Syntax with arguments]
aux_from_select(name)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (342) Arguments of the aux_from_select Function
Name Type Description
name String Specify file name to be selected.
[Return]
The return values from this function are as follows.
Table 5.3 (343) Value to Be Stored in the Return Value of the aux_from_select Function
Type Description
Numerical Execution result
value 0 Successful
Not 0 When the specified file does not exist.
[Description]
This function selects one of the data files for C Language Executor.
Specify the file name argument according to the MS-DOS 8.3 format.
[Example]
For an example, refer to "Example" in "Reading data from the F-ROM file."

12.4 Moving the read pointer

[Function]
aux_from_moveptr
[Syntax with arguments]
aux_from_moveptr(offset, origin)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (344) Arguments of the aux_from_moveptr Function
Name Type Description
offset Numerical value Byte count from base point.
origin Numerical value Origin position.
FROM_SEEK_CUR Current position of the file pointer
FROM_SEEK_END End of file
FROM_SEEK_SET Beginning of file
[Return]
Details of the return values from this function are as shown below.
Table 5.3 (345) Value to Be Stored in the Return Value of the aux_from_moveptr Function
Type Description
Numerical Execution result

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 466/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
value 0 Successful
Not 0 When the pointer is moved backward beyond the beginning of the file.
When the pointer is moved forward beyond the end of the file.
[Description]
This function moves the position of the read pointer in the currently selected file.
Moving the pointer forward beyond the end of the file or backward beyond the beginning of the file causes
an error.
[Example]
For an example, refer to "Example" in "Reading data from the F-ROM file."

12.5 Reading data from the F-ROM file

[Function]
aux_from_read
[Syntax with arguments]
aux_from_read(size)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (346) Arguments of the aux_from_read Function
Name Type Description
size Numerical value Size of the data to be read.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.
Table 5.3 (347) Value to Be Stored in the Return Value of the aux_from_read Function
Element Type Description
1st element Numerical Execution result
value Returns the size (byte) of the data being read if successful. Returns zero if an
error occurs.
2nd element String Data that has been read
[Description]
This function reads data from the selected data file and returns it with the 2nd element of the return value.
Before calling this function, the data file to be read from must be selected with the aux_from_select
function.
[Example]
To open "FPF0FPDT.MEM," which has been created in FANUC PICTURE, select "CRTCONV.TXT" in
"FPF0FPDT.MEM", read 10 characters from the beginning, move the read pointer by 50 bytes, read
another 20 characters, and then close the file:

msg_txt = ""
ret = [0, "a"]
if aux_from_open( "FPF0FPDT.MEM", "r" ) != 0 then
msg_txt = "FILE OPEN EEROR"
else
if aux_from_select( "CRTCONV.TXT" ) != 0 then
msg_txt = "FILE NOT EXIST"
aux_from_close()
else
ret = aux_from_read( 10 )

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 467/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

if ret[0] == 0 then
msg_txt = "DATA READ ERROR"
aux_from_close()
return
end
msg_txt = ret[1]
res = aux_from_moveptr( 50, FROM_SEEK_CUR )
if res != 0 then
msg_txt = "PONTER MOVE ERROR"
aux_from_close()
return
end
ret = aux_from_read( 20 )
if ret[0] == 0 then
msg_txt = "DATA READ ERROR"
aux_from_close()
return
end
msg_txt = msg_txt + "¥n" +ret[1]
aux_from_close()
end
end

12.6 Reading directory information of a F-ROM file

[Function]
aux_from_getdir
[Syntax with arguments]
aux_from_getdir()
[Arguments]
None
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.
Table 5.3 (348) Value to Be Stored in the Return Value of the aux_from_getdir Function
Element Type Description
1st Numerical Execution result
element value Returns zero if successful. Returns -1 if an error occurs.
2nd Array of m Array of directory information
element elements m indicates the number of directory entries (same value as that of the 3rd
element).
For details on the value, refer to the following table "Values to Be Stored in the
Directory Information Array."
3rd Numerical Area in which to store the number of directory entries.
element value

Table 5.3 (349) Values to Be Stored in the Directory Information Array


Element Type Description
1st element String File name
2nd element Numerical value First address of the file

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 468/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Numerical value File size.
[Description]
Reads the directory information of the FROM.
Returns directory information with the 2nd element and the number of directory entries with the 3rd
element.
[Example]
To read the 1st directory information of the F-ROM file "FPF0FPDT.MEM" and store it in msg_txt:

res = [0,"a",0]
if aux_from_open( "FPF0FPDT.MEM", "r" ) != 0 then
msg_txt = "FILE OPEN EEROR"
else
res = aux_from_getdir()
if res[2] == 0 then
msg_txt = "DIR DATA NOT EXIST"
else
msg_txt = ret[1][0][0] + " : " + ret[1][0][1].to_s + " : " + ret[1][0][2].to_s # filename : address : size
end
end

12.7 Reading F-ROM file information


[Function]
aux_from_getinfo
[Syntax with arguments]
aux_from_getinfo(name)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (350) Arguments of the aux_from_getinfo Function
Name Type Description
name String F-ROM file name
*.MEM files that have been created in FANUC PICTURE can be specified.
[Return]
Details of the return values from this function are as shown below.
Table 5.3 (351) Value to Be Stored in the Return Value of the aux_from_getinfo Function
Type Description
Numerical Execution result
value C_DATA Data files for C Language Executor.
-1 The specified file does not exist, or the specified file is not a C Language Executor file.
Details of the return values from this function are as shown below.
[Description]
This function reads information about F-ROM files stored in the F-ROM.
The F-ROM file name has to be specified in only upper case letters.
[Example]
To read the file information of the F-ROM file "FPF0FPDT.MEM" and store it in msg_txt:

msg_txt = ""
ftype = aux_from_getinfo( "FPF0FPDT.MEM" )
if ftype == C_DATA then
msg_txt = "C DATA"

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 469/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

else
msg_txt = "OTHER FILE"
end

12.8 Reading a character from the F-ROM file

[Function]
aux_from_getc
[Syntax with arguments]
aux_from_getc()
[Arguments]
None
[Return]
Details of the return values from this function are as shown below.
Table 5.3 (352) Value to Be Stored in the Return Value of the aux_from_getc Function
Type Description
Numerical Execution result
value Not 0xFF Character code that has been read
0xFF End of the file or Read error
[Description]
This function gets one character from the selected data file.
This function replaces the line termination code, "Carriage Return + Line Feed (CR + LF)", with a single
Line Feed character LF.
Before calling this function, the data file to be read from must be selected with the aux_from_select
function.
[Example]
To open "FPF0FPDT.MEM," select "TEST02.DAT" in "FPF0FPDT.MEM", read one character from the
beginning, store it in msg_txt, and then close the file:

msg_txt = ""
ret = [0, "a"]
if aux_from_open("FPF0FPDT.MEM", "r" ) != 0 then
msg_txt = "FILE OPEN EEROR"
else
if aux_from_select("CRTCONV.TXT" ) != 0 then
msg_txt = "FILE NOT EXIST"
aux_from_close()
else
ret = aux_from_getc()
if ret == 0xFF then
msg_txt = "DATA READ ERROR"
aux_from_close()
return
end
code = ret
aux_from_close()
end
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 470/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

12.9 Reading a line from the F-ROM file

[Function]
aux_from_gets
[Syntax with arguments]
aux_from_gets(size)
[Arguments]
The arguments of this function are as shown below.
Table 5.3 (353) Arguments of the aux_from_gets Function
Name Type Description
size Numerical value Size of the data to be read.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.
Table 5.3 (354) Value to Be Stored in the Return Value of the aux_from_gets Function
Element Type Description
1st element Numerical value Execution result
Returns zero if successful. Returns -1 if an error occurs.
2nd element String Data that has been read (1 line)
[Description]
This function reads one line of data from the selected data file and returns it with the 2nd element of the
return value.
A line is made up of all characters read before the Line Feed character ('¥n'). The read Line Feed character
is returned without any processing. Characters continue to be read until a Line Feed character ('¥n') is
encountered, end of file is detected or "size - 1" number of characters are read.
This function replaces the line termination code, "Carriage Return + Line Feed (CR + LF)", with a single
Line Feed character LF.
Before calling this function, the data file to be read from must be selected with the aux_from_select
function.
[Example]
To open "FPF0FPDT.MEM," select "CRTCONV.TXT" in "FPF0FPDT.MEM", read one line of data up to
100 characters from the beginning, store it in msg_txt, and then close the file:
msg_txt = ""
ret = [0, "a"]
if aux_from_open("FPF0FPDT.MEM", "r" ) != 0 then
msg_txt = "FILE OPEN EEROR"
else
if aux_from_select("CRTCONV.TXT" ) != 0 then
msg_txt = "FILE NOT EXIST"
aux_from_close()
else
ret = aux_from_gets(101)
if ret[0] != 0 then
msg_txt = "DATA READ ERROR"
aux_from_close()
return
end
msg_txt = ret[1]
aux_from_close()
end
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 471/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Network library function reference]

13.1 Opening the communication line in the transmission mode

[Function]
eth_putopen
[Syntax with arguments]
eth_putopen(type, file_name)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (355) Arguments of the eth_putopen Function


Name Type Description
type Numerical Specify the type of communication function to be used for FTP transfer.
value 0: Embedded Ethernet built-in port or PCMCIA LAN card
file_name String Specify the name of a file on the host to which transmitted data is to be written to.
A character string for specifying a file name may consist of up to 255 characters.
[Return]
Details of the return values are as shown below.

Table 5.3 (356) Value to Be Stored in the Return Value of the eth_putopen Function
Type Description
Numerical Execution result
value EW_OK
Successful
EW_BUSY
The communication line is already open.
EW_ATTRIB
The specified type is invalid.
EW_REJECT
The communication line is already being used by another function.
[Description]
This function opens the communication line with the communication function specified by "type" in the
transmission mode.

This function must always be executed before data can be transmitted to the host.
If this function is executed by specifying only a file name in "file_name", a file with the specified file name
is created in the current directory of the host.
If this function is executed by specifying a file name including a path in "file_name" with a host that
supports a file name including a path, a file is created in the specified directory.

The eth_put function can be used to transmit and write data to a file created on the host using this function.
The current directory of the connected host can be checked and changed on the host file list screen. For
details of the host file list screen, refer to Section 8.3, “EMBEDDED ETHERNET OPERATIONS,” in
“OPERATOR’S MANUAL (Common to Lathe System/Machining Center System) (B-63944EN,
B-64484EN, B-64604EN).”

The basic procedure for transmitting data is indicated below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 472/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Opens the communication line


eth_putopen function
=EW_OK

=EW_DTSRVR Sends data


eth_put function =EW_BUFFER
=EW_OK

Is there remaining
data ?
YES

NO

Closes the communication line


eth_putclose function
Fig. 5.3 (i) Basic Procedure for Transmitting Data

NOTE
1 If the eth_putopen function is executed by specifying the name of a file that
already exists on the host, the file name may be overwritten according to the
setting of the host and EW_OK may be returned.
2 If the eth_putopen function is executed by specifying a file name including a path
with a host that does not support a file name including a path, EW_OK is
returned. If the eth_put function is then executed, EW_DTSRVR is returned. If
the cnc_getdtailerr function is executed at this time, Error No. 502, "Data
transmission failed." is output as the detailed status.

13.2 Transmitting data to the host

[Function]
eth_put
[Syntax with arguments]
eth_put(length, data)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (357) Arguments of the eth_put Function


Name Type Description
length Numerical value Number of characters of the data to be output to the transmit buffer.
data String Data to be output to the transmit buffer.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 473/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (358) Value to Be Stored in the Return Value of the eth_put Function
Element Type Description
1st Numerical Execution result
element value EW_OK
Successful
EW_FUNC
The eth_putopen function has not been executed yet.
EW_LENGTH
A value of 0 or less was specified in "length".
EW_BUFFER
The transmit buffer is full.
Retry transmission.
EW_DTSRVR
A communication error occurred.
Close the communication line.
2nd Numerical Number of characters that have actually been output to the transmit buffer.
element value
[Description]
This function outputs data of a specified size to the transmit buffer.

If the free space of the transmit buffer is smaller than the number of characters specified in "length", an
amount of data equivalent to the amount of free space is output and the number of actually output
characters is set to the 2nd element of the return value.
If the transmit buffer has no free space so that no characters can be output, EW_BUFFER is returned. In
this case, retry transmission.

If an error occurs during data transmission to the host, EW_DTSRVR is returned. In this case, close the
communication line by executing the eth_putclose function.

To get more detailed information on this return value, execute the cnc_getdtailerr function.

A detailed status is set in the ODBERR structure member err_no. For details on the status, refer to the
following table.

Table 5.3 (359) Communication Error Detail Status


Error No. Description
468 The connected host cannot be found.
Check the settings including the IP address.
502 Data transmission failed.
503 Data reception failed.
507 The current directory could not be changed.
Check the setting of the login folder.
508 Logging in to the connected host failed.
Check the settings of the login user and login password.
509 Connection to the connected host failed.
Check whether the FTP server is started.
511 The setting of a parameter for the connected host is incorrect.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 474/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

※ When sending a Russian character string, specify the number of characters to be sent in "length" of the
argument.
[Example]
To send the data "TestData" to the file in the host "TEST.txt":

ret = eth_putopen(0,"TEST.txt")
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end
ret = eth_put(8,"TestData")
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.3 Closing the communication line opened in the transmission mode

[Function]
eth_putclose
[Syntax with arguments]
eth_putclose(cancel)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (360) Arguments of the eth_putclose Function


Name Type Description
cancel Numerical Specify the method of closing of the communication line for when data remains in
value the transmit buffer.
0: If data remains in the transmit buffer, communication continues without closing
the communication line.
1: If data remains in the transmit buffer, transmission is canceled and the
communication line is closed.
[Return]
Details of the return values are as shown below.

Table 5.3 (361) Value to Be Stored in the Return Value of the eth_putclose Function
Type Description
Numerical Execution result
value EW_OK
Successful
EW_BUSY
The data in the transmit buffer is being transmitted to the host.
Retry the close operation until the transmission ends.
EW_FUNC
The eth_putopen function has not been executed yet.
EW_DTSRVR
A communication error occurred.
Retry the close operation.
[Description]
This function closes the communication line opened in the transmission mode.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 475/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

If 0 is specified for "cancel", and this function is executed when data remains in the transmit buffer, it does
not close the communication line and returns EW_BUSY. In this case, wait until transmission ends or retry
the close operation.

If 1 is specified for "cancel," this function cancels transmission and closes the communication line even if
data remains in the transmit buffer. At this time, the data remaining in the transmit buffer is discarded and
EW_BUSY is returned. In this case, retry the close operation until EW_OK is returned.

If a communication error occurs during data transmission to the host or communication line close operation,
EW_DTSRVR is returned. In this case, retry the close operation until EW_OK is returned.

To get more detailed information on this return value, execute the cnc_getdtailerr function. The error No. is
set in “Detail status” in the return value array. For details of statuses, see "Communication error detail
status" in "Transmitting data to the host".

13.4 Opening the communication line in the receive mode

[Function]
eth_getopen
[Syntax with arguments]
eth_getopen(type, file_name)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (362) Arguments of the eth_getopen Function


Name Type Description
type Numerical Specify the type of communication function to be used for FTP transfer.
value 0: Embedded Ethernet built-in port or PCMCIA LAN card
file_name String Specify the name of a file to be received from the host.
A character string for specifying a file name may consist of up to 255 characters.
[Return]
Details of the return values are as shown below.

Table 5.3 (363) Value to Be Stored in the Return Value of the eth_getopen Function
Type Description
Numerical Execution result
value EW_OK
Successful
EW_BUSY
The communication line is already open.
EW_ATTRIB
The specified type is invalid.
EW_REJECT
The communication line is already being used by another function.
[Description]
This function opens the communication line in the receive mode.

This function must always be executed before data can be received from the host.
If this function is executed by specifying only a file name in "file_name," the file with the specified file
name stored in the current directory of the host is selected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 476/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

If this function is executed by specifying a file name including a path in "file_name" with a host that
supports a file name including a path, the file stored in the specified directory is selected.

The contents of a file that is stored on the host and specified with this function can be read using the
eth_get function.

The current directory of the connected host can be checked and changed on the host file list screen. For
details of the host file list screen, refer to Section 8.3, “EMBEDDED ETHERNET OPERATIONS,” in
“OPERATOR’S MANUAL (Common to Lathe System/Machining Center System) (B-63944EN,
B-64484EN, B-64604EN).”

The basic procedure for receiving data is indicated below.

Opens the communication line


eth_getopen function
=EW_OK

=EW_DTSRVR Receive data


eth_get function =EW_BUFFER

=EW_OK or EW_RESET

Is data reception
complete?
YES
EW_RESET
NO

Closes the communication line


eth_getclose function

Fig. 5.3 (j) Basic Procedure for Receiving Data

NOTE
1 If the eth_getopen function is executed by specifying the name of a file that does
not exist on the host, EW_OK is returned. If the eth_get function is then
executed, EW_DTSRVR is returned. If the cnc_getdtailerr function is executed at
this time, Error No. 503, "Data reception failed." is output to "Detail status" in the
return value array.
2 If the eth_getopen function is executed by specifying a file name including a path
with a host that does not support a file name including a path, EW_OK is
returned.
If the eth_get function is then executed, EW_DTSRVR is returned. If the
cnc_getdtailerr function is executed at this time, Error No. 503, "Data reception
failed." is output to "Detail status" in the return value array.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 477/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

13.5 Receiving data from the host

[Function]
eth_get
[Syntax with arguments]
eth_get(length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (364) Arguments of the eth_get Function


Name Type Description
length Numerical value Number of characters of the data to be obtained from the receive buffer.
[Return]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (365) Value to Be Stored in the Return Value of the eth_get Function
Element Type Description
1st element Numerical value Execution result
EW_OK
Successful
EW_RESET
There is no data to be received.
Close the communication line.
EW_FUNC
The eth_getopen function has not been executed yet.
EW_LENGTH
A value of 0 or less was specified in "length".
EW_BUFFER
The receive buffer is empty.
Retry receiving.
EW_DTSRVR
A communication error occurred.
Close the communication line.
2nd element String Data to be obtained from the receive buffer
3rd element Numerical value Number of characters of the data that have been obtained from the receive buffer.
[Description]
This function acquires data of a specified size from the receive buffer.

If the amount of data stored in the receive buffer is less than the number of characters specified for
"length," all data in the receive buffer is returned to the 2nd element of the return value and the number of
returned characters is returned to the 3rd element of the return value.
If there is no data in the receive buffer so that no characters can be acquired, EW_BUFFER is returned. In
this case, retry reception.

If this function is executed after the reception of all data from the host, EW_RESET is returned. In this
case, close the communication line by executing the eth_getclose function.
If an error occurs during data reception from the host, EW_DTSRVR is returned. In this case, close the
communication line by executing the eth_getclose function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 478/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

To get more detailed information on this return value, execute the cnc_getdtailerr function. The error No. is
set in “Detail status” in the return value array. For details of statuses, see "Communication error detail
status" in "Transmitting data to the host".
[Example]
To receive the first eight characters of data from the file in the host "TEST.txt":

ret = eth_getopen(0,"TEST.txt")
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end
ret = eth_get(8)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.6 Closing the communication line opened in the receive mode

[Function]
eth_getclose
[Syntax with arguments]
eth_getclose()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (366) Value to Be Stored in the Return Value of the eth_getclose Function
Type Description
Numerical Execution result
value EW_OK
Successful
EW_RESET
Reception was canceled and the communication line was closed.
EW_BUSY
The communication line is closed.
Retry the close operation.
EW_FUNC
The eth_getopen function has not been executed yet.
EW_DTSRVR
A communication error occurred.
Retry the close operation.
[Description]
This function closes the communication line opened in the receive mode.

If this function is executed during data reception from the host, the data reception is canceled and the
communication line is closed. In this case, EW_RESET is returned.
To receive all data, execute the eth_get function until it returns EW_RESET (-2), then execute this
function.

If a communication error occurs during data reception from the host or communication line close operation,
EW_DTSRVR is returned. In this case, retry the close operation until EW_OK or EW_RESET is returned.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 479/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

To get more detailed information on this return value, execute the cnc_getdtailerr function. The error No. is
set in “Detail status” in the return value array. For details of statuses, see "Communication error detail
status" in "Transmitting data to the host".

13.7 Opening the FTP communication line

[Function]
eth_open_ftp
[Syntax with arguments]
eth_open_ftp(mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (367) Arguments of the eth_open_ftp Function


Name Type Description
mode Numerical Specifies the communication mode.
value 0: Active mode
Not 0: Passive mode
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (368) Value to Be Stored in the Return Value of the eth_open_ftp Function
Element Type Description
1st Numerical Execution result
element value EW_OK
Successful
EW_BUSY
The communication line is already open.
EW_DTSRVR
A communication error occurred.
2nd Numerical Detailed communication error information number (valid only when the 1st element is
element value EW_DTSRVR)
12003: Movement of current directory failed after the line was opened.
12013: The user name is incorrect.
12014: The password is incorrect.
12029: Connection failed.
*For other detailed error information numbers, see the error code list for the Windows API.
[Description]
This function opens the line used for communication functions. Parameters for the Ethernet function,
which are required for connection, can be checked with the eth_rdparam function and changed with the
eth_wrparam function.
If a communication error occurs when a communication line is being opened, EW_DTSRVR is returned to
the 1st element of the return value and a detailed communication error information number for that
communication error is returned to the 2nd element.

[Example]
To open a communication line in the Passive mode:

ret = eth_open_ftp(1)
if ret[0] != EW_OK then

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 480/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

MsgBoxShow("ERROR",0)
end

13.8 Transmitting data to the host

[Function]
eth_put_ftp
[Syntax with arguments]
eth_put_ftp(srcPath, dstPath, mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (369) Arguments of the eth_put_ftp Function


Name Type Description
srcPath String Specify the path of the transmission destination file.
dstPath String Specify the path or name of the transmission destination file.
mode Numerical Specifies the transfer mode.
value 0: Binary mode
Not 0: ASCII mode
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (370) Value to Be Stored in the Return Value of the eth_put_ftp Function
Element Type Description
1st Numerical Execution result
element value EW_OK
Successful
EW_FUNC
The eth_ftp_open function has not been executed yet.
EW_DTSRVR
A communication error occurred.
2nd Numerical Detailed communication error information number (valid only when the 1st element is
element value EW_DTSRVR)
2: The file does not exist.
12031: Connection has been reset.
*For other detailed error information numbers, see the error code list for the Windows API.
[Description]
This function transfers a file to the specified host.
If this function is executed by specifying only a file name in "dstPath," a file with the specified file name is
transferred to the current directory of the host.

If this function is executed by specifying a file name including a path in "dstPath" with a host that supports
a file name including a path, the specified file is created when a directory included in the path exists in the
host.

If a communication error occurs when data is being sent to the host, EW_DTSRVR is returned to the 1st
element of the return value and a detailed communication error information number for that
communication error is returned to the 2nd element.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 481/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
1 If the function is executed by specifying the name of a file that already exists on the host,
the file name may be overwritten depending on the setting of the host and EW_OK may
be returned.
2 If the function is executed by specifying a file name including a path with a host that does
not support a file name including a path, EW_DTSRVR is returned.
[Example]
To open a communication line and send a file (D:¥¥TEST¥¥TEST.txt) to the transmission destination FTP
server with the file name "TEST.txt":

ret = eth_open_ftp(1)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end
ret = eth_put_ftp("D:¥¥TEST¥¥TEST.txt","TEST.txt",0)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.9 Receiving data from the host

[Function]
eth_get_ftp
[Syntax with arguments]
eth_get_ftp(srcPath, dstPath, mode, existFile)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (371) Arguments of the eth_get_ftp Function


Name Type Description
srcPath String Specify the path or name of the file on the FTP server.
dstPath String Specify the path of the receiving destination.
mode Numerical Specifies the transfer mode.
value 0: Binary mode
Not 0: ASCII mode
existFile Numerical Specify whether to overwrite the file when it exists.
value 0: Overwrite
1: Do not overwrite
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (372) Value to Be Stored in the Return Value of the eth_get_ftp Function
Element Type Description
1st Numerical Execution result
element value EW_OK
Successful
EW_FUNC
The eth_ftp_open function has not been executed yet.
EW_DTSRVR

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 482/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


A communication error occurred.
2nd Numerical Detailed communication error information number (valid only when the 1st element is
element value EW_DTSRVR)
12003: The file does not exist on the server.
12031: Connection has been reset.
*For other detailed error information numbers, see the error code list for the Windows API.
[Description]
This function receives a file from the specified host.

If this function is executed by specifying only a file name in "srcPath," a file with the specified file name is
transferred from the current directory of the host.

If a communication error occurs when data is being received from the host, EW_DTSRVR is returned to
the 1st element of the return value and a detailed communication error information number for that
communication error is returned to the 2nd element.

NOTE
If the function is executed by specifying a file name including a path with a host that does
not support a file name including a path, EW_DTSRVR is returned.
[Example]
To open a communication line and receive data in the file on the FTP server, specify "TEST.txt" with "
D:¥¥TEST¥¥get.txt" as the receiving destination.

ret = eth_open_ftp(1)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end
ret = eth_get_ftp("TEST.txt","D:¥¥TEST¥¥get.txt",0,0)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.10 Closing the FTP communication line

[Function]
eth_close_ftp
[Syntax with arguments]
eth_close_ftp()
[Arguments]
None
[Return]
Details of the return values are as shown below.

Table 5.3 (373) Value to Be Stored in the Return Value of the eth_close_ftp Function
Type Description
Numerical Return value of the function
value EW_OK
Successful
EW_FUNC

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 483/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
The eth_ftp_open function has not been executed yet.
[Description]
This function closes the communication line that has been opened.
[Example]
To close the open communication line.

ret = eth_open_ftp(1)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end
ret = eth_close_ftp()
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end

13.11 Reading parameters for the Ethernet function

[Function]
eth_rdparam
[Syntax with arguments]
eth_rdparam(type)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (374) Arguments of the eth_rdparam Function


Name Type Description
type Numerical Specify the type of the parameter to be received.
value Embedded Ethernet built-in port
1: Common parameter
2: Focas2/Ethernet parameter
3: FTP transfer parameter
Embedded Ethernet PCMCIA LAN card
21: Common parameter
22: Focas2/Ethernet parameter
23: FTP transfer parameter
Fast Ethernet / Fast Data Server board
41: Common parameter
42: Focas2/Ethernet parameter
44: Data Server parameter
46: TCP/IP communication parameter
Embedded Ethernet (WinCE) built-in port
61: Common parameter
62: Focas2/Ethernet parameter
63: FTP transfer parameter
Embedded Ethernet (WinCE) PCMCIA LAN card
81: Common parameter
82: Focas2/Ethernet parameter
83: FTP transfer parameter

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 484/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
A TCP/IP communication parameter (type=46) can be obtained only when the TCP/IP
communication function is enabled (Parameter TIP(No.907#3)=1). If parameter TIP=0,
this function returns EW_NOOPT.
[Return]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (375) Value to Be Stored in the Return Value of the eth_rdparam Function
Element Type Description
1st element Numerica Execution result
l value EW_OK
Successful
EW_DATA
The specification of the parameter kind (type) is incorrect.
EW_LENGTH
The specified data block length is invalid.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in “Detail status” in the return value array.
20: Embedded Ethernet is not available.
22: The option board is not available.
24: The data server function is not available.
27: TCP/IP communication function is not available.
90: The combination of Communication function is illegal.
Confirm the values of diagnosis data Nos. 4400 and 4401.
For details on diagnosis data Nos. 4400 and 4401, refer to "Section 5.32.5
Diagnosis Data in C Language Executor PROGRAMMING MANUAL
(B-63943EN-3)."
2nd element Array of 7 Parameter received
elements For details on the value, refer to the following table "Parameter information for the
Ethernet function."

Table 5.3 (376) Parameter Information for the Ethernet Function


Element Type Description
1st element Numerical Option
value Bit 0: Ethernet Display function (*) is valid.
Bit 1 to Bit 15: Reserved
* Refer to "FANUC Series 30i/31i/32i-MODEL A Ethernet Display function of
Stand-alone type CNC (B-64485EN, B-64605EN)" for the details of this
function.
2nd element Numerical Kind of parameter received. (Refer to value of argument "type")
value
3rd element Numerical Judgment result of whether the DHCP client (*) is valid.
value 0: DHCP client is invalid.
1: DHCP client is valid.
* Refer to "CONNECTION MANUAL (FUNCTION) (B-63943EN-1,
B-64483EN-1, E-64603EN-1) 18. EMBEDDED ETHERNET FUNCTION"
and "Fast Ethernet Fast Data Server OPERATOR'S MANUAL (B-64014EN)
II.2.4 DNS/DHCP FUNCTION" for the details of this function.
4th element Numerical Valid device for Embedded Ethernet.
value 0: None

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 485/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


1: Internal port
2: PCMCIA LAN card
5th element Numerical Valid channel number for Data Server. (1 to 10)
value
6th element Numerical Storage used by Data Server.
value 0: None
2: ATA Card
7th element Array Parameters received (changes depending on the kind of parameter received)
For details on the value, refer to the table "Values to Be Stored in Parameters
That Have Been Received" shown below.

Table 5.3 (377) Values to Be Stored in Parameters That Have Been Received
Value of "Kind of Number of Description
parameter elements in
received" the array
1, 21, 41, 61, 81 8 Common parameter
For details on the value, refer to the table "Values to Be Stored in
Common Parameters" shown below.
2, 22, 42, 62, 82 3 Focas2/Ethernet parameter
For details on the value, refer to the following table "Values to Be
Stored in Focas2/Ethernet Parameters."
3, 23, 63, 83 3 FTP transfer parameter
For details on the value, refer to the following table "Values to Be
stored in Destination Parameters (CONNECT 1 to 3) for the FTP
transfer function."
44 2 Data Server parameter
For details on the value, refer to the following table "Values to Be
Stored in Data Server Parameters."
46 3 TCP/IP communication parameter
For details on the value, refer to the following table "Values to Be
Stored in TCP/IP Communication Parameters (CONNECT 1 to 3)."

Table 5.3 (378) Values stored in common parameters


Element Type Description
1st String MAC address of CNC
element An ASCII string of up to 12 characters.
2nd String IP address of CNC
element An ASCII string of up to 39 characters.
3rd String Subnet mask on the network that CNC belongs to.
element An ASCII string of up to 15 characters.
4th String IP address of the router that CNC uses
element An ASCII string of up to 39 characters.
5th String IP address of the priority DNS server that CNC uses
element An ASCII string of up to 39 characters.
6th String IP address of the substitute DNS server that CNC uses
element An ASCII string of up to 39 characters.
7th String Host name of CNC
element An ASCII string of up to 31 characters.
However, the maximum number of characters, including the domain that CNC
belongs to, is 64.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 486/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


8th String Domain that CNC belongs to
element An ASCII string of up to 62 characters.
However, the maximum number of characters, including the host name of CNC, is
64.

Table 5.3 (379) Values stored in Focas2/Ethernet parameters


Element Type Description
1st Numerical Port number for TCP (0, 5001 to 65535)
element value
2nd Numerical Port number for UDP (0, 5001 to 65535)
element value
3rd Numerical Time interval for sending a broadcast frame (Unit: 10ms) (0, 10 to 65535)
element value

Table 5.3 (380) Values stored in destination parameters (CONNECT 1 to 3) for the FTP transfer function
Element Type Description
1st Array of 6 FTP communication parameters for CONNECT 1
element elements For details on the value, refer to the following table "Values stored in the transfer
parameter array."
2nd Array of 6 FTP communication parameters for CONNECT 2
element elements For details on the value, refer to the following table "Values stored in the transfer
parameter array."
3rd Array of 6 FTP communication parameters for CONNECT 3
element elements For details on the value, refer to the following table "Values stored in the transfer
parameter array."

Table 5.3 (381) Values stored in the transfer parameter array


Element Type Description
1st String Host name or IP address of the destination
element An ASCII string of up to 63 characters.
2nd Numerical Control port number of the destination (1 to 65535)
element value
3rd Numerical Not used
element value
4th String User name used to log in to the destination
element An ASCII string of up to 31 characters.
5th String Password used to log in to the destination
element An ASCII string of up to 31 characters.
6th String Directory name used to log in to the destination
element An ASCII string of up to 127 characters.

Table 5.3 (382) Values stored in Data Server function parameters


Element Type Description
1st Array of 3 Destination parameters (CONNECT 1 to 3) for the Data Server function
element elements For details on the value, refer to the following table "Values stored in destination
parameters (CONNECT 1 to 3) for the Data Server function."
2nd Array of 3 Login user parameters for the Data Server function
element elements For details on the value, refer to the following table "Values stored in login user
parameters for the Data Server function."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 487/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (383) Values stored in destination parameters (CONNECT 1 to 3) for the Data Server function
Element Type Description
1st Array of 6 FTP communication parameters for CONNECT 1
element elements For details on the value, refer to the above table "Values stored in the transfer
parameter array."
2nd Array of 6 FTP communication parameters for CONNECT 2
element elements For details on the value, refer to the above table "Values stored in the transfer
parameter array."
3rd Array of 6 FTP communication parameters for CONNECT 3
element elements For details on the value, refer to the above table "Values stored in the transfer
parameter array."

Table 5.3 (384) Values stored in login user parameters for the Data Server function
Element Type Description
1st String User name used to permit the destination to log in
element An ASCII string of up to 31 characters.
2nd String Password used to permit the destination to log in
element An ASCII string of up to 31 characters.
3rd String Directory name used to log in to the destination
element An ASCII string of up to 127 characters.

Table 5.3 (385) Values stored in TCP/IP communication parameters (CONNECT 1 to 3)


Element Type Description
1st Array of 2 TCP/IP communication parameters for CONNECT 1
element elements For details on the value, refer to the following table "Values stored in the TCP/IP
communication parameter array."
2nd Array of 2 TCP/IP communication parameters for CONNECT 2
element elements For details on the value, refer to the following table "Values stored in the TCP/IP
communication parameter array."
3rd Array of 2 TCP/IP communication parameters for CONNECT 3
element elements For details on the value, refer to the following table "Values stored in the TCP/IP
communication parameter array."

Table 5.3 (386) Values stored in the TCP/IP communication parameter array
Element Type Description
1st String Host name or IP address of the destination for the TCP/IP communication function
element An ASCII string of up to 63 characters.
2nd Numerical Port number of the destination for the TCP/IP communication function (0, 5001 to
element value 65535)
[Description]
Gets parameters for the Ethernet function (Embedded Ethernet, Fast Ethernet, Fast Data Server board).

A sample of the return value that will actually be received is as follows.


Get FTP transfer parameters for the embedded Ethernet built-in port
[
0, # Execution result (EW_OK)
[
0, # Option
3, # Type of parameter that was actually obtained
0, # Validation flag for the DHCP client function
1, # Valid device for embedded Ethernet
2, # Number of valid channels for the Data Server function

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 488/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

1, # Storage media used by the Data Server function


[ # Parameter to be obtained
[ # FTP communication parameter of CONNECT 1
"192.168.51.115", # Host name or IP address of the destination
21, # Control port number of the destination
0, # Not used
"AAA", # User name used to log into the destination
"AAA123", # Password used to log into the destination
"/TEST1" # Directory name used to log into the destination
]
[ # FTP communication parameter of CONNECT 2
"192.168.51.116", # Host name or IP address of the destination
21, # Control port number of the destination
0, # Not used
"BBB", # User name used to log into the destination
"BBB123", # Password used to log in to the destination
"/TEST2" # Directory name used to log in to the destination
]
[ # FTP communication parameter for CONNECT 3
"192.168.51.117", # Host name or IP address of the destination
21, # Control port number of the destination
0, # Not used
"CCC", # User name used to log in to the destination
"CCC123", # Password used to log in to the destination
"/TEST3" # Directory name used to log in to the destination
]
]
]
]

[Example]
To get an FTP transfer parameter for the embedded Ethernet built-in port:

ret = eth_rdparam (3)


if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.12 Setting parameters for the Ethernet function

[Function]
eth_wrparam
[Syntax with arguments]
eth_wrparam(type, flag, param)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 489/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (387) Arguments of the eth_wrparam function


Name Type Description
type Numerical Specifies the type of parameter to set
value Embedded Ethernet built-in port
1: Common parameter
2: Focas2/Ethernet parameter
3: FTP transfer parameter
Embedded Ethernet PCMCIA LAN card
21: Common parameter
22: Focas2/Ethernet parameter
23: FTP transfer parameter
Fast Ethernet / Fast Data Server board
41: Common parameter
42: Focas2/Ethernet parameter
44: Data Server function parameter
46: TCP/IP communication parameter
Embedded Ethernet (WinCE) built-in port
61: Common parameter
62: Focas2/Ethernet parameter
63: FTP transfer parameter
Embedded Ethernet (WinCE) PCMCIA LAN card
81: Common parameter
82: Focas2/Ethernet parameter
83: FTP transfer parameter
flag Array Flag that defines whether the parameter setting for the Ethernet function is valid or invalid
The structure of flag and that of param correspond to each other.
When you specify "1", the corresponding parameter is set.
When you specify "0", even if the corresponding parameter has been set, it will not
be configured.
For details on the array to which a value is set, refer to "Values stored in parameters
to set." Note that all flags are set using strings.
param Array Parameters for the Ethernet function to set
Sets the parameters for the Ethernet function specified by type.
For details on the value, refer to the following table "Values stored in parameters to
set."

Table 5.3 (388) Values stored in parameters to set


Value of "the type Number of Description
of parameter to elements in
set" the array
1, 21, 41, 61, 81 8 Common parameter
For details on the value, refer to "Values stored in common parameters"
under "Obtaining parameters for the Ethernet function (eth_rdparam)."
2, 22, 42, 62, 82 3 Focas2/Ethernet parameter
For details on the value, refer to "Values stored in Focas2/Ethernet
parameters" under "Obtaining parameters for the Ethernet function
(eth_rdparam)."
3, 23, 63, 83 3 FTP transfer parameter
For details on the value, refer to "Values stored in destination parameters
(CONNECT 1 to 3) for the FTP transfer function" under "Obtaining
parameters for the Ethernet function (eth_rdparam)."
44 2 Data Server function parameter
For details on the value, refer to "Values stored in Data Server function

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 490/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Value of "the type Number of Description


of parameter to elements in
set" the array
parameters" under "Obtaining parameters for the Ethernet function
(eth_rdparam)."
46 3 TCP/IP communication parameter
For information on obtaining parameters for the Ethernet function
(eth_rdparam), refer to the following table "Values stored in TCP/IP
communication parameters (CONNECT 1 to 3)."

NOTE
The TCP/IP communication parameter (type=46) can be obtained only when the TCP/IP
communication function is enabled (Parameter TIP(No.907#3)=1). If parameter TIP=0,
this function returns EW_NOOPT.
[Return value]
Details of the return values are as shown below.

Table 5.3 (389) Value stored in the return value of the eth_wrparam function
Type Description
Numerical Return value of the function
value EW_OK
Normal termination
EW_DATA
The specified argument is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
2: Data is out of range
3: Format error
The following is set in "Error data number" in the return value array.
1: Incorrect parameter type (type)
101: Incorrect setting of the IP Address of CNC
102: Incorrect setting of the subnet mask on the network that CNC belongs to
103: Incorrect setting of the IP address of the router that CNC uses
104: Incorrect setting of the IP address of the priority DNS server that CNC uses
105: Incorrect setting of the IP address of the substitute DNS server that CNC uses
106: Incorrect setting of the host name of CNC
107: Incorrect setting of the domain that CNC belongs to
201: Incorrect setting of the TCP port number
202: Incorrect setting of the UDP port number
203: Incorrect time interval for sending a broadcast frame
311: Incorrect setting of the host name or IP address of CONNECT 1 for the FTP transfer function
312: Incorrect setting of the control port number for CONNECT 1 for the FTP transfer function
314: Incorrect setting of the user name used to log in to CONNECT 1 for the FTP transfer function
315: Incorrect setting of the password used to log in to CONNECT 1 for the FTP transfer function
316: Incorrect setting of the directory name used to log in to CONNECT 1 for the FTP transfer function
321: Incorrect setting of the host name or IP address of CONNECT 2 for the FTP transfer function
322: Incorrect setting of the control port number of CONNECT 2 for the FTP transfer function
324: Incorrect setting of the user name used to log in to CONNECT 2 for the FTP transfer function
325: Incorrect setting of the password used to log in to CONNECT 2 for the FTP transfer function
326: Incorrect setting of the directory name used to log in to CONNECT 2 for the FTP transfer function
331: Incorrect setting of the host name or IP address of CONNECT 3 for the FTP transfer function
332: Incorrect setting of the control port number of CONNECT 3 for the FTP transfer function

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 491/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Type Description
334: Incorrect setting of the user name used to log in to CONNECT 3 for the FTP transfer function
335: Incorrect setting of the password used to log in to CONNECT 3 for the FTP transfer function
336: Incorrect setting of the directory name used to log in to CONNECT 3 for the FTP transfer function
344: Incorrect setting of the user name used to permit the destination to log in for the Data Server function
345: Incorrect setting of the password used to log in to the destination for the Data Server function
346: Incorrect setting of the directory name used to log in to the destination for the Data Server function
351: Incorrect setting of the host name or IP address of CONNECT 1 for the Data Server function
352: Incorrect setting of the control port number of CONNECT 1 for the Data Server function
354: Incorrect setting of the user name used to log in to CONNECT 1 for the Data Server function
355: Incorrect setting of the password used to log in to CONNECT 1 for the Data Server function
356: Incorrect setting of the directory name used to log in to CONNECT 1 for the Data Server function
361: Incorrect setting of the host name or IP address of CONNECT 2 for the Data Server function
362: Incorrect setting of the control port number of CONNECT 2 for the Data Server function
364: Incorrect setting of the user name used to log in to CONNECT 2 for the Data Server function
365: Incorrect setting of the password used to log in to CONNECT 2 for the Data Server function
366: Incorrect setting of the directory name used to log in to CONNECT 2 for the Data Server function
371: Incorrect setting of the host name or IP address of CONNECT 3 for the Data Server function
372: Incorrect setting of the control port number for CONNECT 3 for the Data Server function
374: Incorrect setting of the user name used to log in to CONNECT 3 for the Data Server function
375: Incorrect setting of the password used to log in to CONNECT 3 for the Data Server function
376: Incorrect setting of the directory name used to log in to CONNECT 3 for the Data Server function
511: Incorrect setting of the host name or IP address of CONNECT 1 for the TCP/IP communication function
512: Incorrect setting of the port number of CONNECT 1 for the TCP/IP communication function
521: Incorrect setting of the host name or IP address of CONNECT 2 for the TCP/IP communication function
522: Incorrect setting of the port number of CONNECT 2 for the TCP/IP communication function
531: Incorrect setting of the host name or IP address of CONNECT 3 for the TCP/IP communication function
532: Incorrect setting of the port number of CONNECT 3 for the TCP/IP communication function
EW_NOOPT
There are no required options.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
20: Embedded Ethernet is not available.
22: The option board is not available.
24: The Data Server function is not available.
25: The buffer mode function is not available.
26: There is no ATA card.
27: The TCP/IP communication function is disabled.
90: The combination of communication functions is invalid.
Confirm the values of diagnosis data Nos.4400 and 4401.
For details on the diagnosis data Nos. 4400 and 4401, refer to "Section 5.32.5 Diagnosis Data in C
Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
EW_PROT
Write protection is applied.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
13: The DHCP client function is enabled.
The CNC mode is incorrect. (Only when type=41 or type=42 is specified)
Set the MDI mode or the emergency stop state.
[Description]
Sets parameters for the Ethernet function (Embedded Ethernet, Fast Ethernet, Fast Data Server board).
A sample of the actual argument is as follows.
Set FTP transfer parameters for the embedded Ethernet built-in port

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 492/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[
3, # Parameter type to set
[ # Parameter flag to set
[ # Setting flag for destination parameters for the FTP function for CONNECT 1
"1", # Flag for the host name or IP address of the destination
"1", # Flag for the control port number of the destination
"1", # Not used
"1", # Flag for the user name used to log in to the destination
"1", # Flag for the password used to log in to the destination
"1" # Flag for the directory name used to log in to the destination
]
[ # Setting flag for destination parameters for the FTP function for CONNECT 2
"1", # Flag for the host name or IP address of the destination
"1", # Flag for the control port number of the destination
"1", # Not used
"1", # Flag for the user name used to log in to the destination
"1", # Flag for the password used to log in to the destination
"1" # Flag for the directory name used to log in to the destination
]
[ # Setting flag for destination parameters for the FTP function for CONNECT 3
"1", # Flag for the host name or IP address of the destination
"1", # Flag for the control port number of the destination
"1", # Not used
"1", # Flag for the user name used to log in to the destination
"1", # Flag for the password used to log in to the destination
"1" # Flag for the directory name used to log in to the destination
]
]
[ # Parameter to set
[ # FTP communication parameter for CONNECT 1
"192.168.51.115", # Host name or IP address of the destination
21, # Flag for the control port number of the destination
0, # Not used
"AAA", # Flag for the user name used to log in to the destination
"AAA123", # Flag for the password used to log in to the destination
"/TEST1" # Flag for the directory name used to log in to the destination
]
[ # FTP communication parameters for CONNECT 2
"192.168.51.116", # Host name or IP address of the destination
21, # Flag for the control port number of the destination
0, # Not used
"BBB", # Flag for the user name used to log in to the destination
"BBB123", # Flag for the password used to log in to the destination
"/TEST2" # Flag for the directory name used to log in to the destination
]
[ # FTP communication parameters for CONNECT 3
"192.168.51.117", # Host name or IP address of the destination
21, # Flag for the control port number of the destination
0, # Not used
"CCC", # Flag for the user name used to log in to the destination
"CCC123", # Flag for the password used to log in to the destination

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 493/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

"/TEST3" # Flag for the directory name used to log in to the destination
]
]
]
[Example]
To set a Focas2/Ethernet parameter for the embedded Ethernet built-in port:

ret = eth_wrparam (2, # Focas2/Ethernet parameter for the embedded Ethernet built-in port
[
"1", # Setting flag for the TCP port number
"0", # Setting flag for the UDP port number
"1" # Setting flag for the time interval for sending a broadcast frame
],
[
5001, # TCP port number
8000, # UDP port number
10 # Time interval at which a broadcast frame is sent
])
if ret != EW_OK then
MsgBoxShow("ERROR",0)
end

In the example, the flag setting for the UDP port number is "0" so the UDP port number has not been set.

NOTE
It is only possible to set the following parameters for the Ethernet function when CNC is
in the MDI mode or the emergency stop state. And, when these parameters are set, the
power must be turned off once.
- Common parameters
(Fast Ethernet or Fast Data Server board) (type=41)
- FOCAS2/Ethernet function parameters
(Fast Ethernet or Fast Data Server board) (type=42)

13.13 Reading the mode of the Data Server function

[Function]
eth_rddsmode
[Syntax with arguments]
eth_rddsmode()
[Arguments]
None
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (390) Value stored in the return value of the eth_rddsmode function
Element Type Description
1st element Numerical Execution result
value EW_OK

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 494/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Normal termination
EW_NOOPT
There are no required options.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
22: The option board is not available.
24: The Data Server function is not available.
90: The combination of communication functions is invalid.
Confirm the values of diagnosis data No.4400 and No.4401.
For details on the diagnosis data Nos. 4400 and 4401, refer to "Section
5.32.5 Diagnosis Data in C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
2nd element Numerical Value that corresponds to the Data Server function of each read channel
value 0: None
1: Storage mode
2: Buffer mode
3: FTP mode
[Description]
Reads the mode of the Data Server function in all paths (all channels).
[Example]
To read the mode of the Data Server function in all paths:

ret = eth_rddsmode()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.14 Changing the mode of the Data Server function

[Function]
eth_wrdsmode
[Syntax with arguments]
eth_wrdsmode(path, mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (391) Arguments of the eth_wrdsmode function


Name Type Description
path Numerical Specify the path number (channel number) to change.
value A number from 1 to 10 can be specified. If you specify "0", the mode of all the
paths is changed.
device Numerical Specify the value that corresponds to the mode of the Data Server function for each
value path.
1: Storage mode
2: Buffer mode
3: FTP mode
[Return value]
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 495/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (392) Value stored in the return value of the eth_wrdsmode function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_DATA
The specified argument is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
2: Data is out of range
The following is set in "Error data number" in the return value array.
302: Mode is out of range.
EW_NOOPT
There are no required options.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
22: The option board is not available.
24: The Data Server function is not available.
25: Buffer mode function is not available.
26: There is no ATA card.
90: The combination of communication functions is invalid.
Confirm the values of diagnosis data No.4400 and No.4401.
For details on the diagnosis data Nos. 4400 and 4401, refer to "Section 5.32.5 Diagnosis
Data in C Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
EW_PATH
The specification of the argument path is incorrect.
[Description]
Changes the mode of the Data Server function.

13.15 Reading the connection host number of the Ethernet function

[Function]
eth_rdhost
[Syntax with arguments]
eth_rdhost(type)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (393) Arguments of the eth_rdhost function


Name Type Description
type Numerical Device number of embedded Ethernet to change.
value 1: Internal port
2: PCMCIA LAN card
3: Fast Data Server board
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 496/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (394) Value stored in the return value of the eth_rdhost function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_DATA
The specified argument is incorrect.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
2: Data is out of range
The following is set in "Error data number" in the return value array.
3: Incorrect communication function type (type)
EW_NOOPT
There are no required options.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
20: Embedded Ethernet is not available.
22: The option board is not available.
24: The Data Server function is not available.
90: The combination of communication functions is invalid.
Confirm the values of diagnosis data No.4400 and No.4401.
For details on the diagnosis data Nos. 4400 and 4401, refer to "Section
5.32.5 Diagnosis Data in C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
2nd element Numerical Obtained connection host number of the Ethernet function
value
[Description]
Reads the selected connection host number for the Ethernet function.
[Example]
To read the selected connection host number for the internal port:

ret = eth_rdhost(1)
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end

13.16 Setting the connection host number of the Ethernet function.

[Function]
eth_wrhost
[Syntax with arguments]
eth_wrhost(type, host)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 497/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (395) Arguments of the eth_wrhost function


Name Type Description
type Numerical Device number of embedded Ethernet to change.
value 1: Internal port
2: PCMCIA LAN card
3: Fast Data Server board
host Numerical Specify the connection host number (1 to 3) of the Ethernet function.
value
[Return value]
Details of the return values are as shown below.

Table 5.3 (396) Value stored in the return value of the eth_wrhost function
Type Description
Numerical Execution result
value EW_OK
Normal termination
EW_DATA
The specified argument is incorrect.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
2: Data is out of range
The following is set in "Error data number" in the return value array.
3: Incorrect communication function type (type)
301: Incorrect host number (host)
EW_NOOPT
There are no required options.
To get more detailed information on this return value, execute the cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
20: Embedded Ethernet is not available.
22: The option board is not available.
24: The Data Server function is not available.
90: The combination of communication functions is invalid.
Confirm the values of diagnosis data No.4400 and No.4401.
For details on the diagnosis data Nos. 4400 and 4401, refer to "Section 5.32.5
Diagnosis Data in C Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
[Description]
Sets the connection host number of the Ethernet function.

13.17 Opening the communication line

[Function]
eth_comopen
[Syntax with arguments]
eth_comopen(socket)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 498/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (397) Arguments of the eth_comopen function


Name Type Description
socket Numerical Socket number of the destination
value 0: CONNECT 1
1: CONNECT 2
2: CONNECT 3
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (398) Value stored in the return value of the eth_comopen function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_BUSY
A request to open the communication line is being executed.
EW_FUNC
The communication line is already open.
EW_NUMBER
The specification of the argument socket is incorrect.
EW_NOOPT
There is no option.
Or the parameter TIP (No.907#3)(*1) is not set to "1".
EW_REJECT
The communication function is being prepared.
EW_SOCKET
A communication error occurred.
- When using a standard monitor:
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in "Detail status" in the return value array.
673: The set destination port number is "0".
674: The set destination port number is not open.
675: The IP address or the host name of the destination is incorrect, or the server has
not started.
680: There is no response from the DHCP server.
- When using iHMI:
To get more detailed information on this return value, refer to the information on the 2nd
element.
2nd Numerical Detailed error (valid only when the 1st element is EW_SOCKET)
element value
- When using a standard monitor:
Not used. "0" is always set.
- When using iHMI:
673: The set destination port number is "0".
674: The set destination rejected the connection.
675: The destination cannot be found.
*1: For information on the parameter TIP (No.907#3), refer to "Section 5.4 Parameter settings on the CNC
in C Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
[Description]
Opens the communication line of the socket specified by the argument "socket". This function must always
be executed before sending or receiving data.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 499/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Even if this function is called, the communication line is not opened at once. Please retry opening the
communication line if EW_BUSY is returned as the return value.
When an error occurs while opening the communication line, EW_SOCKET is returned as the return value.
To obtain more detailed information on the EW_SOCKET error when using a standard monitor, execute
the cnc_getdtailerr function. When using iHMI, refer to the value of the 2nd element of the return value to
obtain more detailed information on the EW_SOCKET error.
[Example]
To open the communication line for CONNECT 1:

ret = eth_comopen(0)
if ret [0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

13.18 Closing the communication line

[Function]
eth_comclose
[Syntax with arguments]
eth_comclose(socket)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (399) Arguments of the eth_comclose function


Name Type Description
socket Numerical Socket number of the destination
value 0: CONNECT 1
1: CONNECT 2
2: CONNECT 3
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (400) Value stored in the return value of the eth_comclose function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_BUSY
A request to open the communication line is being executed.
EW_FUNC
The communication line is not open.
EW_NUMBER
The specification of the argument socket is incorrect.
EW_SOCKET
- When using a standard monitor:
A communication error occurred.
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in "Detail status" in the return value array.
676: The communication line with the destination was disconnected.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 500/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


679: Failed to close the communication line.
- When using iHMI:
To get more detailed information on this return value, refer to the information on the 2nd
element.
2nd Numerical Detailed error (valid only when the 1st element is EW_SOCKET)
element value - When using a standard monitor:
Not used. "0" is always set.
- When using iHMI:
676: The communication line with the destination was disconnected.
[Description]
Closes the communication line of the socket specified by the argument "socket".
Even if this function is called, the communication line is not closed at once. Please retry closing the
communication line if EW_BUSY is returned as the return value.
When an error occurs while closing the communication line, EW_SOCKET is returned as the return value.
To obtain more detailed information on the EW_SOCKET error when using a standard monitor, execute
the cnc_getdtailerr function. When using iHMI, refer to the value of the 2nd element of the return value to
obtain more detailed information on the EW_SOCKET error.
[Example]
To close the communication line for CONNECT 1:

ret = eth_comclose(0)
if ret [0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

13.19 Sending data

[Function]
eth_comsend
[Syntax with arguments]
eth_comsend(socket, length, data)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (401) Arguments of the eth_comsend function


Name Type Description
socket Numerical Socket number of the destination
value 0: CONNECT 1
1: CONNECT 2
2: CONNECT 3
length Numerical Specify a value from 1 to 1440 as the size of data to be sent in bytes.
value
data String Data to be sent
The maximum size of data that can be sent at a time is 1440 bytes.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 501/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (402) Value stored in the return value of the eth_comsend function
Element Type Description
1st Numerical Execution result
element value EW_OK
Normal termination
EW_BUSY
A request to open the communication line is being executed.
EW_FUNC
The communication line is not open.
EW_LENGTH
A value outside the range of 1 to 1440 was specified for the argument length.
EW_NUMBER
The specification of the argument socket is incorrect.
EW_SOCKET
- When using a standard monitor:
A communication error occurred.
To get more detailed information on this return value, execute the cnc_getdtailerr
function.
The following is set in "Detail status" in the return value array.
676: The communication line with the destination was disconnected.
677: Data transmission failed.
- When using iHMI:
To get more detailed information on this return value, refer to the information on the
2nd element.
2nd Numerical Detailed error (valid only when the 1st element is EW_SOCKET)
element value - When using a standard monitor:
Not used. "0" is always set.
- When using iHMI:
676: The communication line with the destination was disconnected.
677: Data transmission failed.
[Description]
Writes data for the size specified by the argument length to the transmission buffer for the socket specified
by the argument "socket".
Data transmission using the communication line will not be performed immediately after this function is
called. If EW_BUSY is returned as the return value, please retry sending the data.
If an error occurs while sending data, EW_SOCKET is returned as the return value. To obtain more
detailed information on the EW_SOCKET error when using a standard monitor, execute the
cnc_getdtailerr function. When using iHMI, refer to the value of the 2nd element of the return value to
obtain more detailed information on the EW_SOCKET error.
※ When sending a Russian character string, specify the number of characters to be sent in "length" of the
argument.

[Example]
To send a string "TEST" of four bytes to the destination 0:

ret = eth_comsend(0,4,"TEST")
if ret [0] != EW_OK then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 502/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

13.20 Receiving data

[Function]
eth_comrecv
[Syntax with arguments]
eth_comrecv(socket, length)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (403) Arguments of the eth_comrecv function


Name Type Description
socket Numerical Socket number of the destination
value 0: CONNECT 1
1: CONNECT 2
2: CONNECT 3
length Numerical Size of the data that you want to receive in bytes
value
[Return value]
For this function, the return value is an array of 4 elements.
Details of the return values are as shown below.

Table 5.3 (404) Value stored in the return value of the eth_comrecv function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_FUNC
The communication line is not open.
EW_LENGTH
A value of 0 or less was specified for the argument "length".
EW_NUMBER
The specification of the argument socket is incorrect.
EW_BUFFER
The reception buffer is empty.
EW_SOCKET
- When using a standard monitor:
A communication error occurred.
To get more detailed information on this return value, execute the
cnc_getdtailerr function.
The following is set in "Detail status" in the return value array.
676: The communication line with the destination was disconnected.
- When using iHMI:
To get more detailed information on this return value, refer to the
information on the 2nd element.
2nd element Numerical Detailed error (valid only when the 1st element is EW_SOCKET)
value - When using a standard monitor:
Not used. "0" is always set.
- When using iHMI:
676: The communication line with the destination was disconnected.
3rd element Numerical Size of the received data
value
4th element String Received data
The maximum size of data that can be received at a time is 8191 bytes.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 503/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Reads data for the size specified by the argument length from the transmission buffer for the socket
specified by the argument "socket".
If there is not enough data for the size specified by the argument length in the reception buffer, this
function reads as much data as possible and returns the size of the read data to the 2nd element of the array.
If there is no data in the reception buffer, EW_BUFFER is returned as the return value. In this case, retry
receiving data.
If an error occurs while receiving data, EW_SOCKET is returned. To obtain more detailed information on
the EW_SOCKET error when using a standard monitor, execute the cnc_getdtailerr function. When using
iHMI, refer to the value of the 2nd element of the return value to obtain more detailed information on the
EW_SOCKET error.
Even when the communication line is closed by an external device, the function will read data if data
remains in the reception buffer. In this case, EW_OK is returned. Then, when you execute this function
after all data in the reception buffer is read, EW_SOCKET is returned as the return value.
[Example]
To read data of size 100 from socket number 0:

ret = eth_comrecv (0,100)


if ret[0] = EW_OK then
msg_txt = "Data=" + ret[2] + "¥n"
MsgBoxShow( msg_txt, 0 )
end

13.21 Reading the status of the communication line

[Function]
eth_comstatus
[Syntax with arguments]
eth_comstatus(socket)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (405) Arguments of the eth_comstatus function


Name Type Description
socket Numerical Socket number of the destination
value 0: CONNECT 1
1: CONNECT 2
2: CONNECT 3
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (406) Value stored in the return value of the eth_comstatus function
Element Type Description
1st element Numerical Execution result
value EW_OK
Normal termination
EW_NUMBER
The specification of the argument socket is incorrect.
EW_NOOPT
No options

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 504/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


Or the parameter TIP (No.907#3)(*1) is not set to "1".
EW_REJECT
The communication function is being prepared.
2nd element Numerical Bit position according to the status of the read communication line
value 7: Connecting to the communication line
9: Reception buffer empty
*1: For information on the parameter TIP (No.907#3), refer to "Section 5.4 Parameter settings on the CNC
in C Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
[Description]
Reads the status of the communication line and the status of the reception buffer for the socket specified by
the argument "socket".
[Example]
To read the communication status and the reception buffer status of socket number 0:

ret = eth_comstatus(0)
if ret[0] = EW_OK then
status = format("%016d",ret[1].to_s(2))
msg_txt = "communication status:" + status
MsgBoxShow(msg_txt,0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 505/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[ANSI C standard library function reference]

14.1 Deleting a file

[Function]
remove
[Syntax with arguments]
remove(filename)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (407) Arguments of the remove function


Name Type Description
filename String Path to the file to be deleted
The maximum number of characters is as follows.
When using iHMI:
Up to 259 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of
a memory card in your PC" in "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (408) Value stored in the return value of the remove function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EACCES
A read-only file was set for the path name.
ENOENT
The file or path could not be detected, or
a directory was specified for the path.
- When using iHMI:
2: The specified file could not be found
5: Access denied
*For detailed error numbers other than those listed above, see the error code
list for WindowsAPI.
[Description]
Deletes the file specified by filename.
[Example]
To delete "prg1.txt" in the path "D://ExampleFP/prg/":

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 506/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

path = "D:¥¥ExampleFP¥¥prg¥¥prg1.txt" # File path to delete


ret_values = remove(path) # Deletes the specified file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

14.2 Changing a file name

[Function]
rename
[Syntax with arguments]
rename(oldname, newname)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (409) Arguments of the rename function


Name Type Description
oldname String Path name of the old file or directory
The maximum number of characters is as follows.
When using iHMI:
Up to 259 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of a
memory card in your PC" in "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
newname String Path name of the new file or directory
The maximum number of characters is as follows.
When using iHMI:
Up to 259 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of a
memory card in your PC" in "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (410) Value stored in the return value of the rename function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 507/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EACCES
The file or directory specified by newname already exists, or it cannot be
created due to an invalid path. Or, another path was specified by newname
even though oldname is a directory.
ENOENT
The file or path specified by oldname could not be found.
EXDEV
The file was attempted to be moved to another device.
- When using iHMI:
2: The specified file could not be found
3: The specified path could not be found
5: Access denied
183: A file that already exists cannot be created
*For detailed error numbers other than those listed above, see the error code
list for WindowsAPI.
[Description]
Changes the file or directory name specified by oldname to the one specified by newname. The old name
must be the path name of a file or directory that already exists. The new name must not be the path name of
a file or directory that already exists.
When you assign a path name other than that specified by oldname to newname and use the rename
function, you can move a file from a directory to another directory. However, you cannot move a file from
one device to another device. Although you can change the name of a directory or move it, it cannot be
moved from one device to another device.
[Example]
To change "prg1.txt" in the path "D://ExampleFP/prg/" to "prgRename.txt":

oldname = "D:¥¥ExampleFP¥¥prg¥¥prg1.txt" # Path to the file with an old name


newname = "D:¥¥ExampleFP¥¥prg¥¥prgRename.txt" # Path to a file with a new name
ret_values = rename(oldname, newname) # Changes the name of the specified file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

CAUTION
When using a standard monitor, you cannot move a file or directory with the
current library. Calling a function that moves a file or directory, such as the
rename function, will result in an error. (2nd element of the return value =
EACCES)

14.3 Generating a temporary file name

[Function]
tmpnam
[Syntax with arguments]
tmpnam()
[Arguments]
None

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 508/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (411) Value stored in the return value of the tmpnam function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
1
Function failed
2nd element String A unique file name
[Description]
Generates a file name that opens a temporary file without overwriting an existing file.
This function generates a unique file name for up to TMP_MAX (32767) calls.
The string that is generated consists of a path prefix (¥sNumber.) followed by a number from '0' to '9'. The
number represented by this string takes a value from 1 to 65535. Even if you change the definition of
L_tmpnam, the processing of the tmpnam function will not change.
[Example]
To create a temporary file name:

ret_values = tmpnam() # Creates a temporary file name


if ret_values[0] == 0 then
tmpname = ret_values[1] # Gets a temporary file name
else
MsgBoxShow("ERROR", 0)
end

14.4 Generating a pseudo-random number

[Function]
rand
[Syntax with arguments]
rand()
[Arguments]
None
[Return value]
Details of the return values are as shown below.

Table 5.3 (412) Value stored in the return value of the rand function
Type Description
Numerical Created pseudo-random number
value The pseudo-random number ranges from 0 to 32767.
[Description]
Returns a pseudo-random number. The random number generator can be seeded with the srand function.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 509/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

14.5 Seeding the pseudo-random number generator

[Function]
srand
[Syntax with arguments]
srand(seed)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (413) Arguments of the srand function


Name Type Description
seed Numerical value Seeded series number
[Return value]
Details of the return values are as shown below.

Table 5.3 (414) Value stored in the return value of the srand function
Type Description
Numerical Execution result
value 0
Normal termination
[Description]
Initializes a series of random numbers generated by the srand function or rand function.
[Example]
To initialize a series of random numbers:

seed = time() # Gets a seeded series number from the current time
ret_value = srand(seed[1]) # Executes the srand function
if ret_value != 0 then
MsgBoxShow("ERROR", 0)
end

14.6 Converting local time to calendar time

[Function]
mktime
[Syntax with arguments]
mktime(regiontime)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (415) Arguments of the mktime function


Name Type Description
regiontime Array of 9 Local time
elements For details on the value, refer to the following table "Time information."

Table 5.3 (416) Time information


Element Type Description
1st element Numerical value Second
The value ranges from 0 to 59.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 510/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical value Minute
The value ranges from 0 to 59.
3rd element Numerical value Hour
The value ranges from 0 to 23.
4th element Numerical value Date
The value ranges from 1 to 31.
5th element Numerical value Month
The value ranges from 0 to 11.
6th element Numerical value Year
The number of years elapsed since 1900.
7th element Numerical value Day of the week
A numerical value that corresponds to the day of the
week. Continuous numerical values, with 0 and 1
corresponding to Sunday and Monday, respectively.
8th element Numerical value The serial date number within the year
The value ranges from 0 to 365.
9th element Numerical value Daylight saving time flag
The flag is retained as follows.
Daylight saving time is used: Non-0
Daylight saving time is not used: 0
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (417) Value stored in the return value of the mktime function
Element Type Description
1st element Numerical value Execution result
0
Normal termination
-1
Function failed
2nd element Numerical value Local time converted to the calendar value
If the function fails (1st element is -1), -1 is returned.
[Description]
Converts the specified local time to a calendar value.
[Example]
To convert the local time [0,30,10,1,5,118,5,151,0] to a calendar value:

timeinfo = [0,30,10,1,5,118,5,151,0] # Local time information to be converted


ret_values = mktime(timeinfo) # Executes the mktime function
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

14.7 Getting the current time

[Function]
time
[Syntax with arguments]
time()

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 511/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
None
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (418) Value stored in the return value of the time function
Element Type Description
1st element Numerical value Execution result
0
Normal termination
-1
Function failed
2nd element Numerical value Current time
The accumulated number of seconds since 1/1/1970 0:00:00.
- When using a standard monitor:
The time read from the calendar clock of the CNC device.
If the calendar clock is not set correctly, -1 is returned.
- When using iHMI:
The time read from the system date.
[Description]
Gets the current time.
[Example]
To get the current time:

ret_values = time() # Executes the time function


if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end
curtime = ret_values[1] # Gets the current time

14.8 Converting time to a string

[Function]
asctime
[Syntax with arguments]
asctime(timeinfo)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (419) Arguments of the asctime function


Name Type Description
timeinfo Array of 9 Time information to be converted to a string
elements For details on the value, refer to the following table "Time information."

Table 5.3 (420) Time information


Element Type Description
1st element Numerical value Second
The value ranges from 0 to 59.
2nd element Numerical value Minute
The value ranges from 0 to 59.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 512/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Numerical value Hour
The value ranges from 0 to 23.
4th element Numerical value Date
The value ranges from 1 to 31.
5th element Numerical value Month
The value ranges from 0 to 11.
6th element Numerical value Year
The number of years elapsed since 1900.
7th element Numerical value Day of the week
A numerical value that corresponds to the day of
the week. Continuous numerical values, with 0 and
1 corresponding to Sunday and Monday,
respectively.
8th element Numerical value The serial date number within the year
The value ranges from 0 to 365.
Not used for this function.
9th element Numerical value Daylight saving time flag
The flag is retained as follows.
Daylight saving time is used: Non-0
Daylight saving time is not used: 0
Not used for this function.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (421) Value stored in the return value of the asctime function
Element Type Description
1st element Numerical value Execution result
0
Normal termination
2nd element String Time converted to a string
The format after conversion is as follows:
"Day of the week Month Date Hour:Minute:Second Year¥n"
Example: "Sun Jan 01 00:00:00 1992¥n"
[Description]
Converts the specified time information to a string.
[Example]
To convert the time information [15,30,10,1,5,118,5,151,0] to a string:

timeinfo = [15,30,10,1,5,118,5,151,0] # Stores time information


ret_values = asctime(timeinfo) # Executes the asctime function
strtime = ret_values[1] # Time information converted to a string

14.9 Converting time to a local time string

[Function]
ctime
[Syntax with arguments]
ctime(time)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 513/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (422) Arguments of the ctime function


Name Type Description
time Numerical Time to be converted to a string
value The number of seconds elapsed since 1/1/1970 00:00:00 Greenwich mean
time. This value is the return value of the standard time function.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (423) Value stored in the return value of the ctime function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
2nd element String Time converted to a string
The format after conversion is as follows:
"Day of the week Month Date Hour:Minute:Second Year¥n"
Example: "Sun Jan 01 00:00:00 1992¥n"
[Description]
Converts the specified time information to a string. "ctime(time)" is equivalent to "asctime" (the 3rd
element of "localtime(time)").
[Example]
To convert the time information [15,30,10,1,5,118,5,151,0] to a string:

timeinfo = [15,30,10,1,5,118,5,151,0] # Stores time information


ret_values = ctime(timeinfo) # Executes the ctime function
strtime = ret_values[1] # Time information converted to a string

14.10 Converting the time to Greenwich mean time

[Function]
gmtime
[Syntax with arguments]
gmtime(time)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (424) Arguments of the gmtime function


Name Type Description
time Numerical Time to be converted to Greenwich mean time
value The number of seconds elapsed since 1/1/1970 00:00:00 Greenwich mean
time. This value is the return value of the standard time function.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 514/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (425) Value stored in the return value of the gmtime function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
2nd element Array of 9 Time converted to Greenwich mean time
elements For details on the value, refer to the following table "Time information."

Table 5.3 (426) Time information


Element Type Description
1st element Numerical value Second
The value ranges from 0 to 59.
2nd element Numerical value Minute
The value ranges from 0 to 59.
3rd element Numerical value Hour
The value ranges from 0 to 23.
4th element Numerical value Date
The value ranges from 1 to 31.
5th element Numerical value Month
The value ranges from 0 to 11.
6th element Numerical value Year
The number of years elapsed since 1900.
7th element Numerical value Day of the week
A numerical value that corresponds to the day of
the week. Continuous numerical values, with 0 and
1 corresponding to Sunday and Monday,
respectively.
8th element Numerical value The serial date number within the year
The value ranges from 0 to 365.
9th element Numerical value Daylight saving time flag
The flag is retained as follows.
Daylight saving time is used: Non-0
Daylight saving time is not used: 0
[Description]
Converts time represented by the argument time to Greenwich mean time.
[Example]
To convert the current time to Greenwich mean time:

curtime = time() # Gets the current time


ret_values = gmtime(curtime[1]) # Executes the gmtime function
strctime = ret_values[1] # Time information converted to Greenwich mean time

14.11 Converting time to local time

[Function]
localtime
[Syntax with arguments]
localtime(time)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 515/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (427) Arguments of the localtime function


Name Type Description
time Numerical Time to be converted to local time
value The number of seconds elapsed since 1/1/1970 00:00:00 Greenwich mean
time. This value is the return value of the standard time function.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (428) Value stored in the return value of the localtime function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
2nd element Array of 9 Time information converted to local standard time
elements For details on the value, refer to the following table "Time information."

Table 5.3 (429) Time information


Element Type Description
1st element Numerical value Second
The value ranges from 0 to 59.
2nd element Numerical value Minute
The value ranges from 0 to 59.
3rd element Numerical value Hour
The value ranges from 0 to 23.
4th element Numerical value Date
The value ranges from 1 to 31.
5th element Numerical value Month
The value ranges from 0 to 11.
6th element Numerical value Year
The number of years elapsed since 1900.
7th element Numerical value Day of the week
A numerical value that corresponds to the day of the
week. Continuous numerical values, with 0 and 1
corresponding to Sunday and Monday, respectively.
8th element Numerical value The serial date number within the year
The value ranges from 0 to 365.
9th element Numerical value Daylight saving time flag
The flag is retained as follows.
Daylight saving time is used: Non-0
Daylight saving time is not used: 0
[Description]
Converts time represented by the argument time to local standard time
[Example]
To convert the current time to local standard time:

curtime = time() # Gets the current time


ret_values = localtime(curtime[1]) # Executes the localtime function
strctime = ret_values[1] # Time information converted to local standard time

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 516/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

14.12 Computing the difference between two times

[Function]
difftime
[Syntax with arguments]
difftime(e_time, s_time)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (430) Arguments of the difftime function


Name Type Description
e_time Numerical value End time
s_time Numerical value Start time
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (431) Value stored in the return value of the difftime function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Array of 9 Elapsed time in seconds for e_time – s_time
elements If the function fails (1st element is -1), -1 is returned.
[Description]
Computes the difference between two times by subtracting the argument s_time from the argument e_time.
[Example]
To get the elapsed time:

s_time = time() # Gets the start time


sleep(5000) # Sleeps for 5 seconds
e_time = time() # Gets the end time
ret_values = difftime(e_time[1],s_time[1]) # Executes the difftime function
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end
d_time = ret_values[1] # Gets the elapsed time

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 517/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[List of MS-C extended C standard library function reference]

15.1 Finding the first file whose attributes match the specified ones

[Function]
_dos_findfirst
[Syntax with arguments]
_dos_findfirst(path, attr)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (432) Arguments of the _dos_findfirst function


Name Type Description
path String File name to be searched for
Wild card characters (*, ?) can be used.
Up to 12 characters can be used.
attr Numerical Attributes of the file to be searched for
value For details on the value, refer to the following table "file attributes." Only the values
described can be set. If any other value is specified, it is processed as
_A_NORMAL. When a file has two or more attributes, the values described below
are united by the bit OR operator ( | ).

Table 5.3 (433) file attributes


Name Value Description
_A_NORMAL 0x00 Normal file
_A_RDONLY 0x01 Read only
_A_HIDDEN 0x02 Hidden file
_A_SYSTEM 0x04 System file
_A_VOLID 0x08 Volume label
_A_SUBDIR 0x10 Subdirectory
_A_ARCH 0x20 Archive
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (434) Value stored in the return value of the _dos_findfirst function
Element Type Description
1st element Numerical value Execution result
0: Successful.
If it is not 0, one of the following values is returned:
In addition, ENOENT is set in the 2nd element.
15: A file or directory with the specified attribute could not be found.
22: The specified file name is invalid.
31: The specified path is invalid.
2nd element Numerical value Error code (valid only when the 1st element is not "0")
3rd element Array of 5 File information of the first match
elements For details on the value, refer to the following table "File information."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 518/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (435) File information


Element Type Description
1st element Numerical value file attributes
For details on the value, see "file attributes" above.
When a file has two or more attributes, the values described above are
united by the bit OR operator ( | ).
2nd element Numerical value File modification time *Add the format after trying to change the time.
3rd element Numerical value File modification date *Add the format after trying to change the date.
4th element Numerical value File size [byte]
5th element String File name
If the specified file name has 12 or more characters, the file name up to the
first 12 characters is acquired and the remaining string is discarded.
[Description]
Searches for a file that matches the specified path and the specified attributes.
This function returns information on the first match.
[Example]
To get two items of ".txt" file information with the normal file attribute under the current path:

path = "*.txt" # File path


ret_firstvalues = _dos_findfirst(path, _A_NORMAL) # Searches for the specified file
if ret_firstvalues[0] == 0 then # File search
ret_nextvalues = _dos_findnext() # Searches for the next instance of the specified file
if ret_nextvalues[0] != 0 then
MsgBoxShow("ERROR", 0)
end
else
MsgBoxShow("ERROR", 0)
end

15.2 Finding the next file whose attributes match the specified ones

[Function]
_dos_findnext
[Syntax with arguments]
_dos_findnext()
[Arguments]
None
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (436) Value stored in the return value of the _dos_findnext function
Element Type Description
1st element Numerical Execution result
value 0: Successful.
If it is not 0, one of the following values is returned:
In addition, ENOENT is set in the 2nd element.
15: A file or directory with the specified attribute could not be found.
22: The specified file name is invalid.
31: The specified path is invalid.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 519/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical Error code (valid only when the 1st element is not "0")
value
3rd element Array of 5 File information of the next match
elements For details on the value, refer to the following table "File information."

Table 5.3 (437) File information


Element Type Description
1st element Numerical file attributes
value For details on the value, refer to the following table "file attributes."
When a file has two or more attributes, the values described above are
united by the bit OR operator ( | ).
2nd element Numerical File modification time *Add the format after trying to change the time.
value
3rd element Numerical File modification date *Add the format after trying to change the date.
value
4th element Numerical File size [byte]
value
5th element String File name
If the matching file name has 12 or more characters, the file name up to the
first 12 characters is acquired and the character string is discarded.

Table 5.3 (438) file attributes


Name Value Description
_A_NORMAL 0x00 Normal file
_A_RDONLY 0x01 Read only
_A_HIDDEN 0x02 Hidden file
_A_SYSTEM 0x04 System file
_A_VOLID 0x08 Volume label
_A_SUBDIR 0x10 Subdirectory
_A_ARCH 0x20 Archive
[Description]
Searches for the next instance of a file searched for using the _dos_findfirst function. Path and attributes of
the file for the next search carry over information set by the _dos_findfirst function. Please refer to the
method of setting arguments for the _dos_findfirst function.
Please execute the _dos_findfirst function before executing this function.
[Example]
Refer to "Finding the first file whose attributes match the specified ones (_dos_findfirst)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 520/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

CAUTION
1 Please execute the _dos_findfirst function and execute the _dos_findnext
function to continue searching for the next file.
2 When the following action has been performed, "-1" is returned and no operations
are executed:
- When the _dos_findnext32 function is executed after the _dos_findfirst
function is executed.
- When the _dos_findnext function is executed after the _dos_findfirst32
function is executed.
3 File names of up to 12 characters or more can be searched for. When the file
name is specified using wild card characters, it is possible to search for files with
file names with 13 or more characters, but operatons such as opening, searching,
deletion, cannot be performed.

15.3 Finding a specified file

[Function]
findfirstfile
[Syntax with arguments]
findfirstfile(filename)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (439) Arguments of the findfirstfile function


Name Type Description
filename String Search target file name or directory name
Wild card characters (*, ?) can be used.
Up to 256 characters can be used.
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (440) Value stored in the return value of the findfirstfile function
Element Type Description
1st element Numerical Execution result
value Search handle (0 or larger value)
Normal termination
-1
Function failed
When the function is successful, the search handle is returned.
The search handle is used by the findnextfile function and the findclose function.
2nd element Numerical Detailed error number (valid only when the 1st element is "-1")
value 2: The specified file could not be found
3: The specified path could not be found
123: The file name, directory name, or volume label syntax is incorrect

*For detailed error numbers other than those listed above, see the error code list for
WindowsAPI.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 521/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Array of 7 File information for the first match
elements For details on the value, refer to the following table "File information."

Table 5.3 (441) File information


Element Type Description
1st element Numerical file attributes
value For details on the value, refer to the following table "file attributes."
When a file has two or more attributes, the values described below are united
by the bit OR operator ( | ).
2nd element Array of 8 File creation time
elements For details on the value, refer to the following table "System time information."
3rd element Array of 8 File access time
elements For details on the value, refer to the following table "System time information."
4th element Array of 8 File update time
elements For details on the value, refer to the following table "System time information."
5th element Numerical File size information (upper four bytes)
value
6th element Numerical File size information (lower four bytes)
value
7th element String File name

Table 5.3 (442) file attributes


Name Value Description
FILE_ATTRIBUTE_READONLY 0x01 Read only
FILE_ATTRIBUTE_HIDDEN 0x02 Hidden file
FILE_ATTRIBUTE_SYSTEM 0x04 System attribute
FILE_ATTRIBUTE_DIRECTORY 0x10 Directory attribute
FILE_ATTRIBUTE_ARCHIVE 0x20 Archive
FILE_ATTRIBUTE_NORMAL 0x80 Normal file

Table 5.3 (443) System time information


Element Type Description
1st element Numerical value Year
2nd element Numerical value Month
3rd element Numerical value Day of the week
A numerical value that corresponds to the day
of the week. Continuous numerical values,
with 0 and 1 corresponding to Sunday and
Monday, respectively.
4th element Numerical value Date
5th element Numerical value Hour
6th element Numerical value Minute
7th element Numerical value Second
8th element Numerical value Millisecond
[Description]
Gets information on the specified file or directory.
This function returns information on the first match. To continue searching, execute the findnextfile
function after executing this function. To end the search, execute the findcose function.
[Example]
To get file information on "prg1.txt" and "prg2.txt" under the path "D://ExampleFP/prg/":

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 522/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

path = "D:¥¥ExampleFP¥¥prg¥¥prg*" # File path


ret_firstvalues = findfirstfile(path) # Searches for the specified file
if ret_firstvalues[0] != -1 then # File search
ret_nextvalues = findnextfile(ret_firstvalues[0]) # Searches for the next instance of the specified file
if ret_nextvalues[0] == 0 then
MsgBoxShow("ERROR", 0)
end
findclose(ret_firstvalues[0]) # Closes the file search handle
else
MsgBoxShow("ERROR", 0)
end

15.4 Finding the next instance of the specified file

[Function]
findnextfile
[Syntax with arguments]
findnextfile(handle)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (444) Arguments of the findnextfile function


Name Type Description
handle Numerical Search handle
value Specify the handle returned by the findfirstfile function
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (445) Value stored in the return value of the findnextfile function
Element Type Description
1st element Numerical Execution result
value Non-0 value
Normal termination
0
Function failed
If the function fails, the detailed cause is shown in the detailed error.
2nd element Numerical Detailed error number (valid only when the 1st element is "0")
value 6: Invalid handle
18: There are no more files
*For detailed error numbers other than those listed above, see the error code list for
WindowsAPI.
3rd element Array of 7 Matching file information
elements For details on the value, refer to the following table "File information."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 523/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (446) File information


Element Type Description
1st element Numerical file attributes
value For details on the value, refer to the following table "file attributes."
When a file has two or more attributes, the values described below are
united by the bit OR operator ( | ).
2nd element Array of 8 File creation time
elements For details on the value, refer to the following table "System time
information."
3rd element Array of 8 File access time
elements For details on the value, refer to the following table "System time
information."
4th element Array of 8 File update time
elements For details on the value, refer to the following table "System time
information."
5th element Numerical File size information (upper four bytes)
value
6th element Numerical File size information (lower four bytes)
value
7th element String File name

Table 5.3 (447) file attributes


Name Value Description
FILE_ATTRIBUTE_READONLY 0x01 Read only
FILE_ATTRIBUTE_HIDDEN 0x02 Hidden file
FILE_ATTRIBUTE_SYSTEM 0x04 System attribute
FILE_ATTRIBUTE_DIRECTORY 0x10 Directory attribute
FILE_ATTRIBUTE_ARCHIVE 0x20 Archive
FILE_ATTRIBUTE_NORMAL 0x80 Normal file

Table 5.3 (448) System time information


Element Type Description
1st element Numerical value Year
2nd element Numerical value Month
3rd element Numerical value Day of the week
A numerical value that corresponds to the day
of the week. Continuous numerical values,
with 0 and 1 corresponding to Sunday and
Monday, respectively.
4th element Numerical value Date
5th element Numerical value Hour
6th element Numerical value Minute
7th element Numerical value Second
8th element Numerical value Millisecond
[Description]
Searches for the next instance of a file found by the findfirstfile function. This function use the search
handle returned by the findfirstfile function as the argument. Please execute the findfirstfile function before
executing this function. To continue searching, execute the findnextfile function after executing this
function. To end the search, execute the findcose function.
[Example]
Refer to [Example] under "Finding the specified file (findfirstfile)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 524/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

15.5 Closing the file search handle

[Function]
findclose
[Syntax with arguments]
findclose(handle)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (449) Arguments of the findclose function


Name Type Description
handle Numerical Search handle
value Specify the handle returned by the findfirstfile function
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (450) Value stored in the return value of the findclose function
Element Type Description
1st element Numerical Execution result
value Non-0 value
Normal termination
0
Function failed
If the function fails, the detailed cause is shown in the detailed error.
2nd element Numerical Detailed error (valid only when the 1st element is "0")
value 6: Invalid handle
998: Invalid access to the memory location
*For detailed error numbers other than those listed above, see the error code list for
WindowsAPI.
[Description]
Closes the specified search handle. This function closes the search handle opened by executing the
findfirstfile function. Be sure to execute this function after executing the findfirstfile function and the
findnextfile function.
[Example]
Refer to [Example] under "Finding the specified file (findfirstfile)."

15.6 Acquiring disk information

[Function]
_dos_getdiskfree
[Syntax with arguments]
_dos_getdiskfree( device )
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 525/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (451) Arguments of the _dos_getdiskfree function


Name Type Description
device Numerical Directory name of the disk from which you want to obtain information
value Continuous numerical values, with 0 representing the current drive and 1
representing drive A.
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (452) Value stored in the return value of the _dos_getdiskfree function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
Non-0
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is not "0")
value EINVAL
The specified device is invalid.
3rd element Array of 4 Disk information
elements For details on the value, refer to the following table "Disk information."

Table 5.3 (453) Disk information


Element Type Description
1st element Numerical value Total number of clusters
2nd element Numerical value Number of available clusters
3rd element Numerical value Number of sectors per cluster
4th element Numerical value Number of bytes per sector
[Description]
Gets the capacity of the specified disk.
[Example]
To get the disk capacity of the current drive:

device = 0 # Specify the current drive


ret_values = _dos_getdiskfree(device) # Gets the disk information
if ret_values[0] != 0 then
MsgBoxShow("ERROR", 0)
end

CAUTION
This function cannot be used with iHMI.
If this function is used with iHMI, EW_OK is returned, but disk information will not
be acquired.

15.7 Acquiring disk information

[Function]
getdiskfree
[Syntax with arguments]
getdiskfree(dirname)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 526/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (454) Arguments of the getdiskfree function


Name Type Description
dirname String Directory name of the disk from which you want to obtain information
If you specify nothing, this function obtains disk information of the disk for the current
directory.
Up to 259 characters can be used.
[Return value]
For this function, the return value is an array of 5 elements.
Details of the return values are as shown below.

Table 5.3 (455) Value stored in the return value of the getdiskfree function
Element Type Description
1st element Numerical Execution result
value Non-0
Normal termination
0
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "0")
value 123: The file name, directory name, or volume label syntax is incorrect
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
3rd element Array of 2 Free disk space in bytes available to the user
elements For details on the value, refer to the following table "Disk size information."
4th element Array of 2 Total disk space in bytes available to the user
elements For details on the value, refer to the following table "Disk size information."
5th element Array of 2 Free disk space in bytes
elements For details on the value, refer to the following table "Disk size information."

Table 5.3 (456) Disk size information


Element Type Description
1st element Numerical value Information in lower four bytes
2nd element Numerical value Information in upper four bytes
[Description]
Gets the capacity of the specified disk.
[Example]
To get the disk capacity of the current drive:

device = 0 # Specify the current drive


ret_values = _dos_getdiskfree(device) # Gets the disk information
if ret_values[0] != 0 then
MsgBoxShow("ERROR", 0)
end

CAUTION
This function cannot be used with a standard monitor.
If this function is used with a standard monitor, EW_OK is returned, but disk
information will not be acquired.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 527/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

15.8 Changing the current drive

[Function]
_chdrive
[Syntax with arguments]
_chdrive(drive)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (457) Arguments of the _chdrive function


Name Type Description
drive Numerical Current drive to be changed
value Specify the current drive that you want to change as a numerical value. It takes
continuous numerical values, with 1 and 2 corresponding to drive A and drive
B, respectively. The value ranges from 1 to 26.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (458) Value stored in the return value of the _chdrive function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value EACCES
Cannot access the specified drive.
[Description]
Changes the current drive.
[Example]
To change the current drive to drive C:

drive = 3 # Sets the current drive to change with a numerical value


ret_values = _chdrive(drive) # Executes the _chdrive function
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

NOTE
This function cannot be used with PANEL iH.
If this function is used with PANEL iH, 0 is returned, but the current drive will not
be changed.

15.9 Acquiring the current drive

[Function]
_getdrive

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 528/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax with arguments]


_getdrive()
[Arguments]
None
[Return value]
Details of the return values are as shown below.

Table 5.3 (459) Value stored in the return value of the _getdrive function
Type Description
Numerical Acquired current drive
value The acquired current drive is returned as a numerical value. It takes continuous numerical
values, with 1 and 2 corresponding to drive A and drive B, respectively. The value ranges from
1 to 26.
[Description]
Gets the current drive.

NOTE
This function cannot be used with PANEL iH.
If this function is used with PANEL iH, 0 is returned, but the current drive will not
be acquired.

15.10 Changing the current directory

[Function]
chdir
[Syntax with arguments]
chdir( path )
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (460) Arguments of the chdir function


Name Type Description
path String Path to the new current directory
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (461) Value stored in the return value of the chdir function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value ENOENT
The specified path could not be found
EINVAL
An empty string was specified for the argument

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 529/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Description]
Changes the current directory to the directory specified by the argument.
[Example]
To change the current directory to the path "D://ExampleFP":

path = "D://ExampleFP" # Sets the path to the current directory to be changed


ret_values = chdir(path) # Executes the chdir function
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

NOTE
This function cannot be used with PANEL iH.
If this function is used with PANEL iH, 0 is returned, but the current directory will
not be changed.

15.11 Acquiring the current directory

[Function]
getcwd
[Syntax with arguments]
getcwd()
[Arguments]
None
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (462) Value stored in the return value of the getcwd function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element String Path to the acquired current directory
[Description]
Gets the path to the current directory.
[Example]
To get the current directory:

ret_values = getcwd(path) # Executes the getcwd function


if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 530/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
This function cannot be used with PANEL iH.
If this function is used with PANEL iH, 0 is returned, but the path to the current
directory will not be acquired.

15.12 Calculating the absolute value of a complex number

[Function]
cabs
[Syntax with arguments]
cabs( realnum, imagnum )
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (463) Arguments of the cabs function


Name Type Description
realnum Numerical value Numerical value for the real number part
imagnum Numerical value Numerical value of the imaginary number part
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (464) Value stored in the return value of the cabs function
Element Type Description
1st element Numerica Execution result
l value 0
Normal termination
HUGE_VAL
Function failed
2nd element Numerica Calculated absolute value of the complex number (valid only when the 1st element is "0")
l value When the 1st element is HUGE_VAL, 0 is set.
[Description]
Calculates the absolute value of the complex number specified by the argument.
[Example]
To calculate the absolute value of "4 + 3i":

realnum = 4 # Specification of the real number part


imagnum = 3 # Specification of the imaginary number part
ret_values = cabs(realnum, imagnum) # Executes the cabs function
if ret_values[0] == HUGE_VAL then
MsgBoxShow("ERROR", 0)
end

15.13 Calculating the length of the hypotenuse of a right triangle

[Function]
hypot
[Syntax with arguments]
hypot(xnum, ynum)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 531/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Arguments]
The arguments of this function are as shown below.

Table 5.3 (465) Arguments of the hypot function


Name Type Description
xnum Numerical value Length of the base of the right triangle
ynum Numerical value Height of the right triangle
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (466) Value stored in the return value of the hypot function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
HUGE_VAL
Function failed
2nd element Numerical Length of the hypotenuse of the right triangle (valid only when the 1st element is
value "0")
It is the square of the sum of the squares of the argument xnum and the
square of the argument ynum.
When the 1st element is HUGE_VAL, 0 is set.
[Description]
Calculates the length of the hypotenuse of a right triangle based on the length of the two sides specified the
arguments.
[Example]
To calculate the length of the hypotenuse of a right triangle:

xnum = 4 # Length of the base of the right triangle


ynum = 3 # Height of the right triangle
ret_values = hypot(xnum, ynum) # Executes the hypot function
if ret_values[0] == HUGE_VAL then
MsgBoxShow("ERROR", 0)
end

15.14 Closing a file

[Function]
close
[Syntax with arguments]
close(handle)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (467) Arguments of the close function


Name Type Description
handle Numerical value File handle to be closed
[Return value]
For this function, the return value is an array of 2 elements.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 532/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Details of the return values are as shown below.

Table 5.3 (468) Value stored in the return value of the close function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EBADF
The specified file handle is not valid
- When using iHMI:
6: Invalid handle
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Closes the specified file handle Be sure to execute this function after executing the open function.
[Example]
Refer to [Example] under "Opening a file (open)."

15.15 Creating a file

[Function]
creat
[Syntax with arguments]
creat(filename, mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (469) Arguments of the creat function


Name Type Description
filename String Path to the file to be created
The maximum number of characters is as follows.
When using iHMI:
Up to 259 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of a
memory card in your PC" in "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
mode Numerical Attributes of the file to be created
value For details on the value, refer to the following table "File attributes available for
mode."

Table 5.3 (470) File attributes available for mode


Name Value Description
S_IWRITE 0x0080 Write enable

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 533/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Value Description


S_IREAD 0x0100 Read enable
S_IREAD | S_IWRITE 0x0180 Read and write enable
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (471) Value stored in the return value of the creat function
Element Type Description
1st element Numerical Execution result
value File handle (0 or larger value)
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EACCES
A read-only file was attempted to be opened for writing, or the specified path
is a directory.
EMFILE
There are too many open files.
ENOENT
The specified file could not be found.
- When using iHMI:
3: The specified path could not be found
80: There is a file
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Creates a new file with the specified filename in the specified mode. If the same file name as the specified
filename exists, this function sets the file size to 0.
[Example]
To create a new file "prg1.txt" under the path "D://ExampleFP/prg/":

filename = "D:¥¥ExampleFP¥¥prg¥¥prg1.txt" # File path to create


mode = S_IREAD | S_IWRITE # Specifies read and write enable
ret_values = creat(filename, mode) # Creates a new file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end
close(ret_values[0]) # Closes the created file

15.16 Moving the file pointer to a specified position

[Function]
lseek
[Syntax with arguments]
lseek(handle, offset, origin)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 534/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (472) Arguments of the lseek function


Name Type Description
handle Numerical value File handle
offset Numerical value Value to be moved
origin Numerical value Type to specify the position
For details on the value, refer to the following table "Position types."

Table 5.3 (473) Position types


Name Value Description
SEEK_SET 0x00 Beginning of the file
SEEK_CUR 0x01 Current position of the file pointer
SEEK_END 0x02 End of the file
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (474) Value stored in the return value of the lseek function
Element Type Description
1st element Numerical Execution result
value New file pointer
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EBADF
Invalid file handle
- When using iHMI:
6: Invalid handle
131: The file pointer was attempted to be moved before the start of the file
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Moves the file pointer of the file handle specified by handle by the amount in offset bytes from the position
specified by origin.
[Example]
Refer to [Example] under "Opening a file (open)."

15.17 Creating a new directory

[Function]
mkdir
[Syntax with arguments]
mkdir(dirname)
[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 535/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 5.3 (475) Arguments of the mkdir function


Name Type Description
dirname String Path to the new directory
The maximum number of characters is as follows.
When using iHMI:
Up to 247 characters can be used.
When using a standard monitor:
For directory path restrictions, refer to "C Language Executor
PROGRAMMIG MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of a
memory card in your PC" in "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (476) Value stored in the return value of the mkdir function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EEXIST
The name of an existing file, directory, or device is specified by dirname.
ENOENT
The specified path could not be found.
- When using iHMI:
3: The specified path could not be found
183: A file that already exists cannot be created
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Creates a directory specified by dirname.
[Example]
To create "NewDirectory" under the path "D://ExampleFP/prg/":

dirname = "D:¥¥ExampleFP¥¥prg¥¥ NewDirectory" # Path to the directory to be created


ret_values = mkdir(dirname) # Creates a new directory
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

15.18 Opening a file

[Function]
Open

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 536/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax with arguments]


open(filename, flag, mode)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (477) Arguments of the open function


Name Type Description
filename String Path to the file to be opened
The maximum number of characters is as follows.
When using iHMI:
Up to 259 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
When using a device with integrated structure, you cannot include a subdirectory in
the path. For details, refer to "Section 5.8.6 Specification of a memory card in your
PC" in "C Language Executor PROGRAMMIG MANUAL (B-63943EN-3)."
flag Numerical Mode to be opened
value For details on the value, refer to the following table "Attributes used by flag" and
"Options used by flag."
Values in "Attributes used by flag" and values in "Options used by flag" are concatenated
using any number of "|".
mode Numerical Mode to be created
value It is valid only when O_CREAT is specified by the 2nd argument flag.
For details on the value, refer to the following table "Mode to be created."

Table 5.3 (478) Attributes used by flag


Name Value Description
O_RDONLY 0x0000 Read only
O_WRONLY 0x0001 Write only
O_RDWR 0x0002 Read and write enabled

Table 5.3 (479) Options used by flag


Name Value Description
O_APPEND 0x0008 Moves the file pointer to the end of a file.
O_CREAT 0x0100 Creates a new file if a file does not exist.
O_TRUNC 0x0200 Sets the size of an existing file to 0.
When used together with O_CREAT, an existing file is opened or a new file is created.
O_EXCL 0x0400 If the file specified by filename exists, this function returns an error value. This option
is specified along with O_CREAT, and if the file already exists, this function will fail.
O_TEXT 0x4000 Opens a file in text mode.
- In the iHMI environment:
This option is invalid.
O_BINALY 0x8000 Opens a file in binary mode.
- In the iHMI environment:
This option is invalid.

Table 5.3 (480) Mode to be created


Name Value Description
S_IWRITE 0x0080 Read and write enabled
S_IREAD 0x0100 Read only

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 537/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Name Value Description


S_IREAD | S_IWRITE 0x0180 Read and write enabled
S_IWRITE and S_IREAD | S_IWRITE have the same
meaning, and the file is both read and write enabled.
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (481) Value stored in the return value of the open function
Element Type Description
1st element Numerical Execution result
value 0 or larger value (File handle)
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EACCES
A read-only file was attempted to be opened for writing, or the specified operation
is not allowed due to file sharing mode. Or, the specified filename is a directory.
EEXIST
Although O_CREAT and O_EXCL were specified by flag, filename already exists.
EINVAL
Invalid flag or mode
EMFILE
There are too many open files.
ENOENT
The specified filename could not be found.
- When using iHMI:
2: The specified file could not be found
5: Access denied
32: The process could not access the file It is being used by another process.
80: The file exists
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Opens the specified file. Be sure to execute the close function after executing this function.
[Example]
To open "prg1.txt" under the path "D://ExampleFP/prg/" and perform the following steps:
1. Write the string "Confirm the read function and the write function" with the write function.
2. Read the string written in 1 with the read function.

filename = "D:¥¥ExampleFP¥¥prg¥¥prg1.txt" # Path to the file to be opened


flag = O_RDWR # Specifies read and write enable
mode = 0 # 0 because a new file will not be created
ret_values = open(filename, flag, mode) # Opens the file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
return;
end
handle = ret_values[0] # Holds the file handle
buffer = "Confirm the read function and the write function" # Stores the string to be written

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 538/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

writecount = 25 # Number of bytes of the string to be written


ret_values = write(handle, buffer, writecount) # Writes data to the file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
close(handle) # Closes the file handle
return;
end
readcount = tell(handle) # Gets the current position of the file pointer
offset = 0 # Value to move the file pointer
origin = SEEK_SET # Specifies the position (SEEK_SET: beginning of the file)
lseek(handle, offset, origin) # Moves the file pointer
ret_values = read(handle, readcount) # Reads data from the file
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end
close(handle) # Closes the file handle

15.19 Reading data from a file

[Function]
read
[Syntax with arguments]
read(handle, count)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (482) Arguments of the read function


Name Type Description
handle Numerical value Handle of the file from which data is to be read
count Numerical value Number of bytes of data to be read
[Return value]
For this function, the return value is an array of 4 elements.
Details of the return values are as shown below.

Table 5.3 (483) Value stored in the return value of the read function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EBADF
The specified file handle is invalid.
- When using iHMI:
6: Invalid handle
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
3rd element String Read data

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 539/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


4th element Numerical Number of bytes of data actually read (valid only when the 1st element is "0")
value
[Description]
Reads data of the specified file.
[Example]
Refer to [Example] under "Opening a file (open)."

15.20 Deleting a directory

[Function]
rmdir
[Syntax with arguments]
rmdir(dirname)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (484) Arguments of the rmdir function


Name Type Description
dirname String Path to the directory to be deleted
The maximum number of characters is as follows.
When using iHMI:
Up to 247 characters can be used.
When using a standard monitor:
For file path restrictions, refer to "C Language Executor PROGRAMMIG
MANUAL (B-63943EN-3)."
When using a device with integrated structure, you cannot include a
subdirectory in the path. For details, refer to "Section 5.8.6 Specification of a
memory card in your PC" in "C Language Executor PROGRAMMIG MANUAL
(B-63943EN-3)."
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (485) Value stored in the return value of the rmdir function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 540/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
ENOTEMPTY
The directory in the specified path is not empty, or the directory is the
current working directory or the root directory.
ENOENT
The specified dirname is incorrect.
- When using iHMI:
3: The specified path does not exist
32: The process cannot access the file It is being used by another process.
145: The directory is not empty
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Deletes the directory in the specified path. If data is contained in the specified directory, this function
results in an error.
[Example]
To delete "OldDirectory" under the path "D://ExampleFP/prg/":

dirname = "D:¥¥ExampleFP¥¥prg¥¥OldDirectory" # Path to the directory to be deleted


ret_values = rmdir(dirname) # Deletes the directory
if ret_values[0] == -1 then
MsgBoxShow("ERROR", 0)
end

15.21 Acquiring the current position of the file pointer

[Function]
tell
[Syntax with arguments]
tell(handle)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (486) Arguments of the tell function


Name Type Description
handle Numerical value File handle
[Return value]
For this function, the return value is an array of 2 elements.
Details of the return values are as shown below.

Table 5.3 (487) Value stored in the return value of the tell function
Element Type Description
1st element Numerical Execution result
value Current position of the file pointer
Normal termination
-1
Function failed

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 541/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EBADF
The specified file handle is invalid.
- When using iHMI:
6: Invalid handle
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.
[Description]
Gets the current position of the file pointer for the specified file.
[Example]
Refer to [Example] under "Opening a file (open)."

15.22 Writing data to a file

[Function]
write
[Syntax with arguments]
write(handle, buffer, count)
[Arguments]
The arguments of this function are as shown below.

Table 5.3 (488) Arguments of the write function


Name Type Description
handle Numerical value File handle
buffer String Data to be written
count Numerical value Number of bytes of data to be written
[Return value]
For this function, the return value is an array of 3 elements.
Details of the return values are as shown below.

Table 5.3 (489) Value stored in the return value of the write function
Element Type Description
1st element Numerical Execution result
value 0
Normal termination
-1
Function failed
2nd element Numerical Detailed error (valid only when the 1st element is "-1")
value - When using a standard monitor:
EBADF
The specified file handle is invalid.
ENOSPC
There is not enough empty space for the specified number of bytes.
EINVAL
The specified buffer or count is invalid.
- When using iHMI:
6: Invalid handle
*For detailed error numbers other than those listed above, see the error code list
for WindowsAPI.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 542/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Element Type Description


3rd element Numerical Number of bytes of data actually written (valid only when the 1st element is "0")
value
[Description]
Writes data for the specified number of bytes to the specified file.
※ When sending a Russian character string, specify the number of characters to be sent in "count" of the
argument.

[Example]
Refer to [Example] under "Opening a file (open)."

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 543/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

5.4 TIMER-ACTIVATED OPERATOR FUNCTION ERROR


VARIABLE
If an error occurs in a script called from the timer process of the FP driver, the execution status is set in the
timer-activated operator function error variable. The function numbers set in ERROR_FPFUNC_NO of the
timer-activated operator function error variable are as follows. For information on the timer-activated operator
function error variable, refer to "Section 2.2.16 FP script function" of the "FANUC PICTURE OPERATOR'S
MANUAL (B-66284EN)."

Table 5.4 (a) Function number list


Function name Function number
cnc_rddynamic 200
cnc_wrrelpos 201
cnc_exaxisname2 202
cnc_rdaxisdata 203
cnc_rd5axmandt 205
cnc_rd5axovrlap 206
cnc_clr5axpls 207
cnc_vrfstart 208
cnc_verify 209
cnc_vrfend 210
cnc_seqsrch 211
cnc_rdpdf_drive 212
cnc_rdpdf_inf 213
cnc_rdpdf_curdir 214
cnc_wrpdf_curdir 215
cnc_rdpdf_subdir 216
cnc_rdpdf_alldir 217
cnc_pdf_add 218
cnc_pdf_del 219
cnc_pdf_rename 220
cnc_pdf_slctmain 221
cnc_wrpdf_attr 222
cnc_rdpdf_subdirn 223
cnc_pdf_rdmain 224
cnc_dwnstart4 225
cnc_download4 226
cnc_dwnend4 227
cnc_upstart4 228
cnc_upload4 229
cnc_upend4 230
cnc_exeprgname 231
cnc_exeprgname2 232
cnc_wrmdiprog 233
cnc_rdmdipntr 234
cnc_wrmdipntr 235
cnc_rdpdf_line 236
cnc_wrpdf_line 237
cnc_pdf_delline 238
cnc_pdf_rdactpt 239

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 544/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Function number


cnc_pdf_wractpt 240
cnc_saveprog_start 241
cnc_saveprog_end 242
cnc_rdparar 243
cnc_wrparas 244
cnc_rdwkcdshft 245
cnc_wrwkcdshft 246
cnc_rdpitchinfo 247
cnc_rdmacroinfo 248
cnc_rdparanum 249
cnc_rdsetnum 250
cnc_rdtofsinfo2 251
cnc_rdtoolrng 252
cnc_wrcountr 253
cnc_rdusegrpid 255
cnc_rdmaxgrp 256
cnc_rdmaxtool 257
cnc_rdusetlno 258
cnc_rd1tlifedat2 259
cnc_rd2tlifedata 260
cnc_wr1tlifedat2 261
cnc_wr2tlifedata 262
cnc_wrgrpinfo 263
cnc_wrgrpinfo2 264
cnc_wrgrpinfo3 265
cnc_deltlifegrp 266
cnc_regtool_f2 267
cnc_wrtool_f2 268
cnc_regmagazine 269
cnc_delmagazine 270
cnc_rdmagazine 271
cnc_wrmagazine 272
cnc_wrtoolgeom_tlm 273
cnc_rdtoolgeom_tlm 274
cnc_rdtlgeomsize_ext 275
cnc_wrtlgeomsize_ext 276
cnc_rdmag_property 277
cnc_wrmag_property 278
cnc_delmag_property 279
cnc_rdpot_property 280
cnc_wrpot_property 281
cnc_delpot_property 282
cnc_tool_move 287
cnc_btlfpotsrh 290
cnc_stopophis 294
cnc_startophis 295
cnc_rdophisno 296
cnc_clearophis 297
cnc_rdalmhisno 298
cnc_rdomhisno 300
cnc_rddsfile 301

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 545/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Function number


cnc_rddsdir 302
cnc_dschdir 303
cnc_dsmkdir 304
cnc_dsrmdir 305
cnc_dsremove 306
cnc_rddsdevinfo 307
cnc_dsrename 308
cnc_dscopyfile 309
cnc_getfigure 310
cnc_rdsyssoft3 311
cnc_rddiaginfo 312
cnc_rddiagnum 313
cnc_rdsyshard 314
cnc_sysinfo_ex 315
cnc_rdalmmsg 316
cnc_getdtailerr 317
cnc_statinfo2 318
cnc_rdcncid 354
pmc_rdpmcrng 367
pmc_wrpmcrng 368
pmc_get_current_pmc_unit 369
pmc_get_number_of_pmc 370
pmc_get_pmc_unit_types 371
pmc_rdkpm 372
pmc_wrkpm 373
pmc_kpmsiz 374
pmc_rdpmcinfo 375
pmc_rdprmstart 376
pmc_rdpmcparam 377
pmc_rdprmend 378
pmc_wrprmstart 379
pmc_wrpmcparam 380
pmc_wrprmend 381
pmc_getdtailerr 382
aux_file_mount 384
aux_file_unmount 385
aux_file_memcinfo 386
aux_file_usbinfo 387
_dos_findfirst32 388
_dos_findnext32 389
rs_open 390
rs_close 391
rs_putc 392
rs_getc 393
rs_write 394
rs_read 395
rs_buffer 396
rs_status 397
rs_wait 398
aux_from_open 399
aux_from_close 400

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 546/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Function number


aux_from_select 401
aux_from_moveptr 402
aux_from_read 403
aux_from_getdir 404
aux_from_getinfo 405
aux_from_getc 406
aux_from_gets 407
eth_putopen 408
eth_put 409
eth_putclose 410
eth_getopen 411
eth_get 412
eth_getclose 413
eth_open_ftp 414
eth_put_ftp 415
eth_get_ftp 416
eth_close_ftp 417
eth_rdparam 418
eth_wrparam 419
eth_rddsmode 422
eth_wrdsmode 423
eth_rdhost 424
eth_wrhost 425
eth_comopen 426
eth_comclose 427
eth_comsend 428
eth_comrecv 429
eth_comstatus 430
remove 431
rename 432
tmpnam 433
rand 434
srand 435
mktime 436
time 437
asctime 438
ctime 439
gmtime 440
localtime 441
difftime 442
_dos_findfirst 443
_dos_findnext 444
findfirstfile 445
findnextfile 446
findclose 447
_dos_getdiskfree 448
getdiskfree 449
_chdrive 450
_getdrive 451
chdir 452
getcwd 453

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 547/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Function name Function number


cabs 454
hypot 455
close 456
creat 457
lseek 458
mkdir 459
open 460
read 461
rmdir 462
tell 463
write 464

5.5 RESTRICTIONS

1 If an FP function error occurs in the event script or the control script of the FP driver, normally a dialog
box as shown below appears to show the error content.

Fig. 5.5 (a) Error Dialog Box

2 The dialog box will not appear for library functions can be used from Ruby script. To handle the error, use
the return value of the API.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 548/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

6 ASYNCHRONOUS EXECUTION OF RUBY


SCRIPT

Ruby scripts are normally executed during FP control processing (drawing, action, etc.), timer processing, and
event processing such as screen transitions. Therefore, if there is a Ruby script that takes time to process, other
processing may be stopped during that time.
By using this function, Ruby script can be executed as another process, and Ruby script can be executed without
stopping other processes.

ruby script processing can be executed as a separate process by using this function. This enables asynchronous
execution of various control processing (drawing, action, etc.), timer processing, and event processing such as
screen transitions, without having to stop the process until the Ruby script ends.

The following two functions are added.


- A function that allows asynchronous Ruby script execution from a control action (scriptasync)
- A function for registering the handler, which makes the asynchronous Ruby script execution request from
the timer or screen transition event (set_handlerasync)

6.1 FUNCTIONS USED FOR ASYNCHRONOUS EXECUTION

By using the following two functions, Ruby script can be executed asynchronously.
- A function that allows asynchronous Ruby script execution from a control action (scriptasync)
- A function for registering the handler, which makes the asynchronous Ruby script execution request from
the timer or screen transition event (set_handlerasync)
In a Ruby script to be executed asynchronously, the following functions need to be periodically called.(During
this sleep processing, other processing such as processing of FP control is executed, so it can be executed
without stopping other processing.)
- Task Stop Function (sleep)

NOTE
FP functions and library functions that cannot be used in timer-activated scripts can
not be used in asynchronous Ruby scripts. Additionally, to use a script as an
asynchronous Ruby script, the attribute must be set to "T" in the Script List screen
like a timer script. Refer to Script List for how to change the attribute.
6.1.1 Ruby Script Asynchronous Execution Function (scriptasync)

It is a function (scriptasync) that allows asynchronous Ruby script execution from FP control action.

This function is used to execute Ruby script asynchronously from the action of FP control.
Specify the Ruby script number to be executed as asynchronously as an argument.
The script execution result is returned as the return value.Even if an FP script number is specified, the FP script
is not executed.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 549/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Function]
scriptasync

[Syntax/with arguments]
scriptasync(sno, param1, param2, param3, param4, param5)

[Arguments]
The arguments of this function are as shown below.

Table 6.1.1 (a) Argument of scriptasync function


Name Type Description
sno Numerical value Script number
param1 Numerical value Script 1st parameter (can be omitted)
param2 Numerical value Script 2nd parameter (can be omitted)
param3 Numerical value Script 3rd parameter (can be omitted)
param4 Numerical value Script 4th parameter (can be omitted)
param5 Numerical value Script 5th parameter (can be omitted)

[Return value]
Details of the return values are as shown below.

Table 6.1.1 (b) Value to be stored as the return value of the scriptasync function
Type Description
Numerical value Processing results
0: Normal, Other than 0: Abnormal

[Description]
Executes the script specified with the script number.

[Example]
When executing the 100th script.
scriptasync(100)

Even when there is a time-consuming process described in the 100th script, the controls can perform their
processes (drawing, action, etc.) by writing the sleep function in the script.

6.1.2 Ruby Script Asynchronous Execution Handler Registration


Function (set_handlerasync)

It is afunction for registering the handler that executes the asynchronous Ruby script from the timer or screen
transition event (set_handlerasync) has been added.

This function is used to make an asynchronous Ruby script execution request from the timer or screen transition
event.
Specify the Ruby script number to be executed as asynchronously as an argument.
Even if an FP script number is specified, the FP script is not executed.

[Function]
set_handlerasync

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 550/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

[Syntax/with arguments]
set_handlerasync(sno, type, arg1, arg2, arg3)

[Arguments]
The arguments of this function are as shown below.

Table 6.1.2 (a) Argument of set_handlerasync function


Name Type Description
sno Numerical value Script number
type Numerical value Process classification
arg1 Numerical value Argument 1 for each process classification
arg2 Numerical value Argument 2 for each process classification
arg3 Numerical value Argument 3 for each process classification
* For details on the arguments, refer to the chapter on set_handler.

[Return]
Details of the return values are as shown below.

Table 6.1.2 (b) Value to be stored as the return value of the set_handlerasync function
Type Description
Numerical value Processing results
0: Normal, Other than 0: Abnormal

[Description]
Specify execution of the script number specified in sno, under the conditions specified in type.

[Example]
When executing the 900th script in 1000 msec cycles.
ret = set_handlerasync(900,1,1000,0,0);

Even when there is a time-consuming process described in the 900th script, the controls can perform their
processes (drawing, action, etc.) by writing the sleep function in the script.

6.1.3 Task Stop Function (sleep)

The specifications for the sleep function are as follows. In a Ruby script to be executed asynchronously, the
following functions need to be periodically called.(During this sleep processing, other processing such as
processing of FP control is executed, so it can be executed without stopping other processing.)

Stop the task for a specified time period (msec)


[Function]
sleep

[Syntax/with arguments]
sleep(timeout)

[Arguments]
The arguments of this function are as shown below.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 551/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 6.1.3 (a) Argument of sleep function


Name Type Description
timeout Numerical value Wait time (msec)

[Return value]
None

[Description]
Suspends execution of the calling task for the specified amount of time.

6.2 ERROR DURING ASYNCHRONOUS EXECUTION

If an abnormality occurs in the function call from a Ruby script, a pop-up is not displayed from within the
function, but information on the abnormality is returned as the return value. When creating a Ruby script,
implement abnormality processing based on the return value of the function.
As with the error information setting performed when an abnormality occurs in the script operation for the
timer-activated operator function, error information is also set when an abnormality occurs in the Ruby script in
consideration of cases where FP scripts are converted into Ruby scripts.
* For details on error information, refer to the chapter on timer-activated operator function variables.

Table 6.1.3 (a) Behavior when an error occurs


No Name Action setting Script
FP Script Ruby Script
Normal Timer Normal Timer
activation activation activation, activation
asynchronous
activation
1 FP functions Display error in Display error in Set error Return error Set error
pop-up pop-up information via return value information
Exit script Return error
via return value

NOTE
1 When converting an FP script into a Ruby script, implement a process for when an
abnormality occurs in the script, as a pop-up will not be displayed when an
abnormality occurs.
2 When an abnormality occurs in a timer-activated script, script operation is not
aborted. The script is executed to the end and periodic execution continues as well.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 552/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7 IMPROVE OF SCREEN CALL FUNCTION

You can specify the screen to call for each FANUC PICTURE screen call icon on the iHMI home screen as
follows.
・The latest base screen can be displayed.
・The base screen of the specified screen number in PMC area can be displayed.

■For displaying the latest screen

iHMI home menu FANUC PICTURE application

Call first time


Screen 1

Call third time


Screen 2

Call second time


Screen 3

Screen 4

Fig. 7 (a) Display the latest screen

■For specifying the screen to display before pressing the icon

iHMI home menu FANUC PICTURE application

Call first time


Screen 1

Screen 2
Call second time

Screen 3

PMC Before calling second time,


write the screen number of Screen 3 in Screen 4
PMC area

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 553/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Fig. 7 (b) Specify the screen before press the icon

Table 7 (a) Operation state


Operation state Description
Specify screen number in When pressing the FANUC PICTURE icon from the home menu, the custom

PMC screen specified in PMC area is displayed.
The base screen of the displayed custom screen is stored when back to the home
menu if the custom screen was displayed by pressing the FANUC PICTURE icon
② Store screen number from the home menu.
When pressing the FANUC PICTURE icon from the home menu, the stored
screen is displayed.
The base screen is The specified screen number in PMC or the displayed stored base screen are
③ displayed as initial state of the screen.
initialized.
The screen that is not Although the custom screen of the displayed FANUC PICTURE after pressing the
operated by pressing the icon in home menu is stored, the screen displayed without pressing the icon is not

icon in the home menu is stored.
not stored.

A B PMC
Specified

screen

A C A

③ A B B B B
Sub- Sub- Sub-
screen1 子画面 2
Popup
screen2 screen1

A C D A

The FANUC PICTURE screen "C" is displayed


by automatic screen switch/etc by the PMC.

Fig. 7 (c) Operation state

Target display unit


 PANEL iH / iH Pro

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 554/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

NOTE
1. This function is an additional function that is executed if the screen is specified
(ScreenNo = specified) by <subject> tag of the setting file "apps-general.xml" of the
home menu.
If ScreenNo is not specified, this function is not available.
2. When this function is used, specify “startup” attribute by <entry> tag of the setting
file "apps-general.xml" of the home menu.
If “startup” attribute is not specified, the screen can not be specified by the specified
screen function when pressing the FANUC PICTURE icon in the home menu for
the first time after starting the application manager.

■ About base screen Popup screen 2


A base screen is a main screen that uses the whole screen.
It is not a popup screen. Popup screen 1

Base screen Base screen

Popup screen 1

Popup screen 2

Fig. 7 (d) Base screen

7.1 SETTING METHOD

This function is available by changing the custom screen setting in the setting file “apps-general.xml” of the
home menu.

Table 7.1 (a) Description of subject tag


Function Format of subject value Description
Specified screen ScreenNo=(screen number) [option] The custom screen of the specified screen number is
displayed when the icon in the main menu is touched.
The [option] part can be omitted. Refer to [option] part
“Table 7.1 (b) Description of option”.
*If [option] part is not written, the screen is operated as before.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 555/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

If [option] part is specified, the following option value is set with “[”, “]” (square brackets) after the specified
screen number at ScreenNo. If the option value is set, it is delimited by “,” (comma).

Table 7.1 (b) Description of the option


Function Option value Description
Specified screen PMC area(2 bytes) Specify the first address in PMC area for storing the screen number.
number Example) 1:R12345 The screen number uses 2 bytes.
PMC Refer to *1 about the setting method of PMC area.
Group number of X Use this function to store the screen number of the latest base screen.
Screen number Example) 1 The group number is specified to X.
memory The specifiable group number is 0 to 99.
*1 The PMC area is specified in (A)"PMC path", (B)"kind of PMC address", (C)"PMC address" order.
format: A:BC
Between A and B is delimited by “:”. (colon-delimited)
The specification of PMC path is omittable. “A:” is unnecessary when
omitted.
PMC path is the PMC first path when omitted.
The PMC Address type that is discribed in chapter 3 "FP function" section 2.2 "PMC read (1/2/4 bytes)"
of the operator's manual (B-66284) is available in PMC area.

NOTE
1. Do not insert any space before “[“, “]” (square brackets) if option is specified.
2. A space can not be used inside of “[“, “]” (square brackets) if option is specified.
3. Using only comma is not available if option is not specified. Do not write [option]
part if option is not specified.
4. Set the comma in “[”, “]” (square brackets) to determine 2 items even if one of them
is not use.
5. The screen number is not stored if the group number is not specified to the "Group
number of Screen number memory".
6. The specified screen in the ScreenNo is displayed if a specified character string for
option is incorrect.
7. Subject tag has a limit of 63 characters. The application name could be limited to 27
characters if option is specified. Omit unnecessary characters for the specified
characters in PMC.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 556/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Table 7.1 (c) Pattern of option setting


Screen number Screen number Setting method and Example
Specified PMC memory
Group number
Display the base screen specified in PMC when pressing the home menu icon.
○ -
Example) [E98,], [2:D56,]
Display the latest base screen.
- ○
Example) [,1], [,40]
Display the base screen specified in PMC when pressing the home menu icon, or
○ ○ the latest base screen.
Example) [3:D89,11]

Example)
<entry option="waitregister">
<name>AppFP</name>
<category>Planning</category>
<caption>
<en>OFFSET SCREEN</en>
</caption>
( Omission )
<subject>App ScreenNo=5100[1:R12345,1]</subject>
→Display a main screen of screen number 5100
→Display a screen of the specified screen number at R12345 if R12345 value of the first PMC is
not ZERO.
→Display a screen of the latest screen number if R12345 value of the first PMC is ZERO.
</entry>
<entry option="waitregister ">
<name>AppFP</name>
<category>Machining</category>
<caption>
<en> operator’s panel screen </en>
</caption>
<subject>Overlay=CNCOPERA104 ScreenNo=1100[2:D23456,]</subject>
→Display overlapped with the 15 inches main screen of the screen number 1100 and the 10.4
inches CNC operator’s panel screen
→Display a screen of the specified screen number at D23456 if D23456 value of the second PMC
is not ZERO.
→Display a screen of the specified screen number in ScreenNo if D23456 value of the second
PMC is ZERO.
</entry>
<entry option="waitregister,startup,nomenu">
<name> CNCOPERA104</name> The CNC operator’s panel
<category>Machining</category> screen setting that is used
<caption>
for overlapping display.
<en> NC operation</en>
</caption>
<parameters>--screen-size 104</parameters>
</entry>

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 557/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.1.1 Group number of screen number memory


The Group number is available to set to each icon in the home menu.
The latest base screen is stored on each group number.

Example) The following group setting is available.

Group number: 1

Group number: 2

Group number: 3

Fig. 7.1.1 (a) Example of group number

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 558/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.2 HOW TO USE

This function is available by changing the custom screen setting in the setting file “apps-general.xml” in home
screen.

7.2.1 Memory of screen number

This function is to display the base screen displayed before going back to the home menu when the FANUC
PICTURE icon in the home menu is pressed.
This function is valid if the group of screen number memory is specified in the setting file “apps-general.xml” in
the home menu.
The screen number of the base screen is stored on each group number

Group number 1

Group number 2

Base screen A Base screen B

Base screen C Base screen D

Base screen B
Although the FANUC PICTURE is displayed by
the different icon, the latest base screen is
displayed because of the same group number.

Fig. 7.2.1 (a) Example of group number of screen number memory

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 559/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.2.2 Specification of screen number

This function is used to display the screen of the specified screen number in PMC when the FANUC PICTURE
icon is pressed in the home menu. The specification of screen number is valid when the PMC area is specified in
the specification screen number in the setting file “apps-general.xml” of the home menu. A screen of the read
screen number is displayed after the PMC area of the specified screen number is read when the FANUC
PICTURE icon in the home menu is pressed

Base screen A Base screen B

When the FANUC PICTURE screen is switched from the home


menu, the PMC area is read.

Fig. 7.2.2 (a) Timing of reading the PMC area for the specified screen number

Base screen A Not change

The screen is not switched during displaying the custom


screen even if the specified screen number is changed.

Fig. 7.2.2 (b) Specifying screen number during displaying the custom screen

NOTE
The FANUC PICTURE is not switched during displaying the custom screen of the
FANUC PICTURE even if the screen number that is different from the displaying base
screen is written to the PMC area of the specified screen number.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 560/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.3 NOTES

When using this function, the operations that need attention are described as follows.
Pay attention to the notes, when the screen is designed.

NOTE
3. The popup screen is closed if the screen call in this function is executed when
going back to the home menu during displaying the popup screen. For details, refer
to subsection 7.3.1 "Displaying popup screen”.
4. The screen call in this function is not executed during displaying the following
screens.
・Pop-up ten-key
・Error dialog box
・Debug window of FP script
・Signal display screen
・Combo box
For details, refer to subsection 7.3.1 “Displaying popup screen”.
5. When the screen is switched by this function, the state of the sub screen is returned
to the state specified by the screen structure definition. For details, refer to
subsection 7.3.2 “Sub-screen and focus state”.
6. The screen number is not stored if the custom screen is switched except the
operation of the FANUC PICTURE icon in home menu. For details, refer to
subsection 7.3.3 “Memory period of screen number”.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 561/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.3.1 Displaying popup screen

■ The displaying popup screen is closed, and the latest base screen is displayed.
The latest base screen is stored.
When the home menu icon is pressed, the latest base screen is displayed after the displaying popup screen is
closed.
Base screen A Base screen B Base screen B

Popup A

(Back to the home menu)

ベース画面
Base screenC B

Popup screen is
closed.

Fig. 7.3.1 (a) Close displaying popup screen

■ The latest screen is not displayed when switching to the home menu or the NC screen during displaying a
specific screen.
The screen call in this function is not executed when switching to other screen from the custom screen during
displaying the following screen.
Pop-up ten-key, error dialog box, debug window of FP script, Signal display screen, combo box
The specified screen is not changed even if the icon is pressed during displaying the above screen. If the above
screen is closed, the screen is changed to the specified screen.

Base screen A Base screen B Base screen B

Popup A

The pop-up ten-key is operated


state on popup A.

(Back to the home menu)

ベース画面
Base screenC B Base screen B
The Popup A is also closed, and
Popup A the base screen B is displayed.

The pop-up ten-key operation


is ended.
Fig. 7.3.1 (b) Specific screen is not closed

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 562/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

7.3.2 Sub-screen and focus state

The sub-screen on the base screen is displayed as initialized sub-screen that is specified by the screen structure
definition in Screen Structure Definition Control unless “Save SubScreen n” is used, if the base screen is
displayed by pressing the FANUC PICTURE icon of the home menu with using the specified PMC of screen
number or the screen number memory.
The focused control before going back to the home menu is also displayed as unfocused if the base screen is
displayed by pressing the FANUC PICTURE icon in the home menu.

Base screen A Base screen B Base screen B

Sub-screen Sub-screen
A B
The sub-screen B is switched
by using the sub-screen switch
function.

(Back to the home menu)

Base screen B

Sub-screen is initial
Sub-screen
state.
A

Fig. 7.3.2 (a) Initialized sub-screen

7.3.3 Memory period of screen number

The memory period of the screen number is from pressing the FANUC PICTURE icon in the home menu to
going back to the home menu. The screen number is not stored if the custom screen is switched except the
operation of the FANUC PICTURE icon in the home menu.
Example) The screen number is not stored if the screen is switched automatically by the PMC signal during
displyaing the home menu.

Icon operation Switching screen by the PMC signal Icon operation

Screen Screen Screen Screen Screen


A B C D B

Memory period. Memory period.

Fig.7.3.3 (a) Memory period of the screen number

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 563/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

■ The screen call used by the PMC signal during displaying the home menu
The custom screen is not stored until going back to the home menu if the screen is called by the PMC signal
during displaying the home menu. The custom screen displayed by the operation of the home menu icon is
stored.
Base screen A Base screen B

(Back to the home menu)

Base screen C Base screen D

The base screen C is called


by the PMC signal.

(Back to the home menu)

Base screen B
The latest custom screen is displayed afrer
pressing the home menu icon.

Fig. 7.3.3 (b) Screen switch and screen number memory by the PMC signal (1)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 564/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

■ Screen call by PMC signal after the home menu icon operation
The screen number is stored if the screen call is executed by PMC signal during displaying the custom screen by
the home menu icon operation.

Base screen A Base screen B Base screen C

The base screen C is called


by the PMC signal.

(Back to the home menu)

Base screen C
The latest custom screen is displayed after the
home menu icon is pressed.

Fig. 7.3.3 (c) Screen switch and screen number memory by the PMC signal (2)

Base screen A Base screen C Base screen D

The base screen C is called


by the PMC signal.

(Back to the home menu)

Base screen D

Stored even after switching by the PMC


signal.

Fig. 7.3.3 (d) Screen switch and screen number memory by the PMC signal (3)

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 565/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

8 COMBINED APPLICATION IN STANDARD


DISPLAY UNIT

For the basic creation procedure about combined application, refer to the "Operation Manual (B-66284) ".
This chapter explains the changes in FANUC PICTURE edition 8.0 or later.

NOTE
As For how to deal with the error that occurred when building combined
application, refer to the "C Language Executor Programming Manual
(B-63943JA-3) Additional Information on C Compiler Installation".

8.1 CONSTRUCTION METHOD OF THE DEVELOPMENT


ENVIRONMENT

8.1.1 The corresponding C executor library

The following C executor are required to create combined application in FANUC PICTURE edition 8.0 or later.

FANUC Series 30i/31i/32i/35i -MODEL B, 0i-MODEL F:GZ0I-08.0 or later.( Contained in CNC application
development environment edition 02.0 or later.)

No update is required for Power Motion i -MODEL A.

NOTE
If you can not prepare the above C executor, please use FANUC PICTURE
earlier than 8.0.

8.1.2 Supplement: Diab compiler version in the sample

The combined application can be created with WindRiver's Diab C / C ++ Power-PC compiler. For the sample
on CD, we set up the compilation environment and check the operation for the following compiler.

WindRiver's Diab C / C ++ Power-PC compiler Version 5.9.4.

8.1.3 Merge of FANUC PICTURE providing file


The combined application can be created with WindRiver's Diab C / C ++ Power-PC compiler. For the sample
on CD, we set up the compilation environment and check the operation for the following compiler.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 566/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

8.1.3.1 When creating a new environment

The procedure is as follows.

1. First, install the C language executor development environment. For the procedure, refer to the manual of
the C language executor.
2. Copy the FPLib folder of the FP library and the UserSample folder on CD to the C language executor
development folder (same level as LIB, INC, and TOOL).

Copy source:
Series 30i /31i /32i /35i, Series 0i -F
・FP¥FPLink30¥FPLib
・FP¥FPLink30¥UserSample
Power Motioni -A
・FP¥FPLinkPMiA¥FPLib
・FP¥FPLinkPMiA¥UserSample

3. Copy the file in Tool folder on the CD to the Tool folder in the the C language executor development
folder.

Copy source:
Series 30i /31i /32i /35i, Series 0i -F
・FP¥FPLink30¥TOOL
Power Motioni -A
・FP¥FPLinkPMiA¥TOOL
File name:
・ STEP1.LNK
・ STEP1_adr.LNK
・ STEP1_exp.LNK
・ STEP2.LNK
・ STEP2_adr.LNK
・ STEP2_exp.LNK
・ CHK_LEN1.AWK
・ CHK_LEN2.AWK

8.1.3.2 When updating from an environment created in earlier than 8.0

The procedure is as follows.

1. Overwrite copy the following folders on the CD to combined application development environment( the C
language executor development folder).

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 567/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

Copy source:
[FP¥FPLink30¥FPLib](Series 30i /31i /32i /35i, Series 0i -F)
[FP¥FPLinkPMiA¥FPLib](Power Motioni -A)

2. Copy the Tool folder on CD to the Tool folder in combined application development environment.
(Same as step 3 in Section 8.1.3.1.)

3. Add a call for script processing and termination processing to the file in UserSample folder.
( The red part shown below)

BACK1.C
(略)

extern void Fanuc_Alarm_Task_Init(void); //FS30I


extern void Fanuc_Alarm_Task_Main(void); //FS30I
extern void Fanuc_Alarm_Task_Script(void);
extern void FP_ScanInput(void);
extern void Fanuc_Alarm_Task_Finish(void);

(略)

void main() {
Fanuc_Alarm_Task_Init(); // Initialize proc. for FANUC PICTURE
for (;;) {
(略)
}
Fanuc_Alarm_Task_Finish();
}

BACK2.C
(略)

extern void Fanuc_Communication_Task_Init(void);


extern void Fanuc_Communication_Task_Main(void);
extern void Fanuc_Communication_Task_Finish(void);

void fp_system_error(int, char *);


#ifdef FS30I
extern void Fanuc_Task2_Script(void);
#endif

(略)

void main() {
Fanuc_Communication_Task_Init(); // Initialize proc. for FANUC PICTURE
for (;;) {
Fanuc_Communication_Task_Main(); // Communication moniter proc. for FANUC PICTURE
#ifdef FS30I
Fanuc_Task2_Script(); // Script proc. for TASK2
#endif
os_wait_tim(10L); // Sleeping

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 568/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102
7169FavxIegrAbxdiL/YgaSGl2lWhxHCol1/oYV3t5YGxOF0C+2wd68VWEg==

}
Fanuc_Communication_Task_Finish();
}

4. Open the MakeFile(CEXE.MAK) with a text editor and merge it with the sample file contents on
CD(UserSample¥CEXE.MAK). First, add the following .A file (underlined in red in bold) to the task
definition block.
#------------------------------------------------------------------------------
# Task definition block. Modify here for your application.
#------------------------------------------------------------------------------

TASK1 = USERFUNC.O USERMAIN.O HELPERMN.O ..¥FPLIB¥FPSCRPTLIB.A ..¥FPLIB¥FPJPEGLIB.A


..¥FPLIB¥FPMAINLIB.A ..¥FPLIB¥FPZLIB.A . ..¥FPLIB¥libmruby.a
TASK2 = BACK2.O HELPERCM.O ..¥FPLIB¥FPSCRPTLIB.A ..¥FPLIB¥FPCOMLIB.A ..¥FPLIB¥FPZLIB.A
..¥FPLIB¥libmruby.a
TASK3 = BACK1.O HELPERAL.O ..¥FPLIB¥FPSCRPTLIB.A ..¥FPLIB¥FPSUBLIB.A ..¥FPLIB¥libmruby.a

5. Change the environment variable in MakeFile as follows (underlined in red in bold).


#------------------------------------------------------------------------------
# Environmental variables for FANUC PICTURE
#------------------------------------------------------------------------------
TMP_FILE = cmnd.tmp

!IF "$(FCTOOL)" == ""


TOOL = ..¥tool
!ELSE
TOOL = $(FCTOOL)
!ENDIF

!IF "$(FCLIB)" == ""


FCLIB = ..¥lib
!ENDIF

!IF "$(FCINC)" == ""


#FCINC = ..¥inc
!ENDIF
FCINC = ..¥inc

FPLIB = ..¥FPLIB
FPCCOPT = -I$(FPLIB) -DFS30I -DONO8D -D$(CEXEDVAL)
FPAXIS = -D$(AXIS_TYPE)

!IF "$(PMCMEM_D)" == "ON"


CC = dcc -@$(TOOL)¥cc.opt -Xdialect-c99 -I $(FCINC) $(FPCCOPT) $(FPAXIS) -D PMCMEMD
!ELSE
CC = dcc -@$(TOOL)¥cc.opt -Xdialect-c99 -I $(FCINC) $(FPCCOPT) $(FPAXIS)
!ENDIF

6. Open the project you want to use with FANUC PICTURE 8.0 or later and recreate the MEM. When you
open the project, you will be asked to convert, please convert according to the message.

FANUC PICTURE Specification


Name

(Edition 8.0 or later)


Drawing
number

A-42148E-058
Page

Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 569/569
Created 2018.11.13 charge
Approved

© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy