没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/release/download_crawler_static/18608714/bg1.jpg)
MARRC75KR07091E Rev G A. KAREL LANGUAGE ALPHABETICAL DESCRIPTION
• If NOWAIT is specified in a PULSE statement, the next KAREL statement will be executed
concurrently with the pulse.
• If NOWAIT is not specified in a PULSE statement, the next KAREL statement will not be
executed until the pulse is completed.
See Also: Appendix E , ‘‘Syntax Diagrams’’ for more syntax information
Example: In the following example a digital output is pulsed, followed by the pulsing of a second
digital output. Because NOWAIT is specified, DOUT[start_air] will be executed before DOUT[5] is
completed.
PULSE Statement
PULSE DOUT[5] FOR (seconds * 1000) NOWAIT
PULSE DOUT[start_air] FOR 50 NOWAIT
A.17.28 PURGE CONDITION Statement
Purpose: Deletes the definition of a condition handler from the system
Syntax : PURGE CONDITION[cond_hand_no]
where:
cond_hand_no : an INTEGER expression
Details:
• The statement has no effect if there is no condition handler defined with the specified number.
• The PURGE CONDITION Statement is used only to purge global condition handlers.
• The PURGE CONDITION Statement will purge enabled conditions.
• If a condition handler with the specified number was previously defined, it must be purged
before it is replaced with a new one.
See Also: ENABLE CONDITION Statement Chapter 6 CONDITION HANDLERS , Appendix E ,
‘‘Syntax Diagrams’’ for more syntax information
Example: In the following example, if the BOOLEAN variable ignore_cond is TRUE, the
global condition handler, CONDITION[1], will be purged using the PURGE statement; otherwise
CONDITION[1] is enabled.
PURGE CONDITION Statement
IF ignore_cond THEN
PURGE CONDITION[1]
A–267
![](https://csdnimg.cn/release/download_crawler_static/18608714/bg2.jpg)
A. KAREL LANGUAGE ALPHABETICAL DESCRIPTION MARRC 75KR0709 1E Rev G
ELSE
ENABLE CONDITION[1]
ENDIF
A.17.29 PURGE_DEV Bu ilt-In Procedure
Purpose: Purges the specified memory file device by freeing any used blocks that are no longer
needed
Syntax : PURGE_DEV (device, status)
Input/Output Parameters :
[in] device : STRING
[out] status : INTEGER
%ENVIRONMENT Group :FDEV
Details:
• device specifies the memory file device to purge. device should be set to ’FR:’ for FROM disk,
’RD:’ for RAM disk, or ’MF:’ for both disks.
• The purge operation is only necessary when the device does not have enough memory to perform
an operation. The ’FR:’ device will return 85001 if the FROM disk is full. The ’RD:’ device will
return 85020 if the RAM disk is full.
• The purge operation will erase file blocks that were previously used, but no longer needed. These
are called garbage blocks. The FROM disk may contain many garbage blocks if files are deleted
or overwritten. The RAM disk does not normally contain garbage blocks, but they can occur
when power is removed during a file copy.
• The VOL_SPACE built-in can be used to determine the number of garbage blocks on the FROM
disk. Hardware limitations may reduce the number of blocks actually freed.
• The device must be mounted and no files can be open on the device or an error will be returned.
• status explains the status of the attempted operation. If not equal to 0 then an error occurred.
85023 is returned if no errors occurred, but no blocks were purged.
Example: Return to Section B.9 , "Using the File and Device Built-Ins" (FILE_EX.KL), for a more
detailed program example.
A–268
![](https://csdnimg.cn/release/download_crawler_static/18608714/bg3.jpg)
MARRC75KR07091E Rev G A. KAREL LANGUAGE ALPHABETICAL DESCRIPTION
A.17.30 PUSH_KEY_RD Built-In Procedure
Purpose: Suspend key input from a keyboard device
Syntax : PUSH_KEY_RD(key_dev_name, key_mask, pop_index, status)
Input/Output Parameters:
[in] key_dev_name :STRING
[in] key_mask :INTEGER
[out] pop_index :INTEGER
[out] status :INTEGER
%ENVIRONMENT Group :PBCORE
Details:
• Suspends all read requests on the specified keyboard device that uses (either as accept_mask or
term_mask) any of the specified key classes.
• If there are no read requests active, a null set of inputs is recorded as suspended. This is not an
error.
• key_dev_name must be one of the keyboard devices already defined:
’TPKB’ :Teach Pendant Keyboard Device
’CRKB’ :CRT Keyboard Device
• key_mask is a bit-wise mask indicating the classes of characters that will be suspended. This
should be an OR of the constants defined in the include file klevkmsk.kl.
kc_display :Displayable keys
kc_func_key :Function keys
kc_keypad :Keypad and Edit keys
kc_enter_key :Enter and Return keys
kc_delete :Delete and Backspace keys
kc_lr_arw :Left and Right Arrow keys
kc_ud_arw :Up and Down Arrow keys
kc_other :Other keys (such as Prev)
A–269
![](https://csdnimg.cn/release/download_crawler_static/18608714/bg4.jpg)
A. KAREL LANGUAGE ALPHABETICAL DESCRIPTION MARRC 75KR0709 1E Rev G
• pop_id is returned and should be used in a call to POP_KEY_RD to re-activate the read requests.
• status explains the status of the attempted operation. If not equal to 0, then an error occurred.
See Also: POP_KEY_RD Built-In Procedure
Example: Refer to the READ_KB Built-In Procedure for an example.
A.18 - Q - KAREL LANGUAGE DESCRIPTION
A.18.1 QUEUE_TYPE Data Type
Purpose: Defines the data type for use in QUEUE built-in routines
Syntax : queue_type = STRUCTURE
n_entries : INTEGER
sequence_no : INTEGER
head : INTEGER
tail : INTEGER
ENDSTRUCTURE
Details:
• queue_type is used to initialize and maintain queue data for the QUEUE built-in routines. Do
not change this data; it is used internally.
See Also: APPEND_QUEUE, DELETE_QUEUE, INSERT_QUEUE, COPY_QUEUE,
GET_QUEUE, INIT_QUEUE, MODIFY_QUEUE Built-In Procedures
A.19 - R - KAREL LANGUAGE DESCRIPTION
A.19.1 READ Statement
Purpose: Reads data from a serial I/O device or file.
Syntax : READ < file_var > (data_item {,data_item})
where:
file_var : a FILE variable
A–270
![](https://csdnimg.cn/release/download_crawler_static/18608714/bg5.jpg)
MARRC75KR07091E Rev G A. KAREL LANGUAGE ALPHABETICAL DESCRIPTION
data_item : a variable identifier and its optional format specifiers or the reserved word CR
Details:
• If file_var is not specified in a READ statement the default TPDISPLAY is used. %CRTDEVICE
directive will change the default to INPUT.
• If file_var is specified, it must be one of the input devices (INPUT, CRTPROMPT, TPDISPLAY,
TPPROMPT) or a variable that was set in the OPEN FILE statement.
• If file_var attribute was set with the UF option, data is transmitted into the specified variables
in binary form. Otherwise, data is transmitted as ASCII text.
• data_item can be a system variable that has RW access or a user-defined variable.
• When the READ statement is executed, data is read beginning with the next nonblank input
character and ending with the last character before the next blank, end of line, or end of file
for all input types except STRING.
• If data_item is of type ARRAY, a subscript must be provided.
• If data_item is of type PATH, you can specify that the entire path be read, a specific node be read
([n]), or a range of nodes be read ([n .. m]).
• Optional format specifiers can be used to control the amount of data read for each data_item .
The effect of format specifiers depends on the data type of the item being read and on whether the
data is in text (ASCII) or binary (unformatted) form.
• The reserved word CR, which can be used as a data item, specifies that any remaining data in
the current input line is to be ignored. The next data item will be read from the start of the
next input line.
• If reading from a file and any errors occur during input, the variable being read and all subsequent
variables up to CR in the data list are set uninitialized.
• If file_var is a window device and any errors occur during input, an error message is displayed
indicating the bad data item and you are prompted to enter a replacement for the invalid data item
and to reenter all subsequent items.
• Use IO_STATUS (file_var) to determine if the read operation was successful.
Note Read CR should never be used in unformatted mode.
See Also: Chapter 7 FILE INPUT/OUTPUT OPERATIONS , for more information on the READ
format specifiers, IO_STATUS Built-In Function, Appendix E, ‘‘Syntax Diagrams,’’ for more syntax
information
Example: Refer to the following sections for detailed program examples:
Section B.10 , "Using Dynamic Display Built-ins" (DYN_DISP.KL)
Section B.12 , "Displaying a List From a Dictionary File" (DCLST_EX.KL)
Section B.13 , "Using the DISCTRL_ALPHA Built-in" (DCALP_EX.KL)
A–271
剩余349页未读,继续阅读
![avatar](https://profile-avatar.csdnimg.cn/da1626a5196042c8973fd7ac33b2185a_duxiaokang2014.jpg!1)
AAA_自动化工程师
- 粉丝: 6410
- 资源: 3398
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
- 1
- 2
前往页