Document Name
stringclasses
11 values
URL
stringclasses
11 values
page_number
int64
1
1.26k
full_text
stringlengths
65
18.2k
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
107
1 Instructions 1.45. ErrWrite - Write an error message RobotWare - OS 3HAC 16581-1 Revision: J 104 © Copyright 2004-2010 ABB. All rights reserved. [ \RL3] Reason Line 3 Data type: string Reason for error. [ \RL4] Reason Line 4 Data type: string Reason for error. Program execution An error message (max. 5 lines) is displayed on the FlexPendant and written in the robot message log. In the case of argument \W or argument \I a warning or an information message is written in the event log. ErrWrite generates the program error no. 80001 for an error, no. 80002 for a warning ( \W ) and no. 80003 for an information message (\I). Limitations Total string length (Header+Reason+\RL2+\RL3+\RL4) is limited to 195 characters. Syntax ErrWrite [ '\'W ] | [ '\' I ] ',' [ Header ':=' ] < expression ( IN ) of string>',' [ Reason ':=' ] < expression ( IN ) of string> [ ’\’RL2 ':=' < expression ( IN ) of string> ] [ ’\’RL3 ':=' < expression ( IN ) of string> ] [ ’\’RL4 ':=' < expression ( IN ) of string> ] ';' Related information For information about See Predefined data of type errstr errstr - Error string on page 1114 Display message on the FlexPendant TPWrite - Writes on the FlexPendant on page 568 UIMsgBox - User Message Dialog Box type basic on page 644 Event log Operating manual - IRC5 with FlexPendant Write error message - Err Log ErrLog - Write an error message on page 94 Continued 1 Instructions 1.46. EXIT - Terminates program execution RobotWare - OS 105 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.46. EXIT - Terminates program execution Usage EXIT is used to terminate program execution. Program restart will then be blocked, that is the program can only be restarted from the first instruction of the main routine. The EXIT instruction should be used when fatal errors occur or when program execution is to be stopped permanently. The Stop instruction is used to temporarily stop program execution. After execution of the instruction EXIT the program pointer is gone. To continue program execution, the program pointer must be set. Basic examples A basic example of the instruction EXIT is illustrated below. Example 1 ErrWrite "Fatal error","Illegal state"; EXIT; Program execution stops and cannot be restarted from that position in the program. Syntax EXIT ';' Related information For information about See Stopping program execution temporarily Stop - Stops program execution on page 510 1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 3HAC 16581-1 Revision: J 106 © Copyright 2004-2010 ABB. All rights reserved. 1.47. ExitCycle - Break current cycle and start next Usage ExitCycle is used to break the current cycle and move the program pointer (PP) back to the first instruction in the main routine. If the program is executed in continuous mode, it will start to execute the next cycle. If the execution is in cycle mode, the execution will stop at the first instruction in the main routine. Basic examples Basic examples of the instruction ExitCycle are illustrated below. Example 1 VAR num cyclecount:=0; VAR intnum error_intno; PROC main() IF cyclecount = 0 THEN CONNECT error_intno WITH error_trap; ISignalDI di_error,1,error_intno; ENDIF cyclecount:=cyclecount+1; ! start to do something intelligent ... ENDPROC TRAP error_trap TPWrite "ERROR, I will start on the next item"; ExitCycle; ENDTRAP This will start the next cycle if the signal di_error is set. Program execution Execution of ExitCycle in a program task controlling mechanical units results in the following in the actual task: • On-going robot movements stops. • All robot paths that are not performed at all path levels (both normal and StorePath level) are cleared. • All instructions that are started but not finished at all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
108
1 Instructions 1.46. EXIT - Terminates program execution RobotWare - OS 105 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.46. EXIT - Terminates program execution Usage EXIT is used to terminate program execution. Program restart will then be blocked, that is the program can only be restarted from the first instruction of the main routine. The EXIT instruction should be used when fatal errors occur or when program execution is to be stopped permanently. The Stop instruction is used to temporarily stop program execution. After execution of the instruction EXIT the program pointer is gone. To continue program execution, the program pointer must be set. Basic examples A basic example of the instruction EXIT is illustrated below. Example 1 ErrWrite "Fatal error","Illegal state"; EXIT; Program execution stops and cannot be restarted from that position in the program. Syntax EXIT ';' Related information For information about See Stopping program execution temporarily Stop - Stops program execution on page 510 1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 3HAC 16581-1 Revision: J 106 © Copyright 2004-2010 ABB. All rights reserved. 1.47. ExitCycle - Break current cycle and start next Usage ExitCycle is used to break the current cycle and move the program pointer (PP) back to the first instruction in the main routine. If the program is executed in continuous mode, it will start to execute the next cycle. If the execution is in cycle mode, the execution will stop at the first instruction in the main routine. Basic examples Basic examples of the instruction ExitCycle are illustrated below. Example 1 VAR num cyclecount:=0; VAR intnum error_intno; PROC main() IF cyclecount = 0 THEN CONNECT error_intno WITH error_trap; ISignalDI di_error,1,error_intno; ENDIF cyclecount:=cyclecount+1; ! start to do something intelligent ... ENDPROC TRAP error_trap TPWrite "ERROR, I will start on the next item"; ExitCycle; ENDTRAP This will start the next cycle if the signal di_error is set. Program execution Execution of ExitCycle in a program task controlling mechanical units results in the following in the actual task: • On-going robot movements stops. • All robot paths that are not performed at all path levels (both normal and StorePath level) are cleared. • All instructions that are started but not finished at all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. Continues on next page 1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 107 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Execution of ExitCycle in some other program task, not controlling mechanical units, results in the following in the actual task: • All instructions that are started but not finished on all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. All other modal things in the program and system are not affected by ExitCycle such as: • The actual value of variables or persistents. • Any motion settings such as StorePath-RestoPath sequence, world zones, etc. • Open files, directories, etc. • Defined interrupts, etc. When using ExitCycle in routine calls and the entry routine is defined with “Move PP to Routine ...” or “Call Routine ...”, ExitCycle breaks the current cycle and moves the program pointer back to the first instruction in the entry routine (instead of the main routine as specified above). Syntax ExitCycle';' Related information For information about See Stopping after a fatal error EXIT - Terminates program execution on page 105 Terminating program execution EXIT - Terminates program execution on page 105 Stopping for program actions Stop - Stops program execution on page 510 Finishing execution of a routine RETURN - Finishes execution of a routine on page 365 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
109
1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 3HAC 16581-1 Revision: J 106 © Copyright 2004-2010 ABB. All rights reserved. 1.47. ExitCycle - Break current cycle and start next Usage ExitCycle is used to break the current cycle and move the program pointer (PP) back to the first instruction in the main routine. If the program is executed in continuous mode, it will start to execute the next cycle. If the execution is in cycle mode, the execution will stop at the first instruction in the main routine. Basic examples Basic examples of the instruction ExitCycle are illustrated below. Example 1 VAR num cyclecount:=0; VAR intnum error_intno; PROC main() IF cyclecount = 0 THEN CONNECT error_intno WITH error_trap; ISignalDI di_error,1,error_intno; ENDIF cyclecount:=cyclecount+1; ! start to do something intelligent ... ENDPROC TRAP error_trap TPWrite "ERROR, I will start on the next item"; ExitCycle; ENDTRAP This will start the next cycle if the signal di_error is set. Program execution Execution of ExitCycle in a program task controlling mechanical units results in the following in the actual task: • On-going robot movements stops. • All robot paths that are not performed at all path levels (both normal and StorePath level) are cleared. • All instructions that are started but not finished at all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. Continues on next page 1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 107 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Execution of ExitCycle in some other program task, not controlling mechanical units, results in the following in the actual task: • All instructions that are started but not finished on all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. All other modal things in the program and system are not affected by ExitCycle such as: • The actual value of variables or persistents. • Any motion settings such as StorePath-RestoPath sequence, world zones, etc. • Open files, directories, etc. • Defined interrupts, etc. When using ExitCycle in routine calls and the entry routine is defined with “Move PP to Routine ...” or “Call Routine ...”, ExitCycle breaks the current cycle and moves the program pointer back to the first instruction in the entry routine (instead of the main routine as specified above). Syntax ExitCycle';' Related information For information about See Stopping after a fatal error EXIT - Terminates program execution on page 105 Terminating program execution EXIT - Terminates program execution on page 105 Stopping for program actions Stop - Stops program execution on page 510 Finishing execution of a routine RETURN - Finishes execution of a routine on page 365 Continued 1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 3HAC 16581-1 Revision: J 108 © Copyright 2004-2010 ABB. All rights reserved. 1.48. FOR - Repeats a given number of times Usage FOR is used when one or several instructions are to be repeated a number of times. Basic examples A basic example of the instruction FOR is illustrated below. See also More examples on page 108 . Example 1 FOR i FROM 1 TO 10 DO routine1; ENDFOR Repeats the routine1 procedure 10 times. Arguments FOR Loop counter FROM Start value TO End value [STEP Step value] DO ... ENDFOR Loop counter Identifier The name of the data that will contain the value of the current loop counter. The data is declared automatically. If the loop counter name is the same as any data that already exists in the actual scope, the existing data will be hidden in the FOR loop and not affected in any way. Start value Data type: Num The desired start value of the loop counter. (usually integer values) End value Data type: Num The desired end value of the loop counter. (usually integer values) Step value Data type: Num The value by which the loop counter is to be incremented (or decremented) each loop. (usually integer values) If this value is not specified, the step value will automatically be set to 1 (or -1 if the start value is greater than the end value). More examples More examples of how to use the instruction FOR are illustrated below. Example 1 FOR i FROM 10 TO 2 STEP -2 DO a{i} := a{i-1}; ENDFOR The values in an array are adjusted upwards so that a{10}:=a{9} , a{8}:=a{7} etc. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
110
1 Instructions 1.47. ExitCycle - Break current cycle and start next RobotWare - OS 107 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Execution of ExitCycle in some other program task, not controlling mechanical units, results in the following in the actual task: • All instructions that are started but not finished on all execution levels (both normal and TRAP level) are interrupted. • The program pointer is moved to the first instruction in the main routine. • The program execution continues to execute the next cycle. All other modal things in the program and system are not affected by ExitCycle such as: • The actual value of variables or persistents. • Any motion settings such as StorePath-RestoPath sequence, world zones, etc. • Open files, directories, etc. • Defined interrupts, etc. When using ExitCycle in routine calls and the entry routine is defined with “Move PP to Routine ...” or “Call Routine ...”, ExitCycle breaks the current cycle and moves the program pointer back to the first instruction in the entry routine (instead of the main routine as specified above). Syntax ExitCycle';' Related information For information about See Stopping after a fatal error EXIT - Terminates program execution on page 105 Terminating program execution EXIT - Terminates program execution on page 105 Stopping for program actions Stop - Stops program execution on page 510 Finishing execution of a routine RETURN - Finishes execution of a routine on page 365 Continued 1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 3HAC 16581-1 Revision: J 108 © Copyright 2004-2010 ABB. All rights reserved. 1.48. FOR - Repeats a given number of times Usage FOR is used when one or several instructions are to be repeated a number of times. Basic examples A basic example of the instruction FOR is illustrated below. See also More examples on page 108 . Example 1 FOR i FROM 1 TO 10 DO routine1; ENDFOR Repeats the routine1 procedure 10 times. Arguments FOR Loop counter FROM Start value TO End value [STEP Step value] DO ... ENDFOR Loop counter Identifier The name of the data that will contain the value of the current loop counter. The data is declared automatically. If the loop counter name is the same as any data that already exists in the actual scope, the existing data will be hidden in the FOR loop and not affected in any way. Start value Data type: Num The desired start value of the loop counter. (usually integer values) End value Data type: Num The desired end value of the loop counter. (usually integer values) Step value Data type: Num The value by which the loop counter is to be incremented (or decremented) each loop. (usually integer values) If this value is not specified, the step value will automatically be set to 1 (or -1 if the start value is greater than the end value). More examples More examples of how to use the instruction FOR are illustrated below. Example 1 FOR i FROM 10 TO 2 STEP -2 DO a{i} := a{i-1}; ENDFOR The values in an array are adjusted upwards so that a{10}:=a{9} , a{8}:=a{7} etc. Continues on next page 1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 109 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution 1. The expressions for the start, end, and step values are evaluated. 2. The loop counter is assigned the start value. 3. The value of the loop counter is checked to see whether its value lies between the start and end value, or whether it is equal to the start or end value. If the value of the loop counter is outside of this range, the FOR loop stops and program execution continues with the instruction following ENDFOR . 4. The instructions in the FOR loop are executed. 5. The loop counter is incremented (or decremented) in accordance with the step value. 6. The FOR loop is repeated, starting from point 3. Limitations The loop counter (of data type num ) can only be accessed from within the FOR loop and consequently hides other data and routines that have the same name. It can only be read (not updated) by the instructions in the FOR loop. Decimal values for start, end, or stop values, in combination with exact termination conditions for the FOR loop, cannot be used (undefined whether or not the last loop is running). Remarks If the number of repetitions is to be repeated as long as a given expression is evaluated to a TRUE value, the WHILE instructions should be used instead. Syntax (EBNF) FOR <loop variable> FROM <expression> TO <expression> [ STEP <expression> ] DO <instruction list> ENDFOR <loop variable> ::= <identifier> Related information For information about See Expressions Technical reference manual - RAPID overview Repeats as long as... WHILE - Repeats as long as ... on page 705 Identifiers Technical reference manual - RAPID overview Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
111
1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 3HAC 16581-1 Revision: J 108 © Copyright 2004-2010 ABB. All rights reserved. 1.48. FOR - Repeats a given number of times Usage FOR is used when one or several instructions are to be repeated a number of times. Basic examples A basic example of the instruction FOR is illustrated below. See also More examples on page 108 . Example 1 FOR i FROM 1 TO 10 DO routine1; ENDFOR Repeats the routine1 procedure 10 times. Arguments FOR Loop counter FROM Start value TO End value [STEP Step value] DO ... ENDFOR Loop counter Identifier The name of the data that will contain the value of the current loop counter. The data is declared automatically. If the loop counter name is the same as any data that already exists in the actual scope, the existing data will be hidden in the FOR loop and not affected in any way. Start value Data type: Num The desired start value of the loop counter. (usually integer values) End value Data type: Num The desired end value of the loop counter. (usually integer values) Step value Data type: Num The value by which the loop counter is to be incremented (or decremented) each loop. (usually integer values) If this value is not specified, the step value will automatically be set to 1 (or -1 if the start value is greater than the end value). More examples More examples of how to use the instruction FOR are illustrated below. Example 1 FOR i FROM 10 TO 2 STEP -2 DO a{i} := a{i-1}; ENDFOR The values in an array are adjusted upwards so that a{10}:=a{9} , a{8}:=a{7} etc. Continues on next page 1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 109 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution 1. The expressions for the start, end, and step values are evaluated. 2. The loop counter is assigned the start value. 3. The value of the loop counter is checked to see whether its value lies between the start and end value, or whether it is equal to the start or end value. If the value of the loop counter is outside of this range, the FOR loop stops and program execution continues with the instruction following ENDFOR . 4. The instructions in the FOR loop are executed. 5. The loop counter is incremented (or decremented) in accordance with the step value. 6. The FOR loop is repeated, starting from point 3. Limitations The loop counter (of data type num ) can only be accessed from within the FOR loop and consequently hides other data and routines that have the same name. It can only be read (not updated) by the instructions in the FOR loop. Decimal values for start, end, or stop values, in combination with exact termination conditions for the FOR loop, cannot be used (undefined whether or not the last loop is running). Remarks If the number of repetitions is to be repeated as long as a given expression is evaluated to a TRUE value, the WHILE instructions should be used instead. Syntax (EBNF) FOR <loop variable> FROM <expression> TO <expression> [ STEP <expression> ] DO <instruction list> ENDFOR <loop variable> ::= <identifier> Related information For information about See Expressions Technical reference manual - RAPID overview Repeats as long as... WHILE - Repeats as long as ... on page 705 Identifiers Technical reference manual - RAPID overview Continued 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 110 © Copyright 2004-2010 ABB. All rights reserved. 1.49. GetDataVal - Get the value of a data object Usage GetDataVal ( Get Data Value ) makes it possible to get a value from a data object that is specified with a string variable. Basic examples Basic examples of the instruction GetDataVal are illustrated below. Example 1 VAR num value; ... GetDataVal "reg"+ValToStr(ReadNum(mycom)),value; This will get the value of a register, with a number which is received from the serial channel mycom . The value will be stored in the variable value . Example 2 VAR datapos block; VAR string name; VAR num valuevar; ... SetDataSearch "num" \Object:="my.*" \InMod:="mymod"; WHILE GetNextSym(name,block) DO GetDataVal name\Block:=block,valuevar; TPWrite name+" "\Num:=valuevar; ENDWHILE This session will print out all num variables that begin with my in the module mymod with its value to the FlexPendant. Example 3 VAR num NumArrConst_copy{2}; ... GetDataVal "NumArrConst", NumArrConst_copy; TPWrite "Pos1 = " \Num:=NumArrConst_copy{1}; TPWrite "Pos2 = " \Num:=NumArrConst_copy{2}; This session will print out the num variables in the array NumArrConst. Arguments GetDataVal Object [\Block]|[\TaskRef]|[\TaskName]Value Object Data type: string The name of the data object. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
112
1 Instructions 1.48. FOR - Repeats a given number of times RobotWare - OS 109 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution 1. The expressions for the start, end, and step values are evaluated. 2. The loop counter is assigned the start value. 3. The value of the loop counter is checked to see whether its value lies between the start and end value, or whether it is equal to the start or end value. If the value of the loop counter is outside of this range, the FOR loop stops and program execution continues with the instruction following ENDFOR . 4. The instructions in the FOR loop are executed. 5. The loop counter is incremented (or decremented) in accordance with the step value. 6. The FOR loop is repeated, starting from point 3. Limitations The loop counter (of data type num ) can only be accessed from within the FOR loop and consequently hides other data and routines that have the same name. It can only be read (not updated) by the instructions in the FOR loop. Decimal values for start, end, or stop values, in combination with exact termination conditions for the FOR loop, cannot be used (undefined whether or not the last loop is running). Remarks If the number of repetitions is to be repeated as long as a given expression is evaluated to a TRUE value, the WHILE instructions should be used instead. Syntax (EBNF) FOR <loop variable> FROM <expression> TO <expression> [ STEP <expression> ] DO <instruction list> ENDFOR <loop variable> ::= <identifier> Related information For information about See Expressions Technical reference manual - RAPID overview Repeats as long as... WHILE - Repeats as long as ... on page 705 Identifiers Technical reference manual - RAPID overview Continued 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 110 © Copyright 2004-2010 ABB. All rights reserved. 1.49. GetDataVal - Get the value of a data object Usage GetDataVal ( Get Data Value ) makes it possible to get a value from a data object that is specified with a string variable. Basic examples Basic examples of the instruction GetDataVal are illustrated below. Example 1 VAR num value; ... GetDataVal "reg"+ValToStr(ReadNum(mycom)),value; This will get the value of a register, with a number which is received from the serial channel mycom . The value will be stored in the variable value . Example 2 VAR datapos block; VAR string name; VAR num valuevar; ... SetDataSearch "num" \Object:="my.*" \InMod:="mymod"; WHILE GetNextSym(name,block) DO GetDataVal name\Block:=block,valuevar; TPWrite name+" "\Num:=valuevar; ENDWHILE This session will print out all num variables that begin with my in the module mymod with its value to the FlexPendant. Example 3 VAR num NumArrConst_copy{2}; ... GetDataVal "NumArrConst", NumArrConst_copy; TPWrite "Pos1 = " \Num:=NumArrConst_copy{1}; TPWrite "Pos2 = " \Num:=NumArrConst_copy{2}; This session will print out the num variables in the array NumArrConst. Arguments GetDataVal Object [\Block]|[\TaskRef]|[\TaskName]Value Object Data type: string The name of the data object. Continues on next page 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 111 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \Block ] Data type: datapos The enclosed block to the data object. This can only be fetched with the GetNextSym function. If this argument is omitted, the value of the visible data object in the current program execution scope will be fetched. [\TaskRef] Task Reference Data type: taskid The program task identity in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. For all program tasks in the system the predefined variables of the data type taskid will be available. The variable identity will be "taskname"+"Id", e.g. for the T_ROB1 task the variable identity will be T_ROB1Id . [\TaskName] Data type: string The program task name in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. Value Data type: anytype Variable for storage of the get value. The data type must be the same as the data type for the data object to find. The get value can be fetched from a constant, variable, or persistent but must be stored in a variable. Error handling The system variable ERRNO is set to ERR_SYM_ACCESS if: • the data object is non-existent • the data object is routine data or routine parameter and is not located in the current active routine • searching in other tasks for other declarations then PERS or TASK PERS When using the arguments TaskRef or TaskName you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . Searching for a PERS declared as LOCAL in other tasks will also result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . The system variable ERRNO is set to ERR_INVDIM if the data object and the variable used in argument Value have different dimensions. The error can be handled in the error handler of the routine. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
113
1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 110 © Copyright 2004-2010 ABB. All rights reserved. 1.49. GetDataVal - Get the value of a data object Usage GetDataVal ( Get Data Value ) makes it possible to get a value from a data object that is specified with a string variable. Basic examples Basic examples of the instruction GetDataVal are illustrated below. Example 1 VAR num value; ... GetDataVal "reg"+ValToStr(ReadNum(mycom)),value; This will get the value of a register, with a number which is received from the serial channel mycom . The value will be stored in the variable value . Example 2 VAR datapos block; VAR string name; VAR num valuevar; ... SetDataSearch "num" \Object:="my.*" \InMod:="mymod"; WHILE GetNextSym(name,block) DO GetDataVal name\Block:=block,valuevar; TPWrite name+" "\Num:=valuevar; ENDWHILE This session will print out all num variables that begin with my in the module mymod with its value to the FlexPendant. Example 3 VAR num NumArrConst_copy{2}; ... GetDataVal "NumArrConst", NumArrConst_copy; TPWrite "Pos1 = " \Num:=NumArrConst_copy{1}; TPWrite "Pos2 = " \Num:=NumArrConst_copy{2}; This session will print out the num variables in the array NumArrConst. Arguments GetDataVal Object [\Block]|[\TaskRef]|[\TaskName]Value Object Data type: string The name of the data object. Continues on next page 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 111 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \Block ] Data type: datapos The enclosed block to the data object. This can only be fetched with the GetNextSym function. If this argument is omitted, the value of the visible data object in the current program execution scope will be fetched. [\TaskRef] Task Reference Data type: taskid The program task identity in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. For all program tasks in the system the predefined variables of the data type taskid will be available. The variable identity will be "taskname"+"Id", e.g. for the T_ROB1 task the variable identity will be T_ROB1Id . [\TaskName] Data type: string The program task name in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. Value Data type: anytype Variable for storage of the get value. The data type must be the same as the data type for the data object to find. The get value can be fetched from a constant, variable, or persistent but must be stored in a variable. Error handling The system variable ERRNO is set to ERR_SYM_ACCESS if: • the data object is non-existent • the data object is routine data or routine parameter and is not located in the current active routine • searching in other tasks for other declarations then PERS or TASK PERS When using the arguments TaskRef or TaskName you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . Searching for a PERS declared as LOCAL in other tasks will also result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . The system variable ERRNO is set to ERR_INVDIM if the data object and the variable used in argument Value have different dimensions. The error can be handled in the error handler of the routine. Continued Continues on next page 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 112 © Copyright 2004-2010 ABB. All rights reserved. Limitations For a semivalue data type, it is not possible to search for the associated value data type. E.g. if searching for dionum , no search hit for signals signaldi will be obtained and if searching for num , no search hit for signals signalgi or signalai will be obtained. It is not possible to get the value of a variable declared as LOCAL in a built in RAPID module. Syntax GetDataVal [ Object ’:=’ ] < expression ( IN ) of string > [’\’Block’ :=’<variable ( VAR ) of datapos>] |[ ’\’TaskRef’ :=’ <variable ( VAR ) of taskid>] |[ ’\’TaskName’ :=’ <expression ( IN ) of string>] ’,’] [ Value ’:=’ ] <variable ( VAR ) of anytype>]’;’ Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many data objects SetAllDataVal - Set a value to all data objects in a defined set on page 429 The related data type datapos datapos - Enclosing block for a data object on page 1101 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
114
1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 111 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \Block ] Data type: datapos The enclosed block to the data object. This can only be fetched with the GetNextSym function. If this argument is omitted, the value of the visible data object in the current program execution scope will be fetched. [\TaskRef] Task Reference Data type: taskid The program task identity in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. For all program tasks in the system the predefined variables of the data type taskid will be available. The variable identity will be "taskname"+"Id", e.g. for the T_ROB1 task the variable identity will be T_ROB1Id . [\TaskName] Data type: string The program task name in which to search for the data object specified. When using this argument, you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error. Value Data type: anytype Variable for storage of the get value. The data type must be the same as the data type for the data object to find. The get value can be fetched from a constant, variable, or persistent but must be stored in a variable. Error handling The system variable ERRNO is set to ERR_SYM_ACCESS if: • the data object is non-existent • the data object is routine data or routine parameter and is not located in the current active routine • searching in other tasks for other declarations then PERS or TASK PERS When using the arguments TaskRef or TaskName you may search for PERS or TASK PERS declarations in other tasks, any other declarations will result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . Searching for a PERS declared as LOCAL in other tasks will also result in an error and the system variable ERRNO is set to ERR_SYM_ACCESS . The system variable ERRNO is set to ERR_INVDIM if the data object and the variable used in argument Value have different dimensions. The error can be handled in the error handler of the routine. Continued Continues on next page 1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 112 © Copyright 2004-2010 ABB. All rights reserved. Limitations For a semivalue data type, it is not possible to search for the associated value data type. E.g. if searching for dionum , no search hit for signals signaldi will be obtained and if searching for num , no search hit for signals signalgi or signalai will be obtained. It is not possible to get the value of a variable declared as LOCAL in a built in RAPID module. Syntax GetDataVal [ Object ’:=’ ] < expression ( IN ) of string > [’\’Block’ :=’<variable ( VAR ) of datapos>] |[ ’\’TaskRef’ :=’ <variable ( VAR ) of taskid>] |[ ’\’TaskName’ :=’ <expression ( IN ) of string>] ’,’] [ Value ’:=’ ] <variable ( VAR ) of anytype>]’;’ Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many data objects SetAllDataVal - Set a value to all data objects in a defined set on page 429 The related data type datapos datapos - Enclosing block for a data object on page 1101 Continued 1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 113 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.50. GetSysData - Get system data Usage GetSysData fetches the value and the optional symbol name for the current system data of specified data type. With this instruction it is possible to fetch data and the name of the current active Tool, Work Object, or PayLoad for the robot in actual or connected motion task. Basic examples Basic examples of the instruction GetSysData are illustrated below. Example 1 PERS tooldata curtoolvalue := [TRUE, [[0, 0, 0], [1, 0, 0, 0]], [2, [0, 0, 2], [1, 0, 0, 0], 0, 0, 0]]; VAR string curtoolname; GetSysData curtoolvalue; Copy current active tool data value to the persistent variable curtoolvalue . Example 2 GetSysData curtoolvalue \ObjectName := curtoolname; Also copy current active tool name to the variable curtoolname . Arguments GetSysData DestObject [\ ObjectName ] DestObject Data type: anytype Persistent variable for storage of current active system data value. The data type of this argument also specifies the type of system data (Tool, Work Object, or PayLoad) to fetch. Array or record component can not be used. [\ObjectName] Data type: string Option argument (variable or persistent) to also fetch the current active system data name. Data type Type of system data tooldata Tool wobjdata Work Object loaddata Payload Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
115
1 Instructions 1.49. GetDataVal - Get the value of a data object RobotWare - OS 3HAC 16581-1 Revision: J 112 © Copyright 2004-2010 ABB. All rights reserved. Limitations For a semivalue data type, it is not possible to search for the associated value data type. E.g. if searching for dionum , no search hit for signals signaldi will be obtained and if searching for num , no search hit for signals signalgi or signalai will be obtained. It is not possible to get the value of a variable declared as LOCAL in a built in RAPID module. Syntax GetDataVal [ Object ’:=’ ] < expression ( IN ) of string > [’\’Block’ :=’<variable ( VAR ) of datapos>] |[ ’\’TaskRef’ :=’ <variable ( VAR ) of taskid>] |[ ’\’TaskName’ :=’ <expression ( IN ) of string>] ’,’] [ Value ’:=’ ] <variable ( VAR ) of anytype>]’;’ Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many data objects SetAllDataVal - Set a value to all data objects in a defined set on page 429 The related data type datapos datapos - Enclosing block for a data object on page 1101 Continued 1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 113 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.50. GetSysData - Get system data Usage GetSysData fetches the value and the optional symbol name for the current system data of specified data type. With this instruction it is possible to fetch data and the name of the current active Tool, Work Object, or PayLoad for the robot in actual or connected motion task. Basic examples Basic examples of the instruction GetSysData are illustrated below. Example 1 PERS tooldata curtoolvalue := [TRUE, [[0, 0, 0], [1, 0, 0, 0]], [2, [0, 0, 2], [1, 0, 0, 0], 0, 0, 0]]; VAR string curtoolname; GetSysData curtoolvalue; Copy current active tool data value to the persistent variable curtoolvalue . Example 2 GetSysData curtoolvalue \ObjectName := curtoolname; Also copy current active tool name to the variable curtoolname . Arguments GetSysData DestObject [\ ObjectName ] DestObject Data type: anytype Persistent variable for storage of current active system data value. The data type of this argument also specifies the type of system data (Tool, Work Object, or PayLoad) to fetch. Array or record component can not be used. [\ObjectName] Data type: string Option argument (variable or persistent) to also fetch the current active system data name. Data type Type of system data tooldata Tool wobjdata Work Object loaddata Payload Continues on next page 1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 3HAC 16581-1 Revision: J 114 © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction GetSysData the current data value is stored in the specified persistent variable in argument DestObject . If argument \ObjectName is used, the name of the current data is stored in the specified variable or persistent in argument ObjectName . Current system data for Tool or Work Object is activated by execution of any move instruction. Payload is activated by execution of the instruction GripLoad . Syntax GetSysData [ DestObject ’:=’] < persistent( PERS ) of anytype> [’\’ObjectName’ :=’ < variable or persistent ( INOUT ) of string> ] ’;’ Related information For information about See Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 Definition of payload loaddata - Load data on page 1132 Set system data SetSysData - Set system data on page 445 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
116
1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 113 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.50. GetSysData - Get system data Usage GetSysData fetches the value and the optional symbol name for the current system data of specified data type. With this instruction it is possible to fetch data and the name of the current active Tool, Work Object, or PayLoad for the robot in actual or connected motion task. Basic examples Basic examples of the instruction GetSysData are illustrated below. Example 1 PERS tooldata curtoolvalue := [TRUE, [[0, 0, 0], [1, 0, 0, 0]], [2, [0, 0, 2], [1, 0, 0, 0], 0, 0, 0]]; VAR string curtoolname; GetSysData curtoolvalue; Copy current active tool data value to the persistent variable curtoolvalue . Example 2 GetSysData curtoolvalue \ObjectName := curtoolname; Also copy current active tool name to the variable curtoolname . Arguments GetSysData DestObject [\ ObjectName ] DestObject Data type: anytype Persistent variable for storage of current active system data value. The data type of this argument also specifies the type of system data (Tool, Work Object, or PayLoad) to fetch. Array or record component can not be used. [\ObjectName] Data type: string Option argument (variable or persistent) to also fetch the current active system data name. Data type Type of system data tooldata Tool wobjdata Work Object loaddata Payload Continues on next page 1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 3HAC 16581-1 Revision: J 114 © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction GetSysData the current data value is stored in the specified persistent variable in argument DestObject . If argument \ObjectName is used, the name of the current data is stored in the specified variable or persistent in argument ObjectName . Current system data for Tool or Work Object is activated by execution of any move instruction. Payload is activated by execution of the instruction GripLoad . Syntax GetSysData [ DestObject ’:=’] < persistent( PERS ) of anytype> [’\’ObjectName’ :=’ < variable or persistent ( INOUT ) of string> ] ’;’ Related information For information about See Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 Definition of payload loaddata - Load data on page 1132 Set system data SetSysData - Set system data on page 445 Continued 1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 115 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.51. GetTrapData - Get interrupt data for current TRAP Usage GetTrapData is used in a trap routine to obtain all information about the interrupt that caused the trap routine to be executed. To be used in trap routines generated by instruction IError, before use of the instruction ReadErrData . Basic examples Basic examples of the instruction GetTrapData are illustrated below. See also More examples on page 115 . Example 1 VAR trapdata err_data; GetTrapData err_data; Store interrupt information in the non-value variable err_data . Arguments GetTrapData TrapEvent TrapEvent Data type: trapdata Variable for storage of the information about what caused the trap to be executed. Limitation This instruction can only be used in a TRAP routine. More examples More examples of the instruction GetTrapData are illustrated below. Example 1 VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; VAR trapdata err_data; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ENDTRAP When an error is trapped to the trap routine trap_err , the error domain, the error number, and the error type are saved into appropriate non-value variables of the type trapdata . Syntax GetTrapData [TrapEvent ’:=’] <variable ( VAR ) of trapdata>’;’ Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
117
1 Instructions 1.50. GetSysData - Get system data RobotWare - OS 3HAC 16581-1 Revision: J 114 © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction GetSysData the current data value is stored in the specified persistent variable in argument DestObject . If argument \ObjectName is used, the name of the current data is stored in the specified variable or persistent in argument ObjectName . Current system data for Tool or Work Object is activated by execution of any move instruction. Payload is activated by execution of the instruction GripLoad . Syntax GetSysData [ DestObject ’:=’] < persistent( PERS ) of anytype> [’\’ObjectName’ :=’ < variable or persistent ( INOUT ) of string> ] ’;’ Related information For information about See Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 Definition of payload loaddata - Load data on page 1132 Set system data SetSysData - Set system data on page 445 Continued 1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 115 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.51. GetTrapData - Get interrupt data for current TRAP Usage GetTrapData is used in a trap routine to obtain all information about the interrupt that caused the trap routine to be executed. To be used in trap routines generated by instruction IError, before use of the instruction ReadErrData . Basic examples Basic examples of the instruction GetTrapData are illustrated below. See also More examples on page 115 . Example 1 VAR trapdata err_data; GetTrapData err_data; Store interrupt information in the non-value variable err_data . Arguments GetTrapData TrapEvent TrapEvent Data type: trapdata Variable for storage of the information about what caused the trap to be executed. Limitation This instruction can only be used in a TRAP routine. More examples More examples of the instruction GetTrapData are illustrated below. Example 1 VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; VAR trapdata err_data; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ENDTRAP When an error is trapped to the trap routine trap_err , the error domain, the error number, and the error type are saved into appropriate non-value variables of the type trapdata . Syntax GetTrapData [TrapEvent ’:=’] <variable ( VAR ) of trapdata>’;’ Continues on next page 1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 3HAC 16581-1 Revision: J 116 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Interrupt data for current TRAP trapdata - Interrupt data for current TRAP on page 1212 Orders an interrupt on errors IError - Orders an interrupt on errors on page 126 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
118
1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 115 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.51. GetTrapData - Get interrupt data for current TRAP Usage GetTrapData is used in a trap routine to obtain all information about the interrupt that caused the trap routine to be executed. To be used in trap routines generated by instruction IError, before use of the instruction ReadErrData . Basic examples Basic examples of the instruction GetTrapData are illustrated below. See also More examples on page 115 . Example 1 VAR trapdata err_data; GetTrapData err_data; Store interrupt information in the non-value variable err_data . Arguments GetTrapData TrapEvent TrapEvent Data type: trapdata Variable for storage of the information about what caused the trap to be executed. Limitation This instruction can only be used in a TRAP routine. More examples More examples of the instruction GetTrapData are illustrated below. Example 1 VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; VAR trapdata err_data; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ENDTRAP When an error is trapped to the trap routine trap_err , the error domain, the error number, and the error type are saved into appropriate non-value variables of the type trapdata . Syntax GetTrapData [TrapEvent ’:=’] <variable ( VAR ) of trapdata>’;’ Continues on next page 1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 3HAC 16581-1 Revision: J 116 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Interrupt data for current TRAP trapdata - Interrupt data for current TRAP on page 1212 Orders an interrupt on errors IError - Orders an interrupt on errors on page 126 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued 1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 117 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.52. GOTO - Goes to a new instruction Usage GOTO is used to transfer program execution to another line (a label) within the same routine. Basic examples Basic examples of the instruction GOTO are illustrated below. Example 1 GOTO next; ... next: Program execution continues with the instruction following next. Example 2 reg1 := 1; next: ... reg1 := reg1 + 1; IF reg1<=5 GOTO next; The execution will be transferred to next four times (for reg1= 2, 3, 4, 5). Example 3 IF reg1>100 THEN GOTO highvalue ELSE GOTO lowvalue ENDIF lowvalue: ... GOTO ready; highvalue: ... ready: If reg1 is greater than 100 , the execution will be transferred to the label highvalue , otherwise the execution will be transferred to the label lowvalue . Arguments GOTO Label Label Identifier The label from where program execution is to continue. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
119
1 Instructions 1.51. GetTrapData - Get interrupt data for current TRAP RobotWare - OS 3HAC 16581-1 Revision: J 116 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Interrupt data for current TRAP trapdata - Interrupt data for current TRAP on page 1212 Orders an interrupt on errors IError - Orders an interrupt on errors on page 126 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued 1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 117 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.52. GOTO - Goes to a new instruction Usage GOTO is used to transfer program execution to another line (a label) within the same routine. Basic examples Basic examples of the instruction GOTO are illustrated below. Example 1 GOTO next; ... next: Program execution continues with the instruction following next. Example 2 reg1 := 1; next: ... reg1 := reg1 + 1; IF reg1<=5 GOTO next; The execution will be transferred to next four times (for reg1= 2, 3, 4, 5). Example 3 IF reg1>100 THEN GOTO highvalue ELSE GOTO lowvalue ENDIF lowvalue: ... GOTO ready; highvalue: ... ready: If reg1 is greater than 100 , the execution will be transferred to the label highvalue , otherwise the execution will be transferred to the label lowvalue . Arguments GOTO Label Label Identifier The label from where program execution is to continue. Continues on next page 1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 3HAC 16581-1 Revision: J 118 © Copyright 2004-2010 ABB. All rights reserved. Limitations It is only possible to transfer program execution to a label within the same routine. It is only possible to transfer program execution to a label within an IF or TEST instruction if the GOTO instruction is also located within the same branch of that instruction. It is only possible to transfer program execution to a label within a FOR or WHILE instruction if the GOTO instruction is also located within that instruction. Syntax (EBNF) GOTO <identifier>’;’ Related information For information about See Label Label - Line name on page 207 Other instructions that change the program flow Technical reference manual - RAPID overview , section RAPID summary - Controlling the program flow Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
120
1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 117 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.52. GOTO - Goes to a new instruction Usage GOTO is used to transfer program execution to another line (a label) within the same routine. Basic examples Basic examples of the instruction GOTO are illustrated below. Example 1 GOTO next; ... next: Program execution continues with the instruction following next. Example 2 reg1 := 1; next: ... reg1 := reg1 + 1; IF reg1<=5 GOTO next; The execution will be transferred to next four times (for reg1= 2, 3, 4, 5). Example 3 IF reg1>100 THEN GOTO highvalue ELSE GOTO lowvalue ENDIF lowvalue: ... GOTO ready; highvalue: ... ready: If reg1 is greater than 100 , the execution will be transferred to the label highvalue , otherwise the execution will be transferred to the label lowvalue . Arguments GOTO Label Label Identifier The label from where program execution is to continue. Continues on next page 1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 3HAC 16581-1 Revision: J 118 © Copyright 2004-2010 ABB. All rights reserved. Limitations It is only possible to transfer program execution to a label within the same routine. It is only possible to transfer program execution to a label within an IF or TEST instruction if the GOTO instruction is also located within the same branch of that instruction. It is only possible to transfer program execution to a label within a FOR or WHILE instruction if the GOTO instruction is also located within that instruction. Syntax (EBNF) GOTO <identifier>’;’ Related information For information about See Label Label - Line name on page 207 Other instructions that change the program flow Technical reference manual - RAPID overview , section RAPID summary - Controlling the program flow Continued 1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 119 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.53. GripLoad - Defines the payload for the robot Usage GripLoad is used to define the payload which the robot holds in its gripper. Description When incorrect load data is specified, it can often lead to the following consequences: If the value in the specified load data is greater than that of the value of the true load; • The robot will not be used to its maximum capacity • Impaired path accuracy including a risk of overshooting If the value in the specified load data is less than the value of the true load; • Impaired path accuracy including a risk of overshooting • Risk of overloading the mechanical structure WARNING! It is important to always define the actual tool load and when used the payload of the robot too. Incorrect definitions of load data can result in overloading the robot mechanical structure. Basic examples Basic examples of the instruction GripLoad are illustrated below. Example 1 GripLoad piece1; The robot gripper holds a load called piece1 . Example 2 GripLoad load0; The robot gripper releases all loads. Arguments GripLoad Load Load Data type: loaddata The load data that describes the current payload. Program execution The specified load affects the performance of the robot. The default load, 0 kg, is automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. The payload is updated for the mechanical unit that are controlled from current program task. If GripLoad is used from a non-motion task, the payload is updated for the mechanical unit controlled by the connected motion task. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
121
1 Instructions 1.52. GOTO - Goes to a new instruction RobotWare - OS 3HAC 16581-1 Revision: J 118 © Copyright 2004-2010 ABB. All rights reserved. Limitations It is only possible to transfer program execution to a label within the same routine. It is only possible to transfer program execution to a label within an IF or TEST instruction if the GOTO instruction is also located within the same branch of that instruction. It is only possible to transfer program execution to a label within a FOR or WHILE instruction if the GOTO instruction is also located within that instruction. Syntax (EBNF) GOTO <identifier>’;’ Related information For information about See Label Label - Line name on page 207 Other instructions that change the program flow Technical reference manual - RAPID overview , section RAPID summary - Controlling the program flow Continued 1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 119 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.53. GripLoad - Defines the payload for the robot Usage GripLoad is used to define the payload which the robot holds in its gripper. Description When incorrect load data is specified, it can often lead to the following consequences: If the value in the specified load data is greater than that of the value of the true load; • The robot will not be used to its maximum capacity • Impaired path accuracy including a risk of overshooting If the value in the specified load data is less than the value of the true load; • Impaired path accuracy including a risk of overshooting • Risk of overloading the mechanical structure WARNING! It is important to always define the actual tool load and when used the payload of the robot too. Incorrect definitions of load data can result in overloading the robot mechanical structure. Basic examples Basic examples of the instruction GripLoad are illustrated below. Example 1 GripLoad piece1; The robot gripper holds a load called piece1 . Example 2 GripLoad load0; The robot gripper releases all loads. Arguments GripLoad Load Load Data type: loaddata The load data that describes the current payload. Program execution The specified load affects the performance of the robot. The default load, 0 kg, is automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. The payload is updated for the mechanical unit that are controlled from current program task. If GripLoad is used from a non-motion task, the payload is updated for the mechanical unit controlled by the connected motion task. Continues on next page 1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 3HAC 16581-1 Revision: J 120 © Copyright 2004-2010 ABB. All rights reserved. Syntax GripLoad [ Load ’:=’ ] < persistent ( PERS ) of loaddata > ’;’ Related information For information about See Load identification of tool or payload Operating manual - IRC5 with FlexPendant , section Programming and testing - Service routines - Loadidentify, load identification service routine Definition of load data loaddata - Load data on page 1132 Definition of tool load tooldata - Tool data on page 1207 Definition of work object load wobjdata - Work object data on page 1224 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
122
1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 119 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.53. GripLoad - Defines the payload for the robot Usage GripLoad is used to define the payload which the robot holds in its gripper. Description When incorrect load data is specified, it can often lead to the following consequences: If the value in the specified load data is greater than that of the value of the true load; • The robot will not be used to its maximum capacity • Impaired path accuracy including a risk of overshooting If the value in the specified load data is less than the value of the true load; • Impaired path accuracy including a risk of overshooting • Risk of overloading the mechanical structure WARNING! It is important to always define the actual tool load and when used the payload of the robot too. Incorrect definitions of load data can result in overloading the robot mechanical structure. Basic examples Basic examples of the instruction GripLoad are illustrated below. Example 1 GripLoad piece1; The robot gripper holds a load called piece1 . Example 2 GripLoad load0; The robot gripper releases all loads. Arguments GripLoad Load Load Data type: loaddata The load data that describes the current payload. Program execution The specified load affects the performance of the robot. The default load, 0 kg, is automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. The payload is updated for the mechanical unit that are controlled from current program task. If GripLoad is used from a non-motion task, the payload is updated for the mechanical unit controlled by the connected motion task. Continues on next page 1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 3HAC 16581-1 Revision: J 120 © Copyright 2004-2010 ABB. All rights reserved. Syntax GripLoad [ Load ’:=’ ] < persistent ( PERS ) of loaddata > ’;’ Related information For information about See Load identification of tool or payload Operating manual - IRC5 with FlexPendant , section Programming and testing - Service routines - Loadidentify, load identification service routine Definition of load data loaddata - Load data on page 1132 Definition of tool load tooldata - Tool data on page 1207 Definition of work object load wobjdata - Work object data on page 1224 Continued 1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 121 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 Usage HollowWristReset ( Reset hollow wris t) resets the position of the wrist joints on hollow wrist manipulators, such as IRB5402 and IRB5403. The instruction makes it possible to avoid rewinding the wrist joints 4 and 5 after they have been wound up one or more revolutions. After executing a HollowWristReset instruction, the wrist joints may continue to wind up in the same direction. Description HollowWristReset makes it easier to make application programs. You do not have to ensure that the wrist position is within ±2 revolutions at the time of programming, and it may save cycle time because the robot does not have to spend time rewinding the wrist. However, there is a limitation of ±144 revolutions for winding up joints 4 and 5 before the wrist position is reset by HollowWristReset . The robot programmer must be aware of this limitation and take it into consideration when planning the robot programs. To ensure that the 144 revolution limit is not exceeded after running a “wrist-winding” program several times, you should always let the robot come to a complete stop and reset the absolute position in every program (or cycle/routine/module etc. as necessary). Please note that all axes must remain stopped during the execution of the HollowWristReset instruction. As long as these limitations are taken into consideration, joints 4 and 5 can wind indefinitely and independently of joint 6 during program execution. Please use HollowWristReset instead of IndReset to reset the hollow wrist as this instruction preserves the joint limits for joint 6 in order to prevent too much twisting of the paint tubes/cables. Basic examples Basic examples of the instruction HollowWristReset are illustrated below. Example 1 MoveL p10,v800,fine,paintgun1\WObj:=workobject1; HollowWristReset; All active axes are stopped by a stop point and the wrist is reset. Limitations All active axes must be stopped while the HollowWristReset instruction is executed. The wrist joints must be reset before any of them reach the ±144 revolution limit (i.e. 51840 degrees/ 904 rad). Whenever a program stop, emergency stop, power failure stop, etc. occurs, the controller retains the path context in order to be able to return to the path and let the robot continue program execution from the point on the path at which it was stopped. In manual mode, if the manipulator has been moved out of the path between a stop and a restart, the operator is informed by the following message on the FlexPendant: “Not on path! Robot has been moved after program stop. Should the robot return to the path on Start? Yes/No/ Cancel” . This provides an opportunity of returning to the path before restart. In automatic mode, the robot automatically returns to the path. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
123
1 Instructions 1.53. GripLoad - Defines the payload for the robot RobotWare - OS 3HAC 16581-1 Revision: J 120 © Copyright 2004-2010 ABB. All rights reserved. Syntax GripLoad [ Load ’:=’ ] < persistent ( PERS ) of loaddata > ’;’ Related information For information about See Load identification of tool or payload Operating manual - IRC5 with FlexPendant , section Programming and testing - Service routines - Loadidentify, load identification service routine Definition of load data loaddata - Load data on page 1132 Definition of tool load tooldata - Tool data on page 1207 Definition of work object load wobjdata - Work object data on page 1224 Continued 1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 121 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 Usage HollowWristReset ( Reset hollow wris t) resets the position of the wrist joints on hollow wrist manipulators, such as IRB5402 and IRB5403. The instruction makes it possible to avoid rewinding the wrist joints 4 and 5 after they have been wound up one or more revolutions. After executing a HollowWristReset instruction, the wrist joints may continue to wind up in the same direction. Description HollowWristReset makes it easier to make application programs. You do not have to ensure that the wrist position is within ±2 revolutions at the time of programming, and it may save cycle time because the robot does not have to spend time rewinding the wrist. However, there is a limitation of ±144 revolutions for winding up joints 4 and 5 before the wrist position is reset by HollowWristReset . The robot programmer must be aware of this limitation and take it into consideration when planning the robot programs. To ensure that the 144 revolution limit is not exceeded after running a “wrist-winding” program several times, you should always let the robot come to a complete stop and reset the absolute position in every program (or cycle/routine/module etc. as necessary). Please note that all axes must remain stopped during the execution of the HollowWristReset instruction. As long as these limitations are taken into consideration, joints 4 and 5 can wind indefinitely and independently of joint 6 during program execution. Please use HollowWristReset instead of IndReset to reset the hollow wrist as this instruction preserves the joint limits for joint 6 in order to prevent too much twisting of the paint tubes/cables. Basic examples Basic examples of the instruction HollowWristReset are illustrated below. Example 1 MoveL p10,v800,fine,paintgun1\WObj:=workobject1; HollowWristReset; All active axes are stopped by a stop point and the wrist is reset. Limitations All active axes must be stopped while the HollowWristReset instruction is executed. The wrist joints must be reset before any of them reach the ±144 revolution limit (i.e. 51840 degrees/ 904 rad). Whenever a program stop, emergency stop, power failure stop, etc. occurs, the controller retains the path context in order to be able to return to the path and let the robot continue program execution from the point on the path at which it was stopped. In manual mode, if the manipulator has been moved out of the path between a stop and a restart, the operator is informed by the following message on the FlexPendant: “Not on path! Robot has been moved after program stop. Should the robot return to the path on Start? Yes/No/ Cancel” . This provides an opportunity of returning to the path before restart. In automatic mode, the robot automatically returns to the path. Continues on next page 1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 3HAC 16581-1 Revision: J 122 © Copyright 2004-2010 ABB. All rights reserved. HollowWristReset removes the path context. This means that it is not possible to return to the path in case of a program restart if the HollowWristReset instruction has been executed in the meantime. If this instruction is executed manually (“Debug + Call Service Rout.” in the Program Editor) it should only be executed at a time when returning to the path is not required. That is, after a program is completely finished, or an instruction is completely finished in step-by-step execution and the manipulator is not moved out of the path by jogging, etc. Syntax HollowWristReset ´;’ Related information For information about See Related system parameters Technical reference manual - System parameters , section Motion - Arm - Independent Joint Return to path Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
124
1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 121 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 Usage HollowWristReset ( Reset hollow wris t) resets the position of the wrist joints on hollow wrist manipulators, such as IRB5402 and IRB5403. The instruction makes it possible to avoid rewinding the wrist joints 4 and 5 after they have been wound up one or more revolutions. After executing a HollowWristReset instruction, the wrist joints may continue to wind up in the same direction. Description HollowWristReset makes it easier to make application programs. You do not have to ensure that the wrist position is within ±2 revolutions at the time of programming, and it may save cycle time because the robot does not have to spend time rewinding the wrist. However, there is a limitation of ±144 revolutions for winding up joints 4 and 5 before the wrist position is reset by HollowWristReset . The robot programmer must be aware of this limitation and take it into consideration when planning the robot programs. To ensure that the 144 revolution limit is not exceeded after running a “wrist-winding” program several times, you should always let the robot come to a complete stop and reset the absolute position in every program (or cycle/routine/module etc. as necessary). Please note that all axes must remain stopped during the execution of the HollowWristReset instruction. As long as these limitations are taken into consideration, joints 4 and 5 can wind indefinitely and independently of joint 6 during program execution. Please use HollowWristReset instead of IndReset to reset the hollow wrist as this instruction preserves the joint limits for joint 6 in order to prevent too much twisting of the paint tubes/cables. Basic examples Basic examples of the instruction HollowWristReset are illustrated below. Example 1 MoveL p10,v800,fine,paintgun1\WObj:=workobject1; HollowWristReset; All active axes are stopped by a stop point and the wrist is reset. Limitations All active axes must be stopped while the HollowWristReset instruction is executed. The wrist joints must be reset before any of them reach the ±144 revolution limit (i.e. 51840 degrees/ 904 rad). Whenever a program stop, emergency stop, power failure stop, etc. occurs, the controller retains the path context in order to be able to return to the path and let the robot continue program execution from the point on the path at which it was stopped. In manual mode, if the manipulator has been moved out of the path between a stop and a restart, the operator is informed by the following message on the FlexPendant: “Not on path! Robot has been moved after program stop. Should the robot return to the path on Start? Yes/No/ Cancel” . This provides an opportunity of returning to the path before restart. In automatic mode, the robot automatically returns to the path. Continues on next page 1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 3HAC 16581-1 Revision: J 122 © Copyright 2004-2010 ABB. All rights reserved. HollowWristReset removes the path context. This means that it is not possible to return to the path in case of a program restart if the HollowWristReset instruction has been executed in the meantime. If this instruction is executed manually (“Debug + Call Service Rout.” in the Program Editor) it should only be executed at a time when returning to the path is not required. That is, after a program is completely finished, or an instruction is completely finished in step-by-step execution and the manipulator is not moved out of the path by jogging, etc. Syntax HollowWristReset ´;’ Related information For information about See Related system parameters Technical reference manual - System parameters , section Motion - Arm - Independent Joint Return to path Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Continued 1 Instructions 1.55. IDelete - Cancels an interrupt IDelete 123 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.55. IDelete - Cancels an interrupt Usage IDelete ( Interrupt Delete ) is used to cancel (delete) an interrupt subscription. If the interrupt is to be only temporarily disabled, the instruction ISleep or IDisable should be used. Basic examples Basic examples of the instruction IDelete are illustrated below. Example 1 IDelete feeder_low; The interrupt feeder_low is cancelled. Arguments IDelete Interrupt Interrupt Data type: intnum The interrupt identity. Program execution The definition of the interrupt is completely erased. To define it again it must first be re- connected to the trap routine. It is recommended to preceed IDelete with a stop point. Otherwise the interrupt will be deactivated before the end point of the movement path is reached. Interrupts do not have to be erased; this is done automatically when • a new program is loaded • the program is restarted from the beginning • the program pointer is moved to the start of a routine Syntax IDelete [ Interrupt ´:=’ ] < variable ( VAR ) of intnum > ´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Temporarily disabling an interrupt ISleep - Deactivates an interrupt on page 198 Temporarily disabling all interrupts IDisable - Disables interrupts on page 124
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
125
1 Instructions 1.54. HollowWristReset - Reset hollow wrist for IRB5402 and IRB5403 RobotWare - OS 3HAC 16581-1 Revision: J 122 © Copyright 2004-2010 ABB. All rights reserved. HollowWristReset removes the path context. This means that it is not possible to return to the path in case of a program restart if the HollowWristReset instruction has been executed in the meantime. If this instruction is executed manually (“Debug + Call Service Rout.” in the Program Editor) it should only be executed at a time when returning to the path is not required. That is, after a program is completely finished, or an instruction is completely finished in step-by-step execution and the manipulator is not moved out of the path by jogging, etc. Syntax HollowWristReset ´;’ Related information For information about See Related system parameters Technical reference manual - System parameters , section Motion - Arm - Independent Joint Return to path Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Continued 1 Instructions 1.55. IDelete - Cancels an interrupt IDelete 123 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.55. IDelete - Cancels an interrupt Usage IDelete ( Interrupt Delete ) is used to cancel (delete) an interrupt subscription. If the interrupt is to be only temporarily disabled, the instruction ISleep or IDisable should be used. Basic examples Basic examples of the instruction IDelete are illustrated below. Example 1 IDelete feeder_low; The interrupt feeder_low is cancelled. Arguments IDelete Interrupt Interrupt Data type: intnum The interrupt identity. Program execution The definition of the interrupt is completely erased. To define it again it must first be re- connected to the trap routine. It is recommended to preceed IDelete with a stop point. Otherwise the interrupt will be deactivated before the end point of the movement path is reached. Interrupts do not have to be erased; this is done automatically when • a new program is loaded • the program is restarted from the beginning • the program pointer is moved to the start of a routine Syntax IDelete [ Interrupt ´:=’ ] < variable ( VAR ) of intnum > ´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Temporarily disabling an interrupt ISleep - Deactivates an interrupt on page 198 Temporarily disabling all interrupts IDisable - Disables interrupts on page 124 1 Instructions 1.56. IDisable - Disables interrupts RobotWare - OS 3HAC 16581-1 Revision: J 124 © Copyright 2004-2010 ABB. All rights reserved. 1.56. IDisable - Disables interrupts Usage IDisable (Interrupt Disable) is used to disable all interrupts temporarily. It may, for example, be used in a particularly sensitive part of the program where no interrupts may be permitted to take place in case they disturb normal program execution. Basic examples Basic examples of the instruction IDisable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. Program execution Interrupts that occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more, then the interrupt(s) immediately begin generating, executed in “first in - first out” order in the queue. IEnable is active by default. IEnable is automatically set • at a cold start-up • when starting program execution from the beginning of main • after executing one cycle (passing main ) or executing ExitCycle Syntax IDisable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupt More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting interrupts IEnable - Enables interrupts on page 125
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
126
1 Instructions 1.55. IDelete - Cancels an interrupt IDelete 123 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.55. IDelete - Cancels an interrupt Usage IDelete ( Interrupt Delete ) is used to cancel (delete) an interrupt subscription. If the interrupt is to be only temporarily disabled, the instruction ISleep or IDisable should be used. Basic examples Basic examples of the instruction IDelete are illustrated below. Example 1 IDelete feeder_low; The interrupt feeder_low is cancelled. Arguments IDelete Interrupt Interrupt Data type: intnum The interrupt identity. Program execution The definition of the interrupt is completely erased. To define it again it must first be re- connected to the trap routine. It is recommended to preceed IDelete with a stop point. Otherwise the interrupt will be deactivated before the end point of the movement path is reached. Interrupts do not have to be erased; this is done automatically when • a new program is loaded • the program is restarted from the beginning • the program pointer is moved to the start of a routine Syntax IDelete [ Interrupt ´:=’ ] < variable ( VAR ) of intnum > ´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Temporarily disabling an interrupt ISleep - Deactivates an interrupt on page 198 Temporarily disabling all interrupts IDisable - Disables interrupts on page 124 1 Instructions 1.56. IDisable - Disables interrupts RobotWare - OS 3HAC 16581-1 Revision: J 124 © Copyright 2004-2010 ABB. All rights reserved. 1.56. IDisable - Disables interrupts Usage IDisable (Interrupt Disable) is used to disable all interrupts temporarily. It may, for example, be used in a particularly sensitive part of the program where no interrupts may be permitted to take place in case they disturb normal program execution. Basic examples Basic examples of the instruction IDisable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. Program execution Interrupts that occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more, then the interrupt(s) immediately begin generating, executed in “first in - first out” order in the queue. IEnable is active by default. IEnable is automatically set • at a cold start-up • when starting program execution from the beginning of main • after executing one cycle (passing main ) or executing ExitCycle Syntax IDisable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupt More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting interrupts IEnable - Enables interrupts on page 125 1 Instructions 1.57. IEnable - Enables interrupts RobotWare - OS 125 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.57. IEnable - Enables interrupts Usage IEnable ( Interrupt Enable ) is used to enable interrupts during program execution. Basic examples Basic examples of the instruction IEnable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. When it has finished reading interrupts are once more permitted. Program execution Interrupts which occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more ( IEnable ), the interrupt(s) then immediately begin generating, executed in“ first in - first out” order in the queue. Program execution then continues in the ordinary program and interrupts which occur after this are dealt with as soon as they occur. Interrupts are always permitted when a program is started from the beginning. Interrupts disabled by the ISleep instruction are not affected by the IEnable instruction. Syntax IEnable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting no interrupts IDisable - Disables interrupts on page 124
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
127
1 Instructions 1.56. IDisable - Disables interrupts RobotWare - OS 3HAC 16581-1 Revision: J 124 © Copyright 2004-2010 ABB. All rights reserved. 1.56. IDisable - Disables interrupts Usage IDisable (Interrupt Disable) is used to disable all interrupts temporarily. It may, for example, be used in a particularly sensitive part of the program where no interrupts may be permitted to take place in case they disturb normal program execution. Basic examples Basic examples of the instruction IDisable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. Program execution Interrupts that occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more, then the interrupt(s) immediately begin generating, executed in “first in - first out” order in the queue. IEnable is active by default. IEnable is automatically set • at a cold start-up • when starting program execution from the beginning of main • after executing one cycle (passing main ) or executing ExitCycle Syntax IDisable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupt More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting interrupts IEnable - Enables interrupts on page 125 1 Instructions 1.57. IEnable - Enables interrupts RobotWare - OS 125 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.57. IEnable - Enables interrupts Usage IEnable ( Interrupt Enable ) is used to enable interrupts during program execution. Basic examples Basic examples of the instruction IEnable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. When it has finished reading interrupts are once more permitted. Program execution Interrupts which occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more ( IEnable ), the interrupt(s) then immediately begin generating, executed in“ first in - first out” order in the queue. Program execution then continues in the ordinary program and interrupts which occur after this are dealt with as soon as they occur. Interrupts are always permitted when a program is started from the beginning. Interrupts disabled by the ISleep instruction are not affected by the IEnable instruction. Syntax IEnable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting no interrupts IDisable - Disables interrupts on page 124 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 126 © Copyright 2004-2010 ABB. All rights reserved. 1.58. IError - Orders an interrupt on errors Usage IError ( Interrupt Errors ) is used to order and enable an interrupt when an error occurs. Error, warning, or state change can be logged with IError . Basic examples Basic examples of the instruction IError are illustrated below. See also More examples on page 127 . Example 1 VAR intnum err_int; ... CONNECT err_int WITH err_trap; IError COMMON_ERR, TYPE_ALL, err_int; Orders an interrupt in RAPID and execution of the TRAP routine err_trap each time an error, warning, or state change is generated in the system. Arguments IError ErrorDomain [\ErrorId] ErrorType Interrupt ErrorDomain Data type: errdomain The error domain that is to be monitored. Refer to predefined data of type errdomain . To specify any domain use COMMON_ERR . [ \ErrorId ] Data type: num Optionally, the number of a specific error that is to be monitored. The error number must be specified without the first digit (error domain) of the complete error number. E.g. 10008 Program restarted, must be specified as 0008 or only 8. ErrorType Data type: errtype The type of event such as error, warning, or state change that is to be monitored. Refer to predefined data of type errtype . To specify any type use TYPE_ALL . Interrupt Data type: intnum The interrupt identity. This should have been previously connected to a trap routine by means of the instruction CONNECT . Program execution The corresponding trap routine is automatically called when an error occurs in the specified domain of the specified type and optionally with the specified error number. When this has been executed, program execution continues from where the interrupt occurred. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
128
1 Instructions 1.57. IEnable - Enables interrupts RobotWare - OS 125 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.57. IEnable - Enables interrupts Usage IEnable ( Interrupt Enable ) is used to enable interrupts during program execution. Basic examples Basic examples of the instruction IEnable are illustrated below. Example 1 IDisable; FOR i FROM 1 TO 100 DO character[i]:=ReadBin(sensor); ENDFOR IEnable; No interrupts are permitted as long as the serial channel is reading. When it has finished reading interrupts are once more permitted. Program execution Interrupts which occur during the time in which an IDisable instruction is in effect are placed in a queue. When interrupts are permitted once more ( IEnable ), the interrupt(s) then immediately begin generating, executed in“ first in - first out” order in the queue. Program execution then continues in the ordinary program and interrupts which occur after this are dealt with as soon as they occur. Interrupts are always permitted when a program is started from the beginning. Interrupts disabled by the ISleep instruction are not affected by the IEnable instruction. Syntax IEnable´;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupt Permitting no interrupts IDisable - Disables interrupts on page 124 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 126 © Copyright 2004-2010 ABB. All rights reserved. 1.58. IError - Orders an interrupt on errors Usage IError ( Interrupt Errors ) is used to order and enable an interrupt when an error occurs. Error, warning, or state change can be logged with IError . Basic examples Basic examples of the instruction IError are illustrated below. See also More examples on page 127 . Example 1 VAR intnum err_int; ... CONNECT err_int WITH err_trap; IError COMMON_ERR, TYPE_ALL, err_int; Orders an interrupt in RAPID and execution of the TRAP routine err_trap each time an error, warning, or state change is generated in the system. Arguments IError ErrorDomain [\ErrorId] ErrorType Interrupt ErrorDomain Data type: errdomain The error domain that is to be monitored. Refer to predefined data of type errdomain . To specify any domain use COMMON_ERR . [ \ErrorId ] Data type: num Optionally, the number of a specific error that is to be monitored. The error number must be specified without the first digit (error domain) of the complete error number. E.g. 10008 Program restarted, must be specified as 0008 or only 8. ErrorType Data type: errtype The type of event such as error, warning, or state change that is to be monitored. Refer to predefined data of type errtype . To specify any type use TYPE_ALL . Interrupt Data type: intnum The interrupt identity. This should have been previously connected to a trap routine by means of the instruction CONNECT . Program execution The corresponding trap routine is automatically called when an error occurs in the specified domain of the specified type and optionally with the specified error number. When this has been executed, program execution continues from where the interrupt occurred. Continues on next page 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 127 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IError are illustrated below. VAR intnum err_interrupt; VAR trapdata err_data; VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; ... CONNECT err_interrupt WITH trap_err; IError COMMON_ERR, TYPE_ERR, err_interrupt; ... IDelete err_interrupt; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ! Set domain no 1 ... 11 SetGO go_err1, err_domain; ! Set error no 1 ...9999 SetGO go_err2, err_number; ENDTRAP When an error occurs (only error, not warning or state change) the error number is retrieved in the trap routine, and its value is used to set 2 groups of digital output signals. Limitation It is not possible to order an interrupt on internal errors. In a task of type NORMAL the event will be thrown away during program stop so not all events can be fetched in a NORMAL task. To fetch all events the task must be of static or semi-static type. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; WHILE TRUE DO : : ENDWHILE ENDPROC Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
129
1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 126 © Copyright 2004-2010 ABB. All rights reserved. 1.58. IError - Orders an interrupt on errors Usage IError ( Interrupt Errors ) is used to order and enable an interrupt when an error occurs. Error, warning, or state change can be logged with IError . Basic examples Basic examples of the instruction IError are illustrated below. See also More examples on page 127 . Example 1 VAR intnum err_int; ... CONNECT err_int WITH err_trap; IError COMMON_ERR, TYPE_ALL, err_int; Orders an interrupt in RAPID and execution of the TRAP routine err_trap each time an error, warning, or state change is generated in the system. Arguments IError ErrorDomain [\ErrorId] ErrorType Interrupt ErrorDomain Data type: errdomain The error domain that is to be monitored. Refer to predefined data of type errdomain . To specify any domain use COMMON_ERR . [ \ErrorId ] Data type: num Optionally, the number of a specific error that is to be monitored. The error number must be specified without the first digit (error domain) of the complete error number. E.g. 10008 Program restarted, must be specified as 0008 or only 8. ErrorType Data type: errtype The type of event such as error, warning, or state change that is to be monitored. Refer to predefined data of type errtype . To specify any type use TYPE_ALL . Interrupt Data type: intnum The interrupt identity. This should have been previously connected to a trap routine by means of the instruction CONNECT . Program execution The corresponding trap routine is automatically called when an error occurs in the specified domain of the specified type and optionally with the specified error number. When this has been executed, program execution continues from where the interrupt occurred. Continues on next page 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 127 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IError are illustrated below. VAR intnum err_interrupt; VAR trapdata err_data; VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; ... CONNECT err_interrupt WITH trap_err; IError COMMON_ERR, TYPE_ERR, err_interrupt; ... IDelete err_interrupt; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ! Set domain no 1 ... 11 SetGO go_err1, err_domain; ! Set error no 1 ...9999 SetGO go_err2, err_number; ENDTRAP When an error occurs (only error, not warning or state change) the error number is retrieved in the trap routine, and its value is used to set 2 groups of digital output signals. Limitation It is not possible to order an interrupt on internal errors. In a task of type NORMAL the event will be thrown away during program stop so not all events can be fetched in a NORMAL task. To fetch all events the task must be of static or semi-static type. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; WHILE TRUE DO : : ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 128 © Copyright 2004-2010 ABB. All rights reserved. Interrupts are activated at the beginning of the program. These instructions in the beginning are then kept outside the main flow of the program. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; : : IDelete err_interrupt; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IError [ErrorDomain ’:=’] <expression ( IN ) of errdomain> [’\’ErrorId’:=’ <expression ( IN ) of num>\\ ’,’ [ErrorType’ :=’] <expression ( IN ) of errtype> ´,’ [Interrupt’ :=’] <variable ( VAR ) of intnum>’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Error domains, predefined constants errdomain - Error domain on page 1106 Error types, predefined constants errtype - Error type on page 1115 Get interrupt data for current TRAP GetTrapData - Get interrupt data for current TRAP on page 115 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
130
1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 127 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IError are illustrated below. VAR intnum err_interrupt; VAR trapdata err_data; VAR errdomain err_domain; VAR num err_number; VAR errtype err_type; ... CONNECT err_interrupt WITH trap_err; IError COMMON_ERR, TYPE_ERR, err_interrupt; ... IDelete err_interrupt; ... TRAP trap_err GetTrapData err_data; ReadErrData err_data, err_domain, err_number, err_type; ! Set domain no 1 ... 11 SetGO go_err1, err_domain; ! Set error no 1 ...9999 SetGO go_err2, err_number; ENDTRAP When an error occurs (only error, not warning or state change) the error number is retrieved in the trap routine, and its value is used to set 2 groups of digital output signals. Limitation It is not possible to order an interrupt on internal errors. In a task of type NORMAL the event will be thrown away during program stop so not all events can be fetched in a NORMAL task. To fetch all events the task must be of static or semi-static type. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; WHILE TRUE DO : : ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 128 © Copyright 2004-2010 ABB. All rights reserved. Interrupts are activated at the beginning of the program. These instructions in the beginning are then kept outside the main flow of the program. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; : : IDelete err_interrupt; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IError [ErrorDomain ’:=’] <expression ( IN ) of errdomain> [’\’ErrorId’:=’ <expression ( IN ) of num>\\ ’,’ [ErrorType’ :=’] <expression ( IN ) of errtype> ´,’ [Interrupt’ :=’] <variable ( VAR ) of intnum>’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Error domains, predefined constants errdomain - Error domain on page 1106 Error types, predefined constants errtype - Error type on page 1115 Get interrupt data for current TRAP GetTrapData - Get interrupt data for current TRAP on page 115 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued 1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 129 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.59. IF - If a condition is met, then ...; otherwise ... Usage IF is used when different instructions are to be executed depending on whether a condition is met or not. Basic examples Basic examples of the instruction IF are illustrated below. See also More examples on page 130 . Example 1 IF reg1 > 5 THEN Set do1; Set do2; ENDIF The do1 and do2 signals are set only if reg1 is greater than 5 . Example 2 IF reg1 > 5 THEN Set do1; Set do2; ELSE Reset do1; Reset do2; ENDIF The do1 and do2 signals are set or reset depending on whether reg1 is greater than 5 or not. Arguments IF Condition THEN ... {ELSEIF Condition THEN ...} [ELSE ...] ENDIF Condition Data type: bool The condition that must be satisfied for the instructions between THEN and ELSE/ELSEIF to be executed. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
131
1 Instructions 1.58. IError - Orders an interrupt on errors RobotWare - OS 3HAC 16581-1 Revision: J 128 © Copyright 2004-2010 ABB. All rights reserved. Interrupts are activated at the beginning of the program. These instructions in the beginning are then kept outside the main flow of the program. PROC main ( ) VAR intnum err_interrupt; CONNECT err_interrupt WITH err_trap; IError COMMON_ERR, TYPE_ERR, err_interupt; : : IDelete err_interrupt; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IError [ErrorDomain ’:=’] <expression ( IN ) of errdomain> [’\’ErrorId’:=’ <expression ( IN ) of num>\\ ’,’ [ErrorType’ :=’] <expression ( IN ) of errtype> ´,’ [Interrupt’ :=’] <variable ( VAR ) of intnum>’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics- Interrupts Error domains, predefined constants errdomain - Error domain on page 1106 Error types, predefined constants errtype - Error type on page 1115 Get interrupt data for current TRAP GetTrapData - Get interrupt data for current TRAP on page 115 Gets information about an error ReadErrData - Gets information about an error on page 349 Continued 1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 129 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.59. IF - If a condition is met, then ...; otherwise ... Usage IF is used when different instructions are to be executed depending on whether a condition is met or not. Basic examples Basic examples of the instruction IF are illustrated below. See also More examples on page 130 . Example 1 IF reg1 > 5 THEN Set do1; Set do2; ENDIF The do1 and do2 signals are set only if reg1 is greater than 5 . Example 2 IF reg1 > 5 THEN Set do1; Set do2; ELSE Reset do1; Reset do2; ENDIF The do1 and do2 signals are set or reset depending on whether reg1 is greater than 5 or not. Arguments IF Condition THEN ... {ELSEIF Condition THEN ...} [ELSE ...] ENDIF Condition Data type: bool The condition that must be satisfied for the instructions between THEN and ELSE/ELSEIF to be executed. Continues on next page 1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 3HAC 16581-1 Revision: J 130 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction IF are illustrated below. Example 1 IF counter > 100 THEN counter := 100; ELSEIF counter < 0 THEN counter := 0; ELSE counter := counter + 1; ENDIF Counter is incremented by 1 . However, if the value of counter is outside the limit 0-100 , counter is assigned the corresponding limit value. Program execution The conditions are tested in sequential order, until one of them is satisfied. Program execution continues with the instructions associated with that condition. If none of the conditions are satisfied, program execution continues with the instructions following ELSE . If more than one condition is met, only the instructions associated with the first of those conditions are executed. Syntax (EBNF) IF <conditional expression> THEN <instruction list> { ELSEIF <conditional expression> THEN <instruction list> | < EIT >} [ ELSE <instruction list>] ENDIF Related information For information about See Conditions (logical expressions) Technical reference manual - RAPID overview , section Basic characteristics - Expressions Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
132
1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 129 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.59. IF - If a condition is met, then ...; otherwise ... Usage IF is used when different instructions are to be executed depending on whether a condition is met or not. Basic examples Basic examples of the instruction IF are illustrated below. See also More examples on page 130 . Example 1 IF reg1 > 5 THEN Set do1; Set do2; ENDIF The do1 and do2 signals are set only if reg1 is greater than 5 . Example 2 IF reg1 > 5 THEN Set do1; Set do2; ELSE Reset do1; Reset do2; ENDIF The do1 and do2 signals are set or reset depending on whether reg1 is greater than 5 or not. Arguments IF Condition THEN ... {ELSEIF Condition THEN ...} [ELSE ...] ENDIF Condition Data type: bool The condition that must be satisfied for the instructions between THEN and ELSE/ELSEIF to be executed. Continues on next page 1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 3HAC 16581-1 Revision: J 130 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction IF are illustrated below. Example 1 IF counter > 100 THEN counter := 100; ELSEIF counter < 0 THEN counter := 0; ELSE counter := counter + 1; ENDIF Counter is incremented by 1 . However, if the value of counter is outside the limit 0-100 , counter is assigned the corresponding limit value. Program execution The conditions are tested in sequential order, until one of them is satisfied. Program execution continues with the instructions associated with that condition. If none of the conditions are satisfied, program execution continues with the instructions following ELSE . If more than one condition is met, only the instructions associated with the first of those conditions are executed. Syntax (EBNF) IF <conditional expression> THEN <instruction list> { ELSEIF <conditional expression> THEN <instruction list> | < EIT >} [ ELSE <instruction list>] ENDIF Related information For information about See Conditions (logical expressions) Technical reference manual - RAPID overview , section Basic characteristics - Expressions Continued 1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 131 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.60. Incr - Increments by 1 Usage Incr is used to add 1 to a numeric variable or persistent. Basic examples Basic examples of the instruction Incr are illustrated below. See also More examples on page 131 . Example 1 Incr reg1; 1 is added to reg1 , i.e. reg1:=reg1+1 . Arguments Incr Name | Dname Name Data type: num The name of the variable or persistent to be changed. Dname Data type: dnum The name of the variable or persistent to be changed. More examples More examples of the instruction Incr are illustrated below. Example 1 VAR num no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Num:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Example 2 VAR dnum no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Dnum:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
133
1 Instructions 1.59. IF - If a condition is met, then ...; otherwise ... RobotWare - OS 3HAC 16581-1 Revision: J 130 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction IF are illustrated below. Example 1 IF counter > 100 THEN counter := 100; ELSEIF counter < 0 THEN counter := 0; ELSE counter := counter + 1; ENDIF Counter is incremented by 1 . However, if the value of counter is outside the limit 0-100 , counter is assigned the corresponding limit value. Program execution The conditions are tested in sequential order, until one of them is satisfied. Program execution continues with the instructions associated with that condition. If none of the conditions are satisfied, program execution continues with the instructions following ELSE . If more than one condition is met, only the instructions associated with the first of those conditions are executed. Syntax (EBNF) IF <conditional expression> THEN <instruction list> { ELSEIF <conditional expression> THEN <instruction list> | < EIT >} [ ELSE <instruction list>] ENDIF Related information For information about See Conditions (logical expressions) Technical reference manual - RAPID overview , section Basic characteristics - Expressions Continued 1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 131 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.60. Incr - Increments by 1 Usage Incr is used to add 1 to a numeric variable or persistent. Basic examples Basic examples of the instruction Incr are illustrated below. See also More examples on page 131 . Example 1 Incr reg1; 1 is added to reg1 , i.e. reg1:=reg1+1 . Arguments Incr Name | Dname Name Data type: num The name of the variable or persistent to be changed. Dname Data type: dnum The name of the variable or persistent to be changed. More examples More examples of the instruction Incr are illustrated below. Example 1 VAR num no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Num:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Example 2 VAR dnum no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Dnum:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Continues on next page 1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 3HAC 16581-1 Revision: J 132 © Copyright 2004-2010 ABB. All rights reserved. Syntax Incr [ Name ’:=’ ] < var or pers ( INOUT ) of num > | [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum >’ ;’ Related information For information about See Decrementing a variable by 1 Decr - Decrements by 1 on page 81 Adding any value to a variable Add - Adds a numeric value on page 19 Changing data using an arbitrary expression, e.g. multiplication ":=" - Assigns a value on page 24 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
134
1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 131 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.60. Incr - Increments by 1 Usage Incr is used to add 1 to a numeric variable or persistent. Basic examples Basic examples of the instruction Incr are illustrated below. See also More examples on page 131 . Example 1 Incr reg1; 1 is added to reg1 , i.e. reg1:=reg1+1 . Arguments Incr Name | Dname Name Data type: num The name of the variable or persistent to be changed. Dname Data type: dnum The name of the variable or persistent to be changed. More examples More examples of the instruction Incr are illustrated below. Example 1 VAR num no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Num:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Example 2 VAR dnum no_of_parts:=0; ... WHILE stop_production=0 DO produce_part; Incr no_of_parts; TPWrite "No of produced parts= "\Dnum:=no_of_parts; ENDWHILE The number of parts produced is updated each cycle on the FlexPendant. Production continues to run as long as the input signal stop_production is not set. Continues on next page 1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 3HAC 16581-1 Revision: J 132 © Copyright 2004-2010 ABB. All rights reserved. Syntax Incr [ Name ’:=’ ] < var or pers ( INOUT ) of num > | [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum >’ ;’ Related information For information about See Decrementing a variable by 1 Decr - Decrements by 1 on page 81 Adding any value to a variable Add - Adds a numeric value on page 19 Changing data using an arbitrary expression, e.g. multiplication ":=" - Assigns a value on page 24 Continued 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 133 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.61. IndAMove - Independent absolute position movement Usage IndAMove ( Independent Absolute Movement ) is used to change an axis to independent mode and move the axis to a specific position. An independent axis is an axis moving independently of other axes in the robot system. As program execution immediately continues, it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved within a revolution, the instruction IndRMove should be used instead. If the move is to occur a short distance from the current position, the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndAMove are illustrated below. See also More examples on page 135 . Example 1 IndAMove Station_A,2\ToAbsPos:=p4,20; Axis 2 of Station_A is moved to the position p4 at the speed 20 degrees/s. Arguments IndAMove MecUnit Axis [\ToAbsPos] | [\ToAbsNum] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6) [\ToAbsPos] To Absolute Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as an absolute position value in degrees (mm for linear axes). The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToAbsNum is to be used instead. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
135
1 Instructions 1.60. Incr - Increments by 1 RobotWare - OS 3HAC 16581-1 Revision: J 132 © Copyright 2004-2010 ABB. All rights reserved. Syntax Incr [ Name ’:=’ ] < var or pers ( INOUT ) of num > | [ Dname’ :=’ ] < var or pers ( INOUT ) of dnum >’ ;’ Related information For information about See Decrementing a variable by 1 Decr - Decrements by 1 on page 81 Adding any value to a variable Add - Adds a numeric value on page 19 Changing data using an arbitrary expression, e.g. multiplication ":=" - Assigns a value on page 24 Continued 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 133 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.61. IndAMove - Independent absolute position movement Usage IndAMove ( Independent Absolute Movement ) is used to change an axis to independent mode and move the axis to a specific position. An independent axis is an axis moving independently of other axes in the robot system. As program execution immediately continues, it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved within a revolution, the instruction IndRMove should be used instead. If the move is to occur a short distance from the current position, the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndAMove are illustrated below. See also More examples on page 135 . Example 1 IndAMove Station_A,2\ToAbsPos:=p4,20; Axis 2 of Station_A is moved to the position p4 at the speed 20 degrees/s. Arguments IndAMove MecUnit Axis [\ToAbsPos] | [\ToAbsNum] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6) [\ToAbsPos] To Absolute Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as an absolute position value in degrees (mm for linear axes). The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToAbsNum is to be used instead. Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 134 © Copyright 2004-2010 ABB. All rights reserved. [\ToAbsNum] To Absolute Numeric value Data type: num Axis position defined in degrees (mm for linear axis). Using this argument, the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToAbsPos but the position is defined as a numeric value to make it easy to manually change the position. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Program execution When IndAMove is executed the specified axis moves with the programmed speed to the specified axis position. If \Ramp is programmed there will be a reduction of acceleration/ deceleration. To change the axis back to normal mode the IndReset instruction is used. In connection with this the logical position of the axis can be changed so that a number of revolutions are erased from the position, for example, to avoid rotating back for the next movement. The speed can be altered by executing another IndAMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. For stepwise execution of the instruction the axis is set in independent mode only. The axis begins its movement when the next instruction is executed and continues as long as program execution takes place. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the start of the program or to a new routine all axes are automatically set to normal, without changing the measurement system (equivalent to executing the instruction IndReset\Old ). NOTE! An IndAMove instruction after an IndCMove operation can result in the axis spinning back to the movement performed in the IndCMove instruction. To prevent this, use an IndReset instruction before the IndAMove , or use an IndRMove instruction. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
136
1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 133 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.61. IndAMove - Independent absolute position movement Usage IndAMove ( Independent Absolute Movement ) is used to change an axis to independent mode and move the axis to a specific position. An independent axis is an axis moving independently of other axes in the robot system. As program execution immediately continues, it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved within a revolution, the instruction IndRMove should be used instead. If the move is to occur a short distance from the current position, the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndAMove are illustrated below. See also More examples on page 135 . Example 1 IndAMove Station_A,2\ToAbsPos:=p4,20; Axis 2 of Station_A is moved to the position p4 at the speed 20 degrees/s. Arguments IndAMove MecUnit Axis [\ToAbsPos] | [\ToAbsNum] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6) [\ToAbsPos] To Absolute Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as an absolute position value in degrees (mm for linear axes). The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToAbsNum is to be used instead. Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 134 © Copyright 2004-2010 ABB. All rights reserved. [\ToAbsNum] To Absolute Numeric value Data type: num Axis position defined in degrees (mm for linear axis). Using this argument, the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToAbsPos but the position is defined as a numeric value to make it easy to manually change the position. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Program execution When IndAMove is executed the specified axis moves with the programmed speed to the specified axis position. If \Ramp is programmed there will be a reduction of acceleration/ deceleration. To change the axis back to normal mode the IndReset instruction is used. In connection with this the logical position of the axis can be changed so that a number of revolutions are erased from the position, for example, to avoid rotating back for the next movement. The speed can be altered by executing another IndAMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. For stepwise execution of the instruction the axis is set in independent mode only. The axis begins its movement when the next instruction is executed and continues as long as program execution takes place. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the start of the program or to a new routine all axes are automatically set to normal, without changing the measurement system (equivalent to executing the instruction IndReset\Old ). NOTE! An IndAMove instruction after an IndCMove operation can result in the axis spinning back to the movement performed in the IndCMove instruction. To prevent this, use an IndReset instruction before the IndAMove , or use an IndRMove instruction. Continued Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 135 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when an axis is in independent mode the program cannot be restarted. An error message is displayed and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). More examples More examples of the instruction IndAMove are illustrated below. Example 1 ActUnit Station_A; weld_stationA; IndAMove Station_A,1\ToAbsNum:=90,20\Ramp:=50; ActUnit Station_B; weld_stationB_1; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; DeactUnit Station_A; weld_stationB_2; Station_A is activated and the welding is started in station A. Station_A (axis 1) is then moved to the 90 degrees position while the robot is welding in station B. The speed of the axis is 20 degrees/s. The speed is changed with acceleration/ deceleration reduced to 50% of max performance. When station A reaches this position it is deactivated, and reloading can take place in the station at the same time as the robot continues to weld in station B. Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndAMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToAbsPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ ToAbsNum’:=’ < expression ( IN ) of num> ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
137
1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 134 © Copyright 2004-2010 ABB. All rights reserved. [\ToAbsNum] To Absolute Numeric value Data type: num Axis position defined in degrees (mm for linear axis). Using this argument, the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToAbsPos but the position is defined as a numeric value to make it easy to manually change the position. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Program execution When IndAMove is executed the specified axis moves with the programmed speed to the specified axis position. If \Ramp is programmed there will be a reduction of acceleration/ deceleration. To change the axis back to normal mode the IndReset instruction is used. In connection with this the logical position of the axis can be changed so that a number of revolutions are erased from the position, for example, to avoid rotating back for the next movement. The speed can be altered by executing another IndAMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. For stepwise execution of the instruction the axis is set in independent mode only. The axis begins its movement when the next instruction is executed and continues as long as program execution takes place. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the start of the program or to a new routine all axes are automatically set to normal, without changing the measurement system (equivalent to executing the instruction IndReset\Old ). NOTE! An IndAMove instruction after an IndCMove operation can result in the axis spinning back to the movement performed in the IndCMove instruction. To prevent this, use an IndReset instruction before the IndAMove , or use an IndRMove instruction. Continued Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 135 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when an axis is in independent mode the program cannot be restarted. An error message is displayed and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). More examples More examples of the instruction IndAMove are illustrated below. Example 1 ActUnit Station_A; weld_stationA; IndAMove Station_A,1\ToAbsNum:=90,20\Ramp:=50; ActUnit Station_B; weld_stationB_1; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; DeactUnit Station_A; weld_stationB_2; Station_A is activated and the welding is started in station A. Station_A (axis 1) is then moved to the 90 degrees position while the robot is welding in station B. The speed of the axis is 20 degrees/s. The speed is changed with acceleration/ deceleration reduced to 50% of max performance. When station A reaches this position it is deactivated, and reloading can take place in the station at the same time as the robot continues to weld in station B. Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndAMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToAbsPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ ToAbsNum’:=’ < expression ( IN ) of num> ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 136 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
138
1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 135 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when an axis is in independent mode the program cannot be restarted. An error message is displayed and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). More examples More examples of the instruction IndAMove are illustrated below. Example 1 ActUnit Station_A; weld_stationA; IndAMove Station_A,1\ToAbsNum:=90,20\Ramp:=50; ActUnit Station_B; weld_stationB_1; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; DeactUnit Station_A; weld_stationB_2; Station_A is activated and the welding is started in station A. Station_A (axis 1) is then moved to the 90 degrees position while the robot is welding in station B. The speed of the axis is 20 degrees/s. The speed is changed with acceleration/ deceleration reduced to 50% of max performance. When station A reaches this position it is deactivated, and reloading can take place in the station at the same time as the robot continues to weld in station B. Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndAMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToAbsPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ ToAbsNum’:=’ < expression ( IN ) of num> ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 136 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 137 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.62. IndCMove - Independent continuous movement Usage IndCMove ( Independent Continuous Movement ) is used to change an axis to independent mode and start the axis moving continuously at a specific speed. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndCMove are illustrated below. See also More examples on page 139 . Example 1 IndCMove Station_A,2,-30.5; Axis 2 of Station_A starts to move in a negative direction at a speed of 30.5 degrees/s. Arguments IndCMove MecUnit Axis Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). The direction of movement is specified with the sign of the speed argument. [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
139
1 Instructions 1.61. IndAMove - Independent absolute position movement Independent Axis 3HAC 16581-1 Revision: J 136 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 137 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.62. IndCMove - Independent continuous movement Usage IndCMove ( Independent Continuous Movement ) is used to change an axis to independent mode and start the axis moving continuously at a specific speed. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndCMove are illustrated below. See also More examples on page 139 . Example 1 IndCMove Station_A,2,-30.5; Axis 2 of Station_A starts to move in a negative direction at a speed of 30.5 degrees/s. Arguments IndCMove MecUnit Axis Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). The direction of movement is specified with the sign of the speed argument. [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 138 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndCMove is executed the specified axis starts to move with the programmed speed. The direction of movement is specified as the sign of the speed argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased, for example, to avoid rotating back for the next movement. The speed can be changed by executing a further IndCMove instruction. If a speed in the opposite direction is ordered the axis stops and then accelerates to the new speed and direction. To stop the axis, speed argument 0 can be used. It will then still be in independent mode. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are set automatically to normal mode without changing the measurement system (equivalent to executing the instruction IndReset\Old ). Limitations The resolution of the axis position worsens the further it is moved from its logical zero position (usually the middle of the working area). To achieve high resolution again the logical working area can be set to zero with the instruction IndReset . For more information see RAPID reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes . Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID Reference Manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent Axes ). Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
140
1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 137 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.62. IndCMove - Independent continuous movement Usage IndCMove ( Independent Continuous Movement ) is used to change an axis to independent mode and start the axis moving continuously at a specific speed. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndCMove are illustrated below. See also More examples on page 139 . Example 1 IndCMove Station_A,2,-30.5; Axis 2 of Station_A starts to move in a negative direction at a speed of 30.5 degrees/s. Arguments IndCMove MecUnit Axis Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). The direction of movement is specified with the sign of the speed argument. [\Ramp] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 138 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndCMove is executed the specified axis starts to move with the programmed speed. The direction of movement is specified as the sign of the speed argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased, for example, to avoid rotating back for the next movement. The speed can be changed by executing a further IndCMove instruction. If a speed in the opposite direction is ordered the axis stops and then accelerates to the new speed and direction. To stop the axis, speed argument 0 can be used. It will then still be in independent mode. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are set automatically to normal mode without changing the measurement system (equivalent to executing the instruction IndReset\Old ). Limitations The resolution of the axis position worsens the further it is moved from its logical zero position (usually the middle of the working area). To achieve high resolution again the logical working area can be set to zero with the instruction IndReset . For more information see RAPID reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes . Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID Reference Manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent Axes ). Continued Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 139 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndCMove are illustrated below. IndCMove Station_A,2,20; WaitUntil IndSpeed(Station_A,2 \InSpeed) = TRUE; WaitTime 0.2; MoveL p10, v1000, fine, tool1; IndCMove Station_A,2,-10\Ramp:=50; MoveL p20, v1000, z50, tool1; IndRMove Station_A,2 \ToRelPos:=p1 \Short,10; MoveL p30, v1000, fine, tool1; WaitUntil IndInpos(Station_A,2 ) = TRUE; WaitTime 0.2; IndReset Station_A,2 \RefPos:=p40\Short; MoveL p40, v1000, fine, tool1; Axis 2 of Station_A starts to move in a positive direction at a speed of 20 degrees/s. When this axis has reached the selected speed the robot axes start to move. When the robot reaches position p10 the external axis changes direction and rotates at a speed of 10 degrees/s. The change of speed is performed with acceleration/deceleration reduced to 50 % of maximum performance. At the same time, the robot executes towards p20 . Axis 2 of Station_A is then stopped as quickly as possible in position p1 within the current revolution. When axis 2 has reached this position, and the robot has stopped in position p30 , axis 2 returns to normal mode again. The measurement system offset for this axis is changes a whole number of axis revolutions so that the actual position is as close as possible to p40 . When the robot is then moved to position p40 , axis 2 of Station_A will be moved by the instruction MoveL p40 via the shortest route to position p40 (max ±180 degrees). Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndCMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
141
1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 138 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndCMove is executed the specified axis starts to move with the programmed speed. The direction of movement is specified as the sign of the speed argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased, for example, to avoid rotating back for the next movement. The speed can be changed by executing a further IndCMove instruction. If a speed in the opposite direction is ordered the axis stops and then accelerates to the new speed and direction. To stop the axis, speed argument 0 can be used. It will then still be in independent mode. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are set automatically to normal mode without changing the measurement system (equivalent to executing the instruction IndReset\Old ). Limitations The resolution of the axis position worsens the further it is moved from its logical zero position (usually the middle of the working area). To achieve high resolution again the logical working area can be set to zero with the instruction IndReset . For more information see RAPID reference manual - RAPID overview , section Motion and I/O Principles - Positioning during program execution - Independent axes . Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually, the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID Reference Manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent Axes ). Continued Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 139 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndCMove are illustrated below. IndCMove Station_A,2,20; WaitUntil IndSpeed(Station_A,2 \InSpeed) = TRUE; WaitTime 0.2; MoveL p10, v1000, fine, tool1; IndCMove Station_A,2,-10\Ramp:=50; MoveL p20, v1000, z50, tool1; IndRMove Station_A,2 \ToRelPos:=p1 \Short,10; MoveL p30, v1000, fine, tool1; WaitUntil IndInpos(Station_A,2 ) = TRUE; WaitTime 0.2; IndReset Station_A,2 \RefPos:=p40\Short; MoveL p40, v1000, fine, tool1; Axis 2 of Station_A starts to move in a positive direction at a speed of 20 degrees/s. When this axis has reached the selected speed the robot axes start to move. When the robot reaches position p10 the external axis changes direction and rotates at a speed of 10 degrees/s. The change of speed is performed with acceleration/deceleration reduced to 50 % of maximum performance. At the same time, the robot executes towards p20 . Axis 2 of Station_A is then stopped as quickly as possible in position p1 within the current revolution. When axis 2 has reached this position, and the robot has stopped in position p30 , axis 2 returns to normal mode again. The measurement system offset for this axis is changes a whole number of axis revolutions so that the actual position is as close as possible to p40 . When the robot is then moved to position p40 , axis 2 of Station_A will be moved by the instruction MoveL p40 via the shortest route to position p40 (max ±180 degrees). Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndCMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 140 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
142
1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 139 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndCMove are illustrated below. IndCMove Station_A,2,20; WaitUntil IndSpeed(Station_A,2 \InSpeed) = TRUE; WaitTime 0.2; MoveL p10, v1000, fine, tool1; IndCMove Station_A,2,-10\Ramp:=50; MoveL p20, v1000, z50, tool1; IndRMove Station_A,2 \ToRelPos:=p1 \Short,10; MoveL p30, v1000, fine, tool1; WaitUntil IndInpos(Station_A,2 ) = TRUE; WaitTime 0.2; IndReset Station_A,2 \RefPos:=p40\Short; MoveL p40, v1000, fine, tool1; Axis 2 of Station_A starts to move in a positive direction at a speed of 20 degrees/s. When this axis has reached the selected speed the robot axes start to move. When the robot reaches position p10 the external axis changes direction and rotates at a speed of 10 degrees/s. The change of speed is performed with acceleration/deceleration reduced to 50 % of maximum performance. At the same time, the robot executes towards p20 . Axis 2 of Station_A is then stopped as quickly as possible in position p1 within the current revolution. When axis 2 has reached this position, and the robot has stopped in position p30 , axis 2 returns to normal mode again. The measurement system offset for this axis is changes a whole number of axis revolutions so that the actual position is as close as possible to p40 . When the robot is then moved to position p40 , axis 2 of Station_A will be moved by the instruction MoveL p40 via the shortest route to position p40 (max ±180 degrees). Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndCMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 140 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 141 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.63. IndDMove - Independent delta position movement Usage IndDMove ( Independent Delta Movement ) is used to change an axis to independent mode and move the axis to a specific distance. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to a specific position, the instruction IndAMove or IndRMove must be used instead. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndDMove are illustrated below. See also More examples on page 142 . Example 1 IndDMove Station_A,2,-30,20; Axis 2 of Station_A is moved 30 degrees in a negative direction at a speed of 20 degrees/s. Arguments IndDMove MecUnit Axis Delta Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Delta Data type: num The distance which the current axis is to be moved, expressed in degrees (mm for linear axes). The sign specifies the direction of movement. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
143
1 Instructions 1.62. IndCMove - Independent continuous movement Independent Axis 3HAC 16581-1 Revision: J 140 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndDMove - Independent delta position movement on page 141 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 141 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.63. IndDMove - Independent delta position movement Usage IndDMove ( Independent Delta Movement ) is used to change an axis to independent mode and move the axis to a specific distance. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to a specific position, the instruction IndAMove or IndRMove must be used instead. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndDMove are illustrated below. See also More examples on page 142 . Example 1 IndDMove Station_A,2,-30,20; Axis 2 of Station_A is moved 30 degrees in a negative direction at a speed of 20 degrees/s. Arguments IndDMove MecUnit Axis Delta Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Delta Data type: num The distance which the current axis is to be moved, expressed in degrees (mm for linear axes). The sign specifies the direction of movement. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 3HAC 16581-1 Revision: J 142 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndDMove is executed the specified axis moves with the programmed speed to the specified distance. The direction of movement is specified as the sign of the Delta argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. If the axis is moving the new position is calculated from the momentary position of the axis when the instruction IndDMove is executed. If an IndDMove instruction with distance 0 is executed and the axis is already moving position, the axis will stop and then move back to the position which the axis had when the instruction was executed. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndDMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program, or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a loss of power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . More examples More examples of the instruction IndDMove are illustrated below. Example 1 IndAMove ROB_1,6\ToAbsNum:=90,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove Station_A,2,-30,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove ROB_1,6,400,20; Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
144
1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 141 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.63. IndDMove - Independent delta position movement Usage IndDMove ( Independent Delta Movement ) is used to change an axis to independent mode and move the axis to a specific distance. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to a specific position, the instruction IndAMove or IndRMove must be used instead. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndDMove are illustrated below. See also More examples on page 142 . Example 1 IndDMove Station_A,2,-30,20; Axis 2 of Station_A is moved 30 degrees in a negative direction at a speed of 20 degrees/s. Arguments IndDMove MecUnit Axis Delta Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Delta Data type: num The distance which the current axis is to be moved, expressed in degrees (mm for linear axes). The sign specifies the direction of movement. Speed Data type: num Axis speed in degrees/s (mm/s for linear axis). [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continues on next page 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 3HAC 16581-1 Revision: J 142 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndDMove is executed the specified axis moves with the programmed speed to the specified distance. The direction of movement is specified as the sign of the Delta argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. If the axis is moving the new position is calculated from the momentary position of the axis when the instruction IndDMove is executed. If an IndDMove instruction with distance 0 is executed and the axis is already moving position, the axis will stop and then move back to the position which the axis had when the instruction was executed. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndDMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program, or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a loss of power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . More examples More examples of the instruction IndDMove are illustrated below. Example 1 IndAMove ROB_1,6\ToAbsNum:=90,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove Station_A,2,-30,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove ROB_1,6,400,20; Continued Continues on next page 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 143 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Axis 6 of the robot is moved to the following positions: • 90 degrees • 60 degrees • 460 degrees (1 revolution + 100 degrees) Error handling If the axis is not activated, the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndDMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Delta’:=’ ] < expression ( IN ) of num>’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
145
1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 3HAC 16581-1 Revision: J 142 © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndDMove is executed the specified axis moves with the programmed speed to the specified distance. The direction of movement is specified as the sign of the Delta argument. If \Ramp is programmed there will be a reduction of acceleration/deceleration. If the axis is moving the new position is calculated from the momentary position of the axis when the instruction IndDMove is executed. If an IndDMove instruction with distance 0 is executed and the axis is already moving position, the axis will stop and then move back to the position which the axis had when the instruction was executed. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndDMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program, or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a loss of power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . More examples More examples of the instruction IndDMove are illustrated below. Example 1 IndAMove ROB_1,6\ToAbsNum:=90,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove Station_A,2,-30,20; WaitUntil IndInpos(ROB_1,6) = TRUE; WaitTime 0.2; IndDMove ROB_1,6,400,20; Continued Continues on next page 1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 143 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Axis 6 of the robot is moved to the following positions: • 90 degrees • 60 degrees • 460 degrees (1 revolution + 100 degrees) Error handling If the axis is not activated, the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndDMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Delta’:=’ ] < expression ( IN ) of num>’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 144 © Copyright 2004-2010 ABB. All rights reserved. 1.64. IndReset - Independent reset Usage IndReset ( Independent Reset ) is used to change an independent axis back to normal mode. At the same time, the measurement system for rotational axes can be moved a number of axis revolutions. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndReset are illustrated below. See also More examples on page 147 . IndCMove Station_A,2,5; MoveL *,v1000,fine,tool1; IndCMove Station_A,2,0; WaitUntil IndSpeed(Station_A,2\ZeroSpeed); WaitTime 0.2 IndReset Station_A,2; Axis 2 of Station_A is first moved in independent mode and then changed back to normal mode. The axis will keep its position. NOTE! The current independent axis and the normal axes should not move when the instruction IndReset is executed. That is why previous position is a stop point, and an IndCMove instruction is executed at zero speed. Furthermore, a pause of 0.2 seconds is used to ensure that the correct status has been achieved. Arguments IndReset MecUnit Axis [\RefPos] | [\RefNum] [\Short] | [\Fwd] |[\Bwd] | \Old] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
146
1 Instructions 1.63. IndDMove - Independent delta position movement Independent Axis 143 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Axis 6 of the robot is moved to the following positions: • 90 degrees • 60 degrees • 460 degrees (1 revolution + 100 degrees) Error handling If the axis is not activated, the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndDMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> ’,’ [ Delta’:=’ ] < expression ( IN ) of num>’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’ Ramp’:=’ < expression ( IN ) of num > ] ’;’ Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndRMove - Independent relative position movement on page 149 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 144 © Copyright 2004-2010 ABB. All rights reserved. 1.64. IndReset - Independent reset Usage IndReset ( Independent Reset ) is used to change an independent axis back to normal mode. At the same time, the measurement system for rotational axes can be moved a number of axis revolutions. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndReset are illustrated below. See also More examples on page 147 . IndCMove Station_A,2,5; MoveL *,v1000,fine,tool1; IndCMove Station_A,2,0; WaitUntil IndSpeed(Station_A,2\ZeroSpeed); WaitTime 0.2 IndReset Station_A,2; Axis 2 of Station_A is first moved in independent mode and then changed back to normal mode. The axis will keep its position. NOTE! The current independent axis and the normal axes should not move when the instruction IndReset is executed. That is why previous position is a stop point, and an IndCMove instruction is executed at zero speed. Furthermore, a pause of 0.2 seconds is used to ensure that the correct status has been achieved. Arguments IndReset MecUnit Axis [\RefPos] | [\RefNum] [\Short] | [\Fwd] |[\Bwd] | \Old] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 145 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \RefPos ] Reference Position Data type: robtarget Reference axis position specified as a robtarget . Only the component for this specific Axis is used. The position must be inside the normal working range. For robot axes, the argument \RefNum is to be used instead. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . [ \RefNum ] Reference Numeric value Data type: num Reference axis position defined in degrees (mm for linear axis). The position must be inside the normal working range. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . Same function as \RefPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the axis will be as close as possible to the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset the axis will travel the shortest route, less than ±180 degrees, in order to reach the position. [ \Fwd ] Forward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the positive side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a positive direction less than 360 degrees in order to reach the position. [ \Bwd ] Backward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the negative side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a negative direction less than 360 degrees in order to reach the position. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
147
1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 144 © Copyright 2004-2010 ABB. All rights reserved. 1.64. IndReset - Independent reset Usage IndReset ( Independent Reset ) is used to change an independent axis back to normal mode. At the same time, the measurement system for rotational axes can be moved a number of axis revolutions. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndReset are illustrated below. See also More examples on page 147 . IndCMove Station_A,2,5; MoveL *,v1000,fine,tool1; IndCMove Station_A,2,0; WaitUntil IndSpeed(Station_A,2\ZeroSpeed); WaitTime 0.2 IndReset Station_A,2; Axis 2 of Station_A is first moved in independent mode and then changed back to normal mode. The axis will keep its position. NOTE! The current independent axis and the normal axes should not move when the instruction IndReset is executed. That is why previous position is a stop point, and an IndCMove instruction is executed at zero speed. Furthermore, a pause of 0.2 seconds is used to ensure that the correct status has been achieved. Arguments IndReset MecUnit Axis [\RefPos] | [\RefNum] [\Short] | [\Fwd] |[\Bwd] | \Old] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 145 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \RefPos ] Reference Position Data type: robtarget Reference axis position specified as a robtarget . Only the component for this specific Axis is used. The position must be inside the normal working range. For robot axes, the argument \RefNum is to be used instead. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . [ \RefNum ] Reference Numeric value Data type: num Reference axis position defined in degrees (mm for linear axis). The position must be inside the normal working range. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . Same function as \RefPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the axis will be as close as possible to the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset the axis will travel the shortest route, less than ±180 degrees, in order to reach the position. [ \Fwd ] Forward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the positive side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a positive direction less than 360 degrees in order to reach the position. [ \Bwd ] Backward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the negative side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a negative direction less than 360 degrees in order to reach the position. Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 146 © Copyright 2004-2010 ABB. All rights reserved. [ \Old ] Data type: switch Keeps the old position. NOTE! Resolution is decreased in positions far away from zero. If no argument \Short , \Fwd , \Bwd or \Old is specified - \Old is used as default value. Program execution When IndReset is executed it changes the independent axis back to normal mode. At the same time the measurement system for the axis can be moved by a whole number of axis revolutions. The instruction may also be used in normal mode in order to change the measurement system. NOTE! The position is used only to adjust the measurement system - the axis will not move to the position. Limitations The instruction may only be executed when all active axes running in normal mode are standing still. All active axis in every mechanical unit connected to the same motion planner need to stand still. The independent mode axis which is going to be changed to normal mode must also be stationary. For axes in normal mode this is achieved by executing a move instruction with the argument fine . The independent axis is stopped by an IndCMove with Speed :=0 (followed by a wait period of 0.2 seconds), IndRMove , IndAMove , or IndDMove instruction. The resolution of positions is decreased when moving away from logical position 0. An axis which progressively rotates further and further from the position 0 should thus be set to zero using the instruction IndReset with an argument other than \Old . The measurement system cannot be changed for linear axes. To ensure a proper start after IndReset of an axis with a relative measured measurement system (synchronization switches) an extra time delay of 0.12 seconds must be added after the IndReset instruction. Only robot axis 6 can be used as independent axis. The IndReset instruction can also be used for axis 4 on models IRB2400 and IRB 4400. If IndReset is used on robot axis 4 then axis 6 must not be in the independent mode. If this instruction is preceded by a move instruction, that move instruction must be programmed with a stop point (zonedata fine ), not a fly-by point. Otherwise restart after power failure will not be possible. IndReset cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart or Step. IndReset only switches the independent state for an axis. It cannot be used to stop an Independent movement. To stop an independent motion it has to reach a stop condition ot the user has to for example move PP to main. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
148
1 Instructions 1.64. IndReset - Independent reset Independent Axis 145 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \RefPos ] Reference Position Data type: robtarget Reference axis position specified as a robtarget . Only the component for this specific Axis is used. The position must be inside the normal working range. For robot axes, the argument \RefNum is to be used instead. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . [ \RefNum ] Reference Numeric value Data type: num Reference axis position defined in degrees (mm for linear axis). The position must be inside the normal working range. The argument is only to be defined together with the argument \Short , \Fwd or \Bwd . It is not allowed together with the argument \Old . Same function as \RefPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the axis will be as close as possible to the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset the axis will travel the shortest route, less than ±180 degrees, in order to reach the position. [ \Fwd ] Forward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the positive side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a positive direction less than 360 degrees in order to reach the position. [ \Bwd ] Backward Data type: switch The measurement system will change a whole number of revolutions on the axis side so that the reference position will be on the negative side of the specified \RefPos or \RefNum position. If a positioning instruction with the same position is executed after IndReset , the axis will turn in a negative direction less than 360 degrees in order to reach the position. Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 146 © Copyright 2004-2010 ABB. All rights reserved. [ \Old ] Data type: switch Keeps the old position. NOTE! Resolution is decreased in positions far away from zero. If no argument \Short , \Fwd , \Bwd or \Old is specified - \Old is used as default value. Program execution When IndReset is executed it changes the independent axis back to normal mode. At the same time the measurement system for the axis can be moved by a whole number of axis revolutions. The instruction may also be used in normal mode in order to change the measurement system. NOTE! The position is used only to adjust the measurement system - the axis will not move to the position. Limitations The instruction may only be executed when all active axes running in normal mode are standing still. All active axis in every mechanical unit connected to the same motion planner need to stand still. The independent mode axis which is going to be changed to normal mode must also be stationary. For axes in normal mode this is achieved by executing a move instruction with the argument fine . The independent axis is stopped by an IndCMove with Speed :=0 (followed by a wait period of 0.2 seconds), IndRMove , IndAMove , or IndDMove instruction. The resolution of positions is decreased when moving away from logical position 0. An axis which progressively rotates further and further from the position 0 should thus be set to zero using the instruction IndReset with an argument other than \Old . The measurement system cannot be changed for linear axes. To ensure a proper start after IndReset of an axis with a relative measured measurement system (synchronization switches) an extra time delay of 0.12 seconds must be added after the IndReset instruction. Only robot axis 6 can be used as independent axis. The IndReset instruction can also be used for axis 4 on models IRB2400 and IRB 4400. If IndReset is used on robot axis 4 then axis 6 must not be in the independent mode. If this instruction is preceded by a move instruction, that move instruction must be programmed with a stop point (zonedata fine ), not a fly-by point. Otherwise restart after power failure will not be possible. IndReset cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart or Step. IndReset only switches the independent state for an axis. It cannot be used to stop an Independent movement. To stop an independent motion it has to reach a stop condition ot the user has to for example move PP to main. Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 147 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndReset are illustrated below. Example 1 IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=0 \Short;. IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=300 \Short; Axis 1 in Station_A is first moved independently to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 30 degrees. Axis 1 in Station_A is subsequently moved to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 390 degrees (1 revolution and 30 degrees). Error handling If the axis is moving the system variable ERRNO is set to ERR_AXIS_MOVING . If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndReset [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ RefPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ RefNum’:=’ < expression ( IN ) of num> ] [ ’\’ Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] | [ ’\’ Old ]’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
149
1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 146 © Copyright 2004-2010 ABB. All rights reserved. [ \Old ] Data type: switch Keeps the old position. NOTE! Resolution is decreased in positions far away from zero. If no argument \Short , \Fwd , \Bwd or \Old is specified - \Old is used as default value. Program execution When IndReset is executed it changes the independent axis back to normal mode. At the same time the measurement system for the axis can be moved by a whole number of axis revolutions. The instruction may also be used in normal mode in order to change the measurement system. NOTE! The position is used only to adjust the measurement system - the axis will not move to the position. Limitations The instruction may only be executed when all active axes running in normal mode are standing still. All active axis in every mechanical unit connected to the same motion planner need to stand still. The independent mode axis which is going to be changed to normal mode must also be stationary. For axes in normal mode this is achieved by executing a move instruction with the argument fine . The independent axis is stopped by an IndCMove with Speed :=0 (followed by a wait period of 0.2 seconds), IndRMove , IndAMove , or IndDMove instruction. The resolution of positions is decreased when moving away from logical position 0. An axis which progressively rotates further and further from the position 0 should thus be set to zero using the instruction IndReset with an argument other than \Old . The measurement system cannot be changed for linear axes. To ensure a proper start after IndReset of an axis with a relative measured measurement system (synchronization switches) an extra time delay of 0.12 seconds must be added after the IndReset instruction. Only robot axis 6 can be used as independent axis. The IndReset instruction can also be used for axis 4 on models IRB2400 and IRB 4400. If IndReset is used on robot axis 4 then axis 6 must not be in the independent mode. If this instruction is preceded by a move instruction, that move instruction must be programmed with a stop point (zonedata fine ), not a fly-by point. Otherwise restart after power failure will not be possible. IndReset cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart or Step. IndReset only switches the independent state for an axis. It cannot be used to stop an Independent movement. To stop an independent motion it has to reach a stop condition ot the user has to for example move PP to main. Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 147 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndReset are illustrated below. Example 1 IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=0 \Short;. IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=300 \Short; Axis 1 in Station_A is first moved independently to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 30 degrees. Axis 1 in Station_A is subsequently moved to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 390 degrees (1 revolution and 30 degrees). Error handling If the axis is moving the system variable ERRNO is set to ERR_AXIS_MOVING . If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndReset [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ RefPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ RefNum’:=’ < expression ( IN ) of num> ] [ ’\’ Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] | [ ’\’ Old ]’;’ Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 148 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change an axis to independent mode IndAMove - Independent absolute position movement on page 133 IndCMove - Independent continuous movement on page 137 IndDMove - Independent delta position movement on page 141 IndRMove - Independent relative position movement on page 149 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
150
1 Instructions 1.64. IndReset - Independent reset Independent Axis 147 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndReset are illustrated below. Example 1 IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=0 \Short;. IndAMove Station_A,1\ToAbsNum:=750,50; WaitUntil IndInpos(Station_A,1); WaitTime 0.2; IndReset Station_A,1 \RefNum:=300 \Short; Axis 1 in Station_A is first moved independently to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 30 degrees. Axis 1 in Station_A is subsequently moved to the 750 degrees position (2 revolutions and 30 degrees). At the same time as it changes to normal mode the logical position is set to 390 degrees (1 revolution and 30 degrees). Error handling If the axis is moving the system variable ERRNO is set to ERR_AXIS_MOVING . If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndReset [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ RefPos’:=’ < expression ( IN ) of robtarget> ] | [ ’\’ RefNum’:=’ < expression ( IN ) of num> ] [ ’\’ Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] | [ ’\’ Old ]’;’ Continued Continues on next page 1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 148 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change an axis to independent mode IndAMove - Independent absolute position movement on page 133 IndCMove - Independent continuous movement on page 137 IndDMove - Independent delta position movement on page 141 IndRMove - Independent relative position movement on page 149 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 149 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.65. IndRMove - Independent relative position movement Usage IndRMove ( Independent Relative Movement ) is used to change a rotational axis to independent mode and move the axis to a specific position within one revolution. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to an absolute position (several revolutions) or if the axis is linear, the instruction IndAMove is used instead. If the movement is to take place a certain distance from the current position the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndRMove are illustrated below. See also More examples on page 152 . Example 1 IndRMove Station_A,2\ToRelPos:=p5 \Short,20; Axis 2 of Station_A is moved the shortest route to position p5 within one revolution (maximum rotation ± 180 degrees) at a speed of 20 degrees/s. Arguments IndRMove MecUnit Axis [\ToRelPos] | [\ToRelNum] [\Short] | [\Fwd] | [\Bwd] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). [ \ToRelPos ] To Relative Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as a position value in degrees within one axis revolution. This means that the axis moves less than one revolution. The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToRelNum is to be used instead. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
151
1 Instructions 1.64. IndReset - Independent reset Independent Axis 3HAC 16581-1 Revision: J 148 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change an axis to independent mode IndAMove - Independent absolute position movement on page 133 IndCMove - Independent continuous movement on page 137 IndDMove - Independent delta position movement on page 141 IndRMove - Independent relative position movement on page 149 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 149 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.65. IndRMove - Independent relative position movement Usage IndRMove ( Independent Relative Movement ) is used to change a rotational axis to independent mode and move the axis to a specific position within one revolution. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to an absolute position (several revolutions) or if the axis is linear, the instruction IndAMove is used instead. If the movement is to take place a certain distance from the current position the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndRMove are illustrated below. See also More examples on page 152 . Example 1 IndRMove Station_A,2\ToRelPos:=p5 \Short,20; Axis 2 of Station_A is moved the shortest route to position p5 within one revolution (maximum rotation ± 180 degrees) at a speed of 20 degrees/s. Arguments IndRMove MecUnit Axis [\ToRelPos] | [\ToRelNum] [\Short] | [\Fwd] | [\Bwd] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). [ \ToRelPos ] To Relative Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as a position value in degrees within one axis revolution. This means that the axis moves less than one revolution. The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToRelNum is to be used instead. Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 150 © Copyright 2004-2010 ABB. All rights reserved. [ \ToRelNum ] To Relative Numeric value Data type: num Axis position defined in degrees. Using this argument the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToRelPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The axis is moved the shortest route to the new position. This means that the maximum rotation will be 180 degrees in any direction. The direction of movement therefore depends on the current location of the axis. [ \Fwd ] Forward Data type: switch The axis is moved in a positive direction to the new position. This means that the maximum rotation will be 360 degrees and always in a positive direction (increased position value). [ \Bwd ] Backward Data type: switch The axis is moved in a negative direction to the new position. This means that the maximum rotation will be 360 degrees and always in a negative direction (decreased position value). If \Short , \Fwd or \Bwd argument is omitted, \Short is used as default value. Speed Data type: num Axis speed in degrees/s. [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
152
1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 149 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.65. IndRMove - Independent relative position movement Usage IndRMove ( Independent Relative Movement ) is used to change a rotational axis to independent mode and move the axis to a specific position within one revolution. An independent axis is an axis moving independently of other axes in the robot system. As program execution continues immediately it is possible to execute other instructions (including positioning instructions) during the time the independent axis is moving. If the axis is to be moved to an absolute position (several revolutions) or if the axis is linear, the instruction IndAMove is used instead. If the movement is to take place a certain distance from the current position the instruction IndDMove must be used. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. Basic examples Basic examples of the instruction IndRMove are illustrated below. See also More examples on page 152 . Example 1 IndRMove Station_A,2\ToRelPos:=p5 \Short,20; Axis 2 of Station_A is moved the shortest route to position p5 within one revolution (maximum rotation ± 180 degrees) at a speed of 20 degrees/s. Arguments IndRMove MecUnit Axis [\ToRelPos] | [\ToRelNum] [\Short] | [\Fwd] | [\Bwd] Speed [\Ramp] MecUnit Mechanical Unit Data type: mecunit The name of the mechanical unit. Axis Data type: num The number of the current axis for the mechanical unit (1-6). [ \ToRelPos ] To Relative Position Data type: robtarget Axis position specified as a robtarget . Only the component for this specific Axis is used. The value is used as a position value in degrees within one axis revolution. This means that the axis moves less than one revolution. The axis position will be affected if the axis is displaced using the instruction EOffsSet or EOffsOn . For robot axes the argument \ToRelNum is to be used instead. Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 150 © Copyright 2004-2010 ABB. All rights reserved. [ \ToRelNum ] To Relative Numeric value Data type: num Axis position defined in degrees. Using this argument the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToRelPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The axis is moved the shortest route to the new position. This means that the maximum rotation will be 180 degrees in any direction. The direction of movement therefore depends on the current location of the axis. [ \Fwd ] Forward Data type: switch The axis is moved in a positive direction to the new position. This means that the maximum rotation will be 360 degrees and always in a positive direction (increased position value). [ \Bwd ] Backward Data type: switch The axis is moved in a negative direction to the new position. This means that the maximum rotation will be 360 degrees and always in a negative direction (decreased position value). If \Short , \Fwd or \Bwd argument is omitted, \Short is used as default value. Speed Data type: num Axis speed in degrees/s. [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 151 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndRMove is executed the specified axis moves with the programmed speed to the specified axis position, but only a maximum of one revolution. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndRMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
153
1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 150 © Copyright 2004-2010 ABB. All rights reserved. [ \ToRelNum ] To Relative Numeric value Data type: num Axis position defined in degrees. Using this argument the position will NOT be affected by any displacement, e.g. EOffsSet or PDispOn . Same function as \ToRelPos but the position is defined as a numeric value to make it easy to change the position manually. [ \Short ] Data type: switch The axis is moved the shortest route to the new position. This means that the maximum rotation will be 180 degrees in any direction. The direction of movement therefore depends on the current location of the axis. [ \Fwd ] Forward Data type: switch The axis is moved in a positive direction to the new position. This means that the maximum rotation will be 360 degrees and always in a positive direction (increased position value). [ \Bwd ] Backward Data type: switch The axis is moved in a negative direction to the new position. This means that the maximum rotation will be 360 degrees and always in a negative direction (decreased position value). If \Short , \Fwd or \Bwd argument is omitted, \Short is used as default value. Speed Data type: num Axis speed in degrees/s. [ \Ramp ] Data type: num Decrease acceleration and deceleration from maximum performance (1 - 100%, 100% = maximum performance). Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 151 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndRMove is executed the specified axis moves with the programmed speed to the specified axis position, but only a maximum of one revolution. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndRMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 152 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndRMove are illustrated below. Example 1 IndRMove Station_A,1\ToRelPos:=p5 \Fwd,20\Ramp:=50; Axis 1 of Station_A starts to move in a positive direction to the position p5 within one revolution (maximum rotation 360 degrees) at a speed of 20 degrees/s. The speed is changed with acceleration/deceleration reduced to 50 % of maximum performance. IndAMove Station_A,1\ToAbsNum:=90,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; IndRMove Station_A,1\ToRelNum:=80 \Fwd,20; WaitTime 0.2; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=50 \Bwd,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=150 \Short,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndAMove Station_A,1\ToAbsNum:=10,20; Axis 1 of Station_A is moved to the following positions: • 90 degrees • 440 degrees (1 revolution + 80 degrees) • 410 degrees (1 revolution + 50 degrees) • 510 degrees (1 revolution + 150 degrees) • 10 degrees Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndRMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToRelPos’:=’ < expression ( IN ) of robtargets> ] | [ ’\’ToRelNum’:=’ < expression ( IN ) of num> ] [ ’\’Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
154
1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 151 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When IndRMove is executed the specified axis moves with the programmed speed to the specified axis position, but only a maximum of one revolution. If \Ramp is programmed there will be a reduction of acceleration/deceleration. To change the axis back to normal mode the IndReset instruction is used. The logical position of the axis can be changed in connection with this - a number of full revolutions can be erased from the position, for example, to avoid rotating back for the next movement. The speed can be changed by running a further IndRMove instruction (or another IndXMove instruction). If a speed in the opposite direction is selected the axis stops and then accelerates to the new speed and direction. During stepwise execution of the instruction the axis is set in independent mode only. The axis starts its movement when the next instruction is executed and continues as long as program execution continues. For more information see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes . When the program pointer is moved to the beginning of the program or to a new routine, all axes are automatically set to normal mode without changing the measurement system (equivalent to running the instruction IndReset \Old ). Limitations Axes in independent mode cannot be jogged. If an attempt is made to execute the axis manually the axis will not move, and an error message will be displayed. Execute an IndReset instruction or move the program pointer to main in order to leave independent mode. If a power fail occurs when the axis is in independent mode the program cannot be restarted. An error message is displayed, and the program must be started from the beginning. The instruction is not advisable for coupled robot wrist axes (see RAPID reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes ). Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 152 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndRMove are illustrated below. Example 1 IndRMove Station_A,1\ToRelPos:=p5 \Fwd,20\Ramp:=50; Axis 1 of Station_A starts to move in a positive direction to the position p5 within one revolution (maximum rotation 360 degrees) at a speed of 20 degrees/s. The speed is changed with acceleration/deceleration reduced to 50 % of maximum performance. IndAMove Station_A,1\ToAbsNum:=90,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; IndRMove Station_A,1\ToRelNum:=80 \Fwd,20; WaitTime 0.2; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=50 \Bwd,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=150 \Short,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndAMove Station_A,1\ToAbsNum:=10,20; Axis 1 of Station_A is moved to the following positions: • 90 degrees • 440 degrees (1 revolution + 80 degrees) • 410 degrees (1 revolution + 50 degrees) • 510 degrees (1 revolution + 150 degrees) • 10 degrees Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndRMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToRelPos’:=’ < expression ( IN ) of robtargets> ] | [ ’\’ToRelNum’:=’ < expression ( IN ) of num> ] [ ’\’Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 153 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
155
1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 3HAC 16581-1 Revision: J 152 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction IndRMove are illustrated below. Example 1 IndRMove Station_A,1\ToRelPos:=p5 \Fwd,20\Ramp:=50; Axis 1 of Station_A starts to move in a positive direction to the position p5 within one revolution (maximum rotation 360 degrees) at a speed of 20 degrees/s. The speed is changed with acceleration/deceleration reduced to 50 % of maximum performance. IndAMove Station_A,1\ToAbsNum:=90,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; IndRMove Station_A,1\ToRelNum:=80 \Fwd,20; WaitTime 0.2; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=50 \Bwd,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndRMove Station_A,1\ToRelNum:=150 \Short,20; WaitUntil IndInpos(Station_A,1 ) = TRUE; WaitTime 0.2; IndAMove Station_A,1\ToAbsNum:=10,20; Axis 1 of Station_A is moved to the following positions: • 90 degrees • 440 degrees (1 revolution + 80 degrees) • 410 degrees (1 revolution + 50 degrees) • 510 degrees (1 revolution + 150 degrees) • 10 degrees Error handling If the axis is not activated the system variable ERRNO is set to ERR_AXIS_ACT . This error can then be handled in the error handler. Syntax IndRMove [ MecUnit’:=’ ] < variable ( VAR ) of mecunit> ’,’ [ Axis’:=’ ] < expression ( IN ) of num> [ ’\’ToRelPos’:=’ < expression ( IN ) of robtargets> ] | [ ’\’ToRelNum’:=’ < expression ( IN ) of num> ] [ ’\’Short ] | [ ’\’ Fwd ] | [ ’\’ Bwd ] ’,’ [ Speed ’:=’ ] < expression ( IN ) of num> [ ’\’Ramp’:=’ < expression ( IN ) of num > ] ’;’ Continued Continues on next page 1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 153 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.66. InvertDO - Inverts the value of a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 154 © Copyright 2004-2010 ABB. All rights reserved. 1.66. InvertDO - Inverts the value of a digital output signal Usage InvertDO ( Invert Digital Output ) inverts the value of a digital output signal (0 -> 1 and 1 - > 0). Basic examples Basic examples of the instruction InvertDO are illustrated below. Example 1 InvertDO do15; The current value of the signal do15 is inverted . Arguments InvertDO Signal Signal Data type: signaldo The name of the signal to be inverted. Program execution The current value of the signal is inverted (see figure below). The figure below shows inversion of digital output signal. xx0500002164 Error handling The following recoverable error can be generated. The error can be handled in an error handler. If there is no contact with the unit the system variable ERRNO will be set to: ERR_NORUNUNIT Syntax InvertDO [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’;’ Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O principles - I/O principles Configuration of I/O Technical reference manual - System parameters
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
156
1 Instructions 1.65. IndRMove - Independent relative position movement Independent Axis 153 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Independent axes in general Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution - Independent axes Change back to normal mode IndReset - Independent reset on page 144 Reset the measurement system IndReset - Independent reset on page 144 Other independent axis movement IndAMove - Independent absolute position movement on page 133 IndDMove - Independent delta position movement on page 141 IndCMove - Independent continuous movement on page 137 Check the speed status for independent axes IndSpeed - Independent speed status on page 873 Check the position status for independent axes IndInpos - Independent axis in position status on page 871 Defining independent joints Technical reference manual - System parameters , section Motion - Arm - Independent Joint Continued 1 Instructions 1.66. InvertDO - Inverts the value of a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 154 © Copyright 2004-2010 ABB. All rights reserved. 1.66. InvertDO - Inverts the value of a digital output signal Usage InvertDO ( Invert Digital Output ) inverts the value of a digital output signal (0 -> 1 and 1 - > 0). Basic examples Basic examples of the instruction InvertDO are illustrated below. Example 1 InvertDO do15; The current value of the signal do15 is inverted . Arguments InvertDO Signal Signal Data type: signaldo The name of the signal to be inverted. Program execution The current value of the signal is inverted (see figure below). The figure below shows inversion of digital output signal. xx0500002164 Error handling The following recoverable error can be generated. The error can be handled in an error handler. If there is no contact with the unit the system variable ERRNO will be set to: ERR_NORUNUNIT Syntax InvertDO [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’;’ Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O principles - I/O principles Configuration of I/O Technical reference manual - System parameters 1 Instructions 1.67. IOBusStart - Start of I/O bus RobotWare - OS 155 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.67. IOBusStart - Start of I/O bus Usage IOBusStart is used to start a certain I/O bus. Basic examples Basic example of the instruction IOBusStart is illustrated below. Example 1 IOBusStart "IBS"; The instruction start the bus with the name IBS . Arguments IOBusStart BusName BusName Data type: string The name of bus to start. Program execution Start the bus with the name specified in the parameter BusName . Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler. Syntax IOBusStart [ BusName ’:=’ ] < expression ( IN ) of string>’;’ Related information For information about See How to get I/O bus state IOBusState - Get current state of I/O bus on page 156 Configuration of I/O Technical reference manual - System parameters
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
157
1 Instructions 1.66. InvertDO - Inverts the value of a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 154 © Copyright 2004-2010 ABB. All rights reserved. 1.66. InvertDO - Inverts the value of a digital output signal Usage InvertDO ( Invert Digital Output ) inverts the value of a digital output signal (0 -> 1 and 1 - > 0). Basic examples Basic examples of the instruction InvertDO are illustrated below. Example 1 InvertDO do15; The current value of the signal do15 is inverted . Arguments InvertDO Signal Signal Data type: signaldo The name of the signal to be inverted. Program execution The current value of the signal is inverted (see figure below). The figure below shows inversion of digital output signal. xx0500002164 Error handling The following recoverable error can be generated. The error can be handled in an error handler. If there is no contact with the unit the system variable ERRNO will be set to: ERR_NORUNUNIT Syntax InvertDO [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’;’ Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O principles - I/O principles Configuration of I/O Technical reference manual - System parameters 1 Instructions 1.67. IOBusStart - Start of I/O bus RobotWare - OS 155 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.67. IOBusStart - Start of I/O bus Usage IOBusStart is used to start a certain I/O bus. Basic examples Basic example of the instruction IOBusStart is illustrated below. Example 1 IOBusStart "IBS"; The instruction start the bus with the name IBS . Arguments IOBusStart BusName BusName Data type: string The name of bus to start. Program execution Start the bus with the name specified in the parameter BusName . Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler. Syntax IOBusStart [ BusName ’:=’ ] < expression ( IN ) of string>’;’ Related information For information about See How to get I/O bus state IOBusState - Get current state of I/O bus on page 156 Configuration of I/O Technical reference manual - System parameters 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 156 © Copyright 2004-2010 ABB. All rights reserved. 1.68. IOBusState - Get current state of I/O bus Usage IOBusState is used to read the state of a certain I/O bus. Its physical state and logical state define the status for an I/O bus. Basic examples Basic examples of the instruction IOBusState are illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access the signals on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST The instruction returns the physical bus state of IBS in the bstate variable of type busstate . Example 2 VAR busstate bstate; IOBusState "IBS", bstate \Logic; TEST bstate CASE IOBUS_LOG_STATE_STARTED: ! The IBS bus is started DEFAULT: ! Actions for stopped IBS bus ENDTEST The instruction returns the logical bus state of IBS in the bstate variable of type busstate . Arguments IOBusState BusName State [\Phys] | [\Logic] BusName Data type: string The name of bus to get state about. State Data type: busstate The variable in which the bus state is returned. See predefined data of type busstate below at Program execution. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
158
1 Instructions 1.67. IOBusStart - Start of I/O bus RobotWare - OS 155 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.67. IOBusStart - Start of I/O bus Usage IOBusStart is used to start a certain I/O bus. Basic examples Basic example of the instruction IOBusStart is illustrated below. Example 1 IOBusStart "IBS"; The instruction start the bus with the name IBS . Arguments IOBusStart BusName BusName Data type: string The name of bus to start. Program execution Start the bus with the name specified in the parameter BusName . Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler. Syntax IOBusStart [ BusName ’:=’ ] < expression ( IN ) of string>’;’ Related information For information about See How to get I/O bus state IOBusState - Get current state of I/O bus on page 156 Configuration of I/O Technical reference manual - System parameters 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 156 © Copyright 2004-2010 ABB. All rights reserved. 1.68. IOBusState - Get current state of I/O bus Usage IOBusState is used to read the state of a certain I/O bus. Its physical state and logical state define the status for an I/O bus. Basic examples Basic examples of the instruction IOBusState are illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access the signals on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST The instruction returns the physical bus state of IBS in the bstate variable of type busstate . Example 2 VAR busstate bstate; IOBusState "IBS", bstate \Logic; TEST bstate CASE IOBUS_LOG_STATE_STARTED: ! The IBS bus is started DEFAULT: ! Actions for stopped IBS bus ENDTEST The instruction returns the logical bus state of IBS in the bstate variable of type busstate . Arguments IOBusState BusName State [\Phys] | [\Logic] BusName Data type: string The name of bus to get state about. State Data type: busstate The variable in which the bus state is returned. See predefined data of type busstate below at Program execution. Continues on next page 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 157 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Phys] Physical Data type: switch If using this parameter the physical state of the bus is read. [\Logic] Logical Data type: switch If using this parameter the logical state of the bus is read. Program execution Returning in parameter State the state of the bus is specified in parameter BusName . The I/O bus logical states describe the state a user can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Logic . The I/O bus physical state describes the state that the fieldbus driver can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Phys . - NOTE! For RobotWare 5.08 and earlier versions it is not possible to use the instruction IOBusState with optional argument \Phys or \Logic . From RobotWare 5.09 it is recommended to use the optional argument \Phys or \Logic . Return value Symbolic constant Comment 10 IOBUS_LOG_STATE_STOPPED Bus is stopped due to error 2) 11 IOBUS_LOG_STATE_STARTED Bus is started 1) Return value Symbolic constant Comment 20 IOBUS_PHYS_STATE_HALTED Bus is halted 3) 21 IOBUS_PHYS_STATE_RUNNING Bus is up and running 1) 22 IOBUS_PHYS_STATE_ERROR Bus is not working 2) 23 IOBUS_PHYS_STATE_STARTUP Bus is in start up mode, is not com- municating with any units. 24 IOBUS_PHYS_STATE_INIT Bus is only created 3) Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
159
1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 156 © Copyright 2004-2010 ABB. All rights reserved. 1.68. IOBusState - Get current state of I/O bus Usage IOBusState is used to read the state of a certain I/O bus. Its physical state and logical state define the status for an I/O bus. Basic examples Basic examples of the instruction IOBusState are illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access the signals on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST The instruction returns the physical bus state of IBS in the bstate variable of type busstate . Example 2 VAR busstate bstate; IOBusState "IBS", bstate \Logic; TEST bstate CASE IOBUS_LOG_STATE_STARTED: ! The IBS bus is started DEFAULT: ! Actions for stopped IBS bus ENDTEST The instruction returns the logical bus state of IBS in the bstate variable of type busstate . Arguments IOBusState BusName State [\Phys] | [\Logic] BusName Data type: string The name of bus to get state about. State Data type: busstate The variable in which the bus state is returned. See predefined data of type busstate below at Program execution. Continues on next page 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 157 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Phys] Physical Data type: switch If using this parameter the physical state of the bus is read. [\Logic] Logical Data type: switch If using this parameter the logical state of the bus is read. Program execution Returning in parameter State the state of the bus is specified in parameter BusName . The I/O bus logical states describe the state a user can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Logic . The I/O bus physical state describes the state that the fieldbus driver can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Phys . - NOTE! For RobotWare 5.08 and earlier versions it is not possible to use the instruction IOBusState with optional argument \Phys or \Logic . From RobotWare 5.09 it is recommended to use the optional argument \Phys or \Logic . Return value Symbolic constant Comment 10 IOBUS_LOG_STATE_STOPPED Bus is stopped due to error 2) 11 IOBUS_LOG_STATE_STARTED Bus is started 1) Return value Symbolic constant Comment 20 IOBUS_PHYS_STATE_HALTED Bus is halted 3) 21 IOBUS_PHYS_STATE_RUNNING Bus is up and running 1) 22 IOBUS_PHYS_STATE_ERROR Bus is not working 2) 23 IOBUS_PHYS_STATE_STARTUP Bus is in start up mode, is not com- municating with any units. 24 IOBUS_PHYS_STATE_INIT Bus is only created 3) Continued Continues on next page 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 158 © Copyright 2004-2010 ABB. All rights reserved. The state of the I/O bus is defined in the table below when not using any of the optional argument \Phys or \Logic . 1) If the bus is up and running the state returned in argument State in instruction IOBusState can be either IOBUS_LOG_STATE_STARTED , IOBUS_PHYS_STATE_RUNNING , or BUSSTATE_RUN depending on if optional parameters are used or not in IOBusState . 2) If the bus is stopped due to some error the state returned in argument State can be either IOBUS_LOG_STATE_STOPPED , IOBUS_PHYS_STATE_ERROR , or BUSSTATE_ERROR depending on if optional parameters are used or not in IOBusState . 3) Not possible to get this state in the RAPID program with current version of Robotware - OS. Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler Syntax IOBusState [ BusName ’:=’ ] < expression ( IN ) of string> ’,’ [ State ’:=’ ] < variable ( VAR ) of busstate> [ ’\’ Phys] | [ ’\’ Logic]’;’ Related information Return value Symbolic constant Comment 0 BUSSTATE_HALTED Bus is halted 3) 1 BUSSTATE_RUN Bus is up and running 1) 2 BUSSTATE_ERROR Bus is not working 2) 3 BUSSTATE_STARTUP Bus is in start up mode, is not com- municating with any units. 4 BUSSTATE_INIT Bus is only created 3) For information about See Definition of bus state busstate - State of I/O bus on page 1088 Start of I/O bus IOBusStart - Start of I/O bus on page 155 Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles -I/O principles Configuration of I/O Technical reference manual - System parameters Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
160
1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 157 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Phys] Physical Data type: switch If using this parameter the physical state of the bus is read. [\Logic] Logical Data type: switch If using this parameter the logical state of the bus is read. Program execution Returning in parameter State the state of the bus is specified in parameter BusName . The I/O bus logical states describe the state a user can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Logic . The I/O bus physical state describes the state that the fieldbus driver can order the bus into. The state of the I/O bus is defined in the table below when using optional argument \Phys . - NOTE! For RobotWare 5.08 and earlier versions it is not possible to use the instruction IOBusState with optional argument \Phys or \Logic . From RobotWare 5.09 it is recommended to use the optional argument \Phys or \Logic . Return value Symbolic constant Comment 10 IOBUS_LOG_STATE_STOPPED Bus is stopped due to error 2) 11 IOBUS_LOG_STATE_STARTED Bus is started 1) Return value Symbolic constant Comment 20 IOBUS_PHYS_STATE_HALTED Bus is halted 3) 21 IOBUS_PHYS_STATE_RUNNING Bus is up and running 1) 22 IOBUS_PHYS_STATE_ERROR Bus is not working 2) 23 IOBUS_PHYS_STATE_STARTUP Bus is in start up mode, is not com- municating with any units. 24 IOBUS_PHYS_STATE_INIT Bus is only created 3) Continued Continues on next page 1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 158 © Copyright 2004-2010 ABB. All rights reserved. The state of the I/O bus is defined in the table below when not using any of the optional argument \Phys or \Logic . 1) If the bus is up and running the state returned in argument State in instruction IOBusState can be either IOBUS_LOG_STATE_STARTED , IOBUS_PHYS_STATE_RUNNING , or BUSSTATE_RUN depending on if optional parameters are used or not in IOBusState . 2) If the bus is stopped due to some error the state returned in argument State can be either IOBUS_LOG_STATE_STOPPED , IOBUS_PHYS_STATE_ERROR , or BUSSTATE_ERROR depending on if optional parameters are used or not in IOBusState . 3) Not possible to get this state in the RAPID program with current version of Robotware - OS. Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler Syntax IOBusState [ BusName ’:=’ ] < expression ( IN ) of string> ’,’ [ State ’:=’ ] < variable ( VAR ) of busstate> [ ’\’ Phys] | [ ’\’ Logic]’;’ Related information Return value Symbolic constant Comment 0 BUSSTATE_HALTED Bus is halted 3) 1 BUSSTATE_RUN Bus is up and running 1) 2 BUSSTATE_ERROR Bus is not working 2) 3 BUSSTATE_STARTUP Bus is in start up mode, is not com- municating with any units. 4 BUSSTATE_INIT Bus is only created 3) For information about See Definition of bus state busstate - State of I/O bus on page 1088 Start of I/O bus IOBusStart - Start of I/O bus on page 155 Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles -I/O principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 159 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.69. IODisable - Disable I/O unit Usage IODisable is used to deactivate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason, I/O units can be deactivated or activated during program execution. NOTE! It is not possible to deactivate a unit with Trustlevel set to Required. Basic examples Basic examples of the instruction IODisable are illustrated below. See also More examples on page 160 . Example 1 CONST string cell1:="cell1"; IODisable cell1, 5; Deactivate an I/O unit with name cell1 . Wait max. 5 s. Arguments IODisable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted expressed in seconds. If this time runs out before the I/O unit has finished the deactivation steps the error handler will be called, if there is one, with the error code ERR_IODISABLE . If there is no error handler the program execution will be stopped. However, the I/O unit deactivationprocess will always continue regardless of the MaxTime or error. To deactivate an I/O unit takes about 0-5 s. Program execution The specified I/O unit starts the deactivation steps. The instruction is ready when the deactivation steps are finished. If the MaxTime runs out before the I/O unit has finished the deactivation steps, a recoverable error will be generated. After deactivation of an I/O unit, any setting of outputs in this unit will result in an error. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
161
1 Instructions 1.68. IOBusState - Get current state of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 158 © Copyright 2004-2010 ABB. All rights reserved. The state of the I/O bus is defined in the table below when not using any of the optional argument \Phys or \Logic . 1) If the bus is up and running the state returned in argument State in instruction IOBusState can be either IOBUS_LOG_STATE_STARTED , IOBUS_PHYS_STATE_RUNNING , or BUSSTATE_RUN depending on if optional parameters are used or not in IOBusState . 2) If the bus is stopped due to some error the state returned in argument State can be either IOBUS_LOG_STATE_STOPPED , IOBUS_PHYS_STATE_ERROR , or BUSSTATE_ERROR depending on if optional parameters are used or not in IOBusState . 3) Not possible to get this state in the RAPID program with current version of Robotware - OS. Error handling The system variable ERRNO will be set to ERR_NAME_INVALID if the bus name does not exist.That error can be handled in an ERROR handler Syntax IOBusState [ BusName ’:=’ ] < expression ( IN ) of string> ’,’ [ State ’:=’ ] < variable ( VAR ) of busstate> [ ’\’ Phys] | [ ’\’ Logic]’;’ Related information Return value Symbolic constant Comment 0 BUSSTATE_HALTED Bus is halted 3) 1 BUSSTATE_RUN Bus is up and running 1) 2 BUSSTATE_ERROR Bus is not working 2) 3 BUSSTATE_STARTUP Bus is in start up mode, is not com- municating with any units. 4 BUSSTATE_INIT Bus is only created 3) For information about See Definition of bus state busstate - State of I/O bus on page 1088 Start of I/O bus IOBusStart - Start of I/O bus on page 155 Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles -I/O principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 159 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.69. IODisable - Disable I/O unit Usage IODisable is used to deactivate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason, I/O units can be deactivated or activated during program execution. NOTE! It is not possible to deactivate a unit with Trustlevel set to Required. Basic examples Basic examples of the instruction IODisable are illustrated below. See also More examples on page 160 . Example 1 CONST string cell1:="cell1"; IODisable cell1, 5; Deactivate an I/O unit with name cell1 . Wait max. 5 s. Arguments IODisable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted expressed in seconds. If this time runs out before the I/O unit has finished the deactivation steps the error handler will be called, if there is one, with the error code ERR_IODISABLE . If there is no error handler the program execution will be stopped. However, the I/O unit deactivationprocess will always continue regardless of the MaxTime or error. To deactivate an I/O unit takes about 0-5 s. Program execution The specified I/O unit starts the deactivation steps. The instruction is ready when the deactivation steps are finished. If the MaxTime runs out before the I/O unit has finished the deactivation steps, a recoverable error will be generated. After deactivation of an I/O unit, any setting of outputs in this unit will result in an error. Continues on next page 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 160 © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples More examples of the instruction IODisable are illustrated below. Example 1 PROC go_home() VAR num recover_flag :=0; ... ! Start to disable I/O unit cell1 recover_flag := 1; IODisable "cell1", 0; ! Move to home position MoveJ home, v1000,fine,tool1; ! Wait until deactivation of I/O unit cell1 is ready recover_flag := 2; IODisable "cell1", 5; ... ERROR IF ERRNO = ERR_IODISABLE THEN IF recover_flag = 1 THEN TRYNEXT; ELSEIF recover_flag = 2 THEN RETRY; ENDIF ELSEIF ERRNO <> ERR_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IODisable error", "Not possible to disable I/O unit cell1"; Stop; ENDIF ENDPROC To save cycle time the I/O unit cell1 is deactivated during robot movement to the home position. With the robot at the home position a test is done to establish whether or not the I/O unit cell1 is fully deactivated. After the max. number of retries (5 with a waiting time of 5 s), the robot execution will stop with an error message. The same principle can be used with IOEnable (this will save more cycle time compared with IODisable ). ERR_IODISABLE if the time out time runs out before the unit is deactivated. ERR_TRUSTLEVEL if the trustlevel on the unit is set to 0, then the unit can´t be deactivated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be deactivated. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
162
1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 159 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.69. IODisable - Disable I/O unit Usage IODisable is used to deactivate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason, I/O units can be deactivated or activated during program execution. NOTE! It is not possible to deactivate a unit with Trustlevel set to Required. Basic examples Basic examples of the instruction IODisable are illustrated below. See also More examples on page 160 . Example 1 CONST string cell1:="cell1"; IODisable cell1, 5; Deactivate an I/O unit with name cell1 . Wait max. 5 s. Arguments IODisable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted expressed in seconds. If this time runs out before the I/O unit has finished the deactivation steps the error handler will be called, if there is one, with the error code ERR_IODISABLE . If there is no error handler the program execution will be stopped. However, the I/O unit deactivationprocess will always continue regardless of the MaxTime or error. To deactivate an I/O unit takes about 0-5 s. Program execution The specified I/O unit starts the deactivation steps. The instruction is ready when the deactivation steps are finished. If the MaxTime runs out before the I/O unit has finished the deactivation steps, a recoverable error will be generated. After deactivation of an I/O unit, any setting of outputs in this unit will result in an error. Continues on next page 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 160 © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples More examples of the instruction IODisable are illustrated below. Example 1 PROC go_home() VAR num recover_flag :=0; ... ! Start to disable I/O unit cell1 recover_flag := 1; IODisable "cell1", 0; ! Move to home position MoveJ home, v1000,fine,tool1; ! Wait until deactivation of I/O unit cell1 is ready recover_flag := 2; IODisable "cell1", 5; ... ERROR IF ERRNO = ERR_IODISABLE THEN IF recover_flag = 1 THEN TRYNEXT; ELSEIF recover_flag = 2 THEN RETRY; ENDIF ELSEIF ERRNO <> ERR_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IODisable error", "Not possible to disable I/O unit cell1"; Stop; ENDIF ENDPROC To save cycle time the I/O unit cell1 is deactivated during robot movement to the home position. With the robot at the home position a test is done to establish whether or not the I/O unit cell1 is fully deactivated. After the max. number of retries (5 with a waiting time of 5 s), the robot execution will stop with an error message. The same principle can be used with IOEnable (this will save more cycle time compared with IODisable ). ERR_IODISABLE if the time out time runs out before the unit is deactivated. ERR_TRUSTLEVEL if the trustlevel on the unit is set to 0, then the unit can´t be deactivated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be deactivated. Continued Continues on next page 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 161 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax IODisable [ UnitName ’:=’ ] < expression ( IN ) of string> ’,’ [ MaxTime ’:=’ ] < expression ( IN ) of num> ’;’ Related information For information about See Enabling an I/O unit IOEnable - Enable I/O unit on page 162 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
163
1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 160 © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples More examples of the instruction IODisable are illustrated below. Example 1 PROC go_home() VAR num recover_flag :=0; ... ! Start to disable I/O unit cell1 recover_flag := 1; IODisable "cell1", 0; ! Move to home position MoveJ home, v1000,fine,tool1; ! Wait until deactivation of I/O unit cell1 is ready recover_flag := 2; IODisable "cell1", 5; ... ERROR IF ERRNO = ERR_IODISABLE THEN IF recover_flag = 1 THEN TRYNEXT; ELSEIF recover_flag = 2 THEN RETRY; ENDIF ELSEIF ERRNO <> ERR_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IODisable error", "Not possible to disable I/O unit cell1"; Stop; ENDIF ENDPROC To save cycle time the I/O unit cell1 is deactivated during robot movement to the home position. With the robot at the home position a test is done to establish whether or not the I/O unit cell1 is fully deactivated. After the max. number of retries (5 with a waiting time of 5 s), the robot execution will stop with an error message. The same principle can be used with IOEnable (this will save more cycle time compared with IODisable ). ERR_IODISABLE if the time out time runs out before the unit is deactivated. ERR_TRUSTLEVEL if the trustlevel on the unit is set to 0, then the unit can´t be deactivated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be deactivated. Continued Continues on next page 1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 161 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax IODisable [ UnitName ’:=’ ] < expression ( IN ) of string> ’,’ [ MaxTime ’:=’ ] < expression ( IN ) of num> ’;’ Related information For information about See Enabling an I/O unit IOEnable - Enable I/O unit on page 162 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 162 © Copyright 2004-2010 ABB. All rights reserved. 1.70. IOEnable - Enable I/O unit Usage IOEnable is used to activate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason I/O units can be deactivated or activated during program execution. The controller action when activating a unit depends on the set unit Trustlevel. See System Parameters Unit Trustlevel. Basic examples Basic examples of the instruction IOEnable are illustrated below. See also More examples on page 163 . Example 1 CONST string cell1:="cell1"; IOEnable cell1, 5; Enable I/O unit with name cell1 . Wait max. 5 s. Arguments IOEnable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the I/O unit has finished the activation steps the error handler will be called, if there is one, with the error code ERR_IOENABLE . If there is no error handler the execution will be stopped. The I/O unit activation process will however always continue regardless of MaxTime or error. To activate an I/O unit takes about 2-5 s. Program execution The specified I/O unit starts the activation steps. The instruction is ready when the activation steps are finished. If the MaxTime runs out before the I/O unit has finished the activation steps a recoverable error will be generated. After a sequence of IODisable - IOEnable , all outputs for the current I/O unit will be set to the old values (before IODisable ). Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
164
1 Instructions 1.69. IODisable - Disable I/O unit RobotWare - OS 161 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax IODisable [ UnitName ’:=’ ] < expression ( IN ) of string> ’,’ [ MaxTime ’:=’ ] < expression ( IN ) of num> ’;’ Related information For information about See Enabling an I/O unit IOEnable - Enable I/O unit on page 162 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 162 © Copyright 2004-2010 ABB. All rights reserved. 1.70. IOEnable - Enable I/O unit Usage IOEnable is used to activate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason I/O units can be deactivated or activated during program execution. The controller action when activating a unit depends on the set unit Trustlevel. See System Parameters Unit Trustlevel. Basic examples Basic examples of the instruction IOEnable are illustrated below. See also More examples on page 163 . Example 1 CONST string cell1:="cell1"; IOEnable cell1, 5; Enable I/O unit with name cell1 . Wait max. 5 s. Arguments IOEnable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the I/O unit has finished the activation steps the error handler will be called, if there is one, with the error code ERR_IOENABLE . If there is no error handler the execution will be stopped. The I/O unit activation process will however always continue regardless of MaxTime or error. To activate an I/O unit takes about 2-5 s. Program execution The specified I/O unit starts the activation steps. The instruction is ready when the activation steps are finished. If the MaxTime runs out before the I/O unit has finished the activation steps a recoverable error will be generated. After a sequence of IODisable - IOEnable , all outputs for the current I/O unit will be set to the old values (before IODisable ). Continues on next page 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 163 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples IOEnable can also be used to check whether some I/O unit is disconnected for some reason. More examples of how to use the instruction IOEnable are illustrated below. Example 1 VAR num max_retry:=0; ... IOEnable "cell1", 0; SetDO cell1_sig3, 1; ... ERROR IF ERRNO = ERR_IOENABLE THEN WaitTime 1; RETRY; ELSEIF ERRNO <> Err_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IOEnable error", "Not possible to enable I/O unit cell"; Stop; ENDIF ENDIF Before using signals on the I/O unit cell1 , a test is done by trying to activate the I/O unit with timeout after 0 sec. If the test fails a jump is made to the error handler. In the error handler the program execution waits for 1 sec. and a new retry is made. After 5 retry attempts the error ERR_IOENABLE is propagated to the caller of this routine. Syntax IOEnable [ UnitName ’:=’ ] < expression ( IN ) of string>’ ,’ [ MaxTime’ :=’ ] < expression ( IN ) of num > ’;’ ERR_IOENABLE if the time out time runs out before the unit is activated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be activated. ERR_BUSSTATE if an IOEnable is done, and the bus is in error state or enter error state before the unit is activated. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
165
1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 162 © Copyright 2004-2010 ABB. All rights reserved. 1.70. IOEnable - Enable I/O unit Usage IOEnable is used to activate an I/O unit during program execution. I/O units are automatically activated after start-up if they are defined in the system parameters. When required for some reason I/O units can be deactivated or activated during program execution. The controller action when activating a unit depends on the set unit Trustlevel. See System Parameters Unit Trustlevel. Basic examples Basic examples of the instruction IOEnable are illustrated below. See also More examples on page 163 . Example 1 CONST string cell1:="cell1"; IOEnable cell1, 5; Enable I/O unit with name cell1 . Wait max. 5 s. Arguments IOEnable UnitName MaxTime UnitName Data type: string A name of an I/O unit (the unit name must be present in the system parameters). MaxTime Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the I/O unit has finished the activation steps the error handler will be called, if there is one, with the error code ERR_IOENABLE . If there is no error handler the execution will be stopped. The I/O unit activation process will however always continue regardless of MaxTime or error. To activate an I/O unit takes about 2-5 s. Program execution The specified I/O unit starts the activation steps. The instruction is ready when the activation steps are finished. If the MaxTime runs out before the I/O unit has finished the activation steps a recoverable error will be generated. After a sequence of IODisable - IOEnable , all outputs for the current I/O unit will be set to the old values (before IODisable ). Continues on next page 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 163 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples IOEnable can also be used to check whether some I/O unit is disconnected for some reason. More examples of how to use the instruction IOEnable are illustrated below. Example 1 VAR num max_retry:=0; ... IOEnable "cell1", 0; SetDO cell1_sig3, 1; ... ERROR IF ERRNO = ERR_IOENABLE THEN WaitTime 1; RETRY; ELSEIF ERRNO <> Err_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IOEnable error", "Not possible to enable I/O unit cell"; Stop; ENDIF ENDIF Before using signals on the I/O unit cell1 , a test is done by trying to activate the I/O unit with timeout after 0 sec. If the test fails a jump is made to the error handler. In the error handler the program execution waits for 1 sec. and a new retry is made. After 5 retry attempts the error ERR_IOENABLE is propagated to the caller of this routine. Syntax IOEnable [ UnitName ’:=’ ] < expression ( IN ) of string>’ ,’ [ MaxTime’ :=’ ] < expression ( IN ) of num > ’;’ ERR_IOENABLE if the time out time runs out before the unit is activated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be activated. ERR_BUSSTATE if an IOEnable is done, and the bus is in error state or enter error state before the unit is activated. Continued Continues on next page 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 164 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Disabling an I/O unit IODisable - Disable I/O unit on page 159 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O principles Configuration of I/O Technical reference manual - System parameters Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
166
1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 163 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling The following recoverable errors can be generated. The errors can be handled in an error handler. The system variable ERRNO will be set to: More examples IOEnable can also be used to check whether some I/O unit is disconnected for some reason. More examples of how to use the instruction IOEnable are illustrated below. Example 1 VAR num max_retry:=0; ... IOEnable "cell1", 0; SetDO cell1_sig3, 1; ... ERROR IF ERRNO = ERR_IOENABLE THEN WaitTime 1; RETRY; ELSEIF ERRNO <> Err_EXCRTYMAX THEN RAISE; ELSE ErrWrite "IOEnable error", "Not possible to enable I/O unit cell"; Stop; ENDIF ENDIF Before using signals on the I/O unit cell1 , a test is done by trying to activate the I/O unit with timeout after 0 sec. If the test fails a jump is made to the error handler. In the error handler the program execution waits for 1 sec. and a new retry is made. After 5 retry attempts the error ERR_IOENABLE is propagated to the caller of this routine. Syntax IOEnable [ UnitName ’:=’ ] < expression ( IN ) of string>’ ,’ [ MaxTime’ :=’ ] < expression ( IN ) of num > ’;’ ERR_IOENABLE if the time out time runs out before the unit is activated. ERR_NAME_INVALID if the unit name don’t exist or if the unit isn’t allowed to be activated. ERR_BUSSTATE if an IOEnable is done, and the bus is in error state or enter error state before the unit is activated. Continued Continues on next page 1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 164 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Disabling an I/O unit IODisable - Disable I/O unit on page 159 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 165 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.71. IPers - Interrupt at value change of a persistent variable Usage IPers ( Interrupt Persistent ) is used to order and enable interrupts to be generated when the value of a persistent variable is changed. Basic examples Basic examples of the instruction IPers are illustrated below. Example 1 VAR intnum pers1int; PERS num counter := 0; PROC main() CONNECT pers1int WITH iroutine1; IPers counter, pers1int; ... Idelete pers1int; ENDPROC TRAP iroutine1 TPWrite "Current value of counter = " \Num:=counter; ENDTRAP Orders an interrupt which is to occur each time the persistent variable counter is changed. A call is then made to the iroutine1 trap routine. Arguments IPers Name Interrupt Name Data type: anytype The persistent variable that is to generate interrupts. All type of data could be used such as atomic, record, record component, array, or array element. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the persistent variable changes value a call is made to the corresponding trap routine. When this routine has been executed program execution continues from where the interrupt occurred. If the persistent variable changes value during a program stop no interrupt will occur when the program starts again. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
167
1 Instructions 1.70. IOEnable - Enable I/O unit RobotWare - OS 3HAC 16581-1 Revision: J 164 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Disabling an I/O unit IODisable - Disable I/O unit on page 159 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O principles Configuration of I/O Technical reference manual - System parameters Continued 1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 165 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.71. IPers - Interrupt at value change of a persistent variable Usage IPers ( Interrupt Persistent ) is used to order and enable interrupts to be generated when the value of a persistent variable is changed. Basic examples Basic examples of the instruction IPers are illustrated below. Example 1 VAR intnum pers1int; PERS num counter := 0; PROC main() CONNECT pers1int WITH iroutine1; IPers counter, pers1int; ... Idelete pers1int; ENDPROC TRAP iroutine1 TPWrite "Current value of counter = " \Num:=counter; ENDTRAP Orders an interrupt which is to occur each time the persistent variable counter is changed. A call is then made to the iroutine1 trap routine. Arguments IPers Name Interrupt Name Data type: anytype The persistent variable that is to generate interrupts. All type of data could be used such as atomic, record, record component, array, or array element. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the persistent variable changes value a call is made to the corresponding trap routine. When this routine has been executed program execution continues from where the interrupt occurred. If the persistent variable changes value during a program stop no interrupt will occur when the program starts again. Continues on next page 1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 3HAC 16581-1 Revision: J 166 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. See Instructions - ISignalDI . If subscribed on data such as record component or array element specified in parameter Name , the interrupt will occur every time any part of the data is changed. When executing the trap routine and reading the value of the persistent, there is no guarantee that the value read is the one that triggered the interrupt. Syntax IPers [ Name ’:=’ ] < persistent ( PERS ) of anytype > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
168
1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 165 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.71. IPers - Interrupt at value change of a persistent variable Usage IPers ( Interrupt Persistent ) is used to order and enable interrupts to be generated when the value of a persistent variable is changed. Basic examples Basic examples of the instruction IPers are illustrated below. Example 1 VAR intnum pers1int; PERS num counter := 0; PROC main() CONNECT pers1int WITH iroutine1; IPers counter, pers1int; ... Idelete pers1int; ENDPROC TRAP iroutine1 TPWrite "Current value of counter = " \Num:=counter; ENDTRAP Orders an interrupt which is to occur each time the persistent variable counter is changed. A call is then made to the iroutine1 trap routine. Arguments IPers Name Interrupt Name Data type: anytype The persistent variable that is to generate interrupts. All type of data could be used such as atomic, record, record component, array, or array element. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the persistent variable changes value a call is made to the corresponding trap routine. When this routine has been executed program execution continues from where the interrupt occurred. If the persistent variable changes value during a program stop no interrupt will occur when the program starts again. Continues on next page 1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 3HAC 16581-1 Revision: J 166 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. See Instructions - ISignalDI . If subscribed on data such as record component or array element specified in parameter Name , the interrupt will occur every time any part of the data is changed. When executing the trap routine and reading the value of the persistent, there is no guarantee that the value read is the one that triggered the interrupt. Syntax IPers [ Name ’:=’ ] < persistent ( PERS ) of anytype > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 167 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.72. IRMQMessage - Orders RMQ interrupts for a data type Usage IRMQMessage ( Interrupt RAPID Message Queue Message ) is used to order and enable interrupts for a specific data type when using RMQ functionality. Basic examples Basic examples of the instruction IRMQMessage are illustrated below. See also More Examples . Example 1 VAR intnum rmqint; VAR string dummy; ... CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; Orders an interrupt which is to occur each time a new rmqmessage containing the data type string is received. A call is then made to the iroutine1 TRAP routine. Arguments IRMQMessage InterruptDataType Interrupt InterruptDataType Data type: anytype A reference to a variable, persistent or constant of a data type that will generate an interrupt when a rmqmessage with the specified data type is received. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a TRAP routine by means of the instruction CONNECT . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
169
1 Instructions 1.71. IPers - Interrupt at value change of a persistent variable RobotWare - OS 3HAC 16581-1 Revision: J 166 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. See Instructions - ISignalDI . If subscribed on data such as record component or array element specified in parameter Name , the interrupt will occur every time any part of the data is changed. When executing the trap routine and reading the value of the persistent, there is no guarantee that the value read is the one that triggered the interrupt. Syntax IPers [ Name ’:=’ ] < persistent ( PERS ) of anytype > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information about interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 167 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.72. IRMQMessage - Orders RMQ interrupts for a data type Usage IRMQMessage ( Interrupt RAPID Message Queue Message ) is used to order and enable interrupts for a specific data type when using RMQ functionality. Basic examples Basic examples of the instruction IRMQMessage are illustrated below. See also More Examples . Example 1 VAR intnum rmqint; VAR string dummy; ... CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; Orders an interrupt which is to occur each time a new rmqmessage containing the data type string is received. A call is then made to the iroutine1 TRAP routine. Arguments IRMQMessage InterruptDataType Interrupt InterruptDataType Data type: anytype A reference to a variable, persistent or constant of a data type that will generate an interrupt when a rmqmessage with the specified data type is received. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a TRAP routine by means of the instruction CONNECT . Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 168 © Copyright 2004-2010 ABB. All rights reserved. Program execution When the RMQ message with the specified data type is received, a call is made to the corresponding TRAP routine. When this has been executed, program execution continues from where the interrupt occurred. All messages containing data of the same data type regardless of number of dimensions will be handled by the same interrupt. If using different dimensions, use RMQGetMsgHeader to adapt for this. Any message containing data of a data type that no interrupt is connected to will genererate a warning. The RMQSendWait instruction has the highest priority if a message is received and it fits the description for both the expected answer and a message connected to a TRAP routine with instruction IRMQMessage . Not all data types can be used in argument InterruptDataType (see limitations). The interrupt is considered to be a safe interrupt. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. More examples More examples of how to use the instruction IRMQMessage are illustrated below. Example 1 MODULE ReceiverMod VAR intnum intno1; VAR rmqheader rmqheader1; VAR rmqslot rmqslot1; VAR rmqmessage rmqmessage1; PROC main() VAR string interrupt_on_str := stEmpty; CONNECT intno1 WITH RecMsgs; ! Set up interrupts for data type string IRMQMessage interrupt_on_str, intno1; ! Perform cycle WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
170
1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 167 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.72. IRMQMessage - Orders RMQ interrupts for a data type Usage IRMQMessage ( Interrupt RAPID Message Queue Message ) is used to order and enable interrupts for a specific data type when using RMQ functionality. Basic examples Basic examples of the instruction IRMQMessage are illustrated below. See also More Examples . Example 1 VAR intnum rmqint; VAR string dummy; ... CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; Orders an interrupt which is to occur each time a new rmqmessage containing the data type string is received. A call is then made to the iroutine1 TRAP routine. Arguments IRMQMessage InterruptDataType Interrupt InterruptDataType Data type: anytype A reference to a variable, persistent or constant of a data type that will generate an interrupt when a rmqmessage with the specified data type is received. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a TRAP routine by means of the instruction CONNECT . Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 168 © Copyright 2004-2010 ABB. All rights reserved. Program execution When the RMQ message with the specified data type is received, a call is made to the corresponding TRAP routine. When this has been executed, program execution continues from where the interrupt occurred. All messages containing data of the same data type regardless of number of dimensions will be handled by the same interrupt. If using different dimensions, use RMQGetMsgHeader to adapt for this. Any message containing data of a data type that no interrupt is connected to will genererate a warning. The RMQSendWait instruction has the highest priority if a message is received and it fits the description for both the expected answer and a message connected to a TRAP routine with instruction IRMQMessage . Not all data types can be used in argument InterruptDataType (see limitations). The interrupt is considered to be a safe interrupt. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. More examples More examples of how to use the instruction IRMQMessage are illustrated below. Example 1 MODULE ReceiverMod VAR intnum intno1; VAR rmqheader rmqheader1; VAR rmqslot rmqslot1; VAR rmqmessage rmqmessage1; PROC main() VAR string interrupt_on_str := stEmpty; CONNECT intno1 WITH RecMsgs; ! Set up interrupts for data type string IRMQMessage interrupt_on_str, intno1; ! Perform cycle WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 169 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP RecMsgs VAR string receivestr; VAR string client_name; VAR num userdef; ! Get the message from the RMQ RMQGetMessage rmqmessage1; ! Get information about the message RMQGetMsgHeader rmqmessage1 \Header:=rmqheader1 \SenderId:=rmqslot1 \UserDef:=userdef; IF rmqheader1.datatype = "string" AND rmqheader1.ndim = 0 THEN ! Get the data received in rmqmessage1 RMQGetMsgData rmqmessage1, receivestr; client_name := RMQGetSlotName(rmqslot1); TPWrite "Rec string: " + receivestr; TPWrite "User Def: " + ValToStr(userdef); TPWrite "From: " + client_name; ELSE TPWrite "Faulty data received!" ENDIF ENDTRAP ENDMODULE The example show how to set up interrupts for a specific data type. When a message is received, the TRAP RecMsgs is executed and the received data in the message is printed to the FlexPendant. If the data type received or the dimension of the data is different from the expected, this is printed to the FlexPendant. Limitations It is not allowed to execute IRMQMessage in synchronous mode. That will cause a fatal runtime error. It is not possible to setup interrupts, send or receive data instances of data types that are of non-value, semi-value types or data type motsetdata. The same variable for interrupt identity can not be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main () VAR intnum rmqint; VAR mytype dummy; CONNECT rmq1int WITH iroutine1; IRMQMessage dummy, rmqint; WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
171
1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 168 © Copyright 2004-2010 ABB. All rights reserved. Program execution When the RMQ message with the specified data type is received, a call is made to the corresponding TRAP routine. When this has been executed, program execution continues from where the interrupt occurred. All messages containing data of the same data type regardless of number of dimensions will be handled by the same interrupt. If using different dimensions, use RMQGetMsgHeader to adapt for this. Any message containing data of a data type that no interrupt is connected to will genererate a warning. The RMQSendWait instruction has the highest priority if a message is received and it fits the description for both the expected answer and a message connected to a TRAP routine with instruction IRMQMessage . Not all data types can be used in argument InterruptDataType (see limitations). The interrupt is considered to be a safe interrupt. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. More examples More examples of how to use the instruction IRMQMessage are illustrated below. Example 1 MODULE ReceiverMod VAR intnum intno1; VAR rmqheader rmqheader1; VAR rmqslot rmqslot1; VAR rmqmessage rmqmessage1; PROC main() VAR string interrupt_on_str := stEmpty; CONNECT intno1 WITH RecMsgs; ! Set up interrupts for data type string IRMQMessage interrupt_on_str, intno1; ! Perform cycle WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 169 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP RecMsgs VAR string receivestr; VAR string client_name; VAR num userdef; ! Get the message from the RMQ RMQGetMessage rmqmessage1; ! Get information about the message RMQGetMsgHeader rmqmessage1 \Header:=rmqheader1 \SenderId:=rmqslot1 \UserDef:=userdef; IF rmqheader1.datatype = "string" AND rmqheader1.ndim = 0 THEN ! Get the data received in rmqmessage1 RMQGetMsgData rmqmessage1, receivestr; client_name := RMQGetSlotName(rmqslot1); TPWrite "Rec string: " + receivestr; TPWrite "User Def: " + ValToStr(userdef); TPWrite "From: " + client_name; ELSE TPWrite "Faulty data received!" ENDIF ENDTRAP ENDMODULE The example show how to set up interrupts for a specific data type. When a message is received, the TRAP RecMsgs is executed and the received data in the message is printed to the FlexPendant. If the data type received or the dimension of the data is different from the expected, this is printed to the FlexPendant. Limitations It is not allowed to execute IRMQMessage in synchronous mode. That will cause a fatal runtime error. It is not possible to setup interrupts, send or receive data instances of data types that are of non-value, semi-value types or data type motsetdata. The same variable for interrupt identity can not be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main () VAR intnum rmqint; VAR mytype dummy; CONNECT rmq1int WITH iroutine1; IRMQMessage dummy, rmqint; WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 170 © Copyright 2004-2010 ABB. All rights reserved. All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum rmqint; VAR mytype dummy; CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; ... IDelete rmqint; ENDPROC The interrupt is deleted at the end of the program, and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IRMQMessage [ InterruptDataType‘ :=’ ] < reference ( REF ) of anytype > [ Interrupt‘ :=’ ] < variable ( VAR ) of intnum >‘;‘ Related information For information about See Description of the RAPID Message Queue functionality Application manual - Robot communication and I/O control , section RAPID Message Queue . Send data to the queue of a RAPID task or Robot Application Builder client. RMQFindSlot - Find a slot identity from the slot name on page 371 Get the first message from a RAPID Message Queue. RMQGetMessage - Get an RMQ message on page 373 Send data to the queue of a RAPID task or Robot Application Builder client, and wait for an answer from the client. RMQSendWait - Send an RMQ data message and wait for a response on page 390 Extract the header data from a rmqmessage . RMQGetMsgHeader - Get header information from an RMQ message on page 380 Send data to the queue of a RAPID task or Robot Application Builder client. RMQSendMessage - Send an RMQ data message on page 386 Extract the data from a rmqmessage . RMQGetMsgData - Get the data part from an RMQ message on page 377 Get the slot name from a specified slot identity. RMQGetSlotName - Get the name of an RMQ client on page 964 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
172
1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 169 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP RecMsgs VAR string receivestr; VAR string client_name; VAR num userdef; ! Get the message from the RMQ RMQGetMessage rmqmessage1; ! Get information about the message RMQGetMsgHeader rmqmessage1 \Header:=rmqheader1 \SenderId:=rmqslot1 \UserDef:=userdef; IF rmqheader1.datatype = "string" AND rmqheader1.ndim = 0 THEN ! Get the data received in rmqmessage1 RMQGetMsgData rmqmessage1, receivestr; client_name := RMQGetSlotName(rmqslot1); TPWrite "Rec string: " + receivestr; TPWrite "User Def: " + ValToStr(userdef); TPWrite "From: " + client_name; ELSE TPWrite "Faulty data received!" ENDIF ENDTRAP ENDMODULE The example show how to set up interrupts for a specific data type. When a message is received, the TRAP RecMsgs is executed and the received data in the message is printed to the FlexPendant. If the data type received or the dimension of the data is different from the expected, this is printed to the FlexPendant. Limitations It is not allowed to execute IRMQMessage in synchronous mode. That will cause a fatal runtime error. It is not possible to setup interrupts, send or receive data instances of data types that are of non-value, semi-value types or data type motsetdata. The same variable for interrupt identity can not be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main () VAR intnum rmqint; VAR mytype dummy; CONNECT rmq1int WITH iroutine1; IRMQMessage dummy, rmqint; WHILE TRUE DO ... ENDWHILE ENDPROC Continued Continues on next page 1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 170 © Copyright 2004-2010 ABB. All rights reserved. All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum rmqint; VAR mytype dummy; CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; ... IDelete rmqint; ENDPROC The interrupt is deleted at the end of the program, and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IRMQMessage [ InterruptDataType‘ :=’ ] < reference ( REF ) of anytype > [ Interrupt‘ :=’ ] < variable ( VAR ) of intnum >‘;‘ Related information For information about See Description of the RAPID Message Queue functionality Application manual - Robot communication and I/O control , section RAPID Message Queue . Send data to the queue of a RAPID task or Robot Application Builder client. RMQFindSlot - Find a slot identity from the slot name on page 371 Get the first message from a RAPID Message Queue. RMQGetMessage - Get an RMQ message on page 373 Send data to the queue of a RAPID task or Robot Application Builder client, and wait for an answer from the client. RMQSendWait - Send an RMQ data message and wait for a response on page 390 Extract the header data from a rmqmessage . RMQGetMsgHeader - Get header information from an RMQ message on page 380 Send data to the queue of a RAPID task or Robot Application Builder client. RMQSendMessage - Send an RMQ data message on page 386 Extract the data from a rmqmessage . RMQGetMsgData - Get the data part from an RMQ message on page 377 Get the slot name from a specified slot identity. RMQGetSlotName - Get the name of an RMQ client on page 964 Continued 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 171 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.73. ISignalAI - Interrupts from analog input signal Usage ISignalAI ( Interrupt Signal Analog Input ) is used to order and enable interrupts from an analog input signal. Basic examples Basic examples of the instruction ISignalAI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAI ai1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is between 0.5 and 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Example 3 ISignalAI ai1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Arguments ISignalAI [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
173
1 Instructions 1.72. IRMQMessage - Orders RMQ interrupts for a data type FlexPendant Interface, PC Interface, or Multitasking 3HAC 16581-1 Revision: J 170 © Copyright 2004-2010 ABB. All rights reserved. All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum rmqint; VAR mytype dummy; CONNECT rmqint WITH iroutine1; IRMQMessage dummy, rmqint; ... IDelete rmqint; ENDPROC The interrupt is deleted at the end of the program, and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax IRMQMessage [ InterruptDataType‘ :=’ ] < reference ( REF ) of anytype > [ Interrupt‘ :=’ ] < variable ( VAR ) of intnum >‘;‘ Related information For information about See Description of the RAPID Message Queue functionality Application manual - Robot communication and I/O control , section RAPID Message Queue . Send data to the queue of a RAPID task or Robot Application Builder client. RMQFindSlot - Find a slot identity from the slot name on page 371 Get the first message from a RAPID Message Queue. RMQGetMessage - Get an RMQ message on page 373 Send data to the queue of a RAPID task or Robot Application Builder client, and wait for an answer from the client. RMQSendWait - Send an RMQ data message and wait for a response on page 390 Extract the header data from a rmqmessage . RMQGetMsgHeader - Get header information from an RMQ message on page 380 Send data to the queue of a RAPID task or Robot Application Builder client. RMQSendMessage - Send an RMQ data message on page 386 Extract the data from a rmqmessage . RMQGetMsgData - Get the data part from an RMQ message on page 377 Get the slot name from a specified slot identity. RMQGetSlotName - Get the name of an RMQ client on page 964 Continued 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 171 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.73. ISignalAI - Interrupts from analog input signal Usage ISignalAI ( Interrupt Signal Analog Input ) is used to order and enable interrupts from an analog input signal. Basic examples Basic examples of the instruction ISignalAI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAI ai1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is between 0.5 and 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Example 3 ISignalAI ai1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Arguments ISignalAI [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 172 © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalai The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If none of \DPos and \DNeg argument is used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
174
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 171 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.73. ISignalAI - Interrupts from analog input signal Usage ISignalAI ( Interrupt Signal Analog Input ) is used to order and enable interrupts from an analog input signal. Basic examples Basic examples of the instruction ISignalAI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAI ai1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is between 0.5 and 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Example 3 ISignalAI ai1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog input signal ai1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the stored reference value is bigger than 0.1 . Arguments ISignalAI [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 172 © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalai The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If none of \DPos and \DNeg argument is used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 173 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When the signal fulfils the specified conditions (both Condition and DeltaValue ) a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. Conditions for interrupt generation Before the interrupt subscription is ordered, each time the signal is sampled, the value of the signal is read, saved, and later used as a reference value for the DeltaValue condition. At the interrupt subscription time if specified DeltaValue = 0 and after the interrupt subscription time, the signal is sampled. The signal value is then compared to HighValue and LowValue according to Condition and with consideration to DeltaValue to decide if an interrupt should be generated or not. If the new read value satisfies the specified HighValue and LowValue Condition , but its difference compared to the last stored reference value is less or equal to the DeltaValue argument, no interrupt occurs. If the signal difference is not in the specified direction no interrupts will occur (argument \DPos or \DNeg ). The stored reference value for the DeltaValue condition is updated with a newly read value for later use at any sample if the following conditions are satisfied: • Argument Condition with specified HighValue and LowValue (within limits) • Argument DeltaValue (sufficient signal change in any direction independently of specified switch \DPos or \DNeg ) The reference value is only updated at the sample time, not at the interrupt subscription time. An interrupt is also generated at the sample for update of the reference value if the direction of the signal difference is in accordance with the specified argument (any direction, \DPos0 , or \DNeg ). When the \Single switch is used only one interrupt at the most will be generated. If the switch \Single (cyclic interrupt) is not used a new test of the specified conditions (both Condition and DeltaValue ) is made at every sample of the signal value. Acomparison is made between the current signal value and the last stored reference value to decide if an interrupt should be generated or not. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
175
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 172 © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalai The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If none of \DPos and \DNeg argument is used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 173 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When the signal fulfils the specified conditions (both Condition and DeltaValue ) a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. Conditions for interrupt generation Before the interrupt subscription is ordered, each time the signal is sampled, the value of the signal is read, saved, and later used as a reference value for the DeltaValue condition. At the interrupt subscription time if specified DeltaValue = 0 and after the interrupt subscription time, the signal is sampled. The signal value is then compared to HighValue and LowValue according to Condition and with consideration to DeltaValue to decide if an interrupt should be generated or not. If the new read value satisfies the specified HighValue and LowValue Condition , but its difference compared to the last stored reference value is less or equal to the DeltaValue argument, no interrupt occurs. If the signal difference is not in the specified direction no interrupts will occur (argument \DPos or \DNeg ). The stored reference value for the DeltaValue condition is updated with a newly read value for later use at any sample if the following conditions are satisfied: • Argument Condition with specified HighValue and LowValue (within limits) • Argument DeltaValue (sufficient signal change in any direction independently of specified switch \DPos or \DNeg ) The reference value is only updated at the sample time, not at the interrupt subscription time. An interrupt is also generated at the sample for update of the reference value if the direction of the signal difference is in accordance with the specified argument (any direction, \DPos0 , or \DNeg ). When the \Single switch is used only one interrupt at the most will be generated. If the switch \Single (cyclic interrupt) is not used a new test of the specified conditions (both Condition and DeltaValue ) is made at every sample of the signal value. Acomparison is made between the current signal value and the last stored reference value to decide if an interrupt should be generated or not. Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 174 © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at interrupt subscription time xx0500002165 Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
176
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 173 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When the signal fulfils the specified conditions (both Condition and DeltaValue ) a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. Conditions for interrupt generation Before the interrupt subscription is ordered, each time the signal is sampled, the value of the signal is read, saved, and later used as a reference value for the DeltaValue condition. At the interrupt subscription time if specified DeltaValue = 0 and after the interrupt subscription time, the signal is sampled. The signal value is then compared to HighValue and LowValue according to Condition and with consideration to DeltaValue to decide if an interrupt should be generated or not. If the new read value satisfies the specified HighValue and LowValue Condition , but its difference compared to the last stored reference value is less or equal to the DeltaValue argument, no interrupt occurs. If the signal difference is not in the specified direction no interrupts will occur (argument \DPos or \DNeg ). The stored reference value for the DeltaValue condition is updated with a newly read value for later use at any sample if the following conditions are satisfied: • Argument Condition with specified HighValue and LowValue (within limits) • Argument DeltaValue (sufficient signal change in any direction independently of specified switch \DPos or \DNeg ) The reference value is only updated at the sample time, not at the interrupt subscription time. An interrupt is also generated at the sample for update of the reference value if the direction of the signal difference is in accordance with the specified argument (any direction, \DPos0 , or \DNeg ). When the \Single switch is used only one interrupt at the most will be generated. If the switch \Single (cyclic interrupt) is not used a new test of the specified conditions (both Condition and DeltaValue ) is made at every sample of the signal value. Acomparison is made between the current signal value and the last stored reference value to decide if an interrupt should be generated or not. Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 174 © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at interrupt subscription time xx0500002165 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 175 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at each sample after interrupt subscription xx0500002166 Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
177
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 174 © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at interrupt subscription time xx0500002165 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 175 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at each sample after interrupt subscription xx0500002166 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 176 © Copyright 2004-2010 ABB. All rights reserved. Example 1 of interrupt generation xx0500002167 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0, sig1int; Sample 1 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 0 is more than DeltaValue . Sample 2 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 1 is more than DeltaValue . Samples 3, 4, 5 will not generate any interrupt because the signal difference is less than DeltaValue . Sample 6 will generate an interrupt. Samples 7 to 10 will not generate any interrupt because the signal is above HighValue . Sample 11 will not generate any interrupt because the signal difference compared to Sample 6 is equal to DeltaValue . Sample 12 will not generate any interrupt because the signal difference compared to Sample 6 is less than DeltaValue . Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
178
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 175 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Condition for interrupt generation at each sample after interrupt subscription xx0500002166 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 176 © Copyright 2004-2010 ABB. All rights reserved. Example 1 of interrupt generation xx0500002167 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0, sig1int; Sample 1 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 0 is more than DeltaValue . Sample 2 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 1 is more than DeltaValue . Samples 3, 4, 5 will not generate any interrupt because the signal difference is less than DeltaValue . Sample 6 will generate an interrupt. Samples 7 to 10 will not generate any interrupt because the signal is above HighValue . Sample 11 will not generate any interrupt because the signal difference compared to Sample 6 is equal to DeltaValue . Sample 12 will not generate any interrupt because the signal difference compared to Sample 6 is less than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 177 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 2 of interrupt generation xx0500002168 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0. No interrupt will be generated because the signal changes are in the negative direction. Sample 6 will generate an interrupt because the signal value is between HighValue and LowValue , and the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
179
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 176 © Copyright 2004-2010 ABB. All rights reserved. Example 1 of interrupt generation xx0500002167 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0, sig1int; Sample 1 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 0 is more than DeltaValue . Sample 2 will generate an interrupt because the signal value is between HighValue and LowValue and the signal difference compared to Sample 1 is more than DeltaValue . Samples 3, 4, 5 will not generate any interrupt because the signal difference is less than DeltaValue . Sample 6 will generate an interrupt. Samples 7 to 10 will not generate any interrupt because the signal is above HighValue . Sample 11 will not generate any interrupt because the signal difference compared to Sample 6 is equal to DeltaValue . Sample 12 will not generate any interrupt because the signal difference compared to Sample 6 is less than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 177 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 2 of interrupt generation xx0500002168 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0. No interrupt will be generated because the signal changes are in the negative direction. Sample 6 will generate an interrupt because the signal value is between HighValue and LowValue , and the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 178 © Copyright 2004-2010 ABB. All rights reserved. Example 3 of interrupt generation xx0500002169 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI \Single, ai1, AIO_OUTSIDE, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 7 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 sample 8 will generate an interrupt because the signal value is above HighValue , and the signal difference in the positive direction compared to sample 7 is more than DeltaValue . Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
180
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 177 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 2 of interrupt generation xx0500002168 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_BETWEEN, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0. No interrupt will be generated because the signal changes are in the negative direction. Sample 6 will generate an interrupt because the signal value is between HighValue and LowValue , and the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 178 © Copyright 2004-2010 ABB. All rights reserved. Example 3 of interrupt generation xx0500002169 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI \Single, ai1, AIO_OUTSIDE, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 7 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 sample 8 will generate an interrupt because the signal value is above HighValue , and the signal difference in the positive direction compared to sample 7 is more than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 179 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 4 of interrupt generation xx0500002170 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_ALWAYS, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Sample 6 will generate an interrupt because the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Sample 7 and 8 will generate an interrupt because the signal difference in the positive direction compared to previous sample is more than DeltaValue . A new reference value is stored at sample 11 and 12 because the signal is within limits, and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
181
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 178 © Copyright 2004-2010 ABB. All rights reserved. Example 3 of interrupt generation xx0500002169 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI \Single, ai1, AIO_OUTSIDE, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 7 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 sample 8 will generate an interrupt because the signal value is above HighValue , and the signal difference in the positive direction compared to sample 7 is more than DeltaValue . Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 179 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 4 of interrupt generation xx0500002170 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_ALWAYS, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Sample 6 will generate an interrupt because the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Sample 7 and 8 will generate an interrupt because the signal difference in the positive direction compared to previous sample is more than DeltaValue . A new reference value is stored at sample 11 and 12 because the signal is within limits, and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 180 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a subscription of interrupt on an analog input signal, an interrupt will be given for every change in the analog value that satisfies the condition specified when ordering the interrupt subscription. If the analog value is noisy many interrupts can be generated even if only one or two bits in the analog value are changed. To avoid generating interrupts for small changes of the analog input value, set the DeltaValue to a level greater than 0. Then no interrupts will be generated until a change of the analog value is greater than the specified DeltaValue . Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog input signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDI . Syntax ISignalAI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalai>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [[’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
182
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 179 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 4 of interrupt generation xx0500002170 Assuming the interrupt is ordered between sample 0 and 1, the following instruction will give the following results: ISignalAI ai1, AIO_ALWAYS, 6.1, 2.2, 1.0 \DPos, sig1int; A new reference value is stored at sample 1 and 2 because the signal is within limits and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Sample 6 will generate an interrupt because the signal difference in the positive direction compared to sample 2 is more than DeltaValue . Sample 7 and 8 will generate an interrupt because the signal difference in the positive direction compared to previous sample is more than DeltaValue . A new reference value is stored at sample 11 and 12 because the signal is within limits, and the absolute signal difference between the current value and the last stored reference value is greater than 1.0 Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 180 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a subscription of interrupt on an analog input signal, an interrupt will be given for every change in the analog value that satisfies the condition specified when ordering the interrupt subscription. If the analog value is noisy many interrupts can be generated even if only one or two bits in the analog value are changed. To avoid generating interrupts for small changes of the analog input value, set the DeltaValue to a level greater than 0. Then no interrupts will be generated until a change of the analog value is greater than the specified DeltaValue . Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog input signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDI . Syntax ISignalAI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalai>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [[’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 181 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
183
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 3HAC 16581-1 Revision: J 180 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a subscription of interrupt on an analog input signal, an interrupt will be given for every change in the analog value that satisfies the condition specified when ordering the interrupt subscription. If the analog value is noisy many interrupts can be generated even if only one or two bits in the analog value are changed. To avoid generating interrupts for small changes of the analog input value, set the DeltaValue to a level greater than 0. Then no interrupts will be generated until a change of the analog value is greater than the specified DeltaValue . Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog input signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDI . Syntax ISignalAI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalai>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [[’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page 1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 181 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 182 © Copyright 2004-2010 ABB. All rights reserved. 1.74. ISignalAO - Interrupts from analog output signal Usage ISignalAO ( Interrupt Signal Analog Output ) is used to order and enable interrupts from an analog output signal. Basic examples Basic examples of the instruction ISignalAO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAO \Single, ao1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog output signal ao1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAO ao1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is between 0.5 and 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Example 3 ISignalAO ao1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Arguments ISignalAO [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set the interrupt occurs once at the most. If the Single and SingleSafe argument is omitted an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
184
1 Instructions 1.73. ISignalAI - Interrupts from analog input signal RobotWare - OS 181 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 182 © Copyright 2004-2010 ABB. All rights reserved. 1.74. ISignalAO - Interrupts from analog output signal Usage ISignalAO ( Interrupt Signal Analog Output ) is used to order and enable interrupts from an analog output signal. Basic examples Basic examples of the instruction ISignalAO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAO \Single, ao1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog output signal ao1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAO ao1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is between 0.5 and 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Example 3 ISignalAO ao1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Arguments ISignalAO [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set the interrupt occurs once at the most. If the Single and SingleSafe argument is omitted an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 183 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalao The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the previous stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If neither of the \DPos and \DNeg arguments are used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
185
1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 182 © Copyright 2004-2010 ABB. All rights reserved. 1.74. ISignalAO - Interrupts from analog output signal Usage ISignalAO ( Interrupt Signal Analog Output ) is used to order and enable interrupts from an analog output signal. Basic examples Basic examples of the instruction ISignalAO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAO \Single, ao1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog output signal ao1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Example 2 ISignalAO ao1, AIO_BETWEEN, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is between 0.5 and 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Example 3 ISignalAO ao1, AIO_OUTSIDE, 1.5, 0.5, 0.1, sig1int; Orders an interrupt which is to occur each time the logical value of the analog output signal ao1 is lower than 0.5 or higher than 1.5 , and the absolute signal difference compared to the previous stored reference value is bigger than 0.1. Arguments ISignalAO [\Single] | [\SingleSafe] Signal Condition HighValue LowValue DeltaValue [\DPos] | [\DNeg] Interrupt [\Single] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set the interrupt occurs once at the most. If the Single and SingleSafe argument is omitted an interrupt will occur each time its condition is satisfied. [\SingleSafe] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 183 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalao The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the previous stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If neither of the \DPos and \DNeg arguments are used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 184 © Copyright 2004-2010 ABB. All rights reserved. Program execution See instruction ISignalAI for information about: • Program execution • Condition for interrupt generation • More examples Same principles are valid for ISignalAO as for ISignalAI . Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog output signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value, defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDO . Syntax ISignalAO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalao>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
186
1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 183 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Signal Data type: signalao The name of the signal that is to generate interrupts. Condition Data type: aiotrigg Specifies how HighValue and LowValue define the condition to be satisfied: HighValue Data type: num High logical value to define the condition. LowValue Data type: num Low logical value to define the condition. DeltaValue Data type: num Defines the minimum logical signal difference before generation of a new interrupt. The current signal value compared to the previous stored reference value must be greater than the specified DeltaValue before generation of a new interrupt. [\DPos] Data type: switch Specifies that only positive logical signal differences will give new interrupts. [\DNeg] Data type: switch Specifies that only negative logical signal differences will give new interrupts. If neither of the \DPos and \DNeg arguments are used, both positive and negative differences will generate new interrupts. Interrupt Data type: intnum The interrupt identity. This interrupt should have previously been connected to a trap routine by means of the instruction CONNECT . Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continued Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 184 © Copyright 2004-2010 ABB. All rights reserved. Program execution See instruction ISignalAI for information about: • Program execution • Condition for interrupt generation • More examples Same principles are valid for ISignalAO as for ISignalAI . Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog output signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value, defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDO . Syntax ISignalAO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalao>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 185 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management RAPID reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
187
1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 3HAC 16581-1 Revision: J 184 © Copyright 2004-2010 ABB. All rights reserved. Program execution See instruction ISignalAI for information about: • Program execution • Condition for interrupt generation • More examples Same principles are valid for ISignalAO as for ISignalAI . Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. ERR_AO_LIM if the programmed HighValue or LowValue argument for the specified analog output signal Signal is outside limits. Limitations The HighValue and LowValue arguments should be in the range: logical maximum value, logical minimum value, defined for the signal. HighValue must be above LowValue . DeltaValue must be 0 or positive. The limitations for the interrupt identity are the same as for ISignalDO . Syntax ISignalAO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal’:=’ ]<variable ( VAR ) of signalao>’,’ [ Condition’:=’ ]<expression ( IN ) of aiotrigg>’,’ [ HighValue’:=’ ]<expression ( IN ) of num>’,’ [ LowValue’:=’ ]<expression ( IN ) of num>’,’ [ DeltaValue’:=’ ]<expression ( IN ) of num> [’\’DPos] | [ ’\’DNeg] ’,’] [ Interrupt’:=’ ]<variable ( VAR ) of intnum>’;’ Continued Continues on next page 1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 185 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management RAPID reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 186 © Copyright 2004-2010 ABB. All rights reserved. 1.75. ISignalDI - Orders interrupts from a digital input signal Usage ISignalDI ( Interrupt Signal Digital In ) is used to order and enable interrupts from a digital input signal. Basic examples Basic examples of the instruction ISignalDI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1,1,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDI di1,0,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 0 . Example 3 ISignalDI \Single, di1,1,sig1int; Orders an interrupt which is to occur only the first time the digital input signal di1 is set to 1 . Arguments ISignalDI [ \Single] | [ \SingleSafe] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldi The name of the signal that is to generate interrupts. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
188
1 Instructions 1.74. ISignalAO - Interrupts from analog output signal RobotWare - OS 185 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Definition of constants aiotrigg - Analog I/O trigger condition on page 1083 Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from digital input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from digital output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management RAPID reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Related system parameters (filter) Technical reference manual - System parameters , section IO signals Continued 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 186 © Copyright 2004-2010 ABB. All rights reserved. 1.75. ISignalDI - Orders interrupts from a digital input signal Usage ISignalDI ( Interrupt Signal Digital In ) is used to order and enable interrupts from a digital input signal. Basic examples Basic examples of the instruction ISignalDI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1,1,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDI di1,0,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 0 . Example 3 ISignalDI \Single, di1,1,sig1int; Orders an interrupt which is to occur only the first time the digital input signal di1 is set to 1 . Arguments ISignalDI [ \Single] | [ \SingleSafe] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldi The name of the signal that is to generate interrupts. Continues on next page 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 187 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital input signal at signal level 1 is illustrated in the figure below. xx0500002189 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
189
1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 186 © Copyright 2004-2010 ABB. All rights reserved. 1.75. ISignalDI - Orders interrupts from a digital input signal Usage ISignalDI ( Interrupt Signal Digital In ) is used to order and enable interrupts from a digital input signal. Basic examples Basic examples of the instruction ISignalDI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1,1,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDI di1,0,sig1int; Orders an interrupt which is to occur each time the digital input signal di1 is set to 0 . Example 3 ISignalDI \Single, di1,1,sig1int; Orders an interrupt which is to occur only the first time the digital input signal di1 is set to 1 . Arguments ISignalDI [ \Single] | [ \SingleSafe] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldi The name of the signal that is to generate interrupts. Continues on next page 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 187 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital input signal at signal level 1 is illustrated in the figure below. xx0500002189 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 188 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldi > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
190
1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 187 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value a call is made to the corresponding trap routine. When this has been executed, program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital input signal at signal level 1 is illustrated in the figure below. xx0500002189 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page 1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 188 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldi > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 189 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.76. ISignalDO - Interrupts from a digital output signal Usage ISignalDO ( Interrupt Signal Digital Out ) is used to order and enable interrupts from a digital output signal. Basic examples Basic examples of the instruction ISignalDO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1,1,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDO do1,0,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 0 . Example 3 ISignalDO\Single, do1,1,sig1int; Orders an interrupt which is to occur only the first time the digital output signal do1 is set to 1 . Arguments ISignalDO [ \Single ] | [ \SingleSafe ] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldo The name of the signal that is to generate interrupts. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
191
1 Instructions 1.75. ISignalDI - Orders interrupts from a digital input signal RobotWare - OS 3HAC 16581-1 Revision: J 188 © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldi > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 189 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.76. ISignalDO - Interrupts from a digital output signal Usage ISignalDO ( Interrupt Signal Digital Out ) is used to order and enable interrupts from a digital output signal. Basic examples Basic examples of the instruction ISignalDO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1,1,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDO do1,0,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 0 . Example 3 ISignalDO\Single, do1,1,sig1int; Orders an interrupt which is to occur only the first time the digital output signal do1 is set to 1 . Arguments ISignalDO [ \Single ] | [ \SingleSafe ] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldo The name of the signal that is to generate interrupts. Continues on next page 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 190 © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value 0 or 1, a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital output signal at signal level 1 is illustrated in the figure below. xx0500002190 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
192
1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 189 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.76. ISignalDO - Interrupts from a digital output signal Usage ISignalDO ( Interrupt Signal Digital Out ) is used to order and enable interrupts from a digital output signal. Basic examples Basic examples of the instruction ISignalDO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1,1,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 1 . A call is then made to the iroutine1 trap routine. Example 2 ISignalDO do1,0,sig1int; Orders an interrupt which is to occur each time the digital output signal do1 is set to 0 . Example 3 ISignalDO\Single, do1,1,sig1int; Orders an interrupt which is to occur only the first time the digital output signal do1 is set to 1 . Arguments ISignalDO [ \Single ] | [ \SingleSafe ] Signal TriggValue Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signaldo The name of the signal that is to generate interrupts. Continues on next page 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 190 © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value 0 or 1, a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital output signal at signal level 1 is illustrated in the figure below. xx0500002190 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 191 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
193
1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 3HAC 16581-1 Revision: J 190 © Copyright 2004-2010 ABB. All rights reserved. TriggValue Data type: dionum The value to which the signal must change for an interrupt to occur. The value is specified as 0 or 1 or as a symbolic value (e.g. high/low ). The signal is edge- triggered upon changeover to 0 or 1. TriggValue 2 or symbolic value edge can be used for generation of interrupts on both positive flank (0 -> 1) and negative flank (1 -> 0). Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the signal assumes the specified value 0 or 1, a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes to the specified value before the interrupt is ordered no interrupt occurs. Interrupts from a digital output signal at signal level 1 is illustrated in the figure below. xx0500002190 Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Continued Continues on next page 1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 191 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 192 © Copyright 2004-2010 ABB. All rights reserved. 1.77. ISignalGI - Orders interrupts from a group of digital input signals Usage ISignalGI ( Interrupt Signal Group Digital In ) is used to order and enable interrupts from a group of digital input signals. Basic examples Basic examples of the instruction ISignalGI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1,sig1int; Orders an interrupt when a digital input group signal changes value. Arguments ISignalGI [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgi The name of the group input signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
194
1 Instructions 1.76. ISignalDO - Interrupts from a digital output signal RobotWare - OS 191 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDO do1, 1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalDO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signaldo > ’,’ [ TriggValue’ :=’ ] < expression ( IN ) of dionum > ’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 192 © Copyright 2004-2010 ABB. All rights reserved. 1.77. ISignalGI - Orders interrupts from a group of digital input signals Usage ISignalGI ( Interrupt Signal Group Digital In ) is used to order and enable interrupts from a group of digital input signals. Basic examples Basic examples of the instruction ISignalGI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1,sig1int; Orders an interrupt when a digital input group signal changes value. Arguments ISignalGI [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgi The name of the group input signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 193 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The interrupts are generated as bit interrupts, e.g. interrupts on single digital input signal change within the group. If the bits in the group signal change value with a delay between settings, several interrupts will be generated. Knowledege about how the I/O board works is necessary to get right functionality when using ISignalGI . If several interrupts are generated at group input settings, use instead ISignalDI on a strobe signal that are set when all bits in the group signal have been set. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgi > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
195
1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 192 © Copyright 2004-2010 ABB. All rights reserved. 1.77. ISignalGI - Orders interrupts from a group of digital input signals Usage ISignalGI ( Interrupt Signal Group Digital In ) is used to order and enable interrupts from a group of digital input signals. Basic examples Basic examples of the instruction ISignalGI are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1,sig1int; Orders an interrupt when a digital input group signal changes value. Arguments ISignalGI [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgi The name of the group input signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 193 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The interrupts are generated as bit interrupts, e.g. interrupts on single digital input signal change within the group. If the bits in the group signal change value with a delay between settings, several interrupts will be generated. Knowledege about how the I/O board works is necessary to get right functionality when using ISignalGI . If several interrupts are generated at group input settings, use instead ISignalDI on a strobe signal that are set when all bits in the group signal have been set. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgi > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 194 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from group output signals ISignalGO - Orders interrupts from a group of digital output signals on page 195 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
196
1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 193 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The interrupts are generated as bit interrupts, e.g. interrupts on single digital input signal change within the group. If the bits in the group signal change value with a delay between settings, several interrupts will be generated. Knowledege about how the I/O board works is necessary to get right functionality when using ISignalGI . If several interrupts are generated at group input settings, use instead ISignalDI on a strobe signal that are set when all bits in the group signal have been set. The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGI gi1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGI [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgi > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page 1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 194 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from group output signals ISignalGO - Orders interrupts from a group of digital output signals on page 195 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 195 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.78. ISignalGO - Orders interrupts from a group of digital output signals Usage ISignalGO ( Interrupt Signal Group Digital Out ) is used to order and enable interrupts from a group of digital output signals. Basic examples Basic examples of the instruction ISignalGO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1,sig1int; Orders an interrupt when a digital output group signal change value. Arguments ISignalGO [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument \ Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgo The name of the group output signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
197
1 Instructions 1.77. ISignalGI - Orders interrupts from a group of digital input signals RobotWare - OS 3HAC 16581-1 Revision: J 194 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an input signal ISignalDI - Orders interrupts from a digital input signal on page 186 Interrupt from group output signals ISignalGO - Orders interrupts from a group of digital output signals on page 195 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 195 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.78. ISignalGO - Orders interrupts from a group of digital output signals Usage ISignalGO ( Interrupt Signal Group Digital Out ) is used to order and enable interrupts from a group of digital output signals. Basic examples Basic examples of the instruction ISignalGO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1,sig1int; Orders an interrupt when a digital output group signal change value. Arguments ISignalGO [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument \ Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgo The name of the group output signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 3HAC 16581-1 Revision: J 196 © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgo > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
198
1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 195 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.78. ISignalGO - Orders interrupts from a group of digital output signals Usage ISignalGO ( Interrupt Signal Group Digital Out ) is used to order and enable interrupts from a group of digital output signals. Basic examples Basic examples of the instruction ISignalGO are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1,sig1int; Orders an interrupt when a digital output group signal change value. Arguments ISignalGO [ \Single ] | [ \SingleSafe ] Signal Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument \ Single is set, the interrupt occurs once at the most. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time its condition is satisfied. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. The only time a safe interrupt will be thrown is when the interrupt queue is full. Then an error will be reported. The interrupt will not survive program reset, e.g. PP to main. Signal Data type: signalgo The name of the group output signal that generates interrupts. Interrupt Data type: intnum The interrupt identity. This should have previously been connected to a trap routine by means of the instruction CONNECT . Program execution When the group signal changes value a call is made to the corresponding trap routine. When this has been executed program execution continues from where the interrupt occurred. If the signal changes before the interrupt is ordered no interrupt occurs. Continues on next page 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 3HAC 16581-1 Revision: J 196 © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgo > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 197 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 Interrupt from group input signals ISignalGI - Orders interrupts from a group of digital input signals on page 192 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
199
1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 3HAC 16581-1 Revision: J 196 © Copyright 2004-2010 ABB. All rights reserved. Error handling Following recoverable error can be generated. The error can be handled in an error handler. The system variable ERRNO will be set to: ERR_NORUNUNIT if there is no contact with the unit. Limitations Maximum number of signals that can be used for a group is 32. Numeric value condition can not be used in the instruction to specify that an interrupt should occur on changes to that specific value. This must be handled in the user program by reading the group signal value at execution of the TRAP . The same variable for interrupt identity cannot be used more than once without first deleting it. Interrupts should therefore be handled as shown in one of the alternatives below. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; WHILE TRUE DO ... ENDWHILE ENDPROC All activation of interrupts is done at the beginning of the program. These beginning instructions are then kept outside the main flow of the program. PROC main ( ) VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalGO go1, sig1int; ... IDelete sig1int; ENDPROC The interrupt is deleted at the end of the program and is then reactivated. It should be noted, in this case, that the interrupt is inactive for a short period. Syntax ISignalGO [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Signal ’:=’ ] < variable ( VAR ) of signalgo > ’,’ [ Interrupt’:=’ ] < variable ( VAR ) of intnum > ’;’ Continued Continues on next page 1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 197 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 Interrupt from group input signals ISignalGI - Orders interrupts from a group of digital input signals on page 192 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 3HAC 16581-1 Revision: J 198 © Copyright 2004-2010 ABB. All rights reserved. 1.79. ISleep - Deactivates an interrupt Usage ISleep ( Interrupt Sleep ) is used to deactivate an individual interrupt temporarily. During the deactivation time any generated interrupts of the specified type are discarded without any trap execution. Basic examples Basic examples of the instruction are illustrated below. See also More examples on page 198 . Example 1 ISleep sig1int; The interrupt sig1int is deactivated. Arguments ISleep Interrupt Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. Program execution Any generated interrupts of the specified type are discarded without any trap execution until the interrupt has been re-activated by means of the instruction IWatch . Interrupts which are generated while ISleep is in effect are ignored. More examples More examples of the instruction ISleep are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... ISleep timeint; WriteBin ch1, buffer, 30; IWatch timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
200
1 Instructions 1.78. ISignalGO - Orders interrupts from a group of digital output signals RobotWare - OS 197 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID Summary - Interrupts Interrupt from an output signal ISignalDO - Interrupts from a digital output signal on page 189 Interrupt from group input signals ISignalGI - Orders interrupts from a group of digital input signals on page 192 More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics - Interrupts Interrupt identity intnum - Interrupt identity on page 1125 Continued 1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 3HAC 16581-1 Revision: J 198 © Copyright 2004-2010 ABB. All rights reserved. 1.79. ISleep - Deactivates an interrupt Usage ISleep ( Interrupt Sleep ) is used to deactivate an individual interrupt temporarily. During the deactivation time any generated interrupts of the specified type are discarded without any trap execution. Basic examples Basic examples of the instruction are illustrated below. See also More examples on page 198 . Example 1 ISleep sig1int; The interrupt sig1int is deactivated. Arguments ISleep Interrupt Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. Program execution Any generated interrupts of the specified type are discarded without any trap execution until the interrupt has been re-activated by means of the instruction IWatch . Interrupts which are generated while ISleep is in effect are ignored. More examples More examples of the instruction ISleep are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... ISleep timeint; WriteBin ch1, buffer, 30; IWatch timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Continues on next page 1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 199 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. When, however, communication is in progress these interrupts are not permitted. Error handling Interrupts which have neither been ordered nor enabled are not permitted. If the interrupt number is unknown the system variable ERRNO will be set to ERR_UNKINO (see errnum - Error number on page 1108 ). If trying to deactivate a safe interrupt temporarily with ISleep , the system variable ERRNO is set to ERR_INOISSAFE . These errors can be handled in an error handler. Syntax ISleep [ Interrupt ‘:=’ ] < variable ( VAR ) of intnum > ‘;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Enabling an interrupt IWatch - Activates an interrupt on page 205 Disabling all interrupts IDisable - Disables interrupts on page 124 Cancelling an interrupt IDelete - Cancels an interrupt on page 123 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
201
1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 3HAC 16581-1 Revision: J 198 © Copyright 2004-2010 ABB. All rights reserved. 1.79. ISleep - Deactivates an interrupt Usage ISleep ( Interrupt Sleep ) is used to deactivate an individual interrupt temporarily. During the deactivation time any generated interrupts of the specified type are discarded without any trap execution. Basic examples Basic examples of the instruction are illustrated below. See also More examples on page 198 . Example 1 ISleep sig1int; The interrupt sig1int is deactivated. Arguments ISleep Interrupt Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. Program execution Any generated interrupts of the specified type are discarded without any trap execution until the interrupt has been re-activated by means of the instruction IWatch . Interrupts which are generated while ISleep is in effect are ignored. More examples More examples of the instruction ISleep are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... ISleep timeint; WriteBin ch1, buffer, 30; IWatch timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Continues on next page 1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 199 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. When, however, communication is in progress these interrupts are not permitted. Error handling Interrupts which have neither been ordered nor enabled are not permitted. If the interrupt number is unknown the system variable ERRNO will be set to ERR_UNKINO (see errnum - Error number on page 1108 ). If trying to deactivate a safe interrupt temporarily with ISleep , the system variable ERRNO is set to ERR_INOISSAFE . These errors can be handled in an error handler. Syntax ISleep [ Interrupt ‘:=’ ] < variable ( VAR ) of intnum > ‘;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Enabling an interrupt IWatch - Activates an interrupt on page 205 Disabling all interrupts IDisable - Disables interrupts on page 124 Cancelling an interrupt IDelete - Cancels an interrupt on page 123 Continued 1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 3HAC 16581-1 Revision: J 200 © Copyright 2004-2010 ABB. All rights reserved. 1.80. ITimer - Orders a timed interrupt Usage ITimer ( Interrupt Timer ) is used to order and enable a timed interrupt. This instruction can be used, for example, to check the status of peripheral equipment once every minute. Basic examples Basic examples of the instruction ITimer are illustrated below. See also More examples on page 201 . Example 1 VAR intnum timeint; CONNECT timeint WITH iroutine1; ITimer 60, timeint; Orders an interrupt that is to occur cyclically every 60 seconds. A call is then made to the trap routine iroutine1 . Example 2 ITimer \Single, 60, timeint; Orders an interrupt that is to occur once, after 60 seconds. Arguments ITimer [ \Single ] | [ \SingleSafe ] Time Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs only once. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time at the specified time. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. Time Data type: num The amount of time that must lapse before the interrupt occurs. The value is specified in seconds. If Single or SingleSafe is set this time may not be less than 0.01 seconds. The corresponding time for cyclical interrupts is 0.1 seconds. Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
202
1 Instructions 1.79. ISleep - Deactivates an interrupt RobotWare - OS 199 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. When, however, communication is in progress these interrupts are not permitted. Error handling Interrupts which have neither been ordered nor enabled are not permitted. If the interrupt number is unknown the system variable ERRNO will be set to ERR_UNKINO (see errnum - Error number on page 1108 ). If trying to deactivate a safe interrupt temporarily with ISleep , the system variable ERRNO is set to ERR_INOISSAFE . These errors can be handled in an error handler. Syntax ISleep [ Interrupt ‘:=’ ] < variable ( VAR ) of intnum > ‘;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts Enabling an interrupt IWatch - Activates an interrupt on page 205 Disabling all interrupts IDisable - Disables interrupts on page 124 Cancelling an interrupt IDelete - Cancels an interrupt on page 123 Continued 1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 3HAC 16581-1 Revision: J 200 © Copyright 2004-2010 ABB. All rights reserved. 1.80. ITimer - Orders a timed interrupt Usage ITimer ( Interrupt Timer ) is used to order and enable a timed interrupt. This instruction can be used, for example, to check the status of peripheral equipment once every minute. Basic examples Basic examples of the instruction ITimer are illustrated below. See also More examples on page 201 . Example 1 VAR intnum timeint; CONNECT timeint WITH iroutine1; ITimer 60, timeint; Orders an interrupt that is to occur cyclically every 60 seconds. A call is then made to the trap routine iroutine1 . Example 2 ITimer \Single, 60, timeint; Orders an interrupt that is to occur once, after 60 seconds. Arguments ITimer [ \Single ] | [ \SingleSafe ] Time Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs only once. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time at the specified time. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. Time Data type: num The amount of time that must lapse before the interrupt occurs. The value is specified in seconds. If Single or SingleSafe is set this time may not be less than 0.01 seconds. The corresponding time for cyclical interrupts is 0.1 seconds. Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . Continues on next page 1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 201 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The corresponding trap routine is automatically called at a given time following the interrupt order. When this has been executed program execution continues from where the interrupt occurred. If the interrupt occurs cyclically a new computation of time is started from when the interrupt occurs. More examples More examples of the instruction ITimer are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. If it is not program execution is terminated and an error message appears. Limitations The same variable for interrupt identity cannot be used more than once without being first deleted. See Instructions - ISignalDI . Syntax ITimer [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Time ’:=’ ] < expression ( IN ) of num >’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
203
1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 3HAC 16581-1 Revision: J 200 © Copyright 2004-2010 ABB. All rights reserved. 1.80. ITimer - Orders a timed interrupt Usage ITimer ( Interrupt Timer ) is used to order and enable a timed interrupt. This instruction can be used, for example, to check the status of peripheral equipment once every minute. Basic examples Basic examples of the instruction ITimer are illustrated below. See also More examples on page 201 . Example 1 VAR intnum timeint; CONNECT timeint WITH iroutine1; ITimer 60, timeint; Orders an interrupt that is to occur cyclically every 60 seconds. A call is then made to the trap routine iroutine1 . Example 2 ITimer \Single, 60, timeint; Orders an interrupt that is to occur once, after 60 seconds. Arguments ITimer [ \Single ] | [ \SingleSafe ] Time Interrupt [ \Single ] Data type: switch Specifies whether the interrupt is to occur once or cyclically. If the argument Single is set, the interrupt occurs only once. If the Single and SingleSafe arguments is omitted, an interrupt will occur each time at the specified time. [ \SingleSafe ] Data type: switch Specifies that the interrupt is single and safe. For definition of single, see description of Single argument. A safe interrupt can not be put in sleep with instruction ISleep . The safe interrupt event will be queued at program stop and stepwise execution, and when starting in continious mode again, the interrupt will be executed. Time Data type: num The amount of time that must lapse before the interrupt occurs. The value is specified in seconds. If Single or SingleSafe is set this time may not be less than 0.01 seconds. The corresponding time for cyclical interrupts is 0.1 seconds. Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . Continues on next page 1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 201 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The corresponding trap routine is automatically called at a given time following the interrupt order. When this has been executed program execution continues from where the interrupt occurred. If the interrupt occurs cyclically a new computation of time is started from when the interrupt occurs. More examples More examples of the instruction ITimer are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. If it is not program execution is terminated and an error message appears. Limitations The same variable for interrupt identity cannot be used more than once without being first deleted. See Instructions - ISignalDI . Syntax ITimer [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Time ’:=’ ] < expression ( IN ) of num >’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Continued 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 3HAC 16581-1 Revision: J 202 © Copyright 2004-2010 ABB. All rights reserved. 1.81. IVarValue - orders a variable value interrupt Usage IVarValue ( Interrupt Variable Value ) is used to order and enable an interrupt when the value of a variable accessed via the serial sensor interface has been changed. This instruction can be used, for example, to get seam volume or gap values from a seam tracker. Basic examples Basic examples of the instruction IVarValue are illustrated below. Example 1 LOCAL PERS num adptVlt{25}:=[1,1.2,1.4,1.6,1.8,2,2.16667,2.33333,2.5,...]; LOCAL PERS num adptWfd{25}:=[2,2.2,2.4,2.6,2.8,3,3.16667,3.33333,3.5,...]; LOCAL PERS num adptSpd{25}:=10,12,14,16,18,20,21.6667,23.3333,25[,...]; LOCAL CONST num GAP_VARIABLE_NO:=11; PERS num gap_value; VAR intnum IntAdap; PROC main() ! Setup the interrupt. The trap routine AdapTrp will be called ! when the gap variable with number ´GAP_VARIABLE_NO’ in the !sensor interface has been changed. The new value will be ! available in the PERS gp_value variable. ! Connect to the sensor device "sen1:" (defined in sio.cfg). SenDevice "sen1:"; CONNECT IntAdap WITH AdapTrp; IVarValue "sen1:", GAP_VARIABLE_NO, gap_value, IntAdap; ! Start welding ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ENDPROC Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
204
1 Instructions 1.80. ITimer - Orders a timed interrupt RobotWare - OS 201 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The corresponding trap routine is automatically called at a given time following the interrupt order. When this has been executed program execution continues from where the interrupt occurred. If the interrupt occurs cyclically a new computation of time is started from when the interrupt occurs. More examples More examples of the instruction ITimer are illustrated below. Example 1 VAR intnum timeint; CONNECT timeint WITH check_serialch; ITimer 60, timeint; ... TRAP check_serialch WriteBin ch1, buffer, 1; IF ReadBin(ch1\Time:=5) < 0 THEN TPWrite "The serial communication is broken"; EXIT; ENDIF ENDTRAP Communication across the ch1 serial channel is monitored by means of interrupts which are generated every 60 seconds. The trap routine checks whether the communication is working. If it is not program execution is terminated and an error message appears. Limitations The same variable for interrupt identity cannot be used more than once without being first deleted. See Instructions - ISignalDI . Syntax ITimer [ ’\’ Single ] | [ ’\’ SingleSafe ] ’,’ [ Time ’:=’ ] < expression ( IN ) of num >’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’;’ Related information For information about See Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic Characteristics- Interrupts Continued 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 3HAC 16581-1 Revision: J 202 © Copyright 2004-2010 ABB. All rights reserved. 1.81. IVarValue - orders a variable value interrupt Usage IVarValue ( Interrupt Variable Value ) is used to order and enable an interrupt when the value of a variable accessed via the serial sensor interface has been changed. This instruction can be used, for example, to get seam volume or gap values from a seam tracker. Basic examples Basic examples of the instruction IVarValue are illustrated below. Example 1 LOCAL PERS num adptVlt{25}:=[1,1.2,1.4,1.6,1.8,2,2.16667,2.33333,2.5,...]; LOCAL PERS num adptWfd{25}:=[2,2.2,2.4,2.6,2.8,3,3.16667,3.33333,3.5,...]; LOCAL PERS num adptSpd{25}:=10,12,14,16,18,20,21.6667,23.3333,25[,...]; LOCAL CONST num GAP_VARIABLE_NO:=11; PERS num gap_value; VAR intnum IntAdap; PROC main() ! Setup the interrupt. The trap routine AdapTrp will be called ! when the gap variable with number ´GAP_VARIABLE_NO’ in the !sensor interface has been changed. The new value will be ! available in the PERS gp_value variable. ! Connect to the sensor device "sen1:" (defined in sio.cfg). SenDevice "sen1:"; CONNECT IntAdap WITH AdapTrp; IVarValue "sen1:", GAP_VARIABLE_NO, gap_value, IntAdap; ! Start welding ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ENDPROC Continues on next page 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 203 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP AdapTrap VAR num ArrInd; !Scale the raw gap value received ArrInd:=ArrIndx(gap_value); ! Update active welddata PERS variable ‘adaptWd’ with new data ! from the arrays of predefined parameter arrays. The scaled gap ! value is used as index in the voltage, wirefeed and ! speed arrays. adaptWd.weld_voltage:=adptVlt{ArrInd}; adaptWd.weld_wirefeed:=adptWfd{ArrInd}; adaptWd.weld_speed:=adptSpd{ArrInd}; !Request a refresh of AW parameters using the new data i adaptWd ArcRefresh; ENDTRAP Arguments IVarValue device VarNo Value Interrupt [ \Unit ] [ \DeadBand ] device Data type: string The I/O device name configured in sio.cfg for the sensor used. VarNo Data type: num The number of the variable to be supervised. Value Data type: num A PERS variable which will hold the new value of VarNo . Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . [ \Unit ] Data type: num Scale factor with which the sensor value for VarNo is multiplied before check and before it is saved in Value . [ \DeadBand ] Data type: num If the value for Varno , returned by the sensor, is within +/- DeadBand no interrupt is generated. Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
205
1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 3HAC 16581-1 Revision: J 202 © Copyright 2004-2010 ABB. All rights reserved. 1.81. IVarValue - orders a variable value interrupt Usage IVarValue ( Interrupt Variable Value ) is used to order and enable an interrupt when the value of a variable accessed via the serial sensor interface has been changed. This instruction can be used, for example, to get seam volume or gap values from a seam tracker. Basic examples Basic examples of the instruction IVarValue are illustrated below. Example 1 LOCAL PERS num adptVlt{25}:=[1,1.2,1.4,1.6,1.8,2,2.16667,2.33333,2.5,...]; LOCAL PERS num adptWfd{25}:=[2,2.2,2.4,2.6,2.8,3,3.16667,3.33333,3.5,...]; LOCAL PERS num adptSpd{25}:=10,12,14,16,18,20,21.6667,23.3333,25[,...]; LOCAL CONST num GAP_VARIABLE_NO:=11; PERS num gap_value; VAR intnum IntAdap; PROC main() ! Setup the interrupt. The trap routine AdapTrp will be called ! when the gap variable with number ´GAP_VARIABLE_NO’ in the !sensor interface has been changed. The new value will be ! available in the PERS gp_value variable. ! Connect to the sensor device "sen1:" (defined in sio.cfg). SenDevice "sen1:"; CONNECT IntAdap WITH AdapTrp; IVarValue "sen1:", GAP_VARIABLE_NO, gap_value, IntAdap; ! Start welding ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ArcL\On,*,v100,adaptSm,adaptWd,adaptWv,z10,tool\j\Track:=track; ENDPROC Continues on next page 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 203 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP AdapTrap VAR num ArrInd; !Scale the raw gap value received ArrInd:=ArrIndx(gap_value); ! Update active welddata PERS variable ‘adaptWd’ with new data ! from the arrays of predefined parameter arrays. The scaled gap ! value is used as index in the voltage, wirefeed and ! speed arrays. adaptWd.weld_voltage:=adptVlt{ArrInd}; adaptWd.weld_wirefeed:=adptWfd{ArrInd}; adaptWd.weld_speed:=adptSpd{ArrInd}; !Request a refresh of AW parameters using the new data i adaptWd ArcRefresh; ENDTRAP Arguments IVarValue device VarNo Value Interrupt [ \Unit ] [ \DeadBand ] device Data type: string The I/O device name configured in sio.cfg for the sensor used. VarNo Data type: num The number of the variable to be supervised. Value Data type: num A PERS variable which will hold the new value of VarNo . Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . [ \Unit ] Data type: num Scale factor with which the sensor value for VarNo is multiplied before check and before it is saved in Value . [ \DeadBand ] Data type: num If the value for Varno , returned by the sensor, is within +/- DeadBand no interrupt is generated. Continued Continues on next page 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 3HAC 16581-1 Revision: J 204 © Copyright 2004-2010 ABB. All rights reserved. Program execution The corresponding trap routine is automatically called at a given time following the interrupt order. When this has been executed program execution continues from where the interrupt occurred. Limitations The same variable for interrupt identity cannot be used more than five times without first being deleted. CAUTION! Too high interrupt frequency will stall the whole RAPID execution. Syntax IVarValue [ device ’:=’ ] < expression ( IN ) of string>’,’ [ VarNo ’:=’ ] < expression ( IN ) of num >’,’ [ Value ’:=’ ] < persistent ( PERS ) of num >’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’,’ [ ’\’ Unit’ :=’ ] < expression ( IN ) of num >’,’ [ ’\’ DeadBand’ :=’ ] < expression ( IN ) of num > ’;’ Related information For information about See Connect to a sensor device SenDevice - connect to a sensor device on page 425 Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupts Optical Tracking Application manual - Continuous application platform Optical Tracking Art Application manual - Arc and Arc Sensor Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
206
1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 203 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. TRAP AdapTrap VAR num ArrInd; !Scale the raw gap value received ArrInd:=ArrIndx(gap_value); ! Update active welddata PERS variable ‘adaptWd’ with new data ! from the arrays of predefined parameter arrays. The scaled gap ! value is used as index in the voltage, wirefeed and ! speed arrays. adaptWd.weld_voltage:=adptVlt{ArrInd}; adaptWd.weld_wirefeed:=adptWfd{ArrInd}; adaptWd.weld_speed:=adptSpd{ArrInd}; !Request a refresh of AW parameters using the new data i adaptWd ArcRefresh; ENDTRAP Arguments IVarValue device VarNo Value Interrupt [ \Unit ] [ \DeadBand ] device Data type: string The I/O device name configured in sio.cfg for the sensor used. VarNo Data type: num The number of the variable to be supervised. Value Data type: num A PERS variable which will hold the new value of VarNo . Interrupt Data type: intnum The variable (interrupt identity) of the interrupt. This should have previously been connected to a trap routine by means of the instruction CONNECT . [ \Unit ] Data type: num Scale factor with which the sensor value for VarNo is multiplied before check and before it is saved in Value . [ \DeadBand ] Data type: num If the value for Varno , returned by the sensor, is within +/- DeadBand no interrupt is generated. Continued Continues on next page 1 Instructions 1.81. IVarValue - orders a variable value interrupt Optical Tracking 3HAC 16581-1 Revision: J 204 © Copyright 2004-2010 ABB. All rights reserved. Program execution The corresponding trap routine is automatically called at a given time following the interrupt order. When this has been executed program execution continues from where the interrupt occurred. Limitations The same variable for interrupt identity cannot be used more than five times without first being deleted. CAUTION! Too high interrupt frequency will stall the whole RAPID execution. Syntax IVarValue [ device ’:=’ ] < expression ( IN ) of string>’,’ [ VarNo ’:=’ ] < expression ( IN ) of num >’,’ [ Value ’:=’ ] < persistent ( PERS ) of num >’,’ [ Interrupt’ :=’ ] < variable ( VAR ) of intnum > ’,’ [ ’\’ Unit’ :=’ ] < expression ( IN ) of num >’,’ [ ’\’ DeadBand’ :=’ ] < expression ( IN ) of num > ’;’ Related information For information about See Connect to a sensor device SenDevice - connect to a sensor device on page 425 Summary of interrupts Technical reference manual - RAPID overview , section RAPID summary - Interrupts More information on interrupt management Technical reference manual - RAPID overview , section Basic characteristics - Interrupts Optical Tracking Application manual - Continuous application platform Optical Tracking Art Application manual - Arc and Arc Sensor Continued 1 Instructions 1.82. IWatch - Activates an interrupt RobotWare - OS 205 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.82. IWatch - Activates an interrupt Usage IWatch ( Interrupt Watch ) is used to activate an interrupt which was previously ordered but was deactivated with ISleep . Basic examples Basic examples of the instruction IWatch are illustrated below. See also More examples on page 205 . Example 1 IWatch sig1int; The interrupt sig1int that was previously deactivated is activated. Arguments IWatch Interrupt Interrupt Data type: intnum Variable (interrupt identity) of the interrupt. Program execution Re-activates interrupts of the specified type once again. However, interrupts generated during the time the ISleep instruction was in effect are ignored. More examples More examples of the instruction IWatch are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalDI di1,1,sig1int; ... ISleep sig1int; weldpart1; IWatch sig1int; During execution of the weldpart1 routine no interrupts are permitted from the signal di1 . Error handling Interrupts which have not been ordered are not permitted. If the interrupt number is unknown the system variable ERRNO is set to ERR_UNKINO (see errnum - Error number on page 1108 ). The error can be handled in the error handler. Syntax IWatch [ Interrupt ‘:=’ ] < variable ( VAR ) of intnum > ‘;’ Continues on next page