Omron trajexia CJ1W-MCH72 Operation Manual page 115

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-40 BASICERROR
4-2-41 BATTERY_LOW
104
Example
>> BASE(0,1,2)
On the command line the base group order can be shown by typing
BASE.
Example
>> RUN "PROGRAM", 3
>> BASE PROC(3)(0,2,1)
Use the PROC modifier to show the base group order of a certain task.
Example
>> BASE(2)
>> PRINT BASE
2.0000
Printing BASE will return the current selected base axis.
See also
AXIS
/i
Type
System command
Syntax
BASICERROR
Description
The BASICERROR command can be used to run a routine when a run-
time error occurs in a program. BASICERROR can only be used as part
of an ON ... GOSUB or ON ... GOTO command. This command is
required to be executed once in the BASIC program. If several com-
mands are used only the one executed last is effective.
Arguments
N/A
Example
ON BASICERROR GOTO error_routine
...
no_error = 1
STOP
error_routine:
IF no_error = 0 THEN
PRINT "The error "; RUN_ERROR[0];
PRINT " occurred in line "; ERROR_LINE[0]
ENDIF
STOP
If an error occurs in a BASIC program in this example, the error routine
will be executed.
The IF statement is present to prevent the program going into error rou-
tine when it is stopped normally.
See also
ERROR_LINE, ON, RUN_ERROR.
/i
Type
System parameter (read-only)
Syntax
BATTERY_LOW
Description
This parameter returns the current state of the battery condition. If
BATTERY_LOW=ON then the battery needs to be changed. If
BATTERY_LOW=OFF then battery condition is ok.
Arguments
N/A
Example
No example.
See also
N/A
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents