Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 898 -
(2) Switch to the user background tasks
Responses of the user background task are as follows for each events which
start the tasks.
* Timer
The task starts from the event within 8 msec while the user main
task is being executing or within 16 msec while the CNC display
task is being executing.
* Signal from the other tasks
The task starts immediately by the signal from the task which
has lower priority. When a signal from the task of higher priority
has been received, the user background task starts just after the
higher priority task is stopped.
* Status of serial port
The task starts from the completion of the specified status
within 8 msec while the user main task is being executing or
within 16 msec while the CNC display task is being executing.
All of above response times are described in case that no CNC
interruption tasks are being executed. If the event occurs while any CNC
interruption tasks are being executed, the task which is waked will
starts after the end of execution of that CNC interruption task. If the
event occurs while switching screen from CNC's to user's, the task
starts after the completion of that screen switching.
(3) Switch the user main task and the CNC display task
The task switching is performed with no delay every N*16[msec] or M*
16 [msec] provided no higher priority tasks are being executed.
5.1.2.6 Execution of CNC task while user screen is being displayed
While the user screen is being displayed, not the CNC display task but
the user main task is executed, ordinarily. However the CNC display task
includes the processes which must be executed always such as CNC window
process, etc. in addition to the screen displaying. Therefore, the CNC
display task is executed simultaneously with the user main task while the
user screen is being displayed. The task switching is executed in CNC side.
The CPU time ratio for execution of the user main task and the CNC display
task is 4:1 under the default setting. This ratio can be altered by the
calling of os_chng_duty function in the user application program. For
example, call os_chng_duty(10,1) to increase CPU time of the user application.
The tasks are switched every N*16[msec] and M*16[msec]. (in case that the
execution ratio is N:M; N for the user task, M for the CNC task) This means
that first, the user task is being executed during N*16[msec], and then,
the CNC task is being executed during M*16[msec]. It is not necessary to
alter this execution ratio 4:1 normally. The ratio is altered, for example,
to give especially more CPU time to the user application or to execute
rapidly CNC window process which consume a lot of CPU time. It is impossible
to stop one task by specifying the execution ratio as 0 in os_chng_duty
function. os_chng_duty(1,0) is equivalent to os_chng_duty(1.1).