- 1、本文档共33页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
KUKA机器人变量说明文档
. PM Team
KUKA China | 20.06.2016 | Seite 1
Simple data types
KUKA China | 20.06.2016 | page 2
Simple data types
KUKA China | 20.06.2016 | page 3
Definition of “variables”
In addition to the use of constants (digits, characters, etc.),
memory locations are also defined in the robot controller in
which these values can be stored.
This stored information can thus be retrieved at various points in the program
for evaluation and further processing.
A variable is a fixed memory area, whose contents can be addressed via
the variable name.
Example:
Variable name
...
Part_counter = 37
... Content of the
variable
KUKA China | 20.06.2016 | page 4
Declaration of variables
Variable declarations always have the following syntax:
DECL Data_Type Variable_Name
Example:
Def Main( )
DECL INT part_counter
INI
... End
KUKA China | 20.06.2016 | page 5
Variables and names
Variable names in KRL
? can have a maximum length of 24 characters.
? can consist of letters (A-Z), numbers (0-9) and the signs ‘_’ and ‘$’.
? must not begin with a number.
? must not be a keyword.
KUKA China | 20.06.2016 | page 6
Simple data types
Data type Integer Real Boolean Character
Keyword INT REAL BOOL CHAR
Meaning Integer
Floating-point
number
Logic state
1 character
Range of
values
-231
...
(231-1)
+/-1.1E-38
...
+/-3.4E+38
TRUE,
FALSE
ASCII
character 1-
255
Example 32 1.43 TRUE “A”
KUKA China | 20.06.2016 | page 7
Basic structure of a robot program
DEF NAME( )
; Declaration section
...
; Initialization section
...
; Instruction section
...
END
KUKA China | 20.06.2016 | page 8
Activating the DEF line
? Variables must be declared before the INI line
? In order to set syntax before the INI line, the DEF line must be
activated
KUKA China | 20.06.2016 | page 9
Declaration and value assignment
DEF MAIN_PROGRAM( )
; Declaration section
DECL INT PART
; Initialization section
INI ;Initialization of acceleration and velocity
; Instruction section
PART=58 ;Value assignment, decimal
PART=
文档评论(0)