FANUC PICTURE - Specification For Edition 08.0 or Later
FANUC PICTURE - Specification For Edition 08.0 or Later
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
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==
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==
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==
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.
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.
FANUC PICTURE
Installation CD
FANUC PICTURE
( 8.0 or later )
FANUC PICTURE
( earlier than 8.0 )
1.2 FP CONTROL
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==
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
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.
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 details, refer to Chapter 5, "LIBRARY FUNCTIONS CAN BE USED FROM 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.
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==
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
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".
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
Project file
(earlier than 8.0)
MEM file
(earlier than 8.0)
MEM file
(8.0 or later)
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.
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
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.
3. The installation wizard is displayed. Follow the message and proceed with installation.
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
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.
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==
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==
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==
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.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
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)
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
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
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==
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
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==
[Action] tab
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==
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
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
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==
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==
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==
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:
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==
For details about the item display conditions, refer to "Table 3.1.1.6 (b) List of Item Display Conditions."
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.)
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
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
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==
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
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
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.
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.
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==
0
B is selected.
Other buttons are deselected. Control information
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
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
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
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].
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
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==
[Action] tab
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==
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==
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
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==
[Image] tab
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==
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.
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.
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==
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==
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==
Pattern 2
[NoAction] on the [Action] tab: ON
[Interlock] on the [Action] tab: ON
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."
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
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
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
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==
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
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.1 Function
The list box control lists registered items from which the user can select multiple options.
3.1.3.2 Diagram
A AAAAAAAAAA
B BBBBBBBBBB
CCC
DDDD
EEEEEE
Fig. 3.1.3.2 (a) Images of List Boxes
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
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].
(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.
(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.
(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.
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
Directional Directional
keys keys
Focus on another
control
Directional Directional
keys keys
(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.
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
(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
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.
- 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
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
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
EEEE
EEEE Press the Down FFFF
FFFF button or <Dn> key. GGGG
GGGG HHHH
HHHH IIII
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==
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
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
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
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.
(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.
AAAA
BBBB
CCCC Added to the end of
DDDD the item list.
GGGG
⋅
⋅
⋅
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
⋅
⋅
3.1.3.5 Properties
Tab configuration
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
[Character] tab
Fig. 3.1.3.5 (b) Properties Page - [Character] Tab (Left: Standard Monitor mode, Right: iHMImode)
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==
[Action] tab
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==
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.
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==
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.
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
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==
[Image] tab
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==
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==
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==
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."
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==
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==
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==
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==
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
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.
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)
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.
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==
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.
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
2 1
4
3
5
6
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.
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.
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==
NOTE
The background color is applied to the gray part of the icon image.
3.1.4.5 Properties
Overall configuration
Message boxes consist of the [Button] and [Template] tabs.
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==
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)
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)
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==
[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)
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.
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==
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==
3.1.4.6 Function
This section describes the specifications of the FP functions for message boxes.
[Function]
MsgBoxShow
[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]
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==
If a button is pressed, one of the following values is stored in MESSAGE_VAL depending on the pressed button.
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.
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
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
AAAAAAAAAA
BBBBBBBBBB
CCC
DDDD
EEEEEE
Fig. 3.1.5.2 (b) Conceptual Image of a Combo Box in List Mode
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)
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.
(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.
(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.
(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.
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==
Focus on another
control
<INPUT> key
(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.
Combo box -
mode is enabled. mode is enabled.
The focus is moved to the
Up button - - row above the current
one.
<delete>
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
(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.")
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.)
(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.
3.1.5.5 Properties
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.
[General] tab
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)
[Action] tab
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==
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==
[Focus] tab
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==
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
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==
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==
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==
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==
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."
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==
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==
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==
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
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.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.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.
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.
F
Fig. 3.1.6.4 (b) Flow of Display Update
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
Overall configurationThe properties of pie graph control are displayed on the following tabs.
[General] tab
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)
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].
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==
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")
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
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."
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==
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==
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==
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==
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==
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.
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)
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)
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.
NOTE
The display is not updated if the drawing update speed of the FANUC PICTURE
driver is exceeded.
3.1.7.5 Properties
Overall configurationThe properties of extended bar graph control are displayed on the following tabs.
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==
[General] tab
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)
- 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
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==
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].
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].
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")
- 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.
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
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."
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
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
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
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
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==
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==
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.
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.
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==
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.
-
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.
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.
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.
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==
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.
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.
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."
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]
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==
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.
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.
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==
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."
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==
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."
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]
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==
Selecting [File] > [Entry...] from the menu on the [Image File List] screen opens the file selection dialog box.
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==
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."
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."
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==
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.
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."
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.
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.
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.
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==
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.
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.
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==
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==
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.
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.
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==
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."
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.
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==
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.
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==
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.
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==
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.
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.
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==
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.
[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.
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
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
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
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.
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.
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.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.3 Diagram
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.
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."
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
[Arguments]
This function has the following arguments.
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."
[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
[Arguments]
This function has the following arguments.
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==
[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
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
[Arguments]
This function has the following arguments.
[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 );
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==
(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
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==
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.
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
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
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
The Script List screen of the FP Editor has been changed as a result of the function addition of the Ruby script.
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.
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.
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.
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==
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)
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==
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...].
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==
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.
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==
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").
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==
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.
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."
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.
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==
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.
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==
The appearance of the Script Editor has been changed and now all operations can be performed from the menu bar.
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==
[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."
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==
[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."
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==
[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."
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==
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.
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>
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."
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.
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==
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.
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==
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.
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."
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==
- 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.
- 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)")
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")
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")
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")
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==
- 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."
- 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.
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.
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."
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==
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].
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==
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.
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
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==
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.
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==
- 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.
- 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.
- 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.
- 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).
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==
- 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.
- 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."
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==
- 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.
- 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 a character code that is not displayable was specified, an error dialog box appears and the background of
all error cells turn gray.
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==
[Function]
LangCaption
[Syntax with arguments]
LangCaption( textid , mltlanguse )
[Arguments]
The arguments of this function 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
* 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.
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.
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==
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.
FP script
The timing and processing for conversion of FP scripts and projects are as follows.
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==
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
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
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.
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.
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."
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").
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.
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.
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)
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==
When the conversion target is a screen file, the following dialog box appears and the screen file becomes
operable with the editor.
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.
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
Fig. 4.1.3.1 (h) Example of the change of argument specification method for functions
When script conversion is performed, the conversion confirmation dialog box appears.
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.
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==
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.
If the conversion fails, the following dialog box appears. The conversion processing is stopped and the same
processing as the cancellation processing is performed.
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 (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
For (1), operators, etc., fall under this category. Conversion processing is not performed for these syntaxes.
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)
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.
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
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==
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)
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.
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
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)
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
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==
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)
Fig. 4.1.3.2 (k) Example in which replacement is impossible and a mark is added (jump command)
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==
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."
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.
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."
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.")
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.
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."
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.
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==
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.)
You can create the MEM file by selecting [OK] in the MEM file creation dialog.
Select [OK].
Error check
MEM file creation processing
MEM file
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.
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)
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==
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==
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.
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==
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)
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==
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.
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==
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.
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.
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==
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.
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.
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.
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.
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
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.
Fig. 4.1.7.4 (a) Debug window in the "Small(14inch)" font (extension signal ON)
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==
Fig. 4.1.7.4 (b) Debug window in the "Small(14inch)" font (extension signal OFF)
Fig. 4.1.7.4 (c) Debug window in the "Big(9inch)" font (extension signal ON) - Page 1
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==
Fig. 4.1.7.4 (d) Debug window in the "Big(9inch)" font (extension signal ON) - Page 2
Fig. 4.1.7.4 (e) Debug window in the "Big(9inch)" font (extension signal OFF) - Page 1
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==
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.
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==
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==
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.
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.
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.
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
The following changes were made to the [Create project] and [Open project] menu items.
Extension
The new FP Editor supports the following extensions.
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.
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==
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.)
- 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.
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==
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.
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
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)."
Control
Startup
Timer
script
script
script
script
Event
script
script
Ruby
FP
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==
<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)
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==
<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 × × ×
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==
<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 ×
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==
<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 ×
<delete>
Control
Startup
Timer
script
script
script
script
Event
script
script
Ruby
FP
[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
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==
<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)
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==
<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.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
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==
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.
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.
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==
The following library functions can be used in Ruby script. The library function list is shown from the next
chapter.
Timer script
Event script
Start up
display
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
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==
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
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==
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).
Timer script
Event script
Start up
display
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
Control script
Timer script
Event script
display
Start up
script
iHMI
PMi-A
PMi-A
Non
Event script
display
Start up
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
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.
Event script
display
Start up
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
Timer script
Event script
display
Start up
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
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==
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. ×
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 ×
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==
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.
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.
Event script
Start up
display
Control
script
script
iHMI
PMi-A
PMi-A
Non
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==
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.
Start up
Control
display
Timer
script
script
Event
script
script
iHMI
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==
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.
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.
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==
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==
[Function]
cnc_rddynamic
[Syntax with arguments]
cnc_rddynamic(axis)
[Arguments]
The arguments of this function 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."
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==
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
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)
]
]
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
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)
[Function]
cnc_wrrelpos
[Syntax with arguments]
cnc_wrrelpos(preset)
[Arguments]
The arguments of this function are as shown below.
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).
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
ret=cnc_wrrelpos(preset)
if ret != EW_OK then # ret: Return value of the function
MsgBoxShow("ERROR",0)
end
[Function]
cnc_exaxisname2
[Syntax with arguments]
cnc_exaxisname2(type, absolute, num)
[Arguments]
The arguments of this function are as shown below.
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 (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
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==
[Function]
cnc_rdaxisdata
[Syntax with arguments]
cnc_rdaxisdata(cls, type, num, len)
[Arguments]
The arguments of this function are as shown below.
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."
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==
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)
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==
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.
[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
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==
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.
ret = cnc_rd5axmandt()
if ret[0] != 0 then
msg_txt = "ERROR(" + ret + ")¥n"
MsgBoxShow( msg_txt, 0 )
end
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==
[Function]
cnc_rd5axovrlap
[Syntax with arguments]
cnc_rd5axovrlap(axis)
[Arguments]
The arguments of this function 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"
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
[Function]
cnc_clr5axpls
[Syntax with arguments]
cnc_clr5axpls(type)
[Arguments]
The arguments of this function are as shown below.
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.
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==
[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)."
[Function]
cnc_verify
[Syntax with arguments]
cnc_verify(data, number)
[Arguments]
The arguments of this function are as shown below.
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.
data = "¥nO1234¥nG1F0.3W10.¥nM30¥n%"
number = 27
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()
[Function]
cnc_vrfend
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)."
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==
[Function]
cnc_seqsrch
[Syntax with arguments]
cnc_seqsrch(seq_no)
[Arguments]
The arguments of this function 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".
[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
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==
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
[Function]
cnc_rdpdf_inf
[Syntax with arguments]
cnc_rdpdf_ inf(drive, size_kind)
[Arguments]
The arguments of this function are as shown below.
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."
[Function]
cnc_rdpdf_curdir
[Syntax with arguments]
cnc_rdpdf_curdir(dir_kind)
[Arguments]
The arguments of this function are as shown below.
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==
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)
[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 (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".
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.
[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.
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."
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==
[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.
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."
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==
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==
[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 (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
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.
[Function]
cnc_pdf_del
[Syntax with arguments]
cnc_pdf_del(file_path)
[Arguments]
The arguments of this function are as shown below.
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.
[Function]
cnc_pdf_rename
[Syntax with arguments]
cnc_pdf_rename(file_path, after_name)
[Arguments]
The arguments of this function are as shown below.
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 (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.
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.
[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 (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.
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
[Function]
cnc_wrpdf_attr
[Syntax with arguments]
cnc_wrpdf_attr(file_path, slct, attr)
[Arguments]
The arguments of this function are as shown below.
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"
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.
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==
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."
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==
[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
[Function]
cnc_dwnstart4
[Syntax with arguments]
cnc_dwnstart4(type, file_name)
[Arguments]
The arguments of this function are as shown below.
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 (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.
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.
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.
[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
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==
type = 0
file_name = "//CNC_MEM/USER/PATH1/"
length = 27
data = "¥nO1234¥nG1F0.3W10.¥nM30¥n%"
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.
[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].
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.
[Function]
cnc_upstart4
[Syntax with arguments]
cnc_upstart4(type, file_name)
[Arguments]
The arguments of this function are as shown below.
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.
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==
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)."
[Function]
cnc_upload4
[Syntax with arguments]
cnc_upload4(length)
[Arguments]
The arguments of this function are as shown below.
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).
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==
type = 0
file_name = "//CNC_MEM/USER/PATH1/O1234"
length = 256
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
[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.
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)."
[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."
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.
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
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==
[Function]
cnc_wrmdiprog
[Syntax with arguments]
cnc_wrmdiprog(length, data)
[Arguments]
The arguments of this function 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 ;
length = 45
data = "¥nM03S2000¥nG28U0W0¥nT0101¥nG00X35.0Z-10.0¥n%"
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.
[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."
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.
[Function]
cnc_wrmdipntr
[Syntax with arguments]
cnc_wrmdipntr(crntpntr)
[Arguments]
The arguments of this function 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.
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.
[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
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==
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
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==
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
[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.
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).
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
[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.
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 × ×
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
[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
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==
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
[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.
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==
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.
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==
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
[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.
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.
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.
[Function]
cnc_saveprog_end
[Syntax with arguments]
cnc_saveprog_end()
[Arguments]
None
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.
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==
[Function]
cnc_rdparar
[Syntax with arguments]
cnc_rdparar(s_number, axis, e_number, length)
[Arguments]
The arguments of this function are as shown 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.
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.
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==
(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
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==
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)."
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:
(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
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
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
[Function]
cnc_wrparas
[Syntax with arguments]
cnc_wrparas(length, param)
[Arguments]
The arguments of this function are as shown below.
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."
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
[Function]
cnc_rdwkcdshft
[Syntax with arguments]
cnc_rdwkcdshft(axis)
[Arguments]
The arguments of this function are as shown below.
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==
[Function]
cnc_wrwkcdshft
[Syntax with arguments]
cnc_wrwkcdshft(type, data)
[Arguments]
The arguments of this function are as shown below.
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==
[Return]
Details of the return values are as shown below.
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"
[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
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==
[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."
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()
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.
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
[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.
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."
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==
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 (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.
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.
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.
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==
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.
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==
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
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.
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.
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.
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
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 (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."
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
[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 (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.
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==
[Function]
cnc_rd2tlifedata
[Syntax with arguments]
cnc_rd2tlifedata(grp_no, use_no)
[Arguments]
The arguments of this function are as shown below.
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.
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.
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==
[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.
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.
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==
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.
[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.
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.
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==
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.
[Function]
cnc_wrgrpinfo
[Syntax with arguments]
cnc_wrgrpinfo(s_grp, e_grp, data)
[Arguments]
The arguments of this function are as shown below.
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.
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
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.
[Function]
cnc_wrgrpinfo2
[Syntax with arguments]
cnc_wrgrpinfo2(s_grp, e_grp, opt_grpno)
[Arguments]
The arguments of this function are as shown below.
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.
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.
[Function]
cnc_wrgrpinfo3
[Syntax with arguments]
cnc_wrgrpinfo3(s_grp, e_grp, life_rest)
[Arguments]
The arguments of this function are as shown below.
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.
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.
[Function]
cnc_deltlifegrp
[Syntax with arguments]
cnc_deltlifegrp(number)
[Arguments]
The arguments of this function 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.
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.
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.
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==
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.
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==
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==
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==
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.
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==
[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,
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
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 (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.
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.
[Function]
cnc_regmagazine
[Syntax with arguments]
cnc_regmagazine(data_num, mag)
[Arguments]
The arguments of this function are as shown below.
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==
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
[Function]
cnc_delmagazine
[Syntax with arguments]
cnc_delmagazine(data_num, mag)
[Arguments]
The arguments of this function are as shown below.
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 (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.
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
[Function]
cnc_rdmagazine
[Syntax with arguments]
cnc_rdmagazine(data_num, mag)
[Arguments]
The arguments of this function 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.
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==
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
[Function]
cnc_wrmagazine
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==
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
[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 (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
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==
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
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.
[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 (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.”
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==
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)
[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.
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.”
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==
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)
[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.
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==
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==
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
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==
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
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)
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.
[Function]
cnc_rdmag_property
[Syntax with arguments]
cnc_rdmag_property(data_num, mag)
[Arguments]
The arguments of this function are as shown below.
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)
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==
[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
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
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.
[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.
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==
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.
[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.
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==
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
[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.
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==
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
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==
[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.
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.
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
[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 (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
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.
[Function]
cnc_btlfpotsrh
[Syntax with arguments]
cnc_btlfpotsrh(type, magnum, geomnum, potnum)
[Arguments]
The arguments of this function are as shown below.
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==
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
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==
[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.
[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.
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==
[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
[Function]
cnc_clearophis
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==
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
[Function]
cnc_rdalmhisno
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==
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).
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==
Before using this function, stop the history data sampling (cnc_stopophis function).
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==
[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 (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.
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==
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==
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.
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==
[Function]
cnc_rddsdir
[Syntax with arguments]
cnc_rddsdir(dev_name)
[Arguments]
The arguments of this function 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
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==
[Function]
cnc_dschdir
[Syntax with arguments]
cnc_dschdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.
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/"
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.
[Function]
cnc_dsmkdir
[Syntax with arguments]
cnc_dsmkdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.
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==
[Function]
cnc_dsrmdir
[Syntax with arguments]
cnc_dsrmdir(dev_name, dir)
[Arguments]
The arguments of this function are as shown below.
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==
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.
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==
[Function]
cnc_dsremove
[Syntax with arguments]
cnc_dsremove(dev_name, file)
[Arguments]
The arguments of this function are as shown below.
ret = cnc_dsremove("DATA_SV","ABCDEFG")
if ret != EW_OK then
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==
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.
[Function]
cnc_rddsdevinfo
[Syntax with arguments]
cnc_rddsdevinfo(type)
[Arguments]
The arguments of this function are as shown below.
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==
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.
[Function]
cnc_dsrename
[Syntax with arguments]
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==
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==
[Function]
cnc_dscopyfile
[Syntax with arguments]
cnc_dscopyfile(srcfile, dstfile)
[Arguments]
The arguments of this function are as shown below.
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 ”
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==
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 (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.
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==
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
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==
[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 (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))
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
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
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
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
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"
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
[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 (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.
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==
# 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]
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
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).
[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 (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)
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==
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
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
[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.
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==
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==
[Function]
cnc_rdalmmsg
[Syntax with arguments]
cnc_rdalmmsg(type, num)
[Arguments]
The arguments of this function 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
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==
[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.
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==
[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.
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==
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==
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==
[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.
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==
ret = cnc_rdcncid()
if ret[0] != EW_OK then
msg_txt = "ERROR(" + ret[0] + ")¥n"
MsgBoxShow( msg_txt, 0 )
end
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==
[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.
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==
For the referenceable area of the PMC data for each PMC address type, see "PMC Data Referenceable
Areas."
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==
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
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.
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==
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==
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
[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.
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==
[Return]
Details of the return values are as shown below.
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.
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
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.
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 (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
[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.
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
[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
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
[Function]
pmc_rdkpm
[Syntax with arguments]
pmc_rdkpm(offset, length)
[Arguments]
The arguments of this function 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
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==
[Function]
pmc_wrkpm
[Syntax with arguments]
pmc_wrkpm(offset , data, length)
[Arguments]
The arguments of this function 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.
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.
[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
[Function]
pmc_rdpmcinfo
[Syntax with arguments]
pmc_rdpmcinfo(adr_type)
[Arguments]
The arguments of this function are as shown below.
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==
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==
[Function]
pmc_rdprmstart
[Syntax with arguments]
pmc_rdprmstart()
[Arguments]
None
[Return]
Details of the return values are as shown below.
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.
[Function]
pmc_rdpmcparam
[Syntax with arguments]
pmc_rdpmcparam(length)
[Arguments]
The arguments of this function are as shown below.
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==
NOTE
Judge the final execution result of reading PMC parameters based on the return
value of the pmc_rdprmend function.
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==
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
[Function]
pmc_rdprmend
[Syntax with arguments]
pmc_rdprmend()
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.
[Function]
pmc_wrprmstart
[Syntax with arguments]
pmc_wrprmstart()
[Arguments]
None
[Return]
Details of the return values are as shown below.
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.
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==
[Function]
pmc_wrpmcparam
[Syntax with arguments]
pmc_wrpmcparam (length, buf )
[Arguments]
The arguments of this function are as shown below.
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.
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==
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%"
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==
[Function]
pmc_wrprmend
[Syntax with arguments]
pmc_wrprmend()
[Arguments]
None
[Return]
Details of the return values are as shown below.
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.
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==
[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.
ret = pmc_getdtailerr()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end
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==
[Function]
aux_file_mount
[Syntax with arguments]
aux_file_mount(drive)
[Arguments]
The arguments of this function 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.
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")
[Function]
aux_file_unmount
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.
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==
[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")
[Function]
aux_file_usbinfo
[Syntax with arguments]
aux_file_usbinfo()
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.
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 (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.
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):
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")
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==
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.
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==
[Function]
rs_open
[Syntax with arguments]
rs_open(channel, param, mode)
[Arguments]
The arguments of this function are as shown below.
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==
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.
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.
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==
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.
[Function]
rs_close
[Syntax with arguments]
rs_close(channel)
[Arguments]
The arguments of this function 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.
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 (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.
[Function]
rs_getc
[Syntax with arguments]
rs_getc(channel)
[Arguments]
The arguments of this function 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.
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==
[Function]
rs_write
[Syntax with arguments]
rs_write(buffer, size, channel)
[Arguments]
The arguments of this function 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.
[Function]
rs_read
[Syntax with arguments]
rs_read(size, channel)
[Arguments]
The arguments of this function 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
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==
[Function]
rs_buffer
[Syntax with arguments]
rs_buffer(channel, cmnd)
[Arguments]
The arguments of this function 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.
[Function]
rs_status
[Syntax with arguments]
rs_status(channel)
FANUC PICTURE Specification
Name
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 (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.
[Function]
rs_wait
[Syntax with arguments]
rs_wait(channel, param, mode, time_out)
[Arguments]
The arguments of this function are as shown below.
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==
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.
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.
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.
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==
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.
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==
[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."
[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.
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."
[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."
[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
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."
[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 )
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
[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
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==
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
msg_txt = ""
ftype = aux_from_getinfo( "FPF0FPDT.MEM" )
if ftype == C_DATA then
msg_txt = "C DATA"
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
[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
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==
[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
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==
[Function]
eth_putopen
[Syntax with arguments]
eth_putopen(type, file_name)
[Arguments]
The arguments of this function 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).”
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==
Is there remaining
data ?
YES
NO
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.
[Function]
eth_put
[Syntax with arguments]
eth_put(length, data)
[Arguments]
The arguments of this function are as shown below.
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.
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
[Function]
eth_putclose
[Syntax with arguments]
eth_putclose(cancel)
[Arguments]
The arguments of this function 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.
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".
[Function]
eth_getopen
[Syntax with arguments]
eth_getopen(type, file_name)
[Arguments]
The arguments of this function 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.
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).”
=EW_OK or EW_RESET
Is data reception
complete?
YES
EW_RESET
NO
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.
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==
[Function]
eth_get
[Syntax with arguments]
eth_get(length)
[Arguments]
The arguments of this function 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.
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
[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.
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".
[Function]
eth_open_ftp
[Syntax with arguments]
eth_open_ftp(mode)
[Arguments]
The arguments of this function 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
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
[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 (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.
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
[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 (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
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==
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
[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
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
[Function]
eth_rdparam
[Syntax with arguments]
eth_rdparam(type)
[Arguments]
The arguments of this function are as shown below.
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."
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==
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)."
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==
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."
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 (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-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==
[Example]
To get an FTP transfer parameter for the embedded Ethernet built-in port:
[Function]
eth_wrparam
[Syntax with arguments]
eth_wrparam(type, flag, param)
[Arguments]
The arguments of this function are as shown below.
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==
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==
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
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
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
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)
[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
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==
ret = eth_rddsmode()
if ret[0] != EW_OK then
MsgBoxShow("ERROR",0)
end
[Function]
eth_wrdsmode
[Syntax with arguments]
eth_wrdsmode(path, mode)
[Arguments]
The arguments of this function are as shown below.
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.
[Function]
eth_rdhost
[Syntax with arguments]
eth_rdhost(type)
[Arguments]
The arguments of this function are as shown below.
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
[Function]
eth_wrhost
[Syntax with arguments]
eth_wrhost(type, host)
[Arguments]
The arguments of this function are as shown below.
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 (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.
[Function]
eth_comopen
[Syntax with arguments]
eth_comopen(socket)
[Arguments]
The arguments of this function are as shown below.
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 (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.
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
[Function]
eth_comclose
[Syntax with arguments]
eth_comclose(socket)
[Arguments]
The arguments of this function 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.
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==
ret = eth_comclose(0)
if ret [0] != EW_OK then
MsgBoxShow("ERROR", 0)
end
[Function]
eth_comsend
[Syntax with arguments]
eth_comsend(socket, length, data)
[Arguments]
The arguments of this function are as shown below.
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
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==
[Function]
eth_comrecv
[Syntax with arguments]
eth_comrecv(socket, length)
[Arguments]
The arguments of this function 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.
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:
[Function]
eth_comstatus
[Syntax with arguments]
eth_comstatus(socket)
[Arguments]
The arguments of this function 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
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==
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
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==
[Function]
remove
[Syntax with arguments]
remove(filename)
[Arguments]
The arguments of this function 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/":
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==
[Function]
rename
[Syntax with arguments]
rename(oldname, newname)
[Arguments]
The arguments of this function 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
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==
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)
[Function]
tmpnam
[Syntax with arguments]
tmpnam()
[Arguments]
None
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:
[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.
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==
[Function]
srand
[Syntax with arguments]
srand(seed)
[Arguments]
The arguments of this function 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
[Function]
mktime
[Syntax with arguments]
mktime(regiontime)
[Arguments]
The arguments of this function are as shown below.
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==
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:
[Function]
time
[Syntax with arguments]
time()
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:
[Function]
asctime
[Syntax with arguments]
asctime(timeinfo)
[Arguments]
The arguments of this function are as shown below.
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==
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:
[Function]
ctime
[Syntax with arguments]
ctime(time)
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 (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:
[Function]
gmtime
[Syntax with arguments]
gmtime(time)
[Arguments]
The arguments of this function are as shown below.
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."
[Function]
localtime
[Syntax with arguments]
localtime(time)
[Arguments]
The arguments of this function are as shown below.
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 (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."
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==
[Function]
difftime
[Syntax with arguments]
difftime(e_time, s_time)
[Arguments]
The arguments of this function 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:
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==
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 (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."
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==
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.
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==
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.
[Function]
findfirstfile
[Syntax with arguments]
findfirstfile(filename)
[Arguments]
The arguments of this function 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.
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==
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==
[Function]
findnextfile
[Syntax with arguments]
findnextfile(handle)
[Arguments]
The arguments of this function 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."
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==
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==
[Function]
findclose
[Syntax with arguments]
findclose(handle)
[Arguments]
The arguments of this function 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)."
[Function]
_dos_getdiskfree
[Syntax with arguments]
_dos_getdiskfree( device )
[Arguments]
The arguments of this function are as shown below.
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 (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."
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.
[Function]
getdiskfree
[Syntax with arguments]
getdiskfree(dirname)
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 (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."
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.
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==
[Function]
_chdrive
[Syntax with arguments]
_chdrive(drive)
[Arguments]
The arguments of this function 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:
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.
[Function]
_getdrive
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==
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.
[Function]
chdir
[Syntax with arguments]
chdir( path )
[Arguments]
The arguments of this function 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
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":
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.
[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:
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.
[Function]
cabs
[Syntax with arguments]
cabs( realnum, imagnum )
[Arguments]
The arguments of this function 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":
[Function]
hypot
[Syntax with arguments]
hypot(xnum, ynum)
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 (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:
[Function]
close
[Syntax with arguments]
close(handle)
[Arguments]
The arguments of this function are as shown below.
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==
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)."
[Function]
creat
[Syntax with arguments]
creat(filename, mode)
[Arguments]
The arguments of this function are as shown below.
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==
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/":
[Function]
lseek
[Syntax with arguments]
lseek(handle, offset, origin)
[Arguments]
The arguments of this function are as shown below.
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 (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)."
[Function]
mkdir
[Syntax with arguments]
mkdir(dirname)
[Arguments]
The arguments of this function are as shown below.
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 (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/":
[Function]
Open
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==
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==
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.
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==
[Function]
read
[Syntax with arguments]
read(handle, count)
[Arguments]
The arguments of this function 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
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==
[Function]
rmdir
[Syntax with arguments]
rmdir(dirname)
[Arguments]
The arguments of this function 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
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==
[Function]
tell
[Syntax with arguments]
tell(handle)
[Arguments]
The arguments of this function 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
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==
[Function]
write
[Syntax with arguments]
write(handle, buffer, count)
[Arguments]
The arguments of this function 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.
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==
[Example]
Refer to [Example] under "Opening a file (open)."
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==
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==
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==
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==
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==
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.
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.
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==
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.
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.
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.
[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.
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
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.
[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.
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.)
[Syntax/with arguments]
sleep(timeout)
[Arguments]
The arguments of this function are as shown below.
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==
[Return value]
None
[Description]
Suspends execution of the calling task for the specified amount of time.
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.
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.
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==
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.
Screen 4
Screen 2
Call second time
Screen 3
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==
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
④
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.
Popup screen 1
Popup screen 2
This function is available by changing the custom screen setting in the setting file “apps-general.xml” of the
home menu.
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).
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.
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==
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>
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==
Group number: 1
Group number: 2
Group number: 3
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==
This function is available by changing the custom screen setting in the setting file “apps-general.xml” in home
screen.
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 B
Although the FANUC PICTURE is displayed by
the different icon, the latest base screen is
displayed because of the same group 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==
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
Fig. 7.2.2 (a) Timing of reading the PMC area for the specified screen number
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.
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”.
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==
■ 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
ベース画面
Base screenC B
Popup screen is
closed.
■ 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.
Popup A
ベース画面
Base screenC B Base screen B
The Popup A is also closed, and
Popup A the base screen B is displayed.
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==
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.
Sub-screen Sub-screen
A B
The sub-screen B is switched
by using the sub-screen switch
function.
Base screen B
Sub-screen is initial
Sub-screen
state.
A
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.
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
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)
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 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 D
Fig. 7.3.3 (d) Screen switch and screen number memory by the PMC signal (3)
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==
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".
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.)
NOTE
If you can not prepare the above C executor, please use FANUC PICTURE
earlier than 8.0.
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.
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==
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
1. Overwrite copy the following folders on the CD to combined application development environment( the C
language executor development folder).
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
(略)
(略)
void main() {
Fanuc_Alarm_Task_Init(); // Initialize proc. for FANUC PICTURE
for (;;) {
(略)
}
Fanuc_Alarm_Task_Finish();
}
BACK2.C
(略)
(略)
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
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.
#------------------------------------------------------------------------------
FPLIB = ..¥FPLIB
FPCCOPT = -I$(FPLIB) -DFS30I -DONO8D -D$(CEXEDVAL)
FPAXIS = -D$(AXIS_TYPE)
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.
A-42148E-058
Page
Person in Changes
Edition Date charge
Person in
FANUC CORPORATION 569/569
Created 2018.11.13 charge
Approved
© MyFANUC ACE9905F1D7B4D4FA0C4BB220C9CD102