
4.EMBEDDING OF C APPLICATIONS B-66284EN/01
- 362 -
[Image] tab
Style: “10:No Figure”
(2) User function for user screen display
(a) User function name
The first eight characters of the name of a user function for
user screen display must be "usr_Disp" to separate it from
the other user functions.
Example) usr_DispSample()
(b) Return value of user function
As the return value of the user function, specify the screen
to which the previous screen is switched.
For the CNC screen, specify either the CNC screen number
or the key code of the screen switching MDI key. When
specifying the MDI key, add a value of 0x10000000 to the
return value.
For the FANUC PICTURE screen, add a value of
0x20000000 to the screen number.
Example1) To make switching to the system diagnosis
screen
return (CRT_SYS_DGN);
Example2) To make the same screen switching as if MDI
key [POS] were pressed
return (0x10000000 | MDIKEY_POS);
Example3) To make switching to FANUC PICTURE
screen 3
return (0x20000000 | 3);
(c) Processing structure of user function
A user function for user screen display must have a
structure in which a loop is always made within the function
while the screen is displayed and the function is terminated
with a return value indicating the switching destination
screen number when the user screen is cleared.
usr_DispSample()
↓
Initialization of display
↓
Update of display
↓
Screen change demand? No
↓ Yes
Termination of display
↓
RETURN/ The screen number switched after the
return is returned.