
B-66244EN/03 4.EMBEDDING OF C APPLICATIONS
- 273 -
4.2 CREATION OF APPLICATIONS USING TASKS
Main task
The main function exists in the FANUC PICTURE library.
The outline of the FANUC PICTURE library is as follows.
Initialization
Screen display
Action monitor
Screen switch check
(Switching)
Error check
(Error)
End
From within the FANUC PICTURE library, predetermined functions
are called at the following locations.
Patterns (UserFunc.c) of the following functions are supplied so that
the machine tool builder can make the necessary modifications to them
for use.
Location in which to call Function name
Application of the power (initialization) void User_Pon_Func(void)
Start of screen display (always before screen
display)
void User_Dsp_Func(void)
End of screen display (always after screen
switching)
void User_Clr_Func(void)
All-time call (during action monitoring) void User_All_Func(void)
From those controls that can call FANUC PICTURE functions,
functions created by the machine tool builder must be specified in
properties.
A specified function is called with char* as an argument(Note 1) during
FANUC PICTURE library action monitoring by registering its function
name when the power is turned on, using the following function. The
argument must be analyzed in each function created by the machine
tool builder that has been called.
long SetUserFunc(char *funcname, void (*funcadrs)())
char *funcname :
Function name (of up to 30 characters, the first four
characters of which is fixed to "usr_".)
void (*funcadrs)() : Function pointer
Return value : 0 Normal termination
: -1 Not enough space to register the function name
(memory allocation failure)