Professional Documents
Culture Documents
3. Прочитать о Backgroundedit
CAD модель инструмента может быть импортирована в Roboguide только в формате IGES.
DIFFERENT
$MAXUALRMNUM
Minimum: Not available Maximum: Not available Default: Not available KCL/Data:
Not available Program: RW UIF: Not available CRTL: Not available Data Type:
INTEGER Memory: Not available
Name: Maximum Number of User-defined Alarm Messages that can be Defined
Description: Determines the size of the array $UALRM_MSG. Note that a controlled start is required
to changed the size of the array. These messages are displayed by executing a UALM statement.
Power Up: Requires a controlled start to take effect.
Autobackup
$AUTOBACKUP.$DEVICE
While the robot is executing a program, it reads the lines ahead of the line currently being executed (look-
ahead execution).
$OVRD_RATE
Minimum: Not available Maximum: Not available Default: Not available KCL/Data:
Not available Program: RW UIF: Not available CRTL: Not available Data Type:
ULONG Memory: Not available
Name: Override change rate
Description: The value of $OVRD_RATE indicates the rate of changing override of 10%-100%.
For example, when $OVRD_RATE = 25, override is changed as follows. V.FINE - FINE - 1 - 2 - 3 - 4 - 5
- 10 - 25 - 50 - 75 - 100
Power Up: Changes to this variable take effect immediately.
FRAMES
$GROUP[1].$utool
Minimum: Not available Maximum: Not available Default: Not available KCL/Data:
Not available Program: RW UIF: Not available CRTL: Not available Data Type:
POSITION Memory: Not available
Name: Tool Coordinate System
Description: $utool is used by KAREL system only. For TPE user, the corresponding variable is
$MNUTOOL. $utool defines the location and orientation of the tool that is attached to the faceplate.
The position in $utool is defined with respect to a fixed coordinate system on the robot faceplate and is
the origin of the TOOL FRAME. By default, the value of $utool is set to $NILP, which means the
position of the TCP is identical to the location and orientation of the faceplate coordinate system. You
must change the value of $utool to define the specific tool you are using.
Power Up: Effective with next motion
$GROUP[1].$uframe
Minimum: Not available Maximum: Not available Default: Not available KCL/Data:
Not available Program: RW UIF: Not available CRTL: Not available Data Type:
POSITION Memory: Not available
Name: User Coordinate Frame
Description: $uframe is used by KAREL system only. For the teach pendant programmer, the
corresponding variable is $MNUFRAME. $uframe is the position of a user frame of reference. All
programmed positions are defined with respect to $uframe. Any value you assign to $uframe is defined
with respect to the world coordinate system. By default, $uframe is identical to the world coordinate
system, meaning $uframe = $NILP.
Power Up: Effective with next motion
$MNUFRAME[1,6]
Minimum: NIL Maximum: NIL Default: NIL KCL/Data: RW Program: RW UIF:
Not available CRTL: Not available Data Type: POSITION Memory: Not available
Name: User Frame Array
Description: This system variables contains the positional value of the user frame used by the teach
pendant system. This is a two dimensional array. The inner dimension is the frame number (1-6). The
outer dimension is the group number (gnum). The frame number is $MNUFRAMENUM[gnum].
When $MNUFRAMENUM[gnum] is between 1 and 6 the system uses the following userframe:
$MNUFRAME[gnum, $MNUFRAMENUM[gnum]] If $MNUFRAMENUM[gnum] is zero the null
frame is used. If $MNUFRAMENUM[gnum] is 14 $GROUP[gnum].$UFRAME is used.
Power Up: N/A
Screen: SETUP Frames
$MNUTOOL[1,6]
Minimum: NIL Maximum: NIL Default: NIL KCL/Data: RW Program: RW UIF:
Not available CRTL: Not available Data Type: POSITION Memory: Not available
Name: Tool Frame Array
Description: This system variables contains the positional value of the tool frame used by the teach
pendant system. This is a two dimensional array. The inner dimension is the tool number (1-6).The
outer dimension is the group number (gnum). The tool number is $MNUTOOLNUM[gnum].
When $MNUTOOLNUM[gnum] is between 1 and 6 the system uses the following toolframe:
$MNUTOOL[gnum, $MNUTOOLNUM[gnum]] If $MNUTOOLNUM[gnum] is zero the null frame
is used. If $MNUTOOLNUM[gnum] is 14 $GROUP[gnum].$UTOOL is used.
Power Up: N/A
Screen: SETUP Frames
$MNUTOOLNUM[2]
Minimum: 0x0 Maximum: 0x15 Default: 0 KCL/Data: RW Program: RW UIF: Not
available CRTL: Not available Data Type: INTEGER Memory: Not available
Name: User Tool Frame Number
Description: Used as the index into $MNUTOOL.
Power Up: N/A
Screen: SETUP Frames, TOOL teach pendant instruction
$MNUFRAMENUM[2]
Minimum: 0x0 Maximum: 0x15 Default: 0 KCL/Data: RW Program: RW UIF: Not
available CRTL: Not available Data Type: INTEGER Memory: Not available
Name: User Frame Number
Description: Used as the index into $MNUFRAME.
Power Up: N/A
Screen: SETUP Frames, teach pendant position programming
KAREL
FOR...ENDFOR Statement
Purpose: Looping construct based on an INTEGER counter
Syntax : FOR count = initial || TO | DOWNTO || final
DO{stmnt} ENDFOR
where:
[in]count :INTEGER variable
[in]initial :INTEGER expression
[in]final :INTEGER expression
[in]stmnt :executable KAREL statement
Details:
Initially, count is set to the value of initial and final is evaluated. For each iteration, count is
compared to final.
If TO is used, count is incremented for each loop iteration.
If DOWNTO is used, count is decremented for each loop iteration.
If count is greater than final using TO, stmnt is never executed.
If count is less than final using DOWNTO, stmnt is never executed on the first iteration.
If the comparison does not fail on the first iteration, the FOR loop will be executed for the number of
times that equals ABS( final - initial) + 1.
If final = initial , the loop is executed once.
initial is evaluated prior to entering the loop. Therefore, changing the values of initial and final
during loop execution has no effect on the number of iterations performed.
The value of count on exit from the loop is uninitialized.
Never issue a GO TO statement in a FOR loop. If a GO TO statement causes the program to exit a
FOR loop, the program might be aborted with a ``Run time stack overflow'' error.
Never include a GO TO label in a FOR loop. Entering a FOR loop by a GO TO statement usually
causes the program to be aborted with a ``Run time stack underflow'' error when the ENDFOR
statement is encountered.
The program will not be translated if count is a system variable or ARRAY element.
See Also: Appendix E , ``Syntax Diagrams,'' for additional syntax information.
Example: Refer to the following sections for detailed program examples:
Section B.4 , "Position Data Set and Condition Handlers Program" (PTH_MOVE.KL)
Section B.5 , "Listing Files and Programs and Manipulating Strings" (LIST_EX.KL)
Section B.8 , "Manipulating Values of Dynamically Displayed Variables" (CHG_DATA.KL)
Section B.9 , "Displaying a List From a Dictionary File" (DCLST_EX.KL)
Section B.11 , "Applying Offsets to a Copied Teach Pendant Program" (CPY_TP.KL)
WRITE Statement
Purpose: Writes data to a serial device or file
Syntax : WRITE <file_var> (data_item { ,data_item })
where:
file_var : a FILE variable data_item : an expression and its optional format specifiers or the reserved word
CR
Details:
• If file_var is not specified in a WRITE statement the default TPDISPLAY is used. %CRTDEVICE
directive will change the default to OUTPUT.
• If file_var is specified, it must be one of the output devices or a variable that has been equated
to one of them.
• If file_var attribute was set with the UF option, data is transmitted to the specified file or device
in binary form. Otherwise, data is transmitted as ASCII text.
• data_item can be any valid KAREL expression.
• 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 that is written for each
data_item .
• The reserved word CR, which can be used as a data item, specifies that the next data item to be
written to the file_var will start on the next line.
• Use the IO_STATUS Built-In to determine if the write operation was successful.
See Also: PATH Data Type, for more information on writing PATH variables, Chapter 7 FILE
INPUT/OUTPUT OPERATIONS , for more information on format specifiers and file_vars. Appendix E ,
‘‘Syntax Diagrams,’’ for more syntax information
Example: Refer to Appendix B , "KAREL Example Programs" for more detailed program examples.
DELAY Statement
Purpose: Causes execution of the program to be suspended for a specified number of milliseconds
Syntax : DELAY time_in_ms
where:
time_in_ms :an INTEGER expression
Details:
• If motion is active at the time of the delay, the motion continues.
• time_in_ms is the time in milliseconds. The actual delay will be from zero to $SCR.$cond_time
milliseconds less than the rounded time.
• A time specification of zero has no effect.
• If a program is paused while a delay is in progress, the delay will continue to be timed.
• If the delay time in a paused program expires while the program is still paused, the program, upon
resuming and with no further delay, will continue execution with the statement following the delay.
Otherwise, upon resumption, the program will finish the delay time before continuing execution.
• Aborting a program, or issuing RUN from the CRT/KB when a program is paused, terminates
any delays in progress.
• While a program is awaiting expiration of a delay, the KCL> SHOW TASK command will
show a hold of DELAY.
• A time value greater than one day or less than zero will cause the program to be aborted with an
error.
See Also: Appendix E , ‘‘Syntax Diagrams,’’ for additional syntax information
Example: Refer to the following sections for detailed program examples:
Section B.11 , "Manipulating Values of Dynamically Displayed Variables" (CHG_DATA.KL)
Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
ERROR Condition
Purpose: Specifies an error as a condition
Syntax : ERROR[n]
where:
n :an INTEGER expression or asterisk (*)
Details:
• If n is an INTEGER, it represents an error code number. The condition is satisfied when the
specified error occurs.
• If n is an asterisk (*), it represents a wildcard. The condition is satisfied when any error occurs.
• The condition is an event condition, meaning it is satisfied only for the scan performed when the
error was detected. The error is not remembered on subsequent scans.
See Also: Chapter 6 CONDITION HANDLERS , for more information on using conditions. The
appropriate application-specific FANUC Robotics Setup and Operations Manual for a list of all
error codes
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.
NOMESSAGE Action
Purpose: Suppresses the display and logging of error messages
Syntax : NOMESSAGE
Details:
• Display and logging of the error messages are suppressed only for the error number specified in
the corresponding condition.
• Use a wildcard (*) to suppress all messages.
• Abort error messages still will be displayed and logged even if NOMESSAGE is used.
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.
NOPAUSE Action
Purpose: Resumes program execution if the program was paused, or prevents program execution
from pausing
Syntax : NOPAUSE
Details:
• The NOPAUSE action usually corresponds to an ERROR[n] or PAUSE condition.
• The program will be resumed, even if it was paused before the error.
• If the program is paused by itself, the NOPAUSE action will be ignored and program execution
will be paused.
Example: The following example uses a global condition handler to test for error number 12311. If
this error occurs, the NOPAUSE action will prevent program execution from being paused and the
NOMESSAGE action will suppress the error message normally displayed for error number 12311.
This will allow the routine uninit_error to be executed without interruption.
NOPAUSE Action
ROUTINE uninit_error
BEGIN
WRITE (’Uninitialized operand’,CR)
WRITE (’Use KCL> SET VAR to initialize operand’,CR)
WRITE (’Press Resume at Test/Run screen to ’,cr)
WRITE (’continue program’,cr)
PAUSE --pauses program (undoes NOPAUSE action)
END uninit_error
CONDITION[1]:
WHEN ERROR[12311] DO
NOPAUSE, NOMESSAGE, uninit_error
ENDCONDITION
CONTINUE Action
Purpose: Continues execution of a paused task
Syntax : CONTINUE <PROGRAM[n]>
Details:
• The CONTINUE action will not resume stopped motions.
• If program execution is paused, the CONTINUE action will continue program execution.
• The CONTINUE action can be followed by the clause PROGRAM[n], where n is the task number
to be continued. Use GET_TSK_INFO to get a task number for a specified task name.
• A task can be in an interrupt routine when CONTINUE is executed. However, you should be
aware of the following circumstances because CONTINUE only affects the current interrupt level,
and interrupt levels of a task might be independently paused or running.
— If the interrupt routine and the task are both paused, CONTINUE will continue the interrupt
routine but the task will remain paused.
— If the interrupt routine is running and the task is paused, CONTINUE will appear to have no
effect because it will try to continue the running interrupt routine.
— If the interrupt routine is paused and the task is running, CONTINUE will continue the
interrupt routine.
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.
RELEASE Statement
Purpose: Releases all motion control of the robot arm and auxiliary or extended axes from the KAREL
program so that they can be controlled by the teach pendant while a KAREL program is running.
Syntax : RELEASE
Details:
• Motion stopped prior to execution of the RELEASE statement can only be resumed after the
execution of the next ATTACH statement.
• If motion is initiated from the program while in a released state, the program is aborted with the
following error, ‘‘MCTRL Denied because Released.’’
• If RELEASE is executed while motion is in progress or in a HOLD condition, the program is
aborted with the following error, "Detach request failed."
• All motion control from all KAREL tasks will be released.
See Also: Appendix E , ‘‘Syntax Diagrams,’’ for more syntax information
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.
ATTACH Statement
Purpose: Gives the KAREL program control of motion for the robot arm and auxiliary and extended
axes
Syntax : ATTACH
Details:
• Used with the RELEASE statement. If motion control is not currently released from program
control, the ATTACH statement has no effect.
• If the teach pendant is still enabled, execution of the KAREL program is delayed until the teach
pendant is disabled. The task status will show a hold of "attach done."
• Stopped motions can only be resumed following execution of the ATTACH statement.
See Also: RELEASE Statement, Appendix E , “Syntax Diagrams,’’ for additional syntax information.
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.
RESUME Action
Purpose: Restarts the last stopped motion issued by the task.
Syntax : RESUME <GROUP[n{,n}]>
Details:
• A motion set is a group of motions issued but not yet terminated when a STOP statement
or action is issued.
• If there are no stopped motion sets, no motion will result from the RESUME.
• If more than one motion set has been stopped, RESUME restarts the most recently stopped,
unresumed motion set. Subsequent RESUMEs will start the others in last-in-first-out sequence.
• The motions contained in a stopped motion set are resumed in the same order in which they
were originally issued.
• If a motion is in progress when the RESUME action is issued, any resumed motion(s) occur
after the current motion is completed.
• If the group clause is not present, all groups for which the task has control (when the condition is
defined) will be resumed.
• If the motion that is stopped, resumed, canceled, or held is part of a SIMULTANEOUS or
COORDINATED motion with other groups, the motions for all groups are stopped, resumed,
canceled, or held.
• Motion cannot be resumed for a different task.
Example: Refer to Section B.1 , "Setting Up Digital Output Ports for Monitoring" (DOUT_EX.KL)
for a detailed program example.