Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 942 -
5.10.2 Known problems
There are known problems on C Executor as follows.
Please take case of these problems and keep your application program from
them.
(1) When any function which takes task switching is called in the main task
while the screen switching is inhibited, hang-up may occur.
"Screen switching inhibition status" is one of followings.
* Disabled screen switching by "crt_setswt( CRT_SWT_DIS )" function.
* While graphic is opened by "crt_opengr()" function.
( without "crt_setswt( CRT_SWT_GREN )" )
* "crt_setuserscrn()" function has never be called since power-on.
"Function which takes task switching" are
* Task control function "os_xxx".
* Function which waits until MDI key is input such as "getch", "gets",
"scanf", etc.
* "crt_cncscrn" function.
* "rs_wait" function.
To avoid this problem, make programs like below for the application which
runs while screen switching is inhibited.
(a) Key input
(NG) c = getch() ;
/* "getch()" function waits key input. */
(OK) while( !kbhit() ) c = getch() ;
/* "getch()" function doesn't wait key input. */
(b) Wait until specified time (example: wait 3 seconds)
(NG) os_wait_tim( 3*1000L ) ;
/* Task switching is executed. */
(OK) unsigned long tm ;
tm = clock() ;
while ( clock() - tm < 3*1000L ) ;
/* Program loops in itself. */
(c) Screen switching
(NG) crt_setswt( CRT_SWT_DIS ) ;
crt_cncscrn( CRT_SYS_PRM ) ;
/* Screen is not switched. */
(OK) crt_setswt( 0 ) ;
crt_cncscrn( CRT_SYS_PRM ) ;
/* Screen is switched exactly. */
There are no restriction like this for the auxiliary tasks.