
------------------------------------------------------------------------------
1.6 Switch to CNC screen. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
crt_cncscrn
[Syntax]
#include <crt.h>
int crt_cncscrn( int index ) ;
[Arguments]
index Index number of the CNC screen to be switched to.
[Return]
Returns zero if successful. If not, returns one of following values
and sets the same value in the global variable "errno".
ER_CNC_DATA (=5) Incorrect screen index number "index".
ER_CNC_OPTION (=6) There are no additional options/board required
for the specified screen.
ER_CNC_BUSY (=-1) CNC window is busy.
[Description]
Changes into the CNC screen which is specified by the application
program. Also execution of program is switched from the application
task to the CNC task. This is the same operation as switching to CNC
screen by pressing of the function keys on MDI panel.
The CRT display will be switched into the specified CNC screen by
the successful calling of this function.
At the same time, the control of software will be switches to the
CNC side, and then, the application program is put into sleep state.
When the screen will be changed from the CNC side into the user's
screen again, the application program will restart from the next
instruction to this function call.
Specify the screen index numbers in "index" with the following format.
Upper byte Lower byte
---------------+---------------
Small Large
classification classification
Refer the screen index number list of
"Get current screen index(crt_getcurscrn)" for index numbers of each
screens. All available index values are defined in crt.h as
"CRT_xxx_xxx".
It is possible to switch to any user's screen by specifying the index
number of the user screen.