
B-63423EN/02 SAMPLE PROGRAM
3. USER PROGRAMS FOR G-CODE MENU
-167-
3.4 INPUTTED DATA CHECKING
/****************************************************************************
/*
/* CHECK1.SRC :: System Menue
/*
/***** 8802: Initial Set
/***** 8803: Tool Def
/***** 8804: MSB Codes
/***** 8805: Compensation
/***** 8806: Line
/***** 8807: CW Circle
/***** 8808: CCW Circle
/****************************************************************************
$INCLUDE SYMBOL.DEF
/* ############################################### Initial Set
O8802 input_error_flag = error_non
/* Work Coordinate */
error_item = 1
if[#[value 1] eq #0]goto 97
if[#[value 1] lt 1 || #[value 1] gt 7]goto 98
/* Work Shape */
error_item = 2
if[#[value 2] eq #0]goto 97
if[#[value 2] lt 1 || #[value 2] gt 3]goto 98
/* Work X Co-ord. */
if[#[attribute 3] ne att_not_use]then
error_item = 3
if[#[value 3] eq #0]goto 97
endif
/* Work Y Co-ord. */
if[#[attribute 4] ne att_not_use]then
error_item = 4
if[#[value 4] eq #0]goto 97
endif
/* Work Z Co-ord. */
if[#[attribute 5] ne att_not_use]then
error_item = 5
if[#[value 5] eq #0]goto 97
endif
/* Work X Width */
if[#[attribute 6] ne att_not_use]then
error_item = 6
if[#[value 6] eq #0]goto 97
if[#[value 6] le 0]goto 98
endif
/* Work Y Width */
if[#[attribute 7] ne att_not_use]then
error_item = 7
if[#[value 7] eq #0]goto 97
if[#[value 2] eq 2]then
if[#[value 7] lt 0]goto 98
if[#[value 6] le #[value 7]]goto 98
else
if[#[value 7] le 0]goto 98
endif
endif
/* Work Z Thickness */
if[#[attribute 8] ne att_not_use]then
error_item = 8
if[#[value 8] eq #0]goto 97
if[#[value 8] le 0]goto 98