Index Manuals FANUC Robotics SYSTEM R-30iA and R-30iB Controller. KAREL Reference Manual (MARRC75KR07091E Rev D)
|
|
C. KCL COMMAND ALPHABETICAL DESCRIPTION
MARRC75KR07091E Rev D
DIN, DOUT, WDI, WDOAIN, AOUT, GIN, GOUT
See Also: SIMULATE command
Examples: KCL> UNSIMULATE DIN[17]
KCL> UNSIM ALL
C.103
WAIT command
Syntax: WAIT < prog_name > (DONE | PAUSE)
where:
prog_name : the name of any KAREL or TP program which is a task
DONE : specifies that the command procedure wait until execution of the current task is completed
or aborted
PAUSE : specifies that the command procedure wait until execution of the current task is paused,
completed, or aborted.
Purpose: Defers execution of the commands that follow the KCL> WAIT command in a command
procedure until a task pauses or completes execution.
The command procedure waits until the condition specified with the DONE or PAUSE argument
is met.
See Also: Section 13.4 , ‘‘Command Procedures’’
Example: The following is an example of an executable command procedure:
> SET DEF testprog
> LOAD ALL
> RUN -- execute program
> WAIT PAUSE
> SHOW CURPOS -- display position of TCP when program pauses
> CONTINUE
> WAIT DONE
> CLEAR ALL YES -- clear after execution
C-52
Appendix D
CHARACTER CODES
Contents
Appendix D CHARACTER CODES
D-1
D.1
CHARACTER CODES
D-2
D-1
D. CHARACTER CODES
MARRC75KR07091E Rev D
D.1
CHARACTER CODES
This appendix lists the ASCII numeric decimal codes and their corresponding ASCII, Multinational,
graphic, and European characters as implemented on the KAREL system. The ASCII character set is
the default character set for the KAREL system. Use the CHR Built-In Function, in Appendix A, to
access the Multinational and Graphics character sets.
Table D-1.
ASCII Character Codes
Decimal
Character
Decimal
Character Value
Decimal
Character
Decimal
Character
Code
Value
Code
Code
Value
Code
Value
000
(NUL)
032
SP
064
@
096
‘
001
(SOH)
033
!
065
A
097
a
002
(STX)
034
"
066
B
098
b
003
(ETX)
035
#
067
C
099
c
004
(EOT)
036
$
068
D
100
d
005
(ENQ)
037
%
069
E
101
e
006
(ACK)
038
&
070
F
102
f
007
(BEL)
039
’
071
G
103
g
008
(BS)
040
(
072
H
104
h
009
(HT)
041
)
073
I
105
i
010
(LF)
042
074
J
106
j
011
(VT)
043
+
075
K
107
k
012
(FF)
044
’
076
L
108
l
013
(CR)
045
-
077
M
109
m
014
(SO)
046
078
N
110
n
015
(SI)
047
/
079
O
111
o
016
(DLE)
048
0
080
P
112
p
017
(DC1)
049
1
081
Q
113
q
018
(DC2)
050
2
082
R
114
r
019
(DC3)
051
3
083
S
115
s
020
(DC4)
052
4
084
T
116
t
021
(NAK)
053
5
085
U
117
u
022
(SYN)
054
6
086
V
118
v
023
(ETB)
055
7
087
W
119
w
D-2
MARRC75KR07091E Rev D
D. CHARACTER CODES
Table D-1. ASCII Character Codes (Cont’d)
Decimal
Character
Decimal
Character Value
Decimal
Character
Decimal
Character
Code
Value
Code
Code
Value
Code
Value
024
(CAN)
056
8
088
X
120
x
025
(EM)
057
9
089
Y
121
y
026
(SUB)
058
:
090
Z
122
z
027
(ESC)
059
;
091
[
123
{
028
(FS)
060
<
092
\
124
|
029
(GS)
061
=
093
]
125
}
030
(RS)
062
>
094
^
126
~
031
(US)
063
?
095
—
127
(DEL)
Table D-2. Special ASCII Character Codes
Decimal Code
Character Value
Decimal Code
Character Value
128
Clear window
154
Turn Multinational mode on
129
Clear to end of line
155 48
Foreground color black
130
Clear to end of window
155 49
Foreground color red
131
Set cursor position
155 50
Foreground color green
132
Carriage return
155 51
Foreground color yellow
133
Line feed
155 52
Foreground color blue
134
Reverse line feed
155 53
Foreground color magenta
135
Carriage return & line
155 54
Foreground color cyan
feed
136
Back Space
155 55
Foreground color white
D-3
D. CHARACTER CODES
MARRC75KR07091E Rev D
Table D-2. Special ASCII Character Codes (Cont’d)
Decimal Code
Character Value
Decimal Code
Character Value
137
Home cursor in window
155 127
Foreground color default
138
Blink video attribute
156 48
Background color black
139
Reverse video attribute
156 49
Background color red
140
Bold video attribute
156 50
Background color green
141
Underline video
156 51
Background color yellow
attribute
142
Wide video size
156 52
Background color blue
143
Normal video attribute
156 53
Background color magenta
Turn Graphics mode
156 54
Background color cyan
146
on
147
Turn ASCII mode on
156 55
Background color white
148
High/wide video size
156 127
Background color default
153
Normal video size
Table D-3.
Multinational Character Codes
Decimal
Character
Decimal
Character
Decimal
Character
Decimal
Character Value
Codes
Value
Codes
Value
Codes
Value
Codes
000
032
064
À
096
à
001
033
¡
065
Á
097
á
002
034
066
Â
098
â
003
035
£
067
Ã
099
ã
004
(IND)
036
068
Ä
100
ä
005
(NEL)
037
¥
069
Å
101
å
006
(SSA)
038
070
Æ
102
æ
007
(ESA)
039
§
071
Ç
103
ç
D-4
MARRC75KR07091E Rev D
D. CHARACTER CODES
Table D-3. Multinational Character Codes (Cont’d)
Decimal
Character
Decimal
Character
Decimal
Character
Decimal
Character Value
Codes
Value
Codes
Value
Codes
Value
Codes
008
(HTS)
040
¤
072
È
104
è
009
(HTJ)
041
073
É
105
é
a
010
(VTS)
042
074
Ê
106
ê
011
(PLD)
043
«
075
Ë
107
ë
012
(PLU)
044
076
Ì
108
ì
013
(RI)
045
077
Í
109
í
014
(SS2)
046
078
Î
110
î
015
(SS3)
047
079
Ï
111
ï
016
(DCS)
048
080
112
017
(PU1)
049
±
081
Ñ
113
ñ
2
018
(PU2)
050
082
Ò
114
ò
3
019
(STS)
051
083
Ó
115
ó
020
(CCH)
052
084
Ô
116
ô
021
(MW)
053
µ
085
Õ
117
õ
022
(SPA)
054
¶
086
Ö
118
ö
023
(EPA)
055
•
087
Œ
119
œ
024
056
088
Ø
120
ø
l
025
057
089
Ù
121
ù
026
058
090
Ú
122
ú
027
(CSI)
059
»
091
Û
123
û
028
(ST)
060
¼
092
Ü
124
ü
029
(OSC)
061
½
093
Y
125
ÿ
030
(PM)
062
094
126
031
(APC)
063
¿
095
ß
127
D-5
D. CHARACTER CODES
MARRC75KR07091E Rev D
Table D-4. Graphics Character Codes (not available in R-30iB)
Decimal
Character
Decimal
Character
Decimal
Character
Decimal
Character Value
Codes
Value
Codes
Value
Codes
Value
Codes
000
(NUL)
032
SP
064
@
096
♦
001
(SOH)
033
!
065
A
097
H
002
(STX)
034
"
066
B
098
T
F
003
(ETX)
035
#
067
C
099
F
C
004
(EOT)
036
$
068
D
100
R
L
005
(ENQ)
037
%
069
E
101
F
006
(ACK)
038
&
070
F
102
007
(BEL)
039
’
071
G
103
±
N
008
(BS)
040
(
072
H
104
L
V
009
(HT)
041
)
073
I
105
T
010
(LF)
042
074
J
106
┘
011
(VT)
043
+
075
K
107
┐
012
(FF)
044
’
076
L
108
┌
013
(CR)
045
-
077
M
109
└
014
(SO)
046
078
N
110
+
015
(SI)
047
/
079
O
111
-
016
(DLE)
048
0
080
P
112
-
017
(DC1)
049
1
081
Q
113
-
018
(DC2)
050
2
082
R
114
-
019
(DC3)
051
3
083
S
115
_
020
(DC4)
052
4
084
T
116
D-6
MARRC75KR07091E Rev D
D. CHARACTER CODES
Table D-4. Graphics Character Codes (not available in R-30iB) (Cont’d)
Decimal
Character
Decimal
Character
Decimal
Character
Decimal
Character Value
Codes
Value
Codes
Value
Codes
Value
Codes
021
(NAK)
053
5
085
U
117
022
(SYN)
054
6
086
V
118
023
(ETB)
055
7
087
W
119
024
(CAN)
056
8
088
X
120
|
025
(EM)
057
9
089
Y
121
026
(SUB)
058
:
090
Z
122
027
(ESC)
059
;
091
[
123
Ȇ
028
(FS)
060
<
092
124
029
(GS)
061
=
093
]
125
£
030
(RS)
062
>
094
^
126
•
031
(US)
063
?
095
(blank)
127
(DEL)
Table
D-5.
Teach Pendant Input Codes
Code
Value
Code
Value
0
48
174
USER KEY
2
1
49
175
USER KEY
3
2
50
176
USER KEY
4
3
51
177
USER KEY
5
4
52
178
USER KEY
6
5
53
185
FWD
6
54
186
BWD
7
55
187
COORD
D-7
D. CHARACTER CODES
MARRC75KR07091E Rev D
Table
D-5.
Teach Pendant Input Codes (Cont’d)
Code
Value
Code
Value
8
56
188
+X
9
57
189
+Y
128
PREV
190
+Z
129
F1
191
+X rotation
131
F2
192
+Y rotation
132
F3
193
+Z rotation
133
F4
194
-X
134
F5
195
-Y
135
NEXT
196
-Z
143
SELECT
197
-X rotation
144
MENUS
198
-Y rotation
145
EDIT
199
-Z rotation
146
DATA
210
USER KEY
147
FCTN
212
Up arrow
148
ITEM
213
Down arrow
149
+%
214
Right arrow
150
-%
215
Left arrow
151
HOLD
147
DEADMAN switch, left
152
STEP
248
DEADMAN switch, right
153
RESET
249
ON/OFF switch
173
USER KEY
1
250
EMERGENCY STOP
Table
D-6.
European Character Codes
Code
Value
Code
Value
Code
Value
192
A‘
213
O~
234
e^
193
A‘
214
O:
235
e:
194
A^
215
OE
236
i‘
195
A~
216
O/
237
i‘
196
A:
217
U‘
238
i^
197
Ao
218
U‘
239
i:
D-8
MARRC75KR07091E Rev D
D. CHARACTER CODES
Table
D-6.
European Character Codes (Cont’d)
Code
Value
Code
Value
Code
Value
198
AE
219
U^
240
199
CC
220
U:
241
n~
200
E‘
221
Y:
242
o‘
201
E‘
222
243
o‘
202
E^
223
Bb
244
o^
203
E:
224
a‘
245
o~
204
I‘
225
a‘
246
o:
205
I‘
226
a^
247
oe
206
I^
227
a~
248
207
I:
228
a:
249
u‘
208
229
ao
250
u‘
209
N~
230
ae
251
u^
210
O‘
231
252
u:
211
O‘
232
e‘
253
y:
212
O^
233
e‘
254
A^ = A with ^ on top
A‘ = A with ‘ on top
Ao = A with o on top
A~ = A with ~ on top
A: = A with .. on top
AE = A and E run together
OE = A and E run together
Bb = Beta
D-9
D. CHARACTER CODES
MARRC75KR07091E Rev D
Table
D-7.
Graphics Characters
Decimal Value
ASCII Character
Graphic Character
97
a
solid box
102
f
diamond
103
g
plus/minus
106
j
lower-right box corner
107
k
upper-right box corner
108
l
upper-left box corner
109
m
lower-left box corner
110
n
intersection lines
111
o
pixel row 1 horizontal line
112
p
pixel row 2 horizontal line
113
q
pixel row 3 horizontal line
114
r
pixel row 4 horizontal line
115
s
pixel row 5 horizontal line
116
t
T from right
117
u
T from left
119
v
T from above
119
w
T from below
120
x
Vertical Line
121
y
Less than or equal
122
z
Greater than or equal
123
{
Pi
124
|
Not equal
125
}
British pound symbol
D-10
Appendix E
SYNTAX DIAGRAMS
Contents
Appendix E SYNTAX DIAGRAMS
E-1
E-1
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
KAREL syntax diagrams use the following symbols:
Rectangle
A rectangle encloses elements that are defined in another syntax diagram or in
accompanying text.
Oval
An oval encloses KARELreserved words that are entered exactly as shown.
Circle
A circle encloses special characters that are entered exactly as shown.
Dot
A dot indicatesa mandatory line end (; or ENTER key) beforethe next syntaxelement.
Caret
^
A caret indicates an optional line end.
Arrows
Arrows indicate allowed paths and the correct sequence in a diagram.
Branch
Branches indicate optional paths or sequences.
E-2
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-1.
PROGRAM module definition
directive list
TYPE declaration
program name
VAR declaration
PROGRAM
identifier
^
CONST declaration
ROUTINE declaration
program body
program name
statement
BEGIN
END
identifier
list
ROUTINE definition
^-- 0 or more line-ends
line-end
--newline
line-end
;
E-3
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-2.
directive list
directive
^
directive
%ALPHABETIZE
%COMMENT
=
quoted
string
%CMOSVARS
%CRTDEVICE
%DEFGROUP
=
(integer)
constant
%DELAY
=
(integer)
constant
%ENVIRONMENT
identifier
%LOCKGROUP
=
(integer)
^
constant
,
%NOABORT
=
ERROR
+
COMMAND
%NOPAUSE
=
ERROR
+
COMMAND
+
TPENABLE
%NOBUSYLAMP
%NOLOCKGROUP
%NOPAUSESHFT
%PRIORITY
=
(integer)
constant
%STACKSIZE
=
(integer)
constant
%TIMESLICE
=
(integer)
constant
%TPMOTION
E-4
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-3.
CONST --constant declaration
constant name
value
+
CONST
identifier
=
constant
^
^
constant
constant name
identifier
literal
TYPE -- type declaration
type name
TYPE
identifier
=
user type
^
^
program name
FROM
identifier
E-5
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-4.
user type
data type
STRUCTURE
field list
ENDSTRUCTURE
^
field list
field name
:
structure array
identifier
type
structure array type
data type
BYTE
SHORT
E-6
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-5.
data type
type name
identifier
system type name
system identifier
INTEGER
REAL
BOOLEAN
VECTOR
VIS_PROCESS
MODEL
CAM_SETUP
FILE
CONFIG
PATH
structure type name
PATH HEADER
=
identifier
^
,
structure type name
NODEDATA
=
identifier
^
E-7
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-6.
data type continued
IN
GROUP
[
(integer)
]
position type
constant
string size
STRING
[
(integer)
]
constant
ARRAY
[
(integer)
]
structure array
OF
constant
type
,
E-8
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-7.
position type
POSITION
XYZWPR
JOINTPOS1
JOINTPOS2
JOINTPOS3
JOINTPOS4
JOINTPOS5
JOINTPOS6
JOINTPOS7
JOINTPOS8
JOINTPOS9
JOINTPOS
XYZWPREXT
E-9
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-8.
VAR -- variable declaration
variable name
:
VAR
data
identifier
type
^
program name
CMOS
,
FROM
identifier
DRAM
ROUTINE -- routine declaration
routine name
ROUTINE
identifier
parameter name
parameter
return data
(
identifier
:
)
:
type
type
^
^
,
program name
FROM
identifier
local variables
VAR declaration
local constants
CONST declaration
routine body
routine name
statement
BEGIN
END
identifier
list
E-10
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-9.
return data type
type name
identifier
system type name
system identifier
INTEGER
REAL
BOOLEAN
VECTOR
CONFIG
position type
IN
GROUP
[
(integer)
]
constant
STRING
ARRAY
OF
structure array
type
[
*
]
,
E-11
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-10.
parameter type
type name
identifier
system type name
system identifier
INTEGER
REAL
BOOLEAN
VECTOR
VIS_PROCESS
MODEL
CAM_SETUP
FILE
CONFIG
PATH
structure type name
PATHHEADER
=
identifier
^
,
structure type name
NODEDATA
=
identifier
^
E-12
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-11.
parameter type continued
IN
GROUP
[
(integer)
]
position type
constant
STRING
ARRAY
OF
structure array
type
[
*
]
,
E-13
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-12.
statement list
statement
^
statement
label name
identifier
::
ABORT statement
assignment statement
ATTACH statement
call statement routine
CANCEL statement
CANCEL FILE statement
CLOSE FILE statement
CLOSE HAND statement
CONDITION statement
CONNECT TIMER statement
DELAY statement
DISABLE statement
DISCONNECT TIMER statement
ENABLE statement
FOR statement
GO TO statement
HOLD statement
IF statement
OPEN FILE statement
OPEN HAND statement
PAUSE statement
PULSE statement
PURGE statement
READ statement
RELAX statement
RELEASE statement
REPEAT statement
RESUME statement
RETURN statement
SELECT statement
SIGNAL statement
STOP statement
UNHOLD statement
USING statement
WAIT statement
WHILE statement
WRITE statement
E-14
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-13.
ABORT
- statement
task number
PROGRAM
[
]
ABORT
(integer)
expression
assignmemnt
- statement
variable
=
expression
access
^
ATTACH
- statement
ATTACH
CALL
- routine
actual parameter
routine name
(
expression
)
identifier
^
,
CANCEL
- statement
CANCEL
GROUP
[
(integer)
]
contstant
,
^
CANCEL FILE
- statement
file variable
CANCEL
FILE
variable
access
CLOSE FILE
- statement
file variable
CLOSE
FILE
variable
access
CLOSE HAND
- statement
hand spec
CLOSE
HAND
(integer)
expression
E-15
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-14.
CONDITION statement
condition handler-
number
[
:
CONDITION
(integer)
]
expression
^
system var name
group number
WITH
system identifier
[
(integer)
]
constant
field name
value
system identifier
=
expression
^
,
^
WHEN
DO
action
global condition
^
ENDCONDITION
^
AND
,
global condition
^
OR
CONNECT TIMER
- statement
clock variable
CONNECT
TIMER
TO
(integer)
identifier
DELAY
- statement
time spec (ms)
DELAY
(integer)
expression
DISABLE
- statement
condition handle
number
DISABLE
CONDITION
[
(integer)
]
expression
E-16
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-15.
DISCONNECT TIMER
- statement
clock variable
DISCONNECT
TIMER
(integer)
identifier
ENABLE
- statement
condition handler-
number
ENABLE
CONDITION
[
(integer)
]
expression
FOR
- statement
TO
count variable
initial value
(integer)
(integer)
=
FOR
expression
identifier
^
^
DOWNTO
final value
loop body
(integer)
statement
DO
ENDFOR
expression
list
^
GO TO
- statement
GOTO
label name
(destination)
GO
TO
identifier
statement label
HOLD
- statement
HOLD
GROUP
[
(integer)
]
contstant
,
^
IF THEN
- statement
false alternative
true alternative
statement
ELSE
statement
ENDIF
IF
(boolean)
THEN
list
list
expression
^
E-17
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-16.
OPEN FILE
- statement
file variable
usage spec
variable
OPEN
FILE
(
,
access
(string)
^
expression
^
file spec
(string)
)
expression
OPEN HAND
- statement
hand spec
OPEN
HAND
(integer)
identifier
PAUSE
- statement
task number
PAUSE
PROGRAM
[
(integer)
]
expression
PULSE
- statement
time spec (ms)
port number
]
FOR
(integer)
NOWAIT
PULSE
DOUT
[
(integer)
identifier
expression
^
RDO
PURGE
- statement
condition handler
number
PURGE
CONDITION
[
(integer)
]
expression
E-18
MARRC75KR07091E Rev D
E. SYNTAX DIAGRAMS
Figure E-17.
READ
- statement
file variable
variable
(
)
READ
access
read
^
item
,
read item
- statement
CR
1st format spec
2nd format spec
variable
::
(integer)
::
(integer)
access
expression
expression
RELAX
- statement
hand spec
RELAX
HAND
(integer)
expression
RELEASE
- statement
RELEASE
REPEAT
- statement
loop body
statement
UNTIL
boolean
REPEAT
list
expression
RESUME
- statement
RESUME
GROUP
[
(integer)
]
contstant
,
E-19
E. SYNTAX DIAGRAMS
MARRC75KR07091E Rev D
Figure E-18.
RETURN
- statement
return value
(
)
RETURN
expression
^
SELECT
- statement
case alternative
case value
(integer)
OF
statement
SELECT
CASE
(
(integer)
)
:
expression
list
constant
^
^
,
else alternative
ELSE
:
statement
ENDSELECT
list
SIGNAL
- statement
event number
SIGNAL
EVENT
[
(integer)
]
expression
STOP
- statement
STOP
GROUP
[
(integer)
]
contstant
,
UNHOLD
- statement
[
UNHOLD
GROUP
(integer)
]
contstant
,
USING
- statement
structure
variable
variable
statement
USING
DO
ENDUSING
access
list
,
^
E-20
|
||
|
|
|