Artículo 11. Disposición final de RCD. Los municipios y distritos deberán seleccionar los sitios específicos para la disposición final
7.3 PROPUESTA DE SITIO DE DISPOSICIÓN FINAL DE MATERIAL SOBRANTE CONFORME LOS CRITERIOS IDENTIFICADOS
7.3.1 EVALUACIÓN CUALITATIVA Y CUANTITATIVA DE LOS COMPONENTES DE SELECCIÓN
addition to canceling the motion) to be taken when the conditions are satisfied.
• The condition list represents a list of conditions to be monitored when the condition handler is scanned. Each condition handler is scanned at a rate based on the value of the $SCR.$COND_TIME system variable.
— Multiple conditions must all be separated by the AND operator or the OR operator. Mixing of AND and OR is not allowed.
— When AND is used, all of the conditions in a single WHEN or UNTIL clause must be satisfied simultaneously for the condition handler to be triggered.
— When OR is used, the condition handler is triggered when any of the conditions are satisfied. • The action list represents a list of actions to be taken when the corresponding conditions in
the WHEN or UNTIL clause are simultaneously satisfied. Multiple actions must be separated by a comma or a new line.
• A local condition handler is automatically enabled when the physical motion starts. It is automatically purged when the condition handler is triggered, when the motion is completed, or when the motion is canceled. Unlike global condition handlers, each WHEN block in a MOVE is a separate condition handler. If one WHEN block triggers, only that WHEN block is disabled. • The time delay between executing the MOVE statement and enabling a condition handler might
be long for MOVE statements following incomplete NOWAIT moves.
• Local condition handlers automatically are disabled when the motion is held or stopped and are re-enabled when the motion starts again due to execution of an UNHOLD or RESUME statement or action.
Local Condition Handler Examplesshows an example of local condition handlers in MOVE statements with both WHEN and UNTIL clauses.
See Also: $SCR.$cond_time System Variable, FANUC Robotics Software Reference Manual Local Condition Handler Examples
--local condition handler at end of move statement WITH $SPEED = 200, $MOTYPE = CIRCULAR
MOVE ALONG paint_path NOWAIT, --comma --start of local condition handler
WHEN TIME 100 BEFORE NODE[2] DO DOUT[2] = TRUE ENDMOVE --end of local condition handler MOVE TO posn,
WHEN AT NODE[3] AND DIN[1] DO --multiple conditions CANCEL
ENDMOVE
MOVE ALONG weld_pth, --multiple cond/action pairs UNTIL ERROR[stop_error] THEN
6. CONDITION HANDLERS MARRCRLRF04071E REV B
WHEN PAUSE DO
tmp_clean_up --call interrupt routine WHEN TIME 100 BEFORE NODE[last_node] DO
clean_up --call interrupt routine ENDMOVE
6.2 CONDITIONS
One or more conditions are specified in the condition list of a WHEN or UNTIL clause, defining the conditions portion of a conditions/actions pair. Conditions can be
• States - which remain satisfied as long as the state exists. Examples of states are DIN[1] and (VAR1 > VAR2).
• Events - which are satisfied only at the instant the event occurs. Examples of events are ERROR[n], DIN[n]+, and PAUSE.
The following rules apply to system and program event conditions:
• After a condition handler is enabled, the specified conditions are monitored.
— If all of the conditions of an AND, WHEN, or UNTIL clause are simultaneously satisfied, the condition handler is triggered and corresponding actions are performed.
— If all of the conditions of an OR, WHEN, or UNTIL clause are satisfied, the condition handler is triggered and corresponding actions are performed.
• Event conditions very rarely occur simultaneously. Therefore, you should never use AND between two event conditions in a single WHEN or UNTIL clause because, both conditions will not be satisfied simultaneously.
• While many conditions are similar in form to BOOLEAN expressions in KAREL, and are similar in meaning, only the forms listed in this section, not general BOOLEAN expressions, are permitted.
• Expressions are permitted within an EVAL clause. More general expressions may be used on the right side of comparison conditions, by enclosing the expression in an EVAL clause: EVAL (expression). However, expressions in an EVAL clause are evaluated when the condition handler is defined. They are not evaluated dynamically.
• The value of an EVAL clause expression must be INTEGER, REAL, or BOOLEAN.
See Also: EVAL Clause,Appendix A.
MARRCRLRF04071E REV B 6. CONDITION HANDLERS
6.2.1 Port_Id Conditions
Port_id conditions are used to monitor digital port signals. Port_id must be one of the predefined BOOLEAN port array identifiers (DIN, DOUT, OPIN, OPOUT, TPIN, TPOUT, RDI, RDO, WDI, or WDO). The value of n specifies the port array signal to be monitored. Table 6–5lists the available port_id conditions.
Table 6–5. Port_Id Conditions
CONDITION SATISFIED (TRUE) WHEN
port_id[n] Digital port n is TRUE. (state)
NOT port_id[n] Digital port n is FALSE. (state)
port_id[n]+ Digital port n changes from FALSE to TRUE. (event) port_id[n]- Digital port n changes from TRUE to FALSE. (event)
• For the state conditions, port_id[n] and NOT port_id[n] , the port is tested during every scan. The following conditions would be satisfied if, during a scan, DIN[1] was TRUE and DIN[2] was FALSE:
WHEN DIN[1] AND NOT DIN[2] DO . . .
Note that an input signal should remain ON or OFF for the minimum scan time to ensure that its state is detected.
• For the event condition port_id[n]+ , the initial port value is tested when the condition handler is enabled. Each scan tests for the specified change in the signal. The change must occur while the condition handler is enabled.
The following condition would only be satisfied if, while the condition handler was enabled, DIN[1] changed from TRUE to FALSE since the last scan.
WHEN DIN[1]- DO . . .
6.2.2 Relational Conditions
Relational conditions are used to test the relationship between two operands. They are satisfied when the specified relationship is TRUE. Relational conditions are state conditions, meaning the relationship is tested during every scan. Table 6–6lists the relational conditions.
6. CONDITION HANDLERS MARRCRLRF04071E REV B
Table 6–6. Relational Conditions
CONDITION SATISFIED (TRUE) WHEN
operand = operand operand < > operand operand < operand operand < = operand operand > operand operand > = operand
Relationship specified is TRUE. Operands on the left can be a port array element, referenced as port_id[n], or a variable. Operands on the right can be a variable, a constant, or an EVAL clause. (state)
The following rules apply to relational conditions:
• Both operands must be of the same data type and can only be of type INTEGER, REAL, or BOOLEAN. (As in other situations, INTEGER constants can be used where REAL values are required, and will be treated as REAL values.)
• The operand on the left side of the condition can be any of the port array signals, a user-defined variable, a static variable, or a system variable that can be read by a KAREL program.
• The operand on the right side of the condition can be a user-defined variable, a static variable, a system variable that can be read by a KAREL program, any constant, or an EVAL clause. For example:
WHEN DIN[1] = ON DO . . . --port_id and constant WHEN flag = TRUE DO . . . --variable and constant WHEN AIN[1] >= temp DO . . . --port_id and variable WHEN flag_1 <> flag_2 DO . . . --variable and variable WHEN AIN[1] <= EVAL(temp * scale) DO . . .
--port_id and EVAL clause
WHEN dif > EVAL(max_count - count) DO . . . --variable and EVAL clause
• The EVAL clause allows you to include expressions in relational conditions. However, it is evaluated only when the condition handler is defined. The expression in the EVAL clause cannot include any routine calls.
See Also: EVAL Clause,Appendix A.
6.2.3 System and Program Event Conditions
System and program event conditions are used to monitor system and program generated events. The specified condition is satisfied only if the event occurs when the condition handler is enabled.
MARRCRLRF04071E REV B 6. CONDITION HANDLERS