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
607
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 604 © Copyright 2004-2010 ABB. All rights reserved. Using the argument \Conc , the number of movement instructions in succession is limited to 5. In a program section that includes StorePath-RestoPath , movement instructions with the argument \Conc are not permitted. If this argument is omitted and the ToPoint is not a stop point then the subsequent instruction is executed some time before the robot has reached the programmed zone. This argument cannot be used in a coordinated synchronized movement in a MultiMove System. ToPoint Data type: robtarget The destination point of the robot and external axes. It is defined as a named position or stored directly in the instruction (marked with an * in the instruction). [ \ID ] Synchronization id Data type: identno This argument must be used in a MultiMove system, if it is a coordinated synchronized movement, and is not allowed in any other cases. The specified ID number must be the same in all cooperating program tasks. The ID number gives a guarantee that the movements are not mixed up at runtime. Speed Data type: speeddata The speed data that applies to movements. Speed data defines the velocity of the tool center point, the external axes, and of the tool reorientation. [ \T ] Time Data type: num This argument is used to specify the total time in seconds during which the robot moves. It is then substituted for the corresponding speed data. Trigg_1 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO or TriggRampAO . [ \T2 ] Trigg 2 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 605 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \T3 ] Trigg 3 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T4 ] Trigg 4 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T5 ] Trigg 5 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T6 ] Trigg 6 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T7 ] Trigg 7 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T8 ] Trigg 8 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . Zone Data type: zonedata Zone data for the movement. Zone data describes the size of the generated corner path. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 606 © Copyright 2004-2010 ABB. All rights reserved. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. Program execution See the instruction MoveL for information about linear movement. As the trigger conditions are fulfilled when the robot is positioned closer and closer to the end point, the defined trigger activities are carried out. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction, or at a certain point in time (limited to a short time) before the end point of the instruction. During stepping the execution forward, the I/O activities are carried out but the interrupt routines are not run. During stepping the execution backwards, no trigger activities at all are carried out. 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
608
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 605 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [ \T3 ] Trigg 3 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T4 ] Trigg 4 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T5 ] Trigg 5 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T6 ] Trigg 6 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T7 ] Trigg 7 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . [ \T8 ] Trigg 8 Data type: triggdata Variable that refers to trigger conditions and trigger activity defined earlier in the program using the instructions TriggIO , TriggEquip , TriggInt , TriggSpeed , TriggCheckIO , or TriggRampAO . Zone Data type: zonedata Zone data for the movement. Zone data describes the size of the generated corner path. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 606 © Copyright 2004-2010 ABB. All rights reserved. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. Program execution See the instruction MoveL for information about linear movement. As the trigger conditions are fulfilled when the robot is positioned closer and closer to the end point, the defined trigger activities are carried out. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction, or at a certain point in time (limited to a short time) before the end point of the instruction. During stepping the execution forward, the I/O activities are carried out but the interrupt routines are not run. During stepping the execution backwards, no trigger activities at all are carried out. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 607 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggL are illustrated below. Example 1 VAR intnum intno1; VAR triggdata trigg1; ... CONNECT intno1 WITH trap1; TriggInt trigg1, 0.1 \Time, intno1; ... TriggL p1, v500, trigg1, fine, gun1; TriggL p2, v500, trigg1, fine, gun1; ... IDelete intno1; The interrupt routine trap1 is run when the work point is at a position 0.1 s before the point p1 or p2 respectively. Error handling If the programmed ScaleValue argument for the specified analog output signal AOp in some of the connected TriggSpeed instructions results in out of limit for the analog signal together with the programmed Speed in this instruction, then the system variable ERRNO is set to ERR_AO_LIM . If the programmed DipLag argument in some of the connected TriggSpeed instructions is too big in relation to the Event Preset Time used in System Parameters, then the system variable ERRNO is set to ERR_DIPLAG_LIM . The system variable ERRNO can be set to ERR_NORUNUNIT if there is no contact with the I/O unit when entering instruction and the used triggdata depends on a running I/O unit, i.e. a signal is used in the triggdata. These errors can be handled in the error handler. Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggL is shorter than usual (e.g. at the start of TriggL with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. 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
609
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 606 © Copyright 2004-2010 ABB. All rights reserved. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. Program execution See the instruction MoveL for information about linear movement. As the trigger conditions are fulfilled when the robot is positioned closer and closer to the end point, the defined trigger activities are carried out. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction, or at a certain point in time (limited to a short time) before the end point of the instruction. During stepping the execution forward, the I/O activities are carried out but the interrupt routines are not run. During stepping the execution backwards, no trigger activities at all are carried out. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 607 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggL are illustrated below. Example 1 VAR intnum intno1; VAR triggdata trigg1; ... CONNECT intno1 WITH trap1; TriggInt trigg1, 0.1 \Time, intno1; ... TriggL p1, v500, trigg1, fine, gun1; TriggL p2, v500, trigg1, fine, gun1; ... IDelete intno1; The interrupt routine trap1 is run when the work point is at a position 0.1 s before the point p1 or p2 respectively. Error handling If the programmed ScaleValue argument for the specified analog output signal AOp in some of the connected TriggSpeed instructions results in out of limit for the analog signal together with the programmed Speed in this instruction, then the system variable ERRNO is set to ERR_AO_LIM . If the programmed DipLag argument in some of the connected TriggSpeed instructions is too big in relation to the Event Preset Time used in System Parameters, then the system variable ERRNO is set to ERR_DIPLAG_LIM . The system variable ERRNO can be set to ERR_NORUNUNIT if there is no contact with the I/O unit when entering instruction and the used triggdata depends on a running I/O unit, i.e. a signal is used in the triggdata. These errors can be handled in the error handler. Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggL is shorter than usual (e.g. at the start of TriggL with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 608 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggL [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [Trigg_1 ’:=’ ] < variable ( VAR ) of triggdata > [ ’\’ T2 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T3 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T4 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T5 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T6 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T7 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T8 ’:=’ < variable ( VAR ) of triggdata > ] ´,’ [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Circular movement with triggers TriggC - Circular robot movement with events on page 570 Joint movement with triggers TriggJ - Axis-wise robot movements with events on page 597 Definition of triggers TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggEquip - Define a fixed position and time I/O event on the path on page 582 TriggInt - Defines a position related interrupt on page 588 TriggCheckIO - Defines IO check at a fixed position on page 577 TriggRampAO - Define a fixed position ramp AO event on the path on page 616 TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event on page 622 Writes to a corrections entry CorrWrite - Writes to a correction generator on page 77 Linear movement Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Definition of velocity speeddata - Speed data on page 1185 Definition of zone data zonedata - Zone data on page 1232 Definition of stop point data stoppointdata - Stop point data on page 1189 Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 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
610
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 607 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggL are illustrated below. Example 1 VAR intnum intno1; VAR triggdata trigg1; ... CONNECT intno1 WITH trap1; TriggInt trigg1, 0.1 \Time, intno1; ... TriggL p1, v500, trigg1, fine, gun1; TriggL p2, v500, trigg1, fine, gun1; ... IDelete intno1; The interrupt routine trap1 is run when the work point is at a position 0.1 s before the point p1 or p2 respectively. Error handling If the programmed ScaleValue argument for the specified analog output signal AOp in some of the connected TriggSpeed instructions results in out of limit for the analog signal together with the programmed Speed in this instruction, then the system variable ERRNO is set to ERR_AO_LIM . If the programmed DipLag argument in some of the connected TriggSpeed instructions is too big in relation to the Event Preset Time used in System Parameters, then the system variable ERRNO is set to ERR_DIPLAG_LIM . The system variable ERRNO can be set to ERR_NORUNUNIT if there is no contact with the I/O unit when entering instruction and the used triggdata depends on a running I/O unit, i.e. a signal is used in the triggdata. These errors can be handled in the error handler. Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggL is shorter than usual (e.g. at the start of TriggL with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 608 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggL [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [Trigg_1 ’:=’ ] < variable ( VAR ) of triggdata > [ ’\’ T2 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T3 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T4 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T5 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T6 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T7 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T8 ’:=’ < variable ( VAR ) of triggdata > ] ´,’ [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Circular movement with triggers TriggC - Circular robot movement with events on page 570 Joint movement with triggers TriggJ - Axis-wise robot movements with events on page 597 Definition of triggers TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggEquip - Define a fixed position and time I/O event on the path on page 582 TriggInt - Defines a position related interrupt on page 588 TriggCheckIO - Defines IO check at a fixed position on page 577 TriggRampAO - Define a fixed position ramp AO event on the path on page 616 TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event on page 622 Writes to a corrections entry CorrWrite - Writes to a correction generator on page 77 Linear movement Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Definition of velocity speeddata - Speed data on page 1185 Definition of zone data zonedata - Zone data on page 1232 Definition of stop point data stoppointdata - Stop point data on page 1189 Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 609 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Motion in general Technical reference manual - RAPID overview , section Motion and I/O principles For information about See Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
611
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 3HAC 16581-1 Revision: J 608 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggL [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [Trigg_1 ’:=’ ] < variable ( VAR ) of triggdata > [ ’\’ T2 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T3 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T4 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T5 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T6 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T7 ’:=’ < variable ( VAR ) of triggdata > ] [ ’\’ T8 ’:=’ < variable ( VAR ) of triggdata > ] ´,’ [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Circular movement with triggers TriggC - Circular robot movement with events on page 570 Joint movement with triggers TriggJ - Axis-wise robot movements with events on page 597 Definition of triggers TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggEquip - Define a fixed position and time I/O event on the path on page 582 TriggInt - Defines a position related interrupt on page 588 TriggCheckIO - Defines IO check at a fixed position on page 577 TriggRampAO - Define a fixed position ramp AO event on the path on page 616 TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event on page 622 Writes to a corrections entry CorrWrite - Writes to a correction generator on page 77 Linear movement Technical reference manual - RAPID overview , section Motion and I/O principles - Positioning during program execution Definition of velocity speeddata - Speed data on page 1185 Definition of zone data zonedata - Zone data on page 1232 Definition of stop point data stoppointdata - Stop point data on page 1189 Definition of tools tooldata - Tool data on page 1207 Definition of work objects wobjdata - Work object data on page 1224 Continued Continues on next page 1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 609 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Motion in general Technical reference manual - RAPID overview , section Motion and I/O principles For information about See Continued 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 610 © Copyright 2004-2010 ABB. All rights reserved. 1.213. TriggLIOs - Linear robot movements with I/O events Usage TriggLIOs (Trigg Linear I/O) is used to set output signals at fixed positions at the same time that the robot is making a linear movement. The TriggLIOs instruction is optimized to give good accuracy when using movements with zones (compare with TriggEquip / TriggL ). Basic examples Basic examples of the instruction TriggLIOs are illustrated below. See also More examples on page 613 . Example 1 VAR triggios gunon{1}; gunon{1}.used:=TRUE; gunon{1}.distance:=3; gunon{1}.start:=TRUE; gunon{1}.signalname:="gun"; gunon{1}.equiplag:=0; gunon{1}.setvalue:=1; MoveJ p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=gunon, z50, gun1; MoveL p3, v500, z50, gun1; The signal gun is set when the TCP is 3 mm after point p1 . The figure shows an example of a fixed position I/O event. en0800000157 Arguments TriggLIOs [\Conc] ToPoint [\ID] Speed [\T] [\TriggData1] [\TriggData2] [\TriggData3] Zone [\Inpos] Tool [\WObj] [\Corr] [ \Conc ] Concurrent Data type: switch Subsequent instructions are executed while the robot is moving. The argument can be used to avoid unwanted stops, caused by overloaded CPU, when using fly-by points. This is useful when the programmed points are very close together at high speeds. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
612
1 Instructions 1.212. TriggL - Linear robot movements with events RobotWare - OS 609 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Motion in general Technical reference manual - RAPID overview , section Motion and I/O principles For information about See Continued 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 610 © Copyright 2004-2010 ABB. All rights reserved. 1.213. TriggLIOs - Linear robot movements with I/O events Usage TriggLIOs (Trigg Linear I/O) is used to set output signals at fixed positions at the same time that the robot is making a linear movement. The TriggLIOs instruction is optimized to give good accuracy when using movements with zones (compare with TriggEquip / TriggL ). Basic examples Basic examples of the instruction TriggLIOs are illustrated below. See also More examples on page 613 . Example 1 VAR triggios gunon{1}; gunon{1}.used:=TRUE; gunon{1}.distance:=3; gunon{1}.start:=TRUE; gunon{1}.signalname:="gun"; gunon{1}.equiplag:=0; gunon{1}.setvalue:=1; MoveJ p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=gunon, z50, gun1; MoveL p3, v500, z50, gun1; The signal gun is set when the TCP is 3 mm after point p1 . The figure shows an example of a fixed position I/O event. en0800000157 Arguments TriggLIOs [\Conc] ToPoint [\ID] Speed [\T] [\TriggData1] [\TriggData2] [\TriggData3] Zone [\Inpos] Tool [\WObj] [\Corr] [ \Conc ] Concurrent Data type: switch Subsequent instructions are executed while the robot is moving. The argument can be used to avoid unwanted stops, caused by overloaded CPU, when using fly-by points. This is useful when the programmed points are very close together at high speeds. Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 611 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument is also useful when, for example, communicating with external equipment and synchronization between the external equipment and robot movement is not required. It can also be used to tune the execution of the robot path, to avoid warning 50024 Corner path failure or error 40082 Deceleration limit. Using the argument \Conc , the number of movement instructions in succession is limited to 5. In a program section that includes StorePath-RestoPath , movement instructions with the argument \Conc are not permitted. If this argument is omitted and the ToPoint is not a stop point then the subsequent instruction is executed some time before the robot has reached the programmed zone. This argument cannot be used in a coordinated synchronized movement in a MultiMove System. ToPoint Data type: robtarget The destination point of the robot and external axes. It is defined as a named position or stored directly in the instruction (marked with an * in the instruction). [ \ID ] Synchronization id Data type: identno This argument must be used in a MultiMove system, if it is a coordinated synchronized movement, and is not allowed in any other cases. The specified ID number must be the same in all cooperating program tasks. The ID number gives a guarantee that the movements are not mixed up at runtime. Speed Data type: speeddata The speed data that applies to movements. Speed data defines the velocity of the tool center point, the external axes, and of the tool reorientation. [ \T ] Time Data type: num This argument is used to specify the total time in seconds during which the robot moves. It is then substituted for the corresponding speed data. [\TriggData1] Data type: array of triggios Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals. If using a digital group output signal there is a limitation on 23 signals in the group. 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
613
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 610 © Copyright 2004-2010 ABB. All rights reserved. 1.213. TriggLIOs - Linear robot movements with I/O events Usage TriggLIOs (Trigg Linear I/O) is used to set output signals at fixed positions at the same time that the robot is making a linear movement. The TriggLIOs instruction is optimized to give good accuracy when using movements with zones (compare with TriggEquip / TriggL ). Basic examples Basic examples of the instruction TriggLIOs are illustrated below. See also More examples on page 613 . Example 1 VAR triggios gunon{1}; gunon{1}.used:=TRUE; gunon{1}.distance:=3; gunon{1}.start:=TRUE; gunon{1}.signalname:="gun"; gunon{1}.equiplag:=0; gunon{1}.setvalue:=1; MoveJ p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=gunon, z50, gun1; MoveL p3, v500, z50, gun1; The signal gun is set when the TCP is 3 mm after point p1 . The figure shows an example of a fixed position I/O event. en0800000157 Arguments TriggLIOs [\Conc] ToPoint [\ID] Speed [\T] [\TriggData1] [\TriggData2] [\TriggData3] Zone [\Inpos] Tool [\WObj] [\Corr] [ \Conc ] Concurrent Data type: switch Subsequent instructions are executed while the robot is moving. The argument can be used to avoid unwanted stops, caused by overloaded CPU, when using fly-by points. This is useful when the programmed points are very close together at high speeds. Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 611 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument is also useful when, for example, communicating with external equipment and synchronization between the external equipment and robot movement is not required. It can also be used to tune the execution of the robot path, to avoid warning 50024 Corner path failure or error 40082 Deceleration limit. Using the argument \Conc , the number of movement instructions in succession is limited to 5. In a program section that includes StorePath-RestoPath , movement instructions with the argument \Conc are not permitted. If this argument is omitted and the ToPoint is not a stop point then the subsequent instruction is executed some time before the robot has reached the programmed zone. This argument cannot be used in a coordinated synchronized movement in a MultiMove System. ToPoint Data type: robtarget The destination point of the robot and external axes. It is defined as a named position or stored directly in the instruction (marked with an * in the instruction). [ \ID ] Synchronization id Data type: identno This argument must be used in a MultiMove system, if it is a coordinated synchronized movement, and is not allowed in any other cases. The specified ID number must be the same in all cooperating program tasks. The ID number gives a guarantee that the movements are not mixed up at runtime. Speed Data type: speeddata The speed data that applies to movements. Speed data defines the velocity of the tool center point, the external axes, and of the tool reorientation. [ \T ] Time Data type: num This argument is used to specify the total time in seconds during which the robot moves. It is then substituted for the corresponding speed data. [\TriggData1] Data type: array of triggios Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals. If using a digital group output signal there is a limitation on 23 signals in the group. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 612 © Copyright 2004-2010 ABB. All rights reserved. [\TriggData2] Data type: array of triggstrgo Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Only digital group output signals can be used. [\TriggData3] Data type: array of triggiosdnum Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Zone Data type: zonedata Zone data for the movement. Zone data describes the size of the generated corner path. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. 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
614
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 611 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument is also useful when, for example, communicating with external equipment and synchronization between the external equipment and robot movement is not required. It can also be used to tune the execution of the robot path, to avoid warning 50024 Corner path failure or error 40082 Deceleration limit. Using the argument \Conc , the number of movement instructions in succession is limited to 5. In a program section that includes StorePath-RestoPath , movement instructions with the argument \Conc are not permitted. If this argument is omitted and the ToPoint is not a stop point then the subsequent instruction is executed some time before the robot has reached the programmed zone. This argument cannot be used in a coordinated synchronized movement in a MultiMove System. ToPoint Data type: robtarget The destination point of the robot and external axes. It is defined as a named position or stored directly in the instruction (marked with an * in the instruction). [ \ID ] Synchronization id Data type: identno This argument must be used in a MultiMove system, if it is a coordinated synchronized movement, and is not allowed in any other cases. The specified ID number must be the same in all cooperating program tasks. The ID number gives a guarantee that the movements are not mixed up at runtime. Speed Data type: speeddata The speed data that applies to movements. Speed data defines the velocity of the tool center point, the external axes, and of the tool reorientation. [ \T ] Time Data type: num This argument is used to specify the total time in seconds during which the robot moves. It is then substituted for the corresponding speed data. [\TriggData1] Data type: array of triggios Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals. If using a digital group output signal there is a limitation on 23 signals in the group. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 612 © Copyright 2004-2010 ABB. All rights reserved. [\TriggData2] Data type: array of triggstrgo Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Only digital group output signals can be used. [\TriggData3] Data type: array of triggiosdnum Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Zone Data type: zonedata Zone data for the movement. Zone data describes the size of the generated corner path. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 613 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution See the instruction MoveL for information about linear movement. With the instruction TriggLIOs it is possible to setup 1-50 different trigger activities on I/O signals along a path from A to B. The signals that can be used are digital output signals, digital group output signals and analog output signals. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction. The instruction requires use of either TriggData1 , TriggData2 or TriggData3 argument or all three of them. Use of any of the triggs is optional though. To inhibit use of a trigg the component used can be set to FALSE in the array element of the data types triggios / triggstrgo / triggiosdnum . If no array element is in use, then the TriggLIOs instruction will behave as a MoveL , and no I/O activities will be carried out. If stepping the program forward, the I/O activities are carried out. During stepping the execution backwards, no I/O activities at all are carried out. If setting component EquipLag in TriggData1 , TriggData2 or TriggData3 argument to a negative time (delay), the I/O signal can be set after the destination point ( ToPoint ). If using the argument TriggData2 or TriggData3 it is possible to use values up to 4294967295, which is the maximum value a group of digital signals can have (32 signals in a group signal is max for the system). More examples More examples of how to use the instruction TriggLIOs are illustrated below. Example 1 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . 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
615
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 612 © Copyright 2004-2010 ABB. All rights reserved. [\TriggData2] Data type: array of triggstrgo Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Only digital group output signals can be used. [\TriggData3] Data type: array of triggiosdnum Variable (array) that refers to trigger conditions and trigger activity. When using this argument, it is possible to set analog output signals, digital output signals and digital group output signals that consists of 32 signals in the group and can have a maximum set value of 4294967295. Zone Data type: zonedata Zone data for the movement. Zone data describes the size of the generated corner path. [ \Inpos ] In position Data type: stoppointdata This argument is used to specify the convergence criteria for the position of the robot’s TCP in the stop point. The stop point data substitutes the zone specified in the Zone parameter. Tool Data type: tooldata The tool in use when the robot moves. The tool center point is the point that is moved to the specified destination position. [ \WObj ] Work Object Data type: wobjdata The work object (coordinate system) to which the robot position in the instruction is related. This argument can be omitted and if so then the position is related to the world coordinate system. If, on the other hand, a stationary TCP or coordinated external axes are used then this argument must be specified for a linear movement relative to the work object to be performed. [ \Corr ] Correction Data type: switch Correction data written to a corrections entry by the instruction CorrWrite will be added to the path and destination position if this argument is present. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 613 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution See the instruction MoveL for information about linear movement. With the instruction TriggLIOs it is possible to setup 1-50 different trigger activities on I/O signals along a path from A to B. The signals that can be used are digital output signals, digital group output signals and analog output signals. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction. The instruction requires use of either TriggData1 , TriggData2 or TriggData3 argument or all three of them. Use of any of the triggs is optional though. To inhibit use of a trigg the component used can be set to FALSE in the array element of the data types triggios / triggstrgo / triggiosdnum . If no array element is in use, then the TriggLIOs instruction will behave as a MoveL , and no I/O activities will be carried out. If stepping the program forward, the I/O activities are carried out. During stepping the execution backwards, no I/O activities at all are carried out. If setting component EquipLag in TriggData1 , TriggData2 or TriggData3 argument to a negative time (delay), the I/O signal can be set after the destination point ( ToPoint ). If using the argument TriggData2 or TriggData3 it is possible to use values up to 4294967295, which is the maximum value a group of digital signals can have (32 signals in a group signal is max for the system). More examples More examples of how to use the instruction TriggLIOs are illustrated below. Example 1 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 614 © Copyright 2004-2010 ABB. All rights reserved. Example 2 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; VAR triggstrgo mytriggstrgo{3}:= [[TRUE, 3, TRUE, 0, "go2", "1", 0], [TRUE, 15, TRUE, 0, "go2", "800000", 0], [TRUE, 4, FALSE, 0, "go2", "4294967295", 0]]; VAR triggiosdnum mytriggiosdnum{3}:= [[TRUE, 10, TRUE, 0, "go3", 4294967295, 0], [TRUE, 10, TRUE, 0, "ao2", 5, 0], [TRUE, 10, TRUE, 0, "do2", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios \TriggData2:= mytriggstrgo \TriggData3:=mytriggiosdnum, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal ao1 will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . Those position events is setup by variable mytriggios . The variable mytriggstrgo sets up position events to occur 3 and 15 mm from p1 . First the signal go2 is set to 1, then it is set to 800000. The signal will be set to value 4294967295 4 mm from the ToPoint p2 . This is the maximum value for a 32 bits digital output signal. The variable mytriggiosdnum sets up three position events to occur 10 mm from p1 . First the signal go3 is set to 4294967295, then ao2 is set to 5 and last do2 is set to 1. Error handling The 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 I/O unit. ERR_GO_LIM if the programmed setvalue argument for the specified digital group output signal signalname is outside limits. (Declared in TriggData1 , TriggData2 or TriggData3 ) ERR_AO_LIM if the programmed setvalue argument for the specified analog output signal signalname is outside limits. (Declared in TriggData1 or TriggData3 ) Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggLIOs is shorter than usual (e.g. at the start of TriggLIOs with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. 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
616
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 613 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution See the instruction MoveL for information about linear movement. With the instruction TriggLIOs it is possible to setup 1-50 different trigger activities on I/O signals along a path from A to B. The signals that can be used are digital output signals, digital group output signals and analog output signals. The trigger conditions are fulfilled either at a certain distance before the end point of the instruction, or at a certain distance after the start point of the instruction. The instruction requires use of either TriggData1 , TriggData2 or TriggData3 argument or all three of them. Use of any of the triggs is optional though. To inhibit use of a trigg the component used can be set to FALSE in the array element of the data types triggios / triggstrgo / triggiosdnum . If no array element is in use, then the TriggLIOs instruction will behave as a MoveL , and no I/O activities will be carried out. If stepping the program forward, the I/O activities are carried out. During stepping the execution backwards, no I/O activities at all are carried out. If setting component EquipLag in TriggData1 , TriggData2 or TriggData3 argument to a negative time (delay), the I/O signal can be set after the destination point ( ToPoint ). If using the argument TriggData2 or TriggData3 it is possible to use values up to 4294967295, which is the maximum value a group of digital signals can have (32 signals in a group signal is max for the system). More examples More examples of how to use the instruction TriggLIOs are illustrated below. Example 1 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 614 © Copyright 2004-2010 ABB. All rights reserved. Example 2 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; VAR triggstrgo mytriggstrgo{3}:= [[TRUE, 3, TRUE, 0, "go2", "1", 0], [TRUE, 15, TRUE, 0, "go2", "800000", 0], [TRUE, 4, FALSE, 0, "go2", "4294967295", 0]]; VAR triggiosdnum mytriggiosdnum{3}:= [[TRUE, 10, TRUE, 0, "go3", 4294967295, 0], [TRUE, 10, TRUE, 0, "ao2", 5, 0], [TRUE, 10, TRUE, 0, "do2", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios \TriggData2:= mytriggstrgo \TriggData3:=mytriggiosdnum, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal ao1 will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . Those position events is setup by variable mytriggios . The variable mytriggstrgo sets up position events to occur 3 and 15 mm from p1 . First the signal go2 is set to 1, then it is set to 800000. The signal will be set to value 4294967295 4 mm from the ToPoint p2 . This is the maximum value for a 32 bits digital output signal. The variable mytriggiosdnum sets up three position events to occur 10 mm from p1 . First the signal go3 is set to 4294967295, then ao2 is set to 5 and last do2 is set to 1. Error handling The 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 I/O unit. ERR_GO_LIM if the programmed setvalue argument for the specified digital group output signal signalname is outside limits. (Declared in TriggData1 , TriggData2 or TriggData3 ) ERR_AO_LIM if the programmed setvalue argument for the specified analog output signal signalname is outside limits. (Declared in TriggData1 or TriggData3 ) Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggLIOs is shorter than usual (e.g. at the start of TriggLIOs with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 615 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The limitation of the number of triggs in the instruction TriggLIOs is 50 for each programmed instruction. However, if those triggs is supposed to happen in a close distance, the system might not be able to handle that. That depends on how the movement is done, TCP speed used and how close the triggs are programmed. Those limitations exists, but it is hard to predict when those problems will occur. Syntax TriggLIOs [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [ ’\’ TriggData1’ :=’ ] < array {*} ( VAR ) of triggios > [ ’\’ TriggData2’ :=’ ] < array {*} ( VAR ) of triggstrgo > [ ’\’ TriggData3’ :=’ ] < array {*} ( VAR ) of triggiosdnum > [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Storage of trigg conditions and trigger activity triggios - Positioning events, trigg on page 1214 Storage of trigg conditions and trigger activity for digital signal group consisting of 32 signals triggstrgo - Positioning events, trigg on page 1219 Storage of trigg conditions and trigger activity triggiosdnum - Positioning events, trigg on page 1217 Linear movement Technical reference manual - RAPID overview, section Motion and I/O principles - Positioning during program execution Motion in general Technical reference manual - RAPID overview, section Motion and I/O principles Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
617
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 3HAC 16581-1 Revision: J 614 © Copyright 2004-2010 ABB. All rights reserved. Example 2 VAR triggios mytriggios{3}:= [[TRUE, 3, TRUE, 0, "go1", 55, 0], [TRUE, 15, TRUE, 0, "ao1", 10, 0], [TRUE, 3, FALSE, 0, "do1", 1, 0]]; VAR triggstrgo mytriggstrgo{3}:= [[TRUE, 3, TRUE, 0, "go2", "1", 0], [TRUE, 15, TRUE, 0, "go2", "800000", 0], [TRUE, 4, FALSE, 0, "go2", "4294967295", 0]]; VAR triggiosdnum mytriggiosdnum{3}:= [[TRUE, 10, TRUE, 0, "go3", 4294967295, 0], [TRUE, 10, TRUE, 0, "ao2", 5, 0], [TRUE, 10, TRUE, 0, "do2", 1, 0]]; ... MoveL p1, v500, z50, gun1; TriggLIOs p2, v500, \TriggData1:=mytriggios \TriggData2:= mytriggstrgo \TriggData3:=mytriggiosdnum, z50, gun1; MoveL p3, v500, z50, gun1; The digital group output signal go1 will be set to value 55 3 mm from p1 . Analog output signal ao1 will be set to value 10 15 mm from p1 . Digital output signal do1 will be set 3 mm from ToPoint p2 . Those position events is setup by variable mytriggios . The variable mytriggstrgo sets up position events to occur 3 and 15 mm from p1 . First the signal go2 is set to 1, then it is set to 800000. The signal will be set to value 4294967295 4 mm from the ToPoint p2 . This is the maximum value for a 32 bits digital output signal. The variable mytriggiosdnum sets up three position events to occur 10 mm from p1 . First the signal go3 is set to 4294967295, then ao2 is set to 5 and last do2 is set to 1. Error handling The 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 I/O unit. ERR_GO_LIM if the programmed setvalue argument for the specified digital group output signal signalname is outside limits. (Declared in TriggData1 , TriggData2 or TriggData3 ) ERR_AO_LIM if the programmed setvalue argument for the specified analog output signal signalname is outside limits. (Declared in TriggData1 or TriggData3 ) Limitations If the current start point deviates from the usual so that the total positioning length of the instruction TriggLIOs is shorter than usual (e.g. at the start of TriggLIOs with the robot position at the end point) it may happen that several or all of the trigger conditions are fulfilled immediately and at the same position. In such cases, the sequence in which the trigger activities are carried out will be undefined. The program logic in the user program may not be based on a normal sequence of trigger activities for an “incomplete movement”. Continued Continues on next page 1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 615 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The limitation of the number of triggs in the instruction TriggLIOs is 50 for each programmed instruction. However, if those triggs is supposed to happen in a close distance, the system might not be able to handle that. That depends on how the movement is done, TCP speed used and how close the triggs are programmed. Those limitations exists, but it is hard to predict when those problems will occur. Syntax TriggLIOs [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [ ’\’ TriggData1’ :=’ ] < array {*} ( VAR ) of triggios > [ ’\’ TriggData2’ :=’ ] < array {*} ( VAR ) of triggstrgo > [ ’\’ TriggData3’ :=’ ] < array {*} ( VAR ) of triggiosdnum > [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Storage of trigg conditions and trigger activity triggios - Positioning events, trigg on page 1214 Storage of trigg conditions and trigger activity for digital signal group consisting of 32 signals triggstrgo - Positioning events, trigg on page 1219 Storage of trigg conditions and trigger activity triggiosdnum - Positioning events, trigg on page 1217 Linear movement Technical reference manual - RAPID overview, section Motion and I/O principles - Positioning during program execution Motion in general Technical reference manual - RAPID overview, section Motion and I/O principles Continued 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 616 © Copyright 2004-2010 ABB. All rights reserved. 1.214. TriggRampAO - Define a fixed position ramp AO event on the path Usage TriggRampAO ( Trigg Ramp Analog Output ) is used to define conditions and actions for ramping up or down analog output signal value at a fixed position along the robot’s movement path with possibility to do time compensation for the lag in the external equipment. The data defined is used for implementation in one or more subsequent TriggL , TriggC , or TriggJ instructions. Beside these instructions, TriggRampAO can also be used in CapL or CapC instructions. The type of trig actions connected to the same TriggL/C/J instruction can be TriggRampAO or any of TriggIO , TriggEquip , TriggSpeed , TriggInt , or TriggCheckIO instructions. Any type of combination is allowed except that only one TriggSpeed action on the same signal in the same TriggL/C/J instruction is allowed. 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 TriggRampAO are illustrated below. See also More examples on page 620 . Example 1 VAR triggdata ramp_up; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, z10, gun1; The analog signal aolaser1 will start ramping up its logical value from current value to the new value 8 , when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. Example 2 VAR triggdata ramp_down; ... TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p3, v200, z10, gun1; TriggL p4, v200, ramp_down, z10, gun1; The analog signal aolaser1 will start ramping down its logical value from current value to the new value 2 , when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p4 . The whole ramp-down will be done while the robot moves 10 mm. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
618
1 Instructions 1.213. TriggLIOs - Linear robot movements with I/O events RobotWare - OS 615 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The limitation of the number of triggs in the instruction TriggLIOs is 50 for each programmed instruction. However, if those triggs is supposed to happen in a close distance, the system might not be able to handle that. That depends on how the movement is done, TCP speed used and how close the triggs are programmed. Those limitations exists, but it is hard to predict when those problems will occur. Syntax TriggLIOs [’\’ Conc ’,’] [ ToPoint’ :=’ ] < expression ( IN ) of robtarget > [ ’\’ ID ’:=’ < expression ( IN ) of identno >] ’,’ [ Speed ’:=’ ] < expression ( IN ) of speeddata > [ ’\’ T ’:=’ < expression ( IN ) of num > ]’,’ [ ’\’ TriggData1’ :=’ ] < array {*} ( VAR ) of triggios > [ ’\’ TriggData2’ :=’ ] < array {*} ( VAR ) of triggstrgo > [ ’\’ TriggData3’ :=’ ] < array {*} ( VAR ) of triggiosdnum > [Zone ’:=’ ] < expression ( IN ) of zonedata > [ ’\’ Inpos’ :=’ < expression ( IN ) of stoppointdata > ] ´,’ [ Tool ’:=’ ] < persistent ( PERS ) of tooldata > [ ’\’ WObj’ :=’ < persistent ( PERS ) of wobjdata > ] [ ’\’ Corr ] ’;’ Related information For information about See Storage of trigg conditions and trigger activity triggios - Positioning events, trigg on page 1214 Storage of trigg conditions and trigger activity for digital signal group consisting of 32 signals triggstrgo - Positioning events, trigg on page 1219 Storage of trigg conditions and trigger activity triggiosdnum - Positioning events, trigg on page 1217 Linear movement Technical reference manual - RAPID overview, section Motion and I/O principles - Positioning during program execution Motion in general Technical reference manual - RAPID overview, section Motion and I/O principles Continued 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 616 © Copyright 2004-2010 ABB. All rights reserved. 1.214. TriggRampAO - Define a fixed position ramp AO event on the path Usage TriggRampAO ( Trigg Ramp Analog Output ) is used to define conditions and actions for ramping up or down analog output signal value at a fixed position along the robot’s movement path with possibility to do time compensation for the lag in the external equipment. The data defined is used for implementation in one or more subsequent TriggL , TriggC , or TriggJ instructions. Beside these instructions, TriggRampAO can also be used in CapL or CapC instructions. The type of trig actions connected to the same TriggL/C/J instruction can be TriggRampAO or any of TriggIO , TriggEquip , TriggSpeed , TriggInt , or TriggCheckIO instructions. Any type of combination is allowed except that only one TriggSpeed action on the same signal in the same TriggL/C/J instruction is allowed. 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 TriggRampAO are illustrated below. See also More examples on page 620 . Example 1 VAR triggdata ramp_up; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, z10, gun1; The analog signal aolaser1 will start ramping up its logical value from current value to the new value 8 , when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. Example 2 VAR triggdata ramp_down; ... TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p3, v200, z10, gun1; TriggL p4, v200, ramp_down, z10, gun1; The analog signal aolaser1 will start ramping down its logical value from current value to the new value 2 , when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p4 . The whole ramp-down will be done while the robot moves 10 mm. Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 617 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TriggRampAO TriggData Distance [\Start] EquipLag AOutput SetValue RampLength [\Time] xx0600003433 TriggData Data type: triggdata Variable for storing of the triggdata returned from this instruction. These triggdata can then be used in the subsequent TriggL , TriggC , TriggJ , CapL , or CapC instructions. Distance Data type: num Defines the distance from the centre of the corner path where the ramp of the analog output shall start. Specified as the distance in mm (positive value) from the end point ( ToPoint ) of the movement path (applicable if the argument \Start is not set). See the section Program Execution for further details. [\Start] Data type: switch Used when the distance for the argument Distance is related to the movement start point (preceding ToPoint ) instead of the end point. D Parameter Distance RL Parameter RampLength CV Current analog signal Value SV Parameter SetValue for the analog signal value P1 ToPoint for preceding move instruction P2 ToPoint for actual TrigL/C/J instruction ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] 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
619
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 616 © Copyright 2004-2010 ABB. All rights reserved. 1.214. TriggRampAO - Define a fixed position ramp AO event on the path Usage TriggRampAO ( Trigg Ramp Analog Output ) is used to define conditions and actions for ramping up or down analog output signal value at a fixed position along the robot’s movement path with possibility to do time compensation for the lag in the external equipment. The data defined is used for implementation in one or more subsequent TriggL , TriggC , or TriggJ instructions. Beside these instructions, TriggRampAO can also be used in CapL or CapC instructions. The type of trig actions connected to the same TriggL/C/J instruction can be TriggRampAO or any of TriggIO , TriggEquip , TriggSpeed , TriggInt , or TriggCheckIO instructions. Any type of combination is allowed except that only one TriggSpeed action on the same signal in the same TriggL/C/J instruction is allowed. 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 TriggRampAO are illustrated below. See also More examples on page 620 . Example 1 VAR triggdata ramp_up; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, z10, gun1; The analog signal aolaser1 will start ramping up its logical value from current value to the new value 8 , when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. Example 2 VAR triggdata ramp_down; ... TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p3, v200, z10, gun1; TriggL p4, v200, ramp_down, z10, gun1; The analog signal aolaser1 will start ramping down its logical value from current value to the new value 2 , when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p4 . The whole ramp-down will be done while the robot moves 10 mm. Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 617 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TriggRampAO TriggData Distance [\Start] EquipLag AOutput SetValue RampLength [\Time] xx0600003433 TriggData Data type: triggdata Variable for storing of the triggdata returned from this instruction. These triggdata can then be used in the subsequent TriggL , TriggC , TriggJ , CapL , or CapC instructions. Distance Data type: num Defines the distance from the centre of the corner path where the ramp of the analog output shall start. Specified as the distance in mm (positive value) from the end point ( ToPoint ) of the movement path (applicable if the argument \Start is not set). See the section Program Execution for further details. [\Start] Data type: switch Used when the distance for the argument Distance is related to the movement start point (preceding ToPoint ) instead of the end point. D Parameter Distance RL Parameter RampLength CV Current analog signal Value SV Parameter SetValue for the analog signal value P1 ToPoint for preceding move instruction P2 ToPoint for actual TrigL/C/J instruction ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 618 © Copyright 2004-2010 ABB. All rights reserved. EquipLag Equipment Lag Data type: num Specify the lag for the external equipment in s. For compensation of external equipment lag, use positive argument value. Positive argument value means that the start of the ramping of the AO signal is done by the robot system at a specified time before the TCP physically reaches the specified distance point in relation to the movement start or end point. Negative argument value means that starting the ramping of the AO signal is done by the robot system at a specified time. After that, the TCP has physically passed the specified distance point in relation to the movement start or end point. The figure shows use of argument EquipLag . xx0500002262 AOutput Analog Output Data type: signalao The name of the analog output signal. SetValue Data type: num The value to which the analog output signal should be ramped up or down to (must be within the allowed logical range value for the signal). The ramping is started with the current value of the analog output signal. RampLength Data type: num The ramping length in mm along the TCP movement path. [\Time] Data type: switch Used then the RampLength specifies the ramp time in s instead of ramping length. Must be used, if subsequent TriggL, TriggC , or TriggJ specifies that the total movement should be done on time (argument \T ) instead of speed. 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
620
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 617 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TriggRampAO TriggData Distance [\Start] EquipLag AOutput SetValue RampLength [\Time] xx0600003433 TriggData Data type: triggdata Variable for storing of the triggdata returned from this instruction. These triggdata can then be used in the subsequent TriggL , TriggC , TriggJ , CapL , or CapC instructions. Distance Data type: num Defines the distance from the centre of the corner path where the ramp of the analog output shall start. Specified as the distance in mm (positive value) from the end point ( ToPoint ) of the movement path (applicable if the argument \Start is not set). See the section Program Execution for further details. [\Start] Data type: switch Used when the distance for the argument Distance is related to the movement start point (preceding ToPoint ) instead of the end point. D Parameter Distance RL Parameter RampLength CV Current analog signal Value SV Parameter SetValue for the analog signal value P1 ToPoint for preceding move instruction P2 ToPoint for actual TrigL/C/J instruction ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] ![Image] Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 618 © Copyright 2004-2010 ABB. All rights reserved. EquipLag Equipment Lag Data type: num Specify the lag for the external equipment in s. For compensation of external equipment lag, use positive argument value. Positive argument value means that the start of the ramping of the AO signal is done by the robot system at a specified time before the TCP physically reaches the specified distance point in relation to the movement start or end point. Negative argument value means that starting the ramping of the AO signal is done by the robot system at a specified time. After that, the TCP has physically passed the specified distance point in relation to the movement start or end point. The figure shows use of argument EquipLag . xx0500002262 AOutput Analog Output Data type: signalao The name of the analog output signal. SetValue Data type: num The value to which the analog output signal should be ramped up or down to (must be within the allowed logical range value for the signal). The ramping is started with the current value of the analog output signal. RampLength Data type: num The ramping length in mm along the TCP movement path. [\Time] Data type: switch Used then the RampLength specifies the ramp time in s instead of ramping length. Must be used, if subsequent TriggL, TriggC , or TriggJ specifies that the total movement should be done on time (argument \T ) instead of speed. Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 619 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggRampAO , the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC or TriggJ is executed, the following are applicable with regard to the definitions in TriggRampAO : The table describes the distance specified in the argument Distance : The figure shows ramping of AO in a corner path. xx0600003439 Program execution characteristics of TriggRampAO connected to any TriggL/C/J : • The ramping of the AO is started when the robot reaches the specified Distance point on the robot path (with compensation for the specified EquipLag ) • The ramping function will be performed during a time period calculated from specified RampLength and the programmed TCP speed. The calculation takes into cosideration VelSet , manual speed override, and max. 250 mm/s in MAN mode but not any other speed limitations. • Updating of the AO signal value from start (current read) value to specified SetValue will be done each 10 ms resulting in a staircase form. If the calculated ramp time or specified ramp time is greater than 0.5 s then the ramping frequency will slow down: • <= 0,5s gives max. 50 step each 10 ms • <= 1s gives max. 50 steps each 20 ms • <= 1,5s gives max. 50 steps each 30 ms and so on The TriggRampAO action is also done in FWD step but not in BWD step mode. At any type of stop (ProgStop, Emergency Stop …) if the ramping function is active for the occasion: - if ramping up, the AO is set to an old value momentarily. - if ramping down, the AO is set to the new SetValue momentarily. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). 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
621
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 618 © Copyright 2004-2010 ABB. All rights reserved. EquipLag Equipment Lag Data type: num Specify the lag for the external equipment in s. For compensation of external equipment lag, use positive argument value. Positive argument value means that the start of the ramping of the AO signal is done by the robot system at a specified time before the TCP physically reaches the specified distance point in relation to the movement start or end point. Negative argument value means that starting the ramping of the AO signal is done by the robot system at a specified time. After that, the TCP has physically passed the specified distance point in relation to the movement start or end point. The figure shows use of argument EquipLag . xx0500002262 AOutput Analog Output Data type: signalao The name of the analog output signal. SetValue Data type: num The value to which the analog output signal should be ramped up or down to (must be within the allowed logical range value for the signal). The ramping is started with the current value of the analog output signal. RampLength Data type: num The ramping length in mm along the TCP movement path. [\Time] Data type: switch Used then the RampLength specifies the ramp time in s instead of ramping length. Must be used, if subsequent TriggL, TriggC , or TriggJ specifies that the total movement should be done on time (argument \T ) instead of speed. Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 619 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggRampAO , the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC or TriggJ is executed, the following are applicable with regard to the definitions in TriggRampAO : The table describes the distance specified in the argument Distance : The figure shows ramping of AO in a corner path. xx0600003439 Program execution characteristics of TriggRampAO connected to any TriggL/C/J : • The ramping of the AO is started when the robot reaches the specified Distance point on the robot path (with compensation for the specified EquipLag ) • The ramping function will be performed during a time period calculated from specified RampLength and the programmed TCP speed. The calculation takes into cosideration VelSet , manual speed override, and max. 250 mm/s in MAN mode but not any other speed limitations. • Updating of the AO signal value from start (current read) value to specified SetValue will be done each 10 ms resulting in a staircase form. If the calculated ramp time or specified ramp time is greater than 0.5 s then the ramping frequency will slow down: • <= 0,5s gives max. 50 step each 10 ms • <= 1s gives max. 50 steps each 20 ms • <= 1,5s gives max. 50 steps each 30 ms and so on The TriggRampAO action is also done in FWD step but not in BWD step mode. At any type of stop (ProgStop, Emergency Stop …) if the ramping function is active for the occasion: - if ramping up, the AO is set to an old value momentarily. - if ramping down, the AO is set to the new SetValue momentarily. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 620 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggRampAO are illustrated below. Example 1 VAR triggdata ramp_up; VAR triggdata ramp_down; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, \T2:=ramp_down, z10, gun1; In this example both the ramp-up and ramp-down of the AO is done in the same TriggL instruction on the same movement path. It works without any interference of the AO settings if the movement path is long enough. The analog signal aolaser1 will start ramping up its logical value from the current value to the new value 8 when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. The analog signal aolaser1 will start ramping down its logical value from the current value 8 to the new value 2 when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p2 . The whole ramp-up will be done while the robot moves 10 mm. Error handling If the programmed SetValue argument for the specified analog output signal AOutput is out of limit then the system variable ERRNO is set to ERR_AO_LIM . This error can be handled in the error handler. Limitations The analog output signal value will not be compensated for lower TCP -speed in corner path or during other acceleration or deceleration phases (the AO is not TCP speed proportional). Only the start point of the AO ramping will be done at the specified position on the path. The ramping up or down will be done with “dead calculation”, with high accuracy: • At constant speed the deviation for the end of the AO ramping compared with the specified will be low. • During acceleration or deceleration phases, such as near stop points, the deviation will be higher. • Recommendation: use corner paths before ramp up and after ramp down. If use of two or several TriggRampAO on the same analog output signal and connected to the same TriggL/C/J instrucion and both or several RampLength are located on the same part of the robot path then the AO settings will interact with each other. The position (+/- time) related ramp AO event will start when the previous ToPoint is passed if the specified Distance from the actual ToPoint is not within the length of movement for the current TriggL/C/J instruction. The position (+/- time) related ramp AO event will start when the actual ToPoint is passed if the specified Distance from the previous ToPoint is not within the length of movement for the current TriggL/C/J instruction (with argument \Start ). 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
622
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 619 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggRampAO , the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC or TriggJ is executed, the following are applicable with regard to the definitions in TriggRampAO : The table describes the distance specified in the argument Distance : The figure shows ramping of AO in a corner path. xx0600003439 Program execution characteristics of TriggRampAO connected to any TriggL/C/J : • The ramping of the AO is started when the robot reaches the specified Distance point on the robot path (with compensation for the specified EquipLag ) • The ramping function will be performed during a time period calculated from specified RampLength and the programmed TCP speed. The calculation takes into cosideration VelSet , manual speed override, and max. 250 mm/s in MAN mode but not any other speed limitations. • Updating of the AO signal value from start (current read) value to specified SetValue will be done each 10 ms resulting in a staircase form. If the calculated ramp time or specified ramp time is greater than 0.5 s then the ramping frequency will slow down: • <= 0,5s gives max. 50 step each 10 ms • <= 1s gives max. 50 steps each 20 ms • <= 1,5s gives max. 50 steps each 30 ms and so on The TriggRampAO action is also done in FWD step but not in BWD step mode. At any type of stop (ProgStop, Emergency Stop …) if the ramping function is active for the occasion: - if ramping up, the AO is set to an old value momentarily. - if ramping down, the AO is set to the new SetValue momentarily. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 620 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggRampAO are illustrated below. Example 1 VAR triggdata ramp_up; VAR triggdata ramp_down; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, \T2:=ramp_down, z10, gun1; In this example both the ramp-up and ramp-down of the AO is done in the same TriggL instruction on the same movement path. It works without any interference of the AO settings if the movement path is long enough. The analog signal aolaser1 will start ramping up its logical value from the current value to the new value 8 when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. The analog signal aolaser1 will start ramping down its logical value from the current value 8 to the new value 2 when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p2 . The whole ramp-up will be done while the robot moves 10 mm. Error handling If the programmed SetValue argument for the specified analog output signal AOutput is out of limit then the system variable ERRNO is set to ERR_AO_LIM . This error can be handled in the error handler. Limitations The analog output signal value will not be compensated for lower TCP -speed in corner path or during other acceleration or deceleration phases (the AO is not TCP speed proportional). Only the start point of the AO ramping will be done at the specified position on the path. The ramping up or down will be done with “dead calculation”, with high accuracy: • At constant speed the deviation for the end of the AO ramping compared with the specified will be low. • During acceleration or deceleration phases, such as near stop points, the deviation will be higher. • Recommendation: use corner paths before ramp up and after ramp down. If use of two or several TriggRampAO on the same analog output signal and connected to the same TriggL/C/J instrucion and both or several RampLength are located on the same part of the robot path then the AO settings will interact with each other. The position (+/- time) related ramp AO event will start when the previous ToPoint is passed if the specified Distance from the actual ToPoint is not within the length of movement for the current TriggL/C/J instruction. The position (+/- time) related ramp AO event will start when the actual ToPoint is passed if the specified Distance from the previous ToPoint is not within the length of movement for the current TriggL/C/J instruction (with argument \Start ). Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 621 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. No support for restart of the ramping AO function after any type of stop (ProgStop, Emergency Stop …). At Power Fail Restart the TriggL/C/J instruction is started from the beginning of the current Power Fail position. Syntax TriggRampAO [ TriggData ’:=’ ] < variable ( VAR ) of triggdata > ‘,‘ [ Distance‘ :=’ ] < expression ( IN ) of num > [ ‘\’ Start ]‘ ,’ [ EquipLag’ :=’ ] < expression ( IN ) of num > ‘,‘ [ AOutput ‘:=’ ] < variable ( VAR ) of signalao>‘ ,’ [ SetValue ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ RampLength ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ ‘\’ Time ]‘ ;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggdata triggdata - Positioning events, trigg on page 1213 Set of analog output signal SetAO - Changes the value of an analog output signal on page 431 signalxx - Digital and analog signals on page 1181 Configuration of event preset time Technical reference manual - System parameters , section Motion Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
623
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 3HAC 16581-1 Revision: J 620 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of how to use the instruction TriggRampAO are illustrated below. Example 1 VAR triggdata ramp_up; VAR triggdata ramp_down; ... TriggRampAO ramp_up, 0 \Start, 0.1, aolaser1, 8, 15; TriggRampAO ramp_down, 15, 0.1, aolaser1, 2, 10; MoveL p1, v200, z10, gun1; TriggL p2, v200, ramp_up, \T2:=ramp_down, z10, gun1; In this example both the ramp-up and ramp-down of the AO is done in the same TriggL instruction on the same movement path. It works without any interference of the AO settings if the movement path is long enough. The analog signal aolaser1 will start ramping up its logical value from the current value to the new value 8 when the TCP of the tool gun1 is 0,1 s before the centre of the corner path at p1 . The whole ramp-up will be done while the robot moves 15 mm. The analog signal aolaser1 will start ramping down its logical value from the current value 8 to the new value 2 when the TCP of the tool gun1 is 15 mm plus 0,1 s before the centre of the corner path at p2 . The whole ramp-up will be done while the robot moves 10 mm. Error handling If the programmed SetValue argument for the specified analog output signal AOutput is out of limit then the system variable ERRNO is set to ERR_AO_LIM . This error can be handled in the error handler. Limitations The analog output signal value will not be compensated for lower TCP -speed in corner path or during other acceleration or deceleration phases (the AO is not TCP speed proportional). Only the start point of the AO ramping will be done at the specified position on the path. The ramping up or down will be done with “dead calculation”, with high accuracy: • At constant speed the deviation for the end of the AO ramping compared with the specified will be low. • During acceleration or deceleration phases, such as near stop points, the deviation will be higher. • Recommendation: use corner paths before ramp up and after ramp down. If use of two or several TriggRampAO on the same analog output signal and connected to the same TriggL/C/J instrucion and both or several RampLength are located on the same part of the robot path then the AO settings will interact with each other. The position (+/- time) related ramp AO event will start when the previous ToPoint is passed if the specified Distance from the actual ToPoint is not within the length of movement for the current TriggL/C/J instruction. The position (+/- time) related ramp AO event will start when the actual ToPoint is passed if the specified Distance from the previous ToPoint is not within the length of movement for the current TriggL/C/J instruction (with argument \Start ). Continued Continues on next page 1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 621 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. No support for restart of the ramping AO function after any type of stop (ProgStop, Emergency Stop …). At Power Fail Restart the TriggL/C/J instruction is started from the beginning of the current Power Fail position. Syntax TriggRampAO [ TriggData ’:=’ ] < variable ( VAR ) of triggdata > ‘,‘ [ Distance‘ :=’ ] < expression ( IN ) of num > [ ‘\’ Start ]‘ ,’ [ EquipLag’ :=’ ] < expression ( IN ) of num > ‘,‘ [ AOutput ‘:=’ ] < variable ( VAR ) of signalao>‘ ,’ [ SetValue ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ RampLength ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ ‘\’ Time ]‘ ;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggdata triggdata - Positioning events, trigg on page 1213 Set of analog output signal SetAO - Changes the value of an analog output signal on page 431 signalxx - Digital and analog signals on page 1181 Configuration of event preset time Technical reference manual - System parameters , section Motion Continued 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 622 © Copyright 2004-2010 ABB. All rights reserved. 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event Usage TriggSpeed is used to define conditions and actions for control of an analog output signal with output value proportional to the actual TCP speed. The beginning, scaling, and ending of the analog output can be specified at a fixed position-time along the robot’s movement path. It is possible to use time compensation for the lag in the external equipment for the beginning, scaling, and ending of the analog output and also for speed dips of the robot. The data defined is used in one or more subsequent TriggL , TriggC , or TriggJ instructions. This instruction can only be used in the main task T_ROB1 , if in a MultiMove System, in Motion tasks. Basic examples Basic examples of the instruction TriggSpeed are illustrated below. See also More examples on page 626 . Example 1 VAR triggdata glueflow; TriggSpeed glueflow, 0, 0.05, glue_ao, 0.8\DipLag=:0.04 \ErrDO:=glue_err; TriggL p1, v500, glueflow, z50, gun1; TriggSpeed glueflow, 10, 0.05, glue_ao, 1; TriggL p2, v500, glueflow, z10, gun1; TriggSpeed glueflow, 0, 0.05, glue_ao, 0; TriggL p3, v500, glueflow, z50, gun1; The figure below illustrates an example of TriggSpeed sequence xx0500002329 The glue flow (analog output glue_ao ) with scale value 0.8 starts when TCP is 0.05 s before point p1 , new glue flow scale value 1 when TCP is 10 mm plus 0.05 s before point p2 , and the glue flow ends (scale value 0) when TCP is 0.05 s before point p3 . Any speed dip by the robot is time compensated in such a way that the analog output signal glue_ao is affected 0.04 s before the TCP speed dip 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
624
1 Instructions 1.214. TriggRampAO - Define a fixed position ramp AO event on the path RobotWare - OS 621 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. No support for restart of the ramping AO function after any type of stop (ProgStop, Emergency Stop …). At Power Fail Restart the TriggL/C/J instruction is started from the beginning of the current Power Fail position. Syntax TriggRampAO [ TriggData ’:=’ ] < variable ( VAR ) of triggdata > ‘,‘ [ Distance‘ :=’ ] < expression ( IN ) of num > [ ‘\’ Start ]‘ ,’ [ EquipLag’ :=’ ] < expression ( IN ) of num > ‘,‘ [ AOutput ‘:=’ ] < variable ( VAR ) of signalao>‘ ,’ [ SetValue ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ RampLength ‘:=’ ] < expression ( IN ) of num>‘ ,‘ [ ‘\’ Time ]‘ ;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggdata triggdata - Positioning events, trigg on page 1213 Set of analog output signal SetAO - Changes the value of an analog output signal on page 431 signalxx - Digital and analog signals on page 1181 Configuration of event preset time Technical reference manual - System parameters , section Motion Continued 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 622 © Copyright 2004-2010 ABB. All rights reserved. 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event Usage TriggSpeed is used to define conditions and actions for control of an analog output signal with output value proportional to the actual TCP speed. The beginning, scaling, and ending of the analog output can be specified at a fixed position-time along the robot’s movement path. It is possible to use time compensation for the lag in the external equipment for the beginning, scaling, and ending of the analog output and also for speed dips of the robot. The data defined is used in one or more subsequent TriggL , TriggC , or TriggJ instructions. This instruction can only be used in the main task T_ROB1 , if in a MultiMove System, in Motion tasks. Basic examples Basic examples of the instruction TriggSpeed are illustrated below. See also More examples on page 626 . Example 1 VAR triggdata glueflow; TriggSpeed glueflow, 0, 0.05, glue_ao, 0.8\DipLag=:0.04 \ErrDO:=glue_err; TriggL p1, v500, glueflow, z50, gun1; TriggSpeed glueflow, 10, 0.05, glue_ao, 1; TriggL p2, v500, glueflow, z10, gun1; TriggSpeed glueflow, 0, 0.05, glue_ao, 0; TriggL p3, v500, glueflow, z50, gun1; The figure below illustrates an example of TriggSpeed sequence xx0500002329 The glue flow (analog output glue_ao ) with scale value 0.8 starts when TCP is 0.05 s before point p1 , new glue flow scale value 1 when TCP is 10 mm plus 0.05 s before point p2 , and the glue flow ends (scale value 0) when TCP is 0.05 s before point p3 . Any speed dip by the robot is time compensated in such a way that the analog output signal glue_ao is affected 0.04 s before the TCP speed dip occurs. Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 623 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If overflow of the calculated logical analog output value in glue_ao then the digital output signal glue_err is set. If there is no more overflow then glue_err is reset. Arguments TriggSpeed TriggData Distance [\Start] ScaleLag AOp ScaleValue [\DipLag] [\ErrDO] [\Inhib] TriggData Data type: triggdata Variable for storing the triggdata returned from this instruction. These triggdata are then used in the subsequent TriggL , TriggC , or TriggJ instructions. Distance Data type: num Defines the position on the path for change of the analog output value. Specified as the distance in mm (positive value) from the end point of the movement path (applicable if the argument \ Start is not set). See Program execution on page 625 for further details. [ \Start ] Data type: switch Used when the distance for the argument Distance starts at the movement’s start point instead of the end point. ScaleLag Data type: num Specify the lag as time in s (positive value) in the external equipment for change of the analog output value (starting, scaling, and ending). For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP physically reaches the specified distance in relation to the movement’s start or end point. The argument can also be used to extend the analog output beyond the end point. Set the time in seconds that the robot shall keep the analog output. Set the time with a negative sign. The limit is -0.10 seconds. The figure below illustrates the use of argument ScaleLag xx0500002330 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
625
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 622 © Copyright 2004-2010 ABB. All rights reserved. 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event Usage TriggSpeed is used to define conditions and actions for control of an analog output signal with output value proportional to the actual TCP speed. The beginning, scaling, and ending of the analog output can be specified at a fixed position-time along the robot’s movement path. It is possible to use time compensation for the lag in the external equipment for the beginning, scaling, and ending of the analog output and also for speed dips of the robot. The data defined is used in one or more subsequent TriggL , TriggC , or TriggJ instructions. This instruction can only be used in the main task T_ROB1 , if in a MultiMove System, in Motion tasks. Basic examples Basic examples of the instruction TriggSpeed are illustrated below. See also More examples on page 626 . Example 1 VAR triggdata glueflow; TriggSpeed glueflow, 0, 0.05, glue_ao, 0.8\DipLag=:0.04 \ErrDO:=glue_err; TriggL p1, v500, glueflow, z50, gun1; TriggSpeed glueflow, 10, 0.05, glue_ao, 1; TriggL p2, v500, glueflow, z10, gun1; TriggSpeed glueflow, 0, 0.05, glue_ao, 0; TriggL p3, v500, glueflow, z50, gun1; The figure below illustrates an example of TriggSpeed sequence xx0500002329 The glue flow (analog output glue_ao ) with scale value 0.8 starts when TCP is 0.05 s before point p1 , new glue flow scale value 1 when TCP is 10 mm plus 0.05 s before point p2 , and the glue flow ends (scale value 0) when TCP is 0.05 s before point p3 . Any speed dip by the robot is time compensated in such a way that the analog output signal glue_ao is affected 0.04 s before the TCP speed dip occurs. Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 623 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If overflow of the calculated logical analog output value in glue_ao then the digital output signal glue_err is set. If there is no more overflow then glue_err is reset. Arguments TriggSpeed TriggData Distance [\Start] ScaleLag AOp ScaleValue [\DipLag] [\ErrDO] [\Inhib] TriggData Data type: triggdata Variable for storing the triggdata returned from this instruction. These triggdata are then used in the subsequent TriggL , TriggC , or TriggJ instructions. Distance Data type: num Defines the position on the path for change of the analog output value. Specified as the distance in mm (positive value) from the end point of the movement path (applicable if the argument \ Start is not set). See Program execution on page 625 for further details. [ \Start ] Data type: switch Used when the distance for the argument Distance starts at the movement’s start point instead of the end point. ScaleLag Data type: num Specify the lag as time in s (positive value) in the external equipment for change of the analog output value (starting, scaling, and ending). For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP physically reaches the specified distance in relation to the movement’s start or end point. The argument can also be used to extend the analog output beyond the end point. Set the time in seconds that the robot shall keep the analog output. Set the time with a negative sign. The limit is -0.10 seconds. The figure below illustrates the use of argument ScaleLag xx0500002330 Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 624 © Copyright 2004-2010 ABB. All rights reserved. AOp Analog Output Data type: signalao The name of the analog output signal. ScaleValue Data type: num The scale value for the analog output signal. The physical output value for the analog signal is calculated by the robot: • Logical output value = Scale value * Actual TCP speed in mm/s. • Physical output value = According definition in configuration for actual analog output signal with above Logical output value as input. [ \DipLag ] Data type: num Specify the lag as time in s (positive value) for the external equipment when changing of the analog output value due to robot speed dips. For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP speed dip occurs. This argument can only be used by the robot for the first TriggSpeed (in combination with one of TriggL , TriggC, or TriggJ ) in a sequence of several TriggSpeed instructions. The first specified argument value is valid for all the following TriggSpeed in the sequence. [ \ErrDO ] Error Digital Output Data type: signaldo The name of the digital output signal for reporting analog value overflow. If during movement the calculation of the logical analog output value for signal in argument AOp results in overflow due to overspeed then this signal is set and the physical analog output value is reduced to the maximum value. If there is no more overflow then the signal is reset. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. [ \Inhib ] Inhibit Data type: bool The name of a persistent variable flag for inhibiting the setting of the analog signal at runtime. If this optional argument is used and the actual value of the specified flag is TRUE at the time for setting the analog signal then the specified signal AOp will be set to 0 instead of a calculated value. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. 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
626
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 623 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If overflow of the calculated logical analog output value in glue_ao then the digital output signal glue_err is set. If there is no more overflow then glue_err is reset. Arguments TriggSpeed TriggData Distance [\Start] ScaleLag AOp ScaleValue [\DipLag] [\ErrDO] [\Inhib] TriggData Data type: triggdata Variable for storing the triggdata returned from this instruction. These triggdata are then used in the subsequent TriggL , TriggC , or TriggJ instructions. Distance Data type: num Defines the position on the path for change of the analog output value. Specified as the distance in mm (positive value) from the end point of the movement path (applicable if the argument \ Start is not set). See Program execution on page 625 for further details. [ \Start ] Data type: switch Used when the distance for the argument Distance starts at the movement’s start point instead of the end point. ScaleLag Data type: num Specify the lag as time in s (positive value) in the external equipment for change of the analog output value (starting, scaling, and ending). For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP physically reaches the specified distance in relation to the movement’s start or end point. The argument can also be used to extend the analog output beyond the end point. Set the time in seconds that the robot shall keep the analog output. Set the time with a negative sign. The limit is -0.10 seconds. The figure below illustrates the use of argument ScaleLag xx0500002330 Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 624 © Copyright 2004-2010 ABB. All rights reserved. AOp Analog Output Data type: signalao The name of the analog output signal. ScaleValue Data type: num The scale value for the analog output signal. The physical output value for the analog signal is calculated by the robot: • Logical output value = Scale value * Actual TCP speed in mm/s. • Physical output value = According definition in configuration for actual analog output signal with above Logical output value as input. [ \DipLag ] Data type: num Specify the lag as time in s (positive value) for the external equipment when changing of the analog output value due to robot speed dips. For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP speed dip occurs. This argument can only be used by the robot for the first TriggSpeed (in combination with one of TriggL , TriggC, or TriggJ ) in a sequence of several TriggSpeed instructions. The first specified argument value is valid for all the following TriggSpeed in the sequence. [ \ErrDO ] Error Digital Output Data type: signaldo The name of the digital output signal for reporting analog value overflow. If during movement the calculation of the logical analog output value for signal in argument AOp results in overflow due to overspeed then this signal is set and the physical analog output value is reduced to the maximum value. If there is no more overflow then the signal is reset. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. [ \Inhib ] Inhibit Data type: bool The name of a persistent variable flag for inhibiting the setting of the analog signal at runtime. If this optional argument is used and the actual value of the specified flag is TRUE at the time for setting the analog signal then the specified signal AOp will be set to 0 instead of a calculated value. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 625 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggSpeed the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC , or TriggJ is executed then the following are applicable with regard to the definitions in TriggSpeed : For the distance specified in the argument Distance , see the table below.: The figure below illustrates the fixed position-time scale value event on a corner path. xx0500002331 The position-time related scale value event will be generated when the start point (end point) is passed if the specified distance from the end point (start point) is not within the length of the movement of the current instruction ( TriggL , TriggC , or TriggJ ). The 1:st TriggSpeed used by one of TriggL , TriggC , or TriggJ instruction will internally in the system create a process with the same name as the analog output signal. The same process will be used by all succeeding TriggL , TriggC , or TriggJ which refers to same signal name and setup by a TriggSpeed instruction. The process will immediately set the analog output to 0, in the event of a program emergency stop. In the event of a program stop, the analog output signal will stay TCP-speed proportional until the robot stands still. The process keeps “alive” and ready for a restart. When the robot restarts, the signal is TCP-speed proportional directly from the start. xx0500002332 The process will “die” after handling a scale event with value 0 if no succeeding TriggL , TriggC , or TriggJ is in the queue at the time. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). 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
627
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 624 © Copyright 2004-2010 ABB. All rights reserved. AOp Analog Output Data type: signalao The name of the analog output signal. ScaleValue Data type: num The scale value for the analog output signal. The physical output value for the analog signal is calculated by the robot: • Logical output value = Scale value * Actual TCP speed in mm/s. • Physical output value = According definition in configuration for actual analog output signal with above Logical output value as input. [ \DipLag ] Data type: num Specify the lag as time in s (positive value) for the external equipment when changing of the analog output value due to robot speed dips. For compensation of external equipment lag, this argument value means that the analog output signal is set by the robot at a specified time before the TCP speed dip occurs. This argument can only be used by the robot for the first TriggSpeed (in combination with one of TriggL , TriggC, or TriggJ ) in a sequence of several TriggSpeed instructions. The first specified argument value is valid for all the following TriggSpeed in the sequence. [ \ErrDO ] Error Digital Output Data type: signaldo The name of the digital output signal for reporting analog value overflow. If during movement the calculation of the logical analog output value for signal in argument AOp results in overflow due to overspeed then this signal is set and the physical analog output value is reduced to the maximum value. If there is no more overflow then the signal is reset. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. [ \Inhib ] Inhibit Data type: bool The name of a persistent variable flag for inhibiting the setting of the analog signal at runtime. If this optional argument is used and the actual value of the specified flag is TRUE at the time for setting the analog signal then the specified signal AOp will be set to 0 instead of a calculated value. This argument can only be used by the robot for the 1st TriggSpeed (in combination with one of TriggL , TriggC , or TriggJ ) in a sequence of several TriggSpeed instructions. The 1st given argument value is valid for all the following TriggSpeed in the sequence. Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 625 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggSpeed the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC , or TriggJ is executed then the following are applicable with regard to the definitions in TriggSpeed : For the distance specified in the argument Distance , see the table below.: The figure below illustrates the fixed position-time scale value event on a corner path. xx0500002331 The position-time related scale value event will be generated when the start point (end point) is passed if the specified distance from the end point (start point) is not within the length of the movement of the current instruction ( TriggL , TriggC , or TriggJ ). The 1:st TriggSpeed used by one of TriggL , TriggC , or TriggJ instruction will internally in the system create a process with the same name as the analog output signal. The same process will be used by all succeeding TriggL , TriggC , or TriggJ which refers to same signal name and setup by a TriggSpeed instruction. The process will immediately set the analog output to 0, in the event of a program emergency stop. In the event of a program stop, the analog output signal will stay TCP-speed proportional until the robot stands still. The process keeps “alive” and ready for a restart. When the robot restarts, the signal is TCP-speed proportional directly from the start. xx0500002332 The process will “die” after handling a scale event with value 0 if no succeeding TriggL , TriggC , or TriggJ is in the queue at the time. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 626 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction TriggSpeed are illustrated below. Example 1 VAR triggdata flow; TriggSpeed flow, 10 \Start, 0.05, flowsignal, 0.5 \DipLag:=0.03; MoveJ p1, v1000, z50, tool1; TriggL p2, v500, flow, z50, tool1; The analog output signal flowsignal is set to a logical value = ( 0.5 * actual TCP speed in mm/s) 0.05 s before the TCP passes a point located 10 mm after the start point p. The output value is adjusted to be proportional to the actual TCP speed during the movement to p2 . ... TriggL p3, v500, flow, z10, tool1; The robot moves from p2 to p3 with the analog output value proportional to the actual TCP speed. The analog output value will be decreased at time 0.03 s before the robot reduces the TCP speed during the passage of the corner path z10 . Limitations The limitations for the instruction TriggSpeed are illustrated below. Accuracy of position-time related scale value event Typical absolute accuracy values for scale value events ±5 ms. Typical repeat accuracy values for scale value events ±2 ms. Accuracy of TCP speed dips adaptation (deceleration - acceleration phases) Typical absolute accuracy values for TCP speed dips adaptation ±5 ms. Typical repeat accuracy values for TCP speed dips adaptation ±2ms (the value depends of the configured Path resolution ). Negative ScaleLag If a negative value on parameter ScaleLag is used to move the zero scaling over to the next segment then the analog output signal will not be reset if a program stop occurs. An emergency stop will always reset the analog signal. The analog signal is no longer TCP-speed proportional after the end point on the segment. xx0500002333 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
628
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 625 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution When running the instruction TriggSpeed the trigger condition is stored in the specified variable for the argument TriggData . Afterwards, when one of the instructions TriggL , TriggC , or TriggJ is executed then the following are applicable with regard to the definitions in TriggSpeed : For the distance specified in the argument Distance , see the table below.: The figure below illustrates the fixed position-time scale value event on a corner path. xx0500002331 The position-time related scale value event will be generated when the start point (end point) is passed if the specified distance from the end point (start point) is not within the length of the movement of the current instruction ( TriggL , TriggC , or TriggJ ). The 1:st TriggSpeed used by one of TriggL , TriggC , or TriggJ instruction will internally in the system create a process with the same name as the analog output signal. The same process will be used by all succeeding TriggL , TriggC , or TriggJ which refers to same signal name and setup by a TriggSpeed instruction. The process will immediately set the analog output to 0, in the event of a program emergency stop. In the event of a program stop, the analog output signal will stay TCP-speed proportional until the robot stands still. The process keeps “alive” and ready for a restart. When the robot restarts, the signal is TCP-speed proportional directly from the start. xx0500002332 The process will “die” after handling a scale event with value 0 if no succeeding TriggL , TriggC , or TriggJ is in the queue at the time. Linear movement The straight line distance Circular movement The circle arc length Non-linear movement The approximate arc length along the path (to obtain adequate accuracy, the distance should not exceed one half of the arc length). Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 626 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction TriggSpeed are illustrated below. Example 1 VAR triggdata flow; TriggSpeed flow, 10 \Start, 0.05, flowsignal, 0.5 \DipLag:=0.03; MoveJ p1, v1000, z50, tool1; TriggL p2, v500, flow, z50, tool1; The analog output signal flowsignal is set to a logical value = ( 0.5 * actual TCP speed in mm/s) 0.05 s before the TCP passes a point located 10 mm after the start point p. The output value is adjusted to be proportional to the actual TCP speed during the movement to p2 . ... TriggL p3, v500, flow, z10, tool1; The robot moves from p2 to p3 with the analog output value proportional to the actual TCP speed. The analog output value will be decreased at time 0.03 s before the robot reduces the TCP speed during the passage of the corner path z10 . Limitations The limitations for the instruction TriggSpeed are illustrated below. Accuracy of position-time related scale value event Typical absolute accuracy values for scale value events ±5 ms. Typical repeat accuracy values for scale value events ±2 ms. Accuracy of TCP speed dips adaptation (deceleration - acceleration phases) Typical absolute accuracy values for TCP speed dips adaptation ±5 ms. Typical repeat accuracy values for TCP speed dips adaptation ±2ms (the value depends of the configured Path resolution ). Negative ScaleLag If a negative value on parameter ScaleLag is used to move the zero scaling over to the next segment then the analog output signal will not be reset if a program stop occurs. An emergency stop will always reset the analog signal. The analog signal is no longer TCP-speed proportional after the end point on the segment. xx0500002333 Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 627 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Given two consecutive segments with TriggL / TriggSpeed instructions. A negative value in parameter ScaleLag makes it possible to move the scale event from the first segment to the beginning of the second segment. If the second segment scales at the beginning then there is no control if the two scales interfere. xx0500002334 Related system parameters The system parameter Event Preset Time is used to delay the robot to make it possible to activate/control the external equipment before the robot runs through the position. The table below illustrates the recommendation for setup of system parameter Event Preset Time , where typical Servo Lag is 0.040 s.. ScaleLag DipLag Required Event Preset Time to avoid runtime execution error Recommended Event Preset Time to obtain best accu- racy ScaleLag > DipLag Always DipLag , if DipLag > Servo Lag ScaleLag in s plus 0.090 s ScaleLag < DipLag DipLag < Servo Lag - " - 0.090 s - " - DipLag >Servo Lag - " - DipLag in s plus 0.030 s 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
629
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 626 © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the instruction TriggSpeed are illustrated below. Example 1 VAR triggdata flow; TriggSpeed flow, 10 \Start, 0.05, flowsignal, 0.5 \DipLag:=0.03; MoveJ p1, v1000, z50, tool1; TriggL p2, v500, flow, z50, tool1; The analog output signal flowsignal is set to a logical value = ( 0.5 * actual TCP speed in mm/s) 0.05 s before the TCP passes a point located 10 mm after the start point p. The output value is adjusted to be proportional to the actual TCP speed during the movement to p2 . ... TriggL p3, v500, flow, z10, tool1; The robot moves from p2 to p3 with the analog output value proportional to the actual TCP speed. The analog output value will be decreased at time 0.03 s before the robot reduces the TCP speed during the passage of the corner path z10 . Limitations The limitations for the instruction TriggSpeed are illustrated below. Accuracy of position-time related scale value event Typical absolute accuracy values for scale value events ±5 ms. Typical repeat accuracy values for scale value events ±2 ms. Accuracy of TCP speed dips adaptation (deceleration - acceleration phases) Typical absolute accuracy values for TCP speed dips adaptation ±5 ms. Typical repeat accuracy values for TCP speed dips adaptation ±2ms (the value depends of the configured Path resolution ). Negative ScaleLag If a negative value on parameter ScaleLag is used to move the zero scaling over to the next segment then the analog output signal will not be reset if a program stop occurs. An emergency stop will always reset the analog signal. The analog signal is no longer TCP-speed proportional after the end point on the segment. xx0500002333 Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 627 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Given two consecutive segments with TriggL / TriggSpeed instructions. A negative value in parameter ScaleLag makes it possible to move the scale event from the first segment to the beginning of the second segment. If the second segment scales at the beginning then there is no control if the two scales interfere. xx0500002334 Related system parameters The system parameter Event Preset Time is used to delay the robot to make it possible to activate/control the external equipment before the robot runs through the position. The table below illustrates the recommendation for setup of system parameter Event Preset Time , where typical Servo Lag is 0.040 s.. ScaleLag DipLag Required Event Preset Time to avoid runtime execution error Recommended Event Preset Time to obtain best accu- racy ScaleLag > DipLag Always DipLag , if DipLag > Servo Lag ScaleLag in s plus 0.090 s ScaleLag < DipLag DipLag < Servo Lag - " - 0.090 s - " - DipLag >Servo Lag - " - DipLag in s plus 0.030 s Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 628 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggSpeed [ TriggData ’:=’ ] < variable ( VAR ) of triggdata>´,’ [ Distance’ :=’ ] < expression ( IN ) of num> [ ’\’ Start ] ´,’ [ ScaleLag’:=’ ] < expression ( IN ) of num> ´,’ [ AOp ’:=’] < variable ( VAR ) of signalao> ´,’ [ ScaleValue’ :=’ ] < expression ( IN ) of num> [ ’\’ DipLag’ :=’ < expression ( IN ) of num> ] [ ’\’ ErrDO’ :=’ < variable ( VAR ) of signaldo> ] [ ’\’ Inhib’ :=’ < persistent ( PERS ) of bool >] ´;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggInt - Defines a position related interrupt on page 588 TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggs triggdata - Positioning events, trigg on page 1213 Configuration of Event preset time Technical reference manual - System parameters , section Motion - Motion Planner - Event Preset Time Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
630
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 627 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling Given two consecutive segments with TriggL / TriggSpeed instructions. A negative value in parameter ScaleLag makes it possible to move the scale event from the first segment to the beginning of the second segment. If the second segment scales at the beginning then there is no control if the two scales interfere. xx0500002334 Related system parameters The system parameter Event Preset Time is used to delay the robot to make it possible to activate/control the external equipment before the robot runs through the position. The table below illustrates the recommendation for setup of system parameter Event Preset Time , where typical Servo Lag is 0.040 s.. ScaleLag DipLag Required Event Preset Time to avoid runtime execution error Recommended Event Preset Time to obtain best accu- racy ScaleLag > DipLag Always DipLag , if DipLag > Servo Lag ScaleLag in s plus 0.090 s ScaleLag < DipLag DipLag < Servo Lag - " - 0.090 s - " - DipLag >Servo Lag - " - DipLag in s plus 0.030 s Continued Continues on next page 1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 628 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggSpeed [ TriggData ’:=’ ] < variable ( VAR ) of triggdata>´,’ [ Distance’ :=’ ] < expression ( IN ) of num> [ ’\’ Start ] ´,’ [ ScaleLag’:=’ ] < expression ( IN ) of num> ´,’ [ AOp ’:=’] < variable ( VAR ) of signalao> ´,’ [ ScaleValue’ :=’ ] < expression ( IN ) of num> [ ’\’ DipLag’ :=’ < expression ( IN ) of num> ] [ ’\’ ErrDO’ :=’ < variable ( VAR ) of signaldo> ] [ ’\’ Inhib’ :=’ < persistent ( PERS ) of bool >] ´;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggInt - Defines a position related interrupt on page 588 TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggs triggdata - Positioning events, trigg on page 1213 Configuration of Event preset time Technical reference manual - System parameters , section Motion - Motion Planner - Event Preset Time Continued 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 629 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.216. TriggStopProc - Generate restart data for trigg signals at stop Usage The instruction TriggStopProc creates an internal supervision process in the system for zero setting of specified process signals and the generation of restart data in a specified persistent variable at every program stop ( STOP ) or emergency stop ( QSTOP ) in the system. TriggStopProc and the data type restartdata are intended to be used for restart after program stop ( STOP ) or emergency stop ( QSTOP ) of own process instructions defined in RAPID ( NOSTEPIN routines). It is possible in a user defined RESTART event routine to analyze the current restart data, step backwards on the path with instruction StepBwdPath , and activate suitable process signals before the movement restarts. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in any motion tasks. Note for MultiMove system that only one TriggStopProc support process with the specified shadow signal name (argument ShadowDO ) can be active in the system at the same time. It means that TriggStopProc supervises program stop or emergency stop in the program task where it was last executed. Arguments TriggStopProc RestartRef [\DO] [\GO1] [\GO2] [\GO3] [\GO4] ShadowDO RestartRef Restart Reference Data type: restartdata The persistent variable in which restart data will be available after every stop of program execution. [\DO1] Digital Output 1 Data type: signaldo The signal variable for a digital process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO1] Group Output 1 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO2] Group Output 2 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
631
1 Instructions 1.215. TriggSpeed - Defines TCP speed proportional analog output with fixed position-time scale event RobotWare - OS 3HAC 16581-1 Revision: J 628 © Copyright 2004-2010 ABB. All rights reserved. Syntax TriggSpeed [ TriggData ’:=’ ] < variable ( VAR ) of triggdata>´,’ [ Distance’ :=’ ] < expression ( IN ) of num> [ ’\’ Start ] ´,’ [ ScaleLag’:=’ ] < expression ( IN ) of num> ´,’ [ AOp ’:=’] < variable ( VAR ) of signalao> ´,’ [ ScaleValue’ :=’ ] < expression ( IN ) of num> [ ’\’ DipLag’ :=’ < expression ( IN ) of num> ] [ ’\’ ErrDO’ :=’ < variable ( VAR ) of signaldo> ] [ ’\’ Inhib’ :=’ < persistent ( PERS ) of bool >] ´;’ Related information For information about See Use of triggers TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 TriggJ - Axis-wise robot movements with events on page 597 Definition of other triggs TriggIO - Define a fixed position or time I/O event near a stop point on page 592 TriggInt - Defines a position related interrupt on page 588 TriggEquip - Define a fixed position and time I/O event on the path on page 582 Storage of triggs triggdata - Positioning events, trigg on page 1213 Configuration of Event preset time Technical reference manual - System parameters , section Motion - Motion Planner - Event Preset Time Continued 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 629 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.216. TriggStopProc - Generate restart data for trigg signals at stop Usage The instruction TriggStopProc creates an internal supervision process in the system for zero setting of specified process signals and the generation of restart data in a specified persistent variable at every program stop ( STOP ) or emergency stop ( QSTOP ) in the system. TriggStopProc and the data type restartdata are intended to be used for restart after program stop ( STOP ) or emergency stop ( QSTOP ) of own process instructions defined in RAPID ( NOSTEPIN routines). It is possible in a user defined RESTART event routine to analyze the current restart data, step backwards on the path with instruction StepBwdPath , and activate suitable process signals before the movement restarts. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in any motion tasks. Note for MultiMove system that only one TriggStopProc support process with the specified shadow signal name (argument ShadowDO ) can be active in the system at the same time. It means that TriggStopProc supervises program stop or emergency stop in the program task where it was last executed. Arguments TriggStopProc RestartRef [\DO] [\GO1] [\GO2] [\GO3] [\GO4] ShadowDO RestartRef Restart Reference Data type: restartdata The persistent variable in which restart data will be available after every stop of program execution. [\DO1] Digital Output 1 Data type: signaldo The signal variable for a digital process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO1] Group Output 1 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO2] Group Output 2 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 630 © Copyright 2004-2010 ABB. All rights reserved. [\GO3] Group Output 3 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO4] Group Output 4 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. At least one of the option parameters D01, GO1 ... GO4 must be used. ShadowDO Shadow Digital Output Data type: signaldo The signal variable for the digital signal, which must mirror whether or not the process is active along the robot path. This signal will not be set to zero by the process TriggStopProc at STOP or QSTOP , but its values will be mirrored in restartdata . Program execution Setup and execution of TriggStopProc TriggStopProc must be called from both: • the START event routine or in the unit part of the program (set PP to main, kill the internal process for TriggStopProc ) • the POWERON event routine (power off, kill the internal process for TriggStopProc ) The internal name of the process for TriggStopProc is the same as the signal name in the argument ShadowDO . If TriggStopProc, with the same signal name in argument ShadowDO , is executed twice from the same or another program task then only the last executed TriggStopProc will be active. Execution of TriggStopProc only starts the supervision of I/O signals at STOP and QSTOP . Program stop STOP The process TriggStopProc comprises the following steps: • Wait until the robot stands still on the path. • Store the current value (prevalue according to restartdata ) of all used process signals. Zero sets all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signals change their value during this time: - Store the current value again (postvalue according to restatdata ) - Set that signal to zero except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. 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
632
1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 629 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.216. TriggStopProc - Generate restart data for trigg signals at stop Usage The instruction TriggStopProc creates an internal supervision process in the system for zero setting of specified process signals and the generation of restart data in a specified persistent variable at every program stop ( STOP ) or emergency stop ( QSTOP ) in the system. TriggStopProc and the data type restartdata are intended to be used for restart after program stop ( STOP ) or emergency stop ( QSTOP ) of own process instructions defined in RAPID ( NOSTEPIN routines). It is possible in a user defined RESTART event routine to analyze the current restart data, step backwards on the path with instruction StepBwdPath , and activate suitable process signals before the movement restarts. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in any motion tasks. Note for MultiMove system that only one TriggStopProc support process with the specified shadow signal name (argument ShadowDO ) can be active in the system at the same time. It means that TriggStopProc supervises program stop or emergency stop in the program task where it was last executed. Arguments TriggStopProc RestartRef [\DO] [\GO1] [\GO2] [\GO3] [\GO4] ShadowDO RestartRef Restart Reference Data type: restartdata The persistent variable in which restart data will be available after every stop of program execution. [\DO1] Digital Output 1 Data type: signaldo The signal variable for a digital process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO1] Group Output 1 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO2] Group Output 2 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 630 © Copyright 2004-2010 ABB. All rights reserved. [\GO3] Group Output 3 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO4] Group Output 4 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. At least one of the option parameters D01, GO1 ... GO4 must be used. ShadowDO Shadow Digital Output Data type: signaldo The signal variable for the digital signal, which must mirror whether or not the process is active along the robot path. This signal will not be set to zero by the process TriggStopProc at STOP or QSTOP , but its values will be mirrored in restartdata . Program execution Setup and execution of TriggStopProc TriggStopProc must be called from both: • the START event routine or in the unit part of the program (set PP to main, kill the internal process for TriggStopProc ) • the POWERON event routine (power off, kill the internal process for TriggStopProc ) The internal name of the process for TriggStopProc is the same as the signal name in the argument ShadowDO . If TriggStopProc, with the same signal name in argument ShadowDO , is executed twice from the same or another program task then only the last executed TriggStopProc will be active. Execution of TriggStopProc only starts the supervision of I/O signals at STOP and QSTOP . Program stop STOP The process TriggStopProc comprises the following steps: • Wait until the robot stands still on the path. • Store the current value (prevalue according to restartdata ) of all used process signals. Zero sets all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signals change their value during this time: - Store the current value again (postvalue according to restatdata ) - Set that signal to zero except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 631 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Emergency stop ( QSTOP ) The process TriggStopProc comprises the following steps: • Do the next step as soon as possible. • Store the current value (prevalue according to restartdata ) of all used process signals. Set to zero all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signal changes its value during this time: - Store its current value again (postvalue according to restatdata ) - Set to zero that signal except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. Critical area for process restart Both the robot servo and the external equipment have some lags. All the instructions in the Trigg family are designed so that all signals will be set at suitable places on the robot path, independently of different lags in external equipment, to obtain process results that are as good as possible. Because of this, the settings of I/O signals can be delayed between 0 - 80 ms internally in the system after the robot stands still at program stop ( STOP ) or after registration of an emergency stop ( QSTOP ). Because of this disadvantage for the restart functionality, both the prevalue, postvalue, and the shadow flanks are introduced in restart data. If this critical timeslot of 0 - 80 ms coincides with the following application process cases then it is difficult to perform a good process restart: • At the start of the application process • At the end of the application process • During a short application process • During a short interrupt in the application process 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
633
1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 630 © Copyright 2004-2010 ABB. All rights reserved. [\GO3] Group Output 3 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. [\GO4] Group Output 4 Data type: signalgo The signal variable for a digital group process signal to be set to zero and supervised in restart data when program execution is stopped. At least one of the option parameters D01, GO1 ... GO4 must be used. ShadowDO Shadow Digital Output Data type: signaldo The signal variable for the digital signal, which must mirror whether or not the process is active along the robot path. This signal will not be set to zero by the process TriggStopProc at STOP or QSTOP , but its values will be mirrored in restartdata . Program execution Setup and execution of TriggStopProc TriggStopProc must be called from both: • the START event routine or in the unit part of the program (set PP to main, kill the internal process for TriggStopProc ) • the POWERON event routine (power off, kill the internal process for TriggStopProc ) The internal name of the process for TriggStopProc is the same as the signal name in the argument ShadowDO . If TriggStopProc, with the same signal name in argument ShadowDO , is executed twice from the same or another program task then only the last executed TriggStopProc will be active. Execution of TriggStopProc only starts the supervision of I/O signals at STOP and QSTOP . Program stop STOP The process TriggStopProc comprises the following steps: • Wait until the robot stands still on the path. • Store the current value (prevalue according to restartdata ) of all used process signals. Zero sets all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signals change their value during this time: - Store the current value again (postvalue according to restatdata ) - Set that signal to zero except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 631 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Emergency stop ( QSTOP ) The process TriggStopProc comprises the following steps: • Do the next step as soon as possible. • Store the current value (prevalue according to restartdata ) of all used process signals. Set to zero all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signal changes its value during this time: - Store its current value again (postvalue according to restatdata ) - Set to zero that signal except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. Critical area for process restart Both the robot servo and the external equipment have some lags. All the instructions in the Trigg family are designed so that all signals will be set at suitable places on the robot path, independently of different lags in external equipment, to obtain process results that are as good as possible. Because of this, the settings of I/O signals can be delayed between 0 - 80 ms internally in the system after the robot stands still at program stop ( STOP ) or after registration of an emergency stop ( QSTOP ). Because of this disadvantage for the restart functionality, both the prevalue, postvalue, and the shadow flanks are introduced in restart data. If this critical timeslot of 0 - 80 ms coincides with the following application process cases then it is difficult to perform a good process restart: • At the start of the application process • At the end of the application process • During a short application process • During a short interrupt in the application process Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 632 © Copyright 2004-2010 ABB. All rights reserved. The figure below illustrates process phases at STOP or QSTOP within critical time slot 0-80 ms xx0500002326 Performing a restart A restart of process instructions ( NOSTEPIN routines) along the robot path must be done in a RESTART event routine. The RESTART event routine can consist of the following steps: Action 1. After QSTOP the regain to path is done at program start. 2. Analyze the restart data from the latest STOP or QSTOP . 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
634
1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 631 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Emergency stop ( QSTOP ) The process TriggStopProc comprises the following steps: • Do the next step as soon as possible. • Store the current value (prevalue according to restartdata ) of all used process signals. Set to zero all used process signals except ShadowDO. • Do the following during the next time slot, about 500 ms: - If some process signal changes its value during this time: - Store its current value again (postvalue according to restatdata ) - Set to zero that signal except ShadowDO - Count the number of value transitions (flanks) of the signal ShadowDO • Update the specified persistent variable with restart data. Critical area for process restart Both the robot servo and the external equipment have some lags. All the instructions in the Trigg family are designed so that all signals will be set at suitable places on the robot path, independently of different lags in external equipment, to obtain process results that are as good as possible. Because of this, the settings of I/O signals can be delayed between 0 - 80 ms internally in the system after the robot stands still at program stop ( STOP ) or after registration of an emergency stop ( QSTOP ). Because of this disadvantage for the restart functionality, both the prevalue, postvalue, and the shadow flanks are introduced in restart data. If this critical timeslot of 0 - 80 ms coincides with the following application process cases then it is difficult to perform a good process restart: • At the start of the application process • At the end of the application process • During a short application process • During a short interrupt in the application process Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 632 © Copyright 2004-2010 ABB. All rights reserved. The figure below illustrates process phases at STOP or QSTOP within critical time slot 0-80 ms xx0500002326 Performing a restart A restart of process instructions ( NOSTEPIN routines) along the robot path must be done in a RESTART event routine. The RESTART event routine can consist of the following steps: Action 1. After QSTOP the regain to path is done at program start. 2. Analyze the restart data from the latest STOP or QSTOP . Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 633 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If waiting in any STOP or QSTOP event routine until the TriggStopProc process is ready with e.g. WaitUntil (myproc.restartstop=TRUE), \MaxTime:=2; , the user must always reset the flag in the RESTART event routine with e.g. myproc.restartstop:=FALSE . After that the restart is ready. Error handling If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. Limitation No support for restart of process instructions after a power failure. Syntax TriggStopProc [ RestartRef ’:=’ ] < persistent ( PERS ) of restartdata> [ ’\’ DO1’:=’ < variable ( VAR ) of signaldo> [ ’\’ GO1’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO2’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO3’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO4’:=’ < variable ( VAR ) of signalgo> ] ’,’ [ ShadowDO’:=’ ] < variable ( VAR ) of signaldo> ’;’ Related information 3. Determine the strategy for process restart from the result of the analysis such as: - Process active, do process restart - Process inactive, do not process restart - Do suitable actions depending on type of process application: • Start of process • End of process • Short process • Short interrupt in process 4. Step backwards on the path. 5. Continue the program results in movement restart. Action For information about See Process instructions TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 Restart data restartdata - Restart data for trigg signals on page 1167 Step backward on path StepBwdPath - Move backwards one step on path on page 499 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
635
1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 3HAC 16581-1 Revision: J 632 © Copyright 2004-2010 ABB. All rights reserved. The figure below illustrates process phases at STOP or QSTOP within critical time slot 0-80 ms xx0500002326 Performing a restart A restart of process instructions ( NOSTEPIN routines) along the robot path must be done in a RESTART event routine. The RESTART event routine can consist of the following steps: Action 1. After QSTOP the regain to path is done at program start. 2. Analyze the restart data from the latest STOP or QSTOP . Continued Continues on next page 1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 633 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If waiting in any STOP or QSTOP event routine until the TriggStopProc process is ready with e.g. WaitUntil (myproc.restartstop=TRUE), \MaxTime:=2; , the user must always reset the flag in the RESTART event routine with e.g. myproc.restartstop:=FALSE . After that the restart is ready. Error handling If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. Limitation No support for restart of process instructions after a power failure. Syntax TriggStopProc [ RestartRef ’:=’ ] < persistent ( PERS ) of restartdata> [ ’\’ DO1’:=’ < variable ( VAR ) of signaldo> [ ’\’ GO1’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO2’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO3’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO4’:=’ < variable ( VAR ) of signalgo> ] ’,’ [ ShadowDO’:=’ ] < variable ( VAR ) of signaldo> ’;’ Related information 3. Determine the strategy for process restart from the result of the analysis such as: - Process active, do process restart - Process inactive, do not process restart - Do suitable actions depending on type of process application: • Start of process • End of process • Short process • Short interrupt in process 4. Step backwards on the path. 5. Continue the program results in movement restart. Action For information about See Process instructions TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 Restart data restartdata - Restart data for trigg signals on page 1167 Step backward on path StepBwdPath - Move backwards one step on path on page 499 Continued 1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 3HAC 16581-1 Revision: J 634 © Copyright 2004-2010 ABB. All rights reserved. 1.217. TryInt - Test if data object is a valid integer Usage TryInt is used to test if a given data object is a valid integer. Basic examples Basic examples of the instruction TryInt are illustrated below. Example 1 VAR num myint := 4; ... TryInt myint; The value of myint will be evaluated and since 4 is a valid integer, the program execution continues. Example 2 VAR dnum mydnum := 20000000; ... TryInt mydnum; The value of mydnum will be evaluated and since 20000000 is a valid dnum integer, the program execution continues. Example 3 VAR num myint := 5.2; ... TryInt myint; ... ERROR IF ERRNO = ERR_INT_NOTVAL THEN myint := Round(myint); RETRY; ENDIF The value of myint will be evaluated and since 5.2 is not a valid integer, an error will be raised. In the error handler, myint will be rounded to 5 and the instruction TryInt is executed one more time. Arguments TryInt DataObj | DataObj2 DataObj Data Object Data type: num The data object to test if it is a valid integer. DataObj2 Data Object 2 Data type: dnum The data object to test if it is a valid integer. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
636
1 Instructions 1.216. TriggStopProc - Generate restart data for trigg signals at stop RobotWare - OS 633 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. If waiting in any STOP or QSTOP event routine until the TriggStopProc process is ready with e.g. WaitUntil (myproc.restartstop=TRUE), \MaxTime:=2; , the user must always reset the flag in the RESTART event routine with e.g. myproc.restartstop:=FALSE . After that the restart is ready. Error handling If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. Limitation No support for restart of process instructions after a power failure. Syntax TriggStopProc [ RestartRef ’:=’ ] < persistent ( PERS ) of restartdata> [ ’\’ DO1’:=’ < variable ( VAR ) of signaldo> [ ’\’ GO1’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO2’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO3’:=’ < variable ( VAR ) of signalgo> ] [ ’\’ GO4’:=’ < variable ( VAR ) of signalgo> ] ’,’ [ ShadowDO’:=’ ] < variable ( VAR ) of signaldo> ’;’ Related information 3. Determine the strategy for process restart from the result of the analysis such as: - Process active, do process restart - Process inactive, do not process restart - Do suitable actions depending on type of process application: • Start of process • End of process • Short process • Short interrupt in process 4. Step backwards on the path. 5. Continue the program results in movement restart. Action For information about See Process instructions TriggL - Linear robot movements with events on page 603 TriggC - Circular robot movement with events on page 570 Restart data restartdata - Restart data for trigg signals on page 1167 Step backward on path StepBwdPath - Move backwards one step on path on page 499 Continued 1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 3HAC 16581-1 Revision: J 634 © Copyright 2004-2010 ABB. All rights reserved. 1.217. TryInt - Test if data object is a valid integer Usage TryInt is used to test if a given data object is a valid integer. Basic examples Basic examples of the instruction TryInt are illustrated below. Example 1 VAR num myint := 4; ... TryInt myint; The value of myint will be evaluated and since 4 is a valid integer, the program execution continues. Example 2 VAR dnum mydnum := 20000000; ... TryInt mydnum; The value of mydnum will be evaluated and since 20000000 is a valid dnum integer, the program execution continues. Example 3 VAR num myint := 5.2; ... TryInt myint; ... ERROR IF ERRNO = ERR_INT_NOTVAL THEN myint := Round(myint); RETRY; ENDIF The value of myint will be evaluated and since 5.2 is not a valid integer, an error will be raised. In the error handler, myint will be rounded to 5 and the instruction TryInt is executed one more time. Arguments TryInt DataObj | DataObj2 DataObj Data Object Data type: num The data object to test if it is a valid integer. DataObj2 Data Object 2 Data type: dnum The data object to test if it is a valid integer. Continues on next page 1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 635 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The given data object is tested: • If it is a valid integer, the execution continues with the next instruction. • If it is not a valid integer, the execution continues in the error handler in an actual procedure. Error handling If DataObj contains a decimal value then the variable ERRNO will be set to ERR_INT_NOTVAL . If the value of DataObj is larger or smaller then the integer value range of data type num then the variable ERRNO will be set to ERR_INT_MAXVAL . If the value of DataObj2 is larger or smaller then the integer value range of data type dnum then the variable ERRNO will be set to ERR_INT_MAXVAL . These errors can be handled in the error handler. Note that a value of 3.0 is evaluated as an integer, since .0 can be ignored. Syntax TryInt [ DataObj ‘:=’ ] < expression ( IN ) of num> | [ DataObj2 ‘:=’ ] < expression ( IN ) of dnum>’ ;’ Related information For information about See Data type num num - Numeric values on page 1146 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
637
1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 3HAC 16581-1 Revision: J 634 © Copyright 2004-2010 ABB. All rights reserved. 1.217. TryInt - Test if data object is a valid integer Usage TryInt is used to test if a given data object is a valid integer. Basic examples Basic examples of the instruction TryInt are illustrated below. Example 1 VAR num myint := 4; ... TryInt myint; The value of myint will be evaluated and since 4 is a valid integer, the program execution continues. Example 2 VAR dnum mydnum := 20000000; ... TryInt mydnum; The value of mydnum will be evaluated and since 20000000 is a valid dnum integer, the program execution continues. Example 3 VAR num myint := 5.2; ... TryInt myint; ... ERROR IF ERRNO = ERR_INT_NOTVAL THEN myint := Round(myint); RETRY; ENDIF The value of myint will be evaluated and since 5.2 is not a valid integer, an error will be raised. In the error handler, myint will be rounded to 5 and the instruction TryInt is executed one more time. Arguments TryInt DataObj | DataObj2 DataObj Data Object Data type: num The data object to test if it is a valid integer. DataObj2 Data Object 2 Data type: dnum The data object to test if it is a valid integer. Continues on next page 1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 635 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The given data object is tested: • If it is a valid integer, the execution continues with the next instruction. • If it is not a valid integer, the execution continues in the error handler in an actual procedure. Error handling If DataObj contains a decimal value then the variable ERRNO will be set to ERR_INT_NOTVAL . If the value of DataObj is larger or smaller then the integer value range of data type num then the variable ERRNO will be set to ERR_INT_MAXVAL . If the value of DataObj2 is larger or smaller then the integer value range of data type dnum then the variable ERRNO will be set to ERR_INT_MAXVAL . These errors can be handled in the error handler. Note that a value of 3.0 is evaluated as an integer, since .0 can be ignored. Syntax TryInt [ DataObj ‘:=’ ] < expression ( IN ) of num> | [ DataObj2 ‘:=’ ] < expression ( IN ) of dnum>’ ;’ Related information For information about See Data type num num - Numeric values on page 1146 Continued 1 Instructions 1.218. TRYNEXT - Jumps over an instruction which has caused an error RobotWare-OS 3HAC 16581-1 Revision: J 636 © Copyright 2004-2010 ABB. All rights reserved. 1.218. TRYNEXT - Jumps over an instruction which has caused an error Usage The TRYNEXT instruction is used to resume execution after an error, starting with the instruction following the instruction that caused the error. Basic examples Basic examples of the instruction TryNext are illustrated below. Example 1 reg2 := reg3/reg4; ... ERROR IF ERRNO = ERR_DIVZERO THEN reg2:=0; TRYNEXT; ENDIF An attempt is made to divide reg3 by reg4 . If reg4 is equal to 0 (division by zero) then a jump is made to the error handler where reg2 is assigned to 0 . The TRYNEXT instruction is then used to continue with the next instruction. Program execution Program execution continues with the instruction subsequent to the instruction that caused the error. Limitations The instruction can only exist in a routine’s error handler. Syntax TRYNEXT’;’ Related information For information about See Error handlers Technical reference manual - RAPID overview , section Basic Characteristics- Error Recovery
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
638
1 Instructions 1.217. TryInt - Test if data object is a valid integer RobotWare - OS 635 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The given data object is tested: • If it is a valid integer, the execution continues with the next instruction. • If it is not a valid integer, the execution continues in the error handler in an actual procedure. Error handling If DataObj contains a decimal value then the variable ERRNO will be set to ERR_INT_NOTVAL . If the value of DataObj is larger or smaller then the integer value range of data type num then the variable ERRNO will be set to ERR_INT_MAXVAL . If the value of DataObj2 is larger or smaller then the integer value range of data type dnum then the variable ERRNO will be set to ERR_INT_MAXVAL . These errors can be handled in the error handler. Note that a value of 3.0 is evaluated as an integer, since .0 can be ignored. Syntax TryInt [ DataObj ‘:=’ ] < expression ( IN ) of num> | [ DataObj2 ‘:=’ ] < expression ( IN ) of dnum>’ ;’ Related information For information about See Data type num num - Numeric values on page 1146 Continued 1 Instructions 1.218. TRYNEXT - Jumps over an instruction which has caused an error RobotWare-OS 3HAC 16581-1 Revision: J 636 © Copyright 2004-2010 ABB. All rights reserved. 1.218. TRYNEXT - Jumps over an instruction which has caused an error Usage The TRYNEXT instruction is used to resume execution after an error, starting with the instruction following the instruction that caused the error. Basic examples Basic examples of the instruction TryNext are illustrated below. Example 1 reg2 := reg3/reg4; ... ERROR IF ERRNO = ERR_DIVZERO THEN reg2:=0; TRYNEXT; ENDIF An attempt is made to divide reg3 by reg4 . If reg4 is equal to 0 (division by zero) then a jump is made to the error handler where reg2 is assigned to 0 . The TRYNEXT instruction is then used to continue with the next instruction. Program execution Program execution continues with the instruction subsequent to the instruction that caused the error. Limitations The instruction can only exist in a routine’s error handler. Syntax TRYNEXT’;’ Related information For information about See Error handlers Technical reference manual - RAPID overview , section Basic Characteristics- Error Recovery 1 Instructions 1.219. TuneReset - Resetting servo tuning RobotWare - OS 637 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.219. TuneReset - Resetting servo tuning Usage TuneReset is used to reset the dynamic behavior of all robot axes and external mechanical units to their normal values. 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 TuneReset are illustrated below. Example 1 TuneReset; Resetting tuning values for all axes to 100%. Program execution The tuning values for all axes are reset to 100%. The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Syntax TuneReset ’;’ Related information For information about See Tuning servos TuneServo - Tuning servos on page 638
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
639
1 Instructions 1.218. TRYNEXT - Jumps over an instruction which has caused an error RobotWare-OS 3HAC 16581-1 Revision: J 636 © Copyright 2004-2010 ABB. All rights reserved. 1.218. TRYNEXT - Jumps over an instruction which has caused an error Usage The TRYNEXT instruction is used to resume execution after an error, starting with the instruction following the instruction that caused the error. Basic examples Basic examples of the instruction TryNext are illustrated below. Example 1 reg2 := reg3/reg4; ... ERROR IF ERRNO = ERR_DIVZERO THEN reg2:=0; TRYNEXT; ENDIF An attempt is made to divide reg3 by reg4 . If reg4 is equal to 0 (division by zero) then a jump is made to the error handler where reg2 is assigned to 0 . The TRYNEXT instruction is then used to continue with the next instruction. Program execution Program execution continues with the instruction subsequent to the instruction that caused the error. Limitations The instruction can only exist in a routine’s error handler. Syntax TRYNEXT’;’ Related information For information about See Error handlers Technical reference manual - RAPID overview , section Basic Characteristics- Error Recovery 1 Instructions 1.219. TuneReset - Resetting servo tuning RobotWare - OS 637 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.219. TuneReset - Resetting servo tuning Usage TuneReset is used to reset the dynamic behavior of all robot axes and external mechanical units to their normal values. 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 TuneReset are illustrated below. Example 1 TuneReset; Resetting tuning values for all axes to 100%. Program execution The tuning values for all axes are reset to 100%. The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Syntax TuneReset ’;’ Related information For information about See Tuning servos TuneServo - Tuning servos on page 638 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 638 © Copyright 2004-2010 ABB. All rights reserved. 1.220. TuneServo - Tuning servos Usage TuneServo is used to tune the dynamic behavior of separate axes on the robot. It is not necessary to use TuneServo under normal circumstances, but sometimes tuning can be optimized depending on the robot configuration and the load characteristics. For external axes TuneServo can be used for load adaptation. Avoid doing TuneServo commands at the same time that the robot is moving. It can result in momentary high CPU loads causing error indication and stops. Note! To obtain optimal tuning it is essential that the correct load data is used. Check this before using TuneServo . Generally, optimal tuning values often differ between different robots. Optimal tuning may also change with time. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. WARNING! Incorrect use of the TuneServo can cause oscillating movements or torques that can damage the robot. You must bear this in mind and be careful when using the TuneServo . Improving path accuracy For robots running at lower speeds, TuneServo can be used to improve the path accuracy by: • Tuning TUNE_KV and TUNE_TI (see the tune types description below). • Tuning friction compensation parameters (see below). These two methods can be combined. Other possibilities to improve the path accuracy: • Decreasing path resolution can improve the path. Note: a value of path resolution which is too low will cause CPU load problems. • The accuracy of straight lines can be improved by decreasing acceleration using AccSet . Example: AccSet 20, 10 . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
640
1 Instructions 1.219. TuneReset - Resetting servo tuning RobotWare - OS 637 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.219. TuneReset - Resetting servo tuning Usage TuneReset is used to reset the dynamic behavior of all robot axes and external mechanical units to their normal values. 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 TuneReset are illustrated below. Example 1 TuneReset; Resetting tuning values for all axes to 100%. Program execution The tuning values for all axes are reset to 100%. The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Syntax TuneReset ’;’ Related information For information about See Tuning servos TuneServo - Tuning servos on page 638 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 638 © Copyright 2004-2010 ABB. All rights reserved. 1.220. TuneServo - Tuning servos Usage TuneServo is used to tune the dynamic behavior of separate axes on the robot. It is not necessary to use TuneServo under normal circumstances, but sometimes tuning can be optimized depending on the robot configuration and the load characteristics. For external axes TuneServo can be used for load adaptation. Avoid doing TuneServo commands at the same time that the robot is moving. It can result in momentary high CPU loads causing error indication and stops. Note! To obtain optimal tuning it is essential that the correct load data is used. Check this before using TuneServo . Generally, optimal tuning values often differ between different robots. Optimal tuning may also change with time. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. WARNING! Incorrect use of the TuneServo can cause oscillating movements or torques that can damage the robot. You must bear this in mind and be careful when using the TuneServo . Improving path accuracy For robots running at lower speeds, TuneServo can be used to improve the path accuracy by: • Tuning TUNE_KV and TUNE_TI (see the tune types description below). • Tuning friction compensation parameters (see below). These two methods can be combined. Other possibilities to improve the path accuracy: • Decreasing path resolution can improve the path. Note: a value of path resolution which is too low will cause CPU load problems. • The accuracy of straight lines can be improved by decreasing acceleration using AccSet . Example: AccSet 20, 10 . Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 639 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Description Reduce overshoots - TUNE_DF TUNE_DF is used for reducing overshoots or oscillations along the path. There is always an optimum tuning value that can vary depending on position and movement length. This optimum value can be found by changing the tuning in small steps (1 - 2%) on the axes that are involved in this unwanted behavior. Normally the optimal tuning will be found in the range 70% - 130%. Too low or too high tuning values have a negative effect and will impair movements considerably. When the tuning value at the start point of a long movement differs considerably from the tuning value at the end point, it can be advantageous in some cases to use an intermediate point with a corner zone to define where the tuning value will change. Some examples of the use of TuneServo to optimize tuning follow below: • IRB 6400, in a press service application (extended and flexible load), axes 4 - 6 : Reduce the tuning value for the current wrist axis until the movement is acceptable. A change in the movement will not be noticeable until the optimum value is approached. A low value will impair the movement considerably. Typical tuning value is 25%. • IRB 6400, upper parts of working area. Axis 1 can often be optimized with a tuning value of 85% - 95%. • IRB 6400, short movement (< 80 mm). Axis 1 can often be optimized with a tuning value of 94% - 98%. • IRB 2400, with track motion. In some cases axes 2 - 3 can be optimized with a tuning value of 110% - 130%. The movement along the track can require a different tuning value compared with movement at right angles to the track. • Overshoots and oscillations can be reduced by decreasing the acceleration or the acceleration ramp ( AccSet ), which will however increase the cycle time. This is an alternative method to the use of TuneServo . Reduce overshoots - TUNE_DG TUNE_DG can reduce overshoots on rare occasions. Normally it should not be used. TUNE_DF should always be tried first in cases of overshooting. Tuning of TUNE_DG can be performed with large steps in tune value (e.g. 50%, 100%, 200%, 400%). Never use TUNE_DG when the robot is moving. 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
641
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 638 © Copyright 2004-2010 ABB. All rights reserved. 1.220. TuneServo - Tuning servos Usage TuneServo is used to tune the dynamic behavior of separate axes on the robot. It is not necessary to use TuneServo under normal circumstances, but sometimes tuning can be optimized depending on the robot configuration and the load characteristics. For external axes TuneServo can be used for load adaptation. Avoid doing TuneServo commands at the same time that the robot is moving. It can result in momentary high CPU loads causing error indication and stops. Note! To obtain optimal tuning it is essential that the correct load data is used. Check this before using TuneServo . Generally, optimal tuning values often differ between different robots. Optimal tuning may also change with time. This instruction can only be used in the main task T_ROB1 or, if in a MultiMove system, in Motion tasks. WARNING! Incorrect use of the TuneServo can cause oscillating movements or torques that can damage the robot. You must bear this in mind and be careful when using the TuneServo . Improving path accuracy For robots running at lower speeds, TuneServo can be used to improve the path accuracy by: • Tuning TUNE_KV and TUNE_TI (see the tune types description below). • Tuning friction compensation parameters (see below). These two methods can be combined. Other possibilities to improve the path accuracy: • Decreasing path resolution can improve the path. Note: a value of path resolution which is too low will cause CPU load problems. • The accuracy of straight lines can be improved by decreasing acceleration using AccSet . Example: AccSet 20, 10 . Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 639 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Description Reduce overshoots - TUNE_DF TUNE_DF is used for reducing overshoots or oscillations along the path. There is always an optimum tuning value that can vary depending on position and movement length. This optimum value can be found by changing the tuning in small steps (1 - 2%) on the axes that are involved in this unwanted behavior. Normally the optimal tuning will be found in the range 70% - 130%. Too low or too high tuning values have a negative effect and will impair movements considerably. When the tuning value at the start point of a long movement differs considerably from the tuning value at the end point, it can be advantageous in some cases to use an intermediate point with a corner zone to define where the tuning value will change. Some examples of the use of TuneServo to optimize tuning follow below: • IRB 6400, in a press service application (extended and flexible load), axes 4 - 6 : Reduce the tuning value for the current wrist axis until the movement is acceptable. A change in the movement will not be noticeable until the optimum value is approached. A low value will impair the movement considerably. Typical tuning value is 25%. • IRB 6400, upper parts of working area. Axis 1 can often be optimized with a tuning value of 85% - 95%. • IRB 6400, short movement (< 80 mm). Axis 1 can often be optimized with a tuning value of 94% - 98%. • IRB 2400, with track motion. In some cases axes 2 - 3 can be optimized with a tuning value of 110% - 130%. The movement along the track can require a different tuning value compared with movement at right angles to the track. • Overshoots and oscillations can be reduced by decreasing the acceleration or the acceleration ramp ( AccSet ), which will however increase the cycle time. This is an alternative method to the use of TuneServo . Reduce overshoots - TUNE_DG TUNE_DG can reduce overshoots on rare occasions. Normally it should not be used. TUNE_DF should always be tried first in cases of overshooting. Tuning of TUNE_DG can be performed with large steps in tune value (e.g. 50%, 100%, 200%, 400%). Never use TUNE_DG when the robot is moving. Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 640 © Copyright 2004-2010 ABB. All rights reserved. Reduces vibrations with heavy loads - TUNE_DH TUNE_DH can be used for reducing vibrations and overshooting (e.g. large flexible load). Tune value must always be lower than 100. TUNE_DH increases path deviation and normally also increases cycle time. Example: • IRB6400 with large flexible loads which vibrates when the robot has stopped. Use TUNE_DH with tune value 15. TUNE_DH should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Never use TUNE_DH when the robot is moving. Reduce path errors - TUNE_DI TUNE_DI can be used for reducing path deviation at high speeds. A tune value in the range 50 - 80 is recommended for reducing path deviation. Overshooting can increase (lower tune value means larger overshoot). A higher tune value than 100 can reduce overshooting (but increases path deviation at high speed). TUNE_DI should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Only for ABB internal use - TUNE_DK, TUNE_DL - WARNING! Only for ABB internal use. Do not use these tune types. Incorrect use can cause oscillating movements or torques that can damage the robot. Tuning external axes - TUNE_KP , TUNE_KV , TUNE_TI These tune types affect position control gain (kp), speed control gain (kv), and speed control integration time (ti) for external axes. These are used for adapting external axes to different load inertias. Basic tuning of external axes can also be simplified by using these tune types. Tuning robot axes - TUNE_KP , TUNE_KV , TUNE_TI For robot axes, these tune types have another significance and can be used for reducing path errors at low speeds (< 500 mm/s). Recommended values: TUNE_KV 100 - 180%, TUNE_TI 50 - 100%. TUNE_KP should not be used for robot axes. Values of TUNE_KV/TUNE_TI which are too high or too low will cause vibrations or oscillations. Be careful if trying to exceed these recommended values. Make changes in small steps and avoid oscillating motors. Always tune one axis at a time. Change the tuning values in small steps. Try to improve the path where this specific axis changes its direction of movement or where it accelerates or decelerates. Never use these tune types at high speeds or when the required path accuracy is fulfilled. 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
642
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 639 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Description Reduce overshoots - TUNE_DF TUNE_DF is used for reducing overshoots or oscillations along the path. There is always an optimum tuning value that can vary depending on position and movement length. This optimum value can be found by changing the tuning in small steps (1 - 2%) on the axes that are involved in this unwanted behavior. Normally the optimal tuning will be found in the range 70% - 130%. Too low or too high tuning values have a negative effect and will impair movements considerably. When the tuning value at the start point of a long movement differs considerably from the tuning value at the end point, it can be advantageous in some cases to use an intermediate point with a corner zone to define where the tuning value will change. Some examples of the use of TuneServo to optimize tuning follow below: • IRB 6400, in a press service application (extended and flexible load), axes 4 - 6 : Reduce the tuning value for the current wrist axis until the movement is acceptable. A change in the movement will not be noticeable until the optimum value is approached. A low value will impair the movement considerably. Typical tuning value is 25%. • IRB 6400, upper parts of working area. Axis 1 can often be optimized with a tuning value of 85% - 95%. • IRB 6400, short movement (< 80 mm). Axis 1 can often be optimized with a tuning value of 94% - 98%. • IRB 2400, with track motion. In some cases axes 2 - 3 can be optimized with a tuning value of 110% - 130%. The movement along the track can require a different tuning value compared with movement at right angles to the track. • Overshoots and oscillations can be reduced by decreasing the acceleration or the acceleration ramp ( AccSet ), which will however increase the cycle time. This is an alternative method to the use of TuneServo . Reduce overshoots - TUNE_DG TUNE_DG can reduce overshoots on rare occasions. Normally it should not be used. TUNE_DF should always be tried first in cases of overshooting. Tuning of TUNE_DG can be performed with large steps in tune value (e.g. 50%, 100%, 200%, 400%). Never use TUNE_DG when the robot is moving. Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 640 © Copyright 2004-2010 ABB. All rights reserved. Reduces vibrations with heavy loads - TUNE_DH TUNE_DH can be used for reducing vibrations and overshooting (e.g. large flexible load). Tune value must always be lower than 100. TUNE_DH increases path deviation and normally also increases cycle time. Example: • IRB6400 with large flexible loads which vibrates when the robot has stopped. Use TUNE_DH with tune value 15. TUNE_DH should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Never use TUNE_DH when the robot is moving. Reduce path errors - TUNE_DI TUNE_DI can be used for reducing path deviation at high speeds. A tune value in the range 50 - 80 is recommended for reducing path deviation. Overshooting can increase (lower tune value means larger overshoot). A higher tune value than 100 can reduce overshooting (but increases path deviation at high speed). TUNE_DI should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Only for ABB internal use - TUNE_DK, TUNE_DL - WARNING! Only for ABB internal use. Do not use these tune types. Incorrect use can cause oscillating movements or torques that can damage the robot. Tuning external axes - TUNE_KP , TUNE_KV , TUNE_TI These tune types affect position control gain (kp), speed control gain (kv), and speed control integration time (ti) for external axes. These are used for adapting external axes to different load inertias. Basic tuning of external axes can also be simplified by using these tune types. Tuning robot axes - TUNE_KP , TUNE_KV , TUNE_TI For robot axes, these tune types have another significance and can be used for reducing path errors at low speeds (< 500 mm/s). Recommended values: TUNE_KV 100 - 180%, TUNE_TI 50 - 100%. TUNE_KP should not be used for robot axes. Values of TUNE_KV/TUNE_TI which are too high or too low will cause vibrations or oscillations. Be careful if trying to exceed these recommended values. Make changes in small steps and avoid oscillating motors. Always tune one axis at a time. Change the tuning values in small steps. Try to improve the path where this specific axis changes its direction of movement or where it accelerates or decelerates. Never use these tune types at high speeds or when the required path accuracy is fulfilled. Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 641 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Friction compensation - TUNE_FRIC_LEV , TUNE_FRIC_RAMP These tune types can be used to reduce robot path errors caused by friction and backlash at low speeds (10 - 200 mm/s). These path errors appear when a robot axis changes direction of movement. Activate friction compensation for an axis by setting the system parameter Motion/Control Parameters/Friction FFW On to Yes. The friction model is a constant level with opposite sign of the axis speed direction. Friction FFW Level (Nm) is the absolute friction level at (low) speeds and is greater than Friction FFW Ramp (rad/s) . See the figure below, which shows a friction model. xx0500002188 TUNE_FRIC_LEV overrides the value of the system parameter Friction FFW Level . Tuning Friction FFW Level (using TUNE_FRIC_LEV ) for each robot axis can improve the robot’s path accuracy considerably in the speed range 20 - 100 mm/s. For larger robots (especially the IRB6400 family) the effect will, however, be minimal as other sources of tracking errors dominate these robots. TUNE_FRIC_RAMP overrides the value of the system parameter Friction FFW Ramp . In most cases there is no need to tune the Friction FFW Ramp . The default setting will be appropriate. Tune one axis at a time. Change the tuning value in small steps and find the level that minimizes the robot path error at positions on the path where this specific axis changes direction of movement. Repeat the same procedure for the next axis etc. The final tuning values can be transferred to the system parameters. Example: Friction FFW Level = 1. Final tune value ( TUNE_FRIC_LEV ) = 150%. Set Friction FFW Level = 1.5 and tune value = 100% (default value) which is equivalent. Arguments TuneServo MecUnit Axis TuneValue [\Type] 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). 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
643
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 640 © Copyright 2004-2010 ABB. All rights reserved. Reduces vibrations with heavy loads - TUNE_DH TUNE_DH can be used for reducing vibrations and overshooting (e.g. large flexible load). Tune value must always be lower than 100. TUNE_DH increases path deviation and normally also increases cycle time. Example: • IRB6400 with large flexible loads which vibrates when the robot has stopped. Use TUNE_DH with tune value 15. TUNE_DH should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Never use TUNE_DH when the robot is moving. Reduce path errors - TUNE_DI TUNE_DI can be used for reducing path deviation at high speeds. A tune value in the range 50 - 80 is recommended for reducing path deviation. Overshooting can increase (lower tune value means larger overshoot). A higher tune value than 100 can reduce overshooting (but increases path deviation at high speed). TUNE_DI should only be executed for one axis. All axes in the same mechanical unit automatically get the same TuneValue . Only for ABB internal use - TUNE_DK, TUNE_DL - WARNING! Only for ABB internal use. Do not use these tune types. Incorrect use can cause oscillating movements or torques that can damage the robot. Tuning external axes - TUNE_KP , TUNE_KV , TUNE_TI These tune types affect position control gain (kp), speed control gain (kv), and speed control integration time (ti) for external axes. These are used for adapting external axes to different load inertias. Basic tuning of external axes can also be simplified by using these tune types. Tuning robot axes - TUNE_KP , TUNE_KV , TUNE_TI For robot axes, these tune types have another significance and can be used for reducing path errors at low speeds (< 500 mm/s). Recommended values: TUNE_KV 100 - 180%, TUNE_TI 50 - 100%. TUNE_KP should not be used for robot axes. Values of TUNE_KV/TUNE_TI which are too high or too low will cause vibrations or oscillations. Be careful if trying to exceed these recommended values. Make changes in small steps and avoid oscillating motors. Always tune one axis at a time. Change the tuning values in small steps. Try to improve the path where this specific axis changes its direction of movement or where it accelerates or decelerates. Never use these tune types at high speeds or when the required path accuracy is fulfilled. Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 641 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Friction compensation - TUNE_FRIC_LEV , TUNE_FRIC_RAMP These tune types can be used to reduce robot path errors caused by friction and backlash at low speeds (10 - 200 mm/s). These path errors appear when a robot axis changes direction of movement. Activate friction compensation for an axis by setting the system parameter Motion/Control Parameters/Friction FFW On to Yes. The friction model is a constant level with opposite sign of the axis speed direction. Friction FFW Level (Nm) is the absolute friction level at (low) speeds and is greater than Friction FFW Ramp (rad/s) . See the figure below, which shows a friction model. xx0500002188 TUNE_FRIC_LEV overrides the value of the system parameter Friction FFW Level . Tuning Friction FFW Level (using TUNE_FRIC_LEV ) for each robot axis can improve the robot’s path accuracy considerably in the speed range 20 - 100 mm/s. For larger robots (especially the IRB6400 family) the effect will, however, be minimal as other sources of tracking errors dominate these robots. TUNE_FRIC_RAMP overrides the value of the system parameter Friction FFW Ramp . In most cases there is no need to tune the Friction FFW Ramp . The default setting will be appropriate. Tune one axis at a time. Change the tuning value in small steps and find the level that minimizes the robot path error at positions on the path where this specific axis changes direction of movement. Repeat the same procedure for the next axis etc. The final tuning values can be transferred to the system parameters. Example: Friction FFW Level = 1. Final tune value ( TUNE_FRIC_LEV ) = 150%. Set Friction FFW Level = 1.5 and tune value = 100% (default value) which is equivalent. Arguments TuneServo MecUnit Axis TuneValue [\Type] 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). Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 642 © Copyright 2004-2010 ABB. All rights reserved. TuneValue Data type: num Tuning value in percent (1 - 500). 100% is the normal value. [ \Type ] Data type: tunetype Type of servo tuning. Available types are TUNE_DF, TUNE_KP, TUNE_KV, TUNE_TI, TUNE_FRIC_LEV, TUNE_FRIC_RAMP, TUNE_DG, TUNE_DH, TUNE_DI . Type TUNE_DK and TUNE_DL only for ABB internal use. This argument can be omitted when using tuning type TUNE_DF . Basic examples Basic examples of the instruction TuneServo are illustrated below. Example 1 TuneServo MHA160R1, 1, 110 \Type:= TUNE_KP; Activating of tuning type TUNE_KP with the tuning value 110 % on axis 1 in the mechanical unit MHA160R1 . Program execution The specified tuning type and tuning value are activated for the specified axis. This value is applicable for all movements until a new value is programmed for the current axis, or until the tuning types and values for all axes are reset using the instruction TuneReset . The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Limitations Any active servo tuning are always set to default values at power fail. This limitation can be handled in the user program at restart after power failure. Syntax TuneServo [MecUnit ’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [Axis ’:=’ ] < expression ( IN ) of num> ’,’ [TuneValue’ :=’ ] < expression ( IN ) of num> [’\’ Type’ :=’ <expression ( IN ) of tunetype>]’;’ 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
644
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 641 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Friction compensation - TUNE_FRIC_LEV , TUNE_FRIC_RAMP These tune types can be used to reduce robot path errors caused by friction and backlash at low speeds (10 - 200 mm/s). These path errors appear when a robot axis changes direction of movement. Activate friction compensation for an axis by setting the system parameter Motion/Control Parameters/Friction FFW On to Yes. The friction model is a constant level with opposite sign of the axis speed direction. Friction FFW Level (Nm) is the absolute friction level at (low) speeds and is greater than Friction FFW Ramp (rad/s) . See the figure below, which shows a friction model. xx0500002188 TUNE_FRIC_LEV overrides the value of the system parameter Friction FFW Level . Tuning Friction FFW Level (using TUNE_FRIC_LEV ) for each robot axis can improve the robot’s path accuracy considerably in the speed range 20 - 100 mm/s. For larger robots (especially the IRB6400 family) the effect will, however, be minimal as other sources of tracking errors dominate these robots. TUNE_FRIC_RAMP overrides the value of the system parameter Friction FFW Ramp . In most cases there is no need to tune the Friction FFW Ramp . The default setting will be appropriate. Tune one axis at a time. Change the tuning value in small steps and find the level that minimizes the robot path error at positions on the path where this specific axis changes direction of movement. Repeat the same procedure for the next axis etc. The final tuning values can be transferred to the system parameters. Example: Friction FFW Level = 1. Final tune value ( TUNE_FRIC_LEV ) = 150%. Set Friction FFW Level = 1.5 and tune value = 100% (default value) which is equivalent. Arguments TuneServo MecUnit Axis TuneValue [\Type] 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). Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 642 © Copyright 2004-2010 ABB. All rights reserved. TuneValue Data type: num Tuning value in percent (1 - 500). 100% is the normal value. [ \Type ] Data type: tunetype Type of servo tuning. Available types are TUNE_DF, TUNE_KP, TUNE_KV, TUNE_TI, TUNE_FRIC_LEV, TUNE_FRIC_RAMP, TUNE_DG, TUNE_DH, TUNE_DI . Type TUNE_DK and TUNE_DL only for ABB internal use. This argument can be omitted when using tuning type TUNE_DF . Basic examples Basic examples of the instruction TuneServo are illustrated below. Example 1 TuneServo MHA160R1, 1, 110 \Type:= TUNE_KP; Activating of tuning type TUNE_KP with the tuning value 110 % on axis 1 in the mechanical unit MHA160R1 . Program execution The specified tuning type and tuning value are activated for the specified axis. This value is applicable for all movements until a new value is programmed for the current axis, or until the tuning types and values for all axes are reset using the instruction TuneReset . The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Limitations Any active servo tuning are always set to default values at power fail. This limitation can be handled in the user program at restart after power failure. Syntax TuneServo [MecUnit ’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [Axis ’:=’ ] < expression ( IN ) of num> ’,’ [TuneValue’ :=’ ] < expression ( IN ) of num> [’\’ Type’ :=’ <expression ( IN ) of tunetype>]’;’ Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 643 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Other motion settings Technical reference manual - RAPID overview , section RAPID summary - Motion settings Types of servo tuning tunetype - Servo tune type on page 1222 Reset of all servo tunings TuneReset - Resetting servo tuning on page 637 Tuning of external axes Application manual - Additional axes and stand alone controller Friction compensation Technical reference manual - System parameters , section Motion - Friction Compensation Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
645
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 3HAC 16581-1 Revision: J 642 © Copyright 2004-2010 ABB. All rights reserved. TuneValue Data type: num Tuning value in percent (1 - 500). 100% is the normal value. [ \Type ] Data type: tunetype Type of servo tuning. Available types are TUNE_DF, TUNE_KP, TUNE_KV, TUNE_TI, TUNE_FRIC_LEV, TUNE_FRIC_RAMP, TUNE_DG, TUNE_DH, TUNE_DI . Type TUNE_DK and TUNE_DL only for ABB internal use. This argument can be omitted when using tuning type TUNE_DF . Basic examples Basic examples of the instruction TuneServo are illustrated below. Example 1 TuneServo MHA160R1, 1, 110 \Type:= TUNE_KP; Activating of tuning type TUNE_KP with the tuning value 110 % on axis 1 in the mechanical unit MHA160R1 . Program execution The specified tuning type and tuning value are activated for the specified axis. This value is applicable for all movements until a new value is programmed for the current axis, or until the tuning types and values for all axes are reset using the instruction TuneReset . The default servo tuning values for all axes are automatically set by executing instruction TuneReset • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. Limitations Any active servo tuning are always set to default values at power fail. This limitation can be handled in the user program at restart after power failure. Syntax TuneServo [MecUnit ’:=’ ] < variable ( VAR ) of mecunit>’ ,’ [Axis ’:=’ ] < expression ( IN ) of num> ’,’ [TuneValue’ :=’ ] < expression ( IN ) of num> [’\’ Type’ :=’ <expression ( IN ) of tunetype>]’;’ Continued Continues on next page 1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 643 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Other motion settings Technical reference manual - RAPID overview , section RAPID summary - Motion settings Types of servo tuning tunetype - Servo tune type on page 1222 Reset of all servo tunings TuneReset - Resetting servo tuning on page 637 Tuning of external axes Application manual - Additional axes and stand alone controller Friction compensation Technical reference manual - System parameters , section Motion - Friction Compensation Continued 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 644 © Copyright 2004-2010 ABB. All rights reserved. 1.221. UIMsgBox - User Message Dialog Box type basic Usage UIMsgBox ( User Interaction Message Box ) is used to communicate with the user of the robot system on available user device, such as the FlexPendant. A message is written to the operator, who answers by selecting a button. The user selection is then transferred back to the program. Basic examples Basic examples of the instruction UIMsgBox are illustrated below. See also More examples on page 648 . Example 1 UIMsgBox Continue the program ?; The message "Continue the program ?" is displayed. The program proceeds when the user presses the default button OK. Example 2 VAR btnres answer; ... UIMsgBox \Header:="UIMsgBox Header", "Message Line 1" \MsgLine2:="Message Line 2" \MsgLine3:="Message Line 3" \MsgLine4:="Message Line 4" \MsgLine5:="Message Line 5" \Buttons:=btnOKCancel \Icon:=iconInfo \Result:=answer; IF answer = resOK my_proc; Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
646
1 Instructions 1.220. TuneServo - Tuning servos RobotWare - OS 643 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Other motion settings Technical reference manual - RAPID overview , section RAPID summary - Motion settings Types of servo tuning tunetype - Servo tune type on page 1222 Reset of all servo tunings TuneReset - Resetting servo tuning on page 637 Tuning of external axes Application manual - Additional axes and stand alone controller Friction compensation Technical reference manual - System parameters , section Motion - Friction Compensation Continued 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 644 © Copyright 2004-2010 ABB. All rights reserved. 1.221. UIMsgBox - User Message Dialog Box type basic Usage UIMsgBox ( User Interaction Message Box ) is used to communicate with the user of the robot system on available user device, such as the FlexPendant. A message is written to the operator, who answers by selecting a button. The user selection is then transferred back to the program. Basic examples Basic examples of the instruction UIMsgBox are illustrated below. See also More examples on page 648 . Example 1 UIMsgBox Continue the program ?; The message "Continue the program ?" is displayed. The program proceeds when the user presses the default button OK. Example 2 VAR btnres answer; ... UIMsgBox \Header:="UIMsgBox Header", "Message Line 1" \MsgLine2:="Message Line 2" \MsgLine3:="Message Line 3" \MsgLine4:="Message Line 4" \MsgLine5:="Message Line 5" \Buttons:=btnOKCancel \Icon:=iconInfo \Result:=answer; IF answer = resOK my_proc; Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 645 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002432 Above message box with icon, header, message line 1 to 5, and push buttons is written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. In other words, answer will be assigned 1 (OK) or 5 (Cancel) depending on which of the buttons is pressed. If answer is OK then my_proc will be called. Note that Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Arguments UIMsgBox [\Header] MsgLine1 [\MsgLine2] [\MsgLine3] [\MsgLine4] [\MsgLine5] [\Wrap] [\Buttons] [\Icon] [\Image] [\Result] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. MsgLine1 Message Line 1 Data type: string Text line 1 to be written on the display. Max. 55 characters. [\MsgLine2] Message Line 2 Data type: string Additional text line 2 to be written on the display. Max. 55 characters. [\MsgLine3] Message Line 3 Data type: string Additional text line 3 to be written on the display. Max. 55 characters. ![Image] 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
647
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 644 © Copyright 2004-2010 ABB. All rights reserved. 1.221. UIMsgBox - User Message Dialog Box type basic Usage UIMsgBox ( User Interaction Message Box ) is used to communicate with the user of the robot system on available user device, such as the FlexPendant. A message is written to the operator, who answers by selecting a button. The user selection is then transferred back to the program. Basic examples Basic examples of the instruction UIMsgBox are illustrated below. See also More examples on page 648 . Example 1 UIMsgBox Continue the program ?; The message "Continue the program ?" is displayed. The program proceeds when the user presses the default button OK. Example 2 VAR btnres answer; ... UIMsgBox \Header:="UIMsgBox Header", "Message Line 1" \MsgLine2:="Message Line 2" \MsgLine3:="Message Line 3" \MsgLine4:="Message Line 4" \MsgLine5:="Message Line 5" \Buttons:=btnOKCancel \Icon:=iconInfo \Result:=answer; IF answer = resOK my_proc; Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 645 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002432 Above message box with icon, header, message line 1 to 5, and push buttons is written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. In other words, answer will be assigned 1 (OK) or 5 (Cancel) depending on which of the buttons is pressed. If answer is OK then my_proc will be called. Note that Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Arguments UIMsgBox [\Header] MsgLine1 [\MsgLine2] [\MsgLine3] [\MsgLine4] [\MsgLine5] [\Wrap] [\Buttons] [\Icon] [\Image] [\Result] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. MsgLine1 Message Line 1 Data type: string Text line 1 to be written on the display. Max. 55 characters. [\MsgLine2] Message Line 2 Data type: string Additional text line 2 to be written on the display. Max. 55 characters. [\MsgLine3] Message Line 3 Data type: string Additional text line 3 to be written on the display. Max. 55 characters. ![Image] Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 646 © Copyright 2004-2010 ABB. All rights reserved. [\MsgLine4] Message Line 4 Data type: string Additional text line 4 to be written on the display. Max. 55 characters. [\MsgLine5] Message Line 5 Data type: string Additional text line 5 to be written on the display. Max. 55 characters. [\Wrap] Data type: switch If selected, all the strings MsgLine1 ... MsgLine5 will be concatenated to one string with a single space between each individual string and spread out on as few lines as possible. Default, each message string MsgLine1 ... MsgLine5 will be on separate lines on the display. [\Buttons] Data type: buttondata Defines the push buttons to be displayed. Only one of the predefined buttons combination of type buttondata can be used. See Predefined data on page 648 . Default, the system displays the OK button. ( \Buttons:=btn OK ). [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. See Predefined data on page 648 . Default no icon. [\Image] Data type: string The name of the image that should be used. To launch your own images, the images have to be placed in the HOME: directory in the active system or directly in the active system. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant will load the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be showed can have the width of 185 pixels and the height of 300 pixels. If the image is bigger, only 185 * 300 pixels of the image will be shown starting at the top left of the image. No exact value can be specified on the size that an image can have or the amount of images that can be loaded to the FlexPendant. It depends on the size of other files loaded to the FlexPendant. The program execution will just continue if an image is used that has not been loaded to the FlexPendant. 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
648
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 645 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002432 Above message box with icon, header, message line 1 to 5, and push buttons is written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. In other words, answer will be assigned 1 (OK) or 5 (Cancel) depending on which of the buttons is pressed. If answer is OK then my_proc will be called. Note that Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Arguments UIMsgBox [\Header] MsgLine1 [\MsgLine2] [\MsgLine3] [\MsgLine4] [\MsgLine5] [\Wrap] [\Buttons] [\Icon] [\Image] [\Result] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. MsgLine1 Message Line 1 Data type: string Text line 1 to be written on the display. Max. 55 characters. [\MsgLine2] Message Line 2 Data type: string Additional text line 2 to be written on the display. Max. 55 characters. [\MsgLine3] Message Line 3 Data type: string Additional text line 3 to be written on the display. Max. 55 characters. ![Image] Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 646 © Copyright 2004-2010 ABB. All rights reserved. [\MsgLine4] Message Line 4 Data type: string Additional text line 4 to be written on the display. Max. 55 characters. [\MsgLine5] Message Line 5 Data type: string Additional text line 5 to be written on the display. Max. 55 characters. [\Wrap] Data type: switch If selected, all the strings MsgLine1 ... MsgLine5 will be concatenated to one string with a single space between each individual string and spread out on as few lines as possible. Default, each message string MsgLine1 ... MsgLine5 will be on separate lines on the display. [\Buttons] Data type: buttondata Defines the push buttons to be displayed. Only one of the predefined buttons combination of type buttondata can be used. See Predefined data on page 648 . Default, the system displays the OK button. ( \Buttons:=btn OK ). [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. See Predefined data on page 648 . Default no icon. [\Image] Data type: string The name of the image that should be used. To launch your own images, the images have to be placed in the HOME: directory in the active system or directly in the active system. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant will load the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be showed can have the width of 185 pixels and the height of 300 pixels. If the image is bigger, only 185 * 300 pixels of the image will be shown starting at the top left of the image. No exact value can be specified on the size that an image can have or the amount of images that can be loaded to the FlexPendant. It depends on the size of other files loaded to the FlexPendant. The program execution will just continue if an image is used that has not been loaded to the FlexPendant. Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 647 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Result] Data type: btnres The variable for which, depending on which button is pressed, the numeric value 0..7 is returned. Only one of the predefined constants of type btnres can be used to test the user selection. See Predefined data on page 648 . If any type of system break such as \MaxTime , \DIBreak , or \DOBreak or if \Buttons:=btnNone, resUnkwn equal to 0 is returned. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_MAXTIME can be used to test whether or not the maximum time has elapsed. [\DIBreak] Digital Input Break Data type: signaldi The digital input signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1), the program continues to execute in the error handler, unless the BreakFlag is used (see below). The constant ERR_TP_DIBREAK can be used to test whether or not this has occurred. [\DOBreak] Digital Output Break Data type: signaldo The digital output signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1) then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used it is set to 0 by the system) that will hold the error code if \MaxTime , \DIBreak , or \DOBreak is used. The constants ERR_TP_MAXTIME , ERR_TP_DIBREAK , and ERR_TP_DOBREAK can be used to select the reason. If this optional variable is omitted then the error handler will be executed. Program execution The message box with icon, header, message lines, image, and buttons are displayed according to the programmed arguments. Program execution waits until the user selects one button or the message box is interrupted by time-out or signal action. The user selection and interrupt reason are transferred back to the program. New message box on TRAP level takes the focus from the message box on the basic level. 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
649
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 646 © Copyright 2004-2010 ABB. All rights reserved. [\MsgLine4] Message Line 4 Data type: string Additional text line 4 to be written on the display. Max. 55 characters. [\MsgLine5] Message Line 5 Data type: string Additional text line 5 to be written on the display. Max. 55 characters. [\Wrap] Data type: switch If selected, all the strings MsgLine1 ... MsgLine5 will be concatenated to one string with a single space between each individual string and spread out on as few lines as possible. Default, each message string MsgLine1 ... MsgLine5 will be on separate lines on the display. [\Buttons] Data type: buttondata Defines the push buttons to be displayed. Only one of the predefined buttons combination of type buttondata can be used. See Predefined data on page 648 . Default, the system displays the OK button. ( \Buttons:=btn OK ). [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. See Predefined data on page 648 . Default no icon. [\Image] Data type: string The name of the image that should be used. To launch your own images, the images have to be placed in the HOME: directory in the active system or directly in the active system. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant will load the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be showed can have the width of 185 pixels and the height of 300 pixels. If the image is bigger, only 185 * 300 pixels of the image will be shown starting at the top left of the image. No exact value can be specified on the size that an image can have or the amount of images that can be loaded to the FlexPendant. It depends on the size of other files loaded to the FlexPendant. The program execution will just continue if an image is used that has not been loaded to the FlexPendant. Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 647 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Result] Data type: btnres The variable for which, depending on which button is pressed, the numeric value 0..7 is returned. Only one of the predefined constants of type btnres can be used to test the user selection. See Predefined data on page 648 . If any type of system break such as \MaxTime , \DIBreak , or \DOBreak or if \Buttons:=btnNone, resUnkwn equal to 0 is returned. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_MAXTIME can be used to test whether or not the maximum time has elapsed. [\DIBreak] Digital Input Break Data type: signaldi The digital input signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1), the program continues to execute in the error handler, unless the BreakFlag is used (see below). The constant ERR_TP_DIBREAK can be used to test whether or not this has occurred. [\DOBreak] Digital Output Break Data type: signaldo The digital output signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1) then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used it is set to 0 by the system) that will hold the error code if \MaxTime , \DIBreak , or \DOBreak is used. The constants ERR_TP_MAXTIME , ERR_TP_DIBREAK , and ERR_TP_DOBREAK can be used to select the reason. If this optional variable is omitted then the error handler will be executed. Program execution The message box with icon, header, message lines, image, and buttons are displayed according to the programmed arguments. Program execution waits until the user selects one button or the message box is interrupted by time-out or signal action. The user selection and interrupt reason are transferred back to the program. New message box on TRAP level takes the focus from the message box on the basic level. Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 648 © Copyright 2004-2010 ABB. All rights reserved. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; !Buttons: CONST buttondata btnNone := -1; CONST buttondata btnOK := 0; CONST buttondata btnAbrtRtryIgn := 1; CONST buttondata btnOKCancel := 2; CONST buttondata btnRetryCancel := 3; CONST buttondata btnYesNo := 4; CONST buttondata btnYesNoCancel := 5; !Results: CONST btnres resUnkwn := 0; CONST btnres resOK := 1; CONST btnres resAbort := 2; CONST btnres resRetry := 3; CONST btnres resIgnore := 4; CONST btnres resCancel := 5; CONST btnres resYes := 6; CONST btnres resNo := 7; More examples More examples of how to use the instruction UIMsgBox are illustrated below. Example 1 VAR errnum err_var; ... UIMsgBox \Header:= "Example 1", "Waiting for a break condition..." \Buttons:=btnNone \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var; TEST err_var CASE ERR_TP_MAXTIME: ! Time out break, max time 60 seconds has elapsed CASE ERR_TP_DIBREAK: ! Input signal break, signal di5 has been set to 1 DEFAULT: ! Not such case defined ENDTEST The message box is displayed until a break condition has become true. The operator can not answer or remove the message box because btnNone is set for the argument \Buttons . The message box is removed when di5 is set to 1 or at time out (after 60 seconds). 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
650
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 647 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Result] Data type: btnres The variable for which, depending on which button is pressed, the numeric value 0..7 is returned. Only one of the predefined constants of type btnres can be used to test the user selection. See Predefined data on page 648 . If any type of system break such as \MaxTime , \DIBreak , or \DOBreak or if \Buttons:=btnNone, resUnkwn equal to 0 is returned. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_MAXTIME can be used to test whether or not the maximum time has elapsed. [\DIBreak] Digital Input Break Data type: signaldi The digital input signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1), the program continues to execute in the error handler, unless the BreakFlag is used (see below). The constant ERR_TP_DIBREAK can be used to test whether or not this has occurred. [\DOBreak] Digital Output Break Data type: signaldo The digital output signal that may interrupt the operator dialog. If no button is selected when the signal is set to 1 (or is already 1) then the program continues to execute in the error handler unless the BreakFlag is used (see below). The constant ERR_TP_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used it is set to 0 by the system) that will hold the error code if \MaxTime , \DIBreak , or \DOBreak is used. The constants ERR_TP_MAXTIME , ERR_TP_DIBREAK , and ERR_TP_DOBREAK can be used to select the reason. If this optional variable is omitted then the error handler will be executed. Program execution The message box with icon, header, message lines, image, and buttons are displayed according to the programmed arguments. Program execution waits until the user selects one button or the message box is interrupted by time-out or signal action. The user selection and interrupt reason are transferred back to the program. New message box on TRAP level takes the focus from the message box on the basic level. Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 648 © Copyright 2004-2010 ABB. All rights reserved. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; !Buttons: CONST buttondata btnNone := -1; CONST buttondata btnOK := 0; CONST buttondata btnAbrtRtryIgn := 1; CONST buttondata btnOKCancel := 2; CONST buttondata btnRetryCancel := 3; CONST buttondata btnYesNo := 4; CONST buttondata btnYesNoCancel := 5; !Results: CONST btnres resUnkwn := 0; CONST btnres resOK := 1; CONST btnres resAbort := 2; CONST btnres resRetry := 3; CONST btnres resIgnore := 4; CONST btnres resCancel := 5; CONST btnres resYes := 6; CONST btnres resNo := 7; More examples More examples of how to use the instruction UIMsgBox are illustrated below. Example 1 VAR errnum err_var; ... UIMsgBox \Header:= "Example 1", "Waiting for a break condition..." \Buttons:=btnNone \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var; TEST err_var CASE ERR_TP_MAXTIME: ! Time out break, max time 60 seconds has elapsed CASE ERR_TP_DIBREAK: ! Input signal break, signal di5 has been set to 1 DEFAULT: ! Not such case defined ENDTEST The message box is displayed until a break condition has become true. The operator can not answer or remove the message box because btnNone is set for the argument \Buttons . The message box is removed when di5 is set to 1 or at time out (after 60 seconds). Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 649 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can then be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator then the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If digital input is set (parameter \DIBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DIBREAK and the execution continues in the error handler. • If a digital output is set (parameter \DOBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DOBREAK and the execution continues in the error handler. This situation can only be dealt with by the error handler: • If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small of a value for the time-out parameter \MaxTime when UIMsgBox is frequently executed, like in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMsgBox [´\´Header´:=´ <expression ( IN ) of string>´,´] [MsgLine1´:=´] <expression ( IN ) of string> [´\´MsgLine2´:=´<expression ( IN ) of string>] [´\´MsgLine3´:=´<expression ( IN ) of string>] [´\´MsgLine4´:=´<expression ( IN ) of string>] [´\´MsgLine5´:=´<expression ( IN ) of string>] [´\´Wrap] [´\´Buttons´:=´ <expression ( IN ) of buttondata>] [´\´Icon´:=´ <expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´Result´:=´< var or pers ( INOUT ) of btnres>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>]´;´ 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
651
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 648 © Copyright 2004-2010 ABB. All rights reserved. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; !Buttons: CONST buttondata btnNone := -1; CONST buttondata btnOK := 0; CONST buttondata btnAbrtRtryIgn := 1; CONST buttondata btnOKCancel := 2; CONST buttondata btnRetryCancel := 3; CONST buttondata btnYesNo := 4; CONST buttondata btnYesNoCancel := 5; !Results: CONST btnres resUnkwn := 0; CONST btnres resOK := 1; CONST btnres resAbort := 2; CONST btnres resRetry := 3; CONST btnres resIgnore := 4; CONST btnres resCancel := 5; CONST btnres resYes := 6; CONST btnres resNo := 7; More examples More examples of how to use the instruction UIMsgBox are illustrated below. Example 1 VAR errnum err_var; ... UIMsgBox \Header:= "Example 1", "Waiting for a break condition..." \Buttons:=btnNone \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var; TEST err_var CASE ERR_TP_MAXTIME: ! Time out break, max time 60 seconds has elapsed CASE ERR_TP_DIBREAK: ! Input signal break, signal di5 has been set to 1 DEFAULT: ! Not such case defined ENDTEST The message box is displayed until a break condition has become true. The operator can not answer or remove the message box because btnNone is set for the argument \Buttons . The message box is removed when di5 is set to 1 or at time out (after 60 seconds). Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 649 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can then be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator then the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If digital input is set (parameter \DIBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DIBREAK and the execution continues in the error handler. • If a digital output is set (parameter \DOBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DOBREAK and the execution continues in the error handler. This situation can only be dealt with by the error handler: • If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small of a value for the time-out parameter \MaxTime when UIMsgBox is frequently executed, like in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMsgBox [´\´Header´:=´ <expression ( IN ) of string>´,´] [MsgLine1´:=´] <expression ( IN ) of string> [´\´MsgLine2´:=´<expression ( IN ) of string>] [´\´MsgLine3´:=´<expression ( IN ) of string>] [´\´MsgLine4´:=´<expression ( IN ) of string>] [´\´MsgLine5´:=´<expression ( IN ) of string>] [´\´Wrap] [´\´Buttons´:=´ <expression ( IN ) of buttondata>] [´\´Icon´:=´ <expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´Result´:=´< var or pers ( INOUT ) of btnres>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>]´;´ Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 650 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 Push button data buttondata - Push button data on page 1089 Push button result data btnres - Push button result data on page 1086 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UINumEntry - User Number Entry on page 1064 User Interaction Number Tune UINumTune - User Number Tune on page 1070 User Interaction Alpha Entry UIAlphaEntry - User Alpha Entry on page 1032 User Interaction List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 FlexPendant interface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
652
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 649 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can then be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator then the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If digital input is set (parameter \DIBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DIBREAK and the execution continues in the error handler. • If a digital output is set (parameter \DOBreak ) before an input from the operator then the system variable ERRNO is set to ERR_TP_DOBREAK and the execution continues in the error handler. This situation can only be dealt with by the error handler: • If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small of a value for the time-out parameter \MaxTime when UIMsgBox is frequently executed, like in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMsgBox [´\´Header´:=´ <expression ( IN ) of string>´,´] [MsgLine1´:=´] <expression ( IN ) of string> [´\´MsgLine2´:=´<expression ( IN ) of string>] [´\´MsgLine3´:=´<expression ( IN ) of string>] [´\´MsgLine4´:=´<expression ( IN ) of string>] [´\´MsgLine5´:=´<expression ( IN ) of string>] [´\´Wrap] [´\´Buttons´:=´ <expression ( IN ) of buttondata>] [´\´Icon´:=´ <expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´Result´:=´< var or pers ( INOUT ) of btnres>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>]´;´ Continued Continues on next page 1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 650 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 Push button data buttondata - Push button data on page 1089 Push button result data btnres - Push button result data on page 1086 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UINumEntry - User Number Entry on page 1064 User Interaction Number Tune UINumTune - User Number Tune on page 1070 User Interaction Alpha Entry UIAlphaEntry - User Alpha Entry on page 1032 User Interaction List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 FlexPendant interface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 1 Instructions 1.222. UIShow - User Interface show 651 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.222. UIShow - User Interface show Usage UIShow ( User Interface Show ) is used to communicate with the user of the robot system on the available User Device such as the FlexPendant. With UIShow both individually written applications and standard applications can be launched from a RAPID program. Basic examples Basic examples of the instruction UIShow are illustrated below. Example 1 and example 2 only works if the files TpsViewMyAppl.dll and TpsViewMyAppl.gtpu.dll is present in the HOME: directory, and a warmstart has been performed. Example 1 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \InstanceID:=myinstance \Status:=mystatus; ! Update the view with new init command UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 , and then update the view with Cmd2 . Example 2 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \Status:=mystatus; ! Launch another view of the application MyAppl UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 . Then it launches another view with init command Cmd2 . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
653
1 Instructions 1.221. UIMsgBox - User Message Dialog Box type basic RobotWare - OS 3HAC 16581-1 Revision: J 650 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 Push button data buttondata - Push button data on page 1089 Push button result data btnres - Push button result data on page 1086 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UINumEntry - User Number Entry on page 1064 User Interaction Number Tune UINumTune - User Number Tune on page 1070 User Interaction Alpha Entry UIAlphaEntry - User Alpha Entry on page 1032 User Interaction List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 FlexPendant interface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 1 Instructions 1.222. UIShow - User Interface show 651 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.222. UIShow - User Interface show Usage UIShow ( User Interface Show ) is used to communicate with the user of the robot system on the available User Device such as the FlexPendant. With UIShow both individually written applications and standard applications can be launched from a RAPID program. Basic examples Basic examples of the instruction UIShow are illustrated below. Example 1 and example 2 only works if the files TpsViewMyAppl.dll and TpsViewMyAppl.gtpu.dll is present in the HOME: directory, and a warmstart has been performed. Example 1 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \InstanceID:=myinstance \Status:=mystatus; ! Update the view with new init command UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 , and then update the view with Cmd2 . Example 2 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \Status:=mystatus; ! Launch another view of the application MyAppl UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 . Then it launches another view with init command Cmd2 . Continues on next page 1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 652 © Copyright 2004-2010 ABB. All rights reserved. Example 3 CONST string Name:="tpsviewbackupandrestore.dll"; CONST string Type:="ABB.Robotics.Tps.Views.TpsViewBackupAndRestore"; VAR num mystatus:=0; ... UIShow Name, Type \Status:=mystatus; Launch standard application Backup and Restore. Arguments UIShow AssemblyName TypeName [\InitCmd] [\InstanceId] [\Status] [\NoCloseBtn] AssemblyName Data type: string The name of the assembly that contains the view. TypeName Data type: string This is the name of the view (the type to create). This is the fully qualified name of the type, i.e. its namespace is included. [\InitCmd] Init Command Data type: string A init data string passed to the view. [\InstanceId] Data type: uishownum A parameter that represents a token used to identify a view. If a view is shown after the call to UIShow then a value that identifies the view is passed back. This token can then be used in other calls to UIShow to activate an already running view. If the value identifies an existing (running) view then the view will be activated. If it does not exist then a new instance will be created. This means that this parameter can be used to determine if a new instance will be launched or not. If its value identifies an already started view then this view will be activated regardless of the values of all other parameters. A recommendation is to use an unique InstanceId variable for each new application that is going to be launched with the UIShow instruction. The parameter must be a persistent variable and the reason for this is that this variable should keep its value, even if the program pointer is moved to main. If executing the same UIShow as earlier and using the same variable then the same view will be activated if it is still open. If the view has been closed then a new view will be launched. 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
654
1 Instructions 1.222. UIShow - User Interface show 651 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.222. UIShow - User Interface show Usage UIShow ( User Interface Show ) is used to communicate with the user of the robot system on the available User Device such as the FlexPendant. With UIShow both individually written applications and standard applications can be launched from a RAPID program. Basic examples Basic examples of the instruction UIShow are illustrated below. Example 1 and example 2 only works if the files TpsViewMyAppl.dll and TpsViewMyAppl.gtpu.dll is present in the HOME: directory, and a warmstart has been performed. Example 1 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \InstanceID:=myinstance \Status:=mystatus; ! Update the view with new init command UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 , and then update the view with Cmd2 . Example 2 CONST string Name:="TpsViewMyAppl.gtpu.dll"; CONST string Type:="ABB.Robotics.SDK.Views.TpsViewMyAppl"; CONST string Cmd1:="Init data string passed to the view"; CONST string Cmd2:="New init data string passed to the view"; PERS uishownum myinstance:=0; VAR num mystatus:=0; ... ! Launch one view of my application MyAppl UIShow Name, Type \InitCmd:=Cmd1 \Status:=mystatus; ! Launch another view of the application MyAppl UIShow Name, Type \InitCmd:=Cmd2 \InstanceID:=myinstance \Status:=mystatus; The code above will launch the view TpsViewMyAppl with init command Cmd1 . Then it launches another view with init command Cmd2 . Continues on next page 1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 652 © Copyright 2004-2010 ABB. All rights reserved. Example 3 CONST string Name:="tpsviewbackupandrestore.dll"; CONST string Type:="ABB.Robotics.Tps.Views.TpsViewBackupAndRestore"; VAR num mystatus:=0; ... UIShow Name, Type \Status:=mystatus; Launch standard application Backup and Restore. Arguments UIShow AssemblyName TypeName [\InitCmd] [\InstanceId] [\Status] [\NoCloseBtn] AssemblyName Data type: string The name of the assembly that contains the view. TypeName Data type: string This is the name of the view (the type to create). This is the fully qualified name of the type, i.e. its namespace is included. [\InitCmd] Init Command Data type: string A init data string passed to the view. [\InstanceId] Data type: uishownum A parameter that represents a token used to identify a view. If a view is shown after the call to UIShow then a value that identifies the view is passed back. This token can then be used in other calls to UIShow to activate an already running view. If the value identifies an existing (running) view then the view will be activated. If it does not exist then a new instance will be created. This means that this parameter can be used to determine if a new instance will be launched or not. If its value identifies an already started view then this view will be activated regardless of the values of all other parameters. A recommendation is to use an unique InstanceId variable for each new application that is going to be launched with the UIShow instruction. The parameter must be a persistent variable and the reason for this is that this variable should keep its value, even if the program pointer is moved to main. If executing the same UIShow as earlier and using the same variable then the same view will be activated if it is still open. If the view has been closed then a new view will be launched. Continued Continues on next page 1 Instructions 1.222. UIShow - User Interface show 653 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Status] Data type: num Status indicates if the operation was successful or not. Note that if this option is used then the RAPID execution will be waiting until the instruction is completed, i.e. the view is launched. This optional parameter is primary used for debugging purpose. (See Error handling ) [\NoCloseBtn] No Close Button Data type: switch NoCloseBtn disables the close button of the view. Program execution The UIShow instruction is used to launch individual applications on the FlexPendant. To launch individual applications, the assemblies have to be placed in the HOME: directory in the active system, or directly in the active system, or in an additional option. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant loads the new assemblies. A demand on the system is that the RobotWare option FlexPendant Interface is used. It is also possible to launch standard applications such as Backup and Restore. Then there is no demand to have the RobotWare option FlexPendant Interface . If using the parameter \Status then the program execution will wait until the application is launched. If errors in the application are not handled then it is only the result of the launch that is supervised. Without the \Status parameter, the FlexPendant is ordered to launch the application but there is no check to determine if it is possible to launch it or not. Status Description 0 OK -1 No space left on the FlexPendant for the new view. Maximum 6 views can be open at the same time on the FlexPendant. -2 Assembly could not be found, does not exist -3 File was found, but could not be loaded -4 Assembly exist, but no new instance could be created -5 The typename is invalid for this assembly -6 InstanceID does not match assembly to load 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
655
1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 652 © Copyright 2004-2010 ABB. All rights reserved. Example 3 CONST string Name:="tpsviewbackupandrestore.dll"; CONST string Type:="ABB.Robotics.Tps.Views.TpsViewBackupAndRestore"; VAR num mystatus:=0; ... UIShow Name, Type \Status:=mystatus; Launch standard application Backup and Restore. Arguments UIShow AssemblyName TypeName [\InitCmd] [\InstanceId] [\Status] [\NoCloseBtn] AssemblyName Data type: string The name of the assembly that contains the view. TypeName Data type: string This is the name of the view (the type to create). This is the fully qualified name of the type, i.e. its namespace is included. [\InitCmd] Init Command Data type: string A init data string passed to the view. [\InstanceId] Data type: uishownum A parameter that represents a token used to identify a view. If a view is shown after the call to UIShow then a value that identifies the view is passed back. This token can then be used in other calls to UIShow to activate an already running view. If the value identifies an existing (running) view then the view will be activated. If it does not exist then a new instance will be created. This means that this parameter can be used to determine if a new instance will be launched or not. If its value identifies an already started view then this view will be activated regardless of the values of all other parameters. A recommendation is to use an unique InstanceId variable for each new application that is going to be launched with the UIShow instruction. The parameter must be a persistent variable and the reason for this is that this variable should keep its value, even if the program pointer is moved to main. If executing the same UIShow as earlier and using the same variable then the same view will be activated if it is still open. If the view has been closed then a new view will be launched. Continued Continues on next page 1 Instructions 1.222. UIShow - User Interface show 653 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Status] Data type: num Status indicates if the operation was successful or not. Note that if this option is used then the RAPID execution will be waiting until the instruction is completed, i.e. the view is launched. This optional parameter is primary used for debugging purpose. (See Error handling ) [\NoCloseBtn] No Close Button Data type: switch NoCloseBtn disables the close button of the view. Program execution The UIShow instruction is used to launch individual applications on the FlexPendant. To launch individual applications, the assemblies have to be placed in the HOME: directory in the active system, or directly in the active system, or in an additional option. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant loads the new assemblies. A demand on the system is that the RobotWare option FlexPendant Interface is used. It is also possible to launch standard applications such as Backup and Restore. Then there is no demand to have the RobotWare option FlexPendant Interface . If using the parameter \Status then the program execution will wait until the application is launched. If errors in the application are not handled then it is only the result of the launch that is supervised. Without the \Status parameter, the FlexPendant is ordered to launch the application but there is no check to determine if it is possible to launch it or not. Status Description 0 OK -1 No space left on the FlexPendant for the new view. Maximum 6 views can be open at the same time on the FlexPendant. -2 Assembly could not be found, does not exist -3 File was found, but could not be loaded -4 Assembly exist, but no new instance could be created -5 The typename is invalid for this assembly -6 InstanceID does not match assembly to load Continued Continues on next page 1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 654 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. If parameter \Status is used then these situations can then be dealt with by the error handler: • If there is no space left on the FlexPendant for the assembly then the system variable ERRNO is set to ERR_UISHOW_FULL and the execution continues in the error handler. The FlexPendant can have 6 views open at the same time. • If something else goes wrong when trying to launch a view then the system variable ERRNO is set to ERR_UISHOW_FATAL , and the execution continues in the error handler. Limitations When using UIShow instruction to launch individual applications then it is a demand that the system is equipped with the option FlexPendant Interface . Applications that have been launched with the UIShow instruction do not survive power fail situations. POWER ON event routine can be used to setup the application again. Syntax UIShow [AssemblyName ´:=´] < expression ( IN ) of string >’,’ [TypeName ´:=´] < expression ( IN ) of string >’,’ [’\’InitCmd’ :=’ < expression ( IN ) of string> ] [’\’InstanceId ’:=’ < persistent ( PERS ) of uishownum> ] [’\’Status ’:=’ < variable ( VAR ) of num> ] [’\’NoCloseBtn ]’;’ Related information For information about See FlexPendant nterface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Building individual applications for the FlexPendant Application manual - Robot Application Builder uishownum uishownum - Instance ID for UIShow on page 1223 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
656
1 Instructions 1.222. UIShow - User Interface show 653 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Status] Data type: num Status indicates if the operation was successful or not. Note that if this option is used then the RAPID execution will be waiting until the instruction is completed, i.e. the view is launched. This optional parameter is primary used for debugging purpose. (See Error handling ) [\NoCloseBtn] No Close Button Data type: switch NoCloseBtn disables the close button of the view. Program execution The UIShow instruction is used to launch individual applications on the FlexPendant. To launch individual applications, the assemblies have to be placed in the HOME: directory in the active system, or directly in the active system, or in an additional option. The recommendation is to place the files in the HOME: directory so that they are saved if a Backup and Restore is done. A warmstart is required and then the FlexPendant loads the new assemblies. A demand on the system is that the RobotWare option FlexPendant Interface is used. It is also possible to launch standard applications such as Backup and Restore. Then there is no demand to have the RobotWare option FlexPendant Interface . If using the parameter \Status then the program execution will wait until the application is launched. If errors in the application are not handled then it is only the result of the launch that is supervised. Without the \Status parameter, the FlexPendant is ordered to launch the application but there is no check to determine if it is possible to launch it or not. Status Description 0 OK -1 No space left on the FlexPendant for the new view. Maximum 6 views can be open at the same time on the FlexPendant. -2 Assembly could not be found, does not exist -3 File was found, but could not be loaded -4 Assembly exist, but no new instance could be created -5 The typename is invalid for this assembly -6 InstanceID does not match assembly to load Continued Continues on next page 1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 654 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. If parameter \Status is used then these situations can then be dealt with by the error handler: • If there is no space left on the FlexPendant for the assembly then the system variable ERRNO is set to ERR_UISHOW_FULL and the execution continues in the error handler. The FlexPendant can have 6 views open at the same time. • If something else goes wrong when trying to launch a view then the system variable ERRNO is set to ERR_UISHOW_FATAL , and the execution continues in the error handler. Limitations When using UIShow instruction to launch individual applications then it is a demand that the system is equipped with the option FlexPendant Interface . Applications that have been launched with the UIShow instruction do not survive power fail situations. POWER ON event routine can be used to setup the application again. Syntax UIShow [AssemblyName ´:=´] < expression ( IN ) of string >’,’ [TypeName ´:=´] < expression ( IN ) of string >’,’ [’\’InitCmd’ :=’ < expression ( IN ) of string> ] [’\’InstanceId ’:=’ < persistent ( PERS ) of uishownum> ] [’\’Status ’:=’ < variable ( VAR ) of num> ] [’\’NoCloseBtn ]’;’ Related information For information about See FlexPendant nterface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Building individual applications for the FlexPendant Application manual - Robot Application Builder uishownum uishownum - Instance ID for UIShow on page 1223 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 655 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.223. UnLoad - UnLoad a program module during execution Usage UnLoad is used to unload a program module from the program memory during execution. The program module must have previously been loaded into the program memory using the instructions Load or StartLoad - WaitLoad . Basic examples Basic examples of the instruction UnLoad are illustrated below. See also More examples below. Example 1 UnLoad diskhome \File:="PART_A.MOD"; UnLoad the program module PART_A.MOD from the program memory that was previously loaded into the program memory with Load . (See instruction Load ). diskhome is a predefined string constant "HOME:". Arguments UnLoad [\ErrIfChanged] | [\Save] FilePath [\File] [\ErrIfChanged] Data type: switch If this argument is used, and the module has been changed since it was loaded into the system, then the instruction will generate the error recovery code ERR_NOTSAVED . [\Save] Data type: switch If this argument is used then the program module is saved before the unloading starts. The program module will be saved at the original place specified in the Load or StartLoad instruction. FilePath Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file path and the file name must be the same as in the previously executed Load or StartLoad instruction. The file name shall be excluded when the argument \File is used. [\File] Data type: string When the file name is excluded in the argument FilePath , then it must be defined with this argument. The file name must be the same as in the previously executed Load or StartLoad instruction. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
657
1 Instructions 1.222. UIShow - User Interface show 3HAC 16581-1 Revision: J 654 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is no client, e.g. a FlexPendant, to take care of the instruction then the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. If parameter \Status is used then these situations can then be dealt with by the error handler: • If there is no space left on the FlexPendant for the assembly then the system variable ERRNO is set to ERR_UISHOW_FULL and the execution continues in the error handler. The FlexPendant can have 6 views open at the same time. • If something else goes wrong when trying to launch a view then the system variable ERRNO is set to ERR_UISHOW_FATAL , and the execution continues in the error handler. Limitations When using UIShow instruction to launch individual applications then it is a demand that the system is equipped with the option FlexPendant Interface . Applications that have been launched with the UIShow instruction do not survive power fail situations. POWER ON event routine can be used to setup the application again. Syntax UIShow [AssemblyName ´:=´] < expression ( IN ) of string >’,’ [TypeName ´:=´] < expression ( IN ) of string >’,’ [’\’InitCmd’ :=’ < expression ( IN ) of string> ] [’\’InstanceId ’:=’ < persistent ( PERS ) of uishownum> ] [’\’Status ’:=’ < variable ( VAR ) of num> ] [’\’NoCloseBtn ]’;’ Related information For information about See FlexPendant nterface Product Specification - Controller Software IRC5, RobotWare 5.0 , section Communication - FlexPendant Interface Building individual applications for the FlexPendant Application manual - Robot Application Builder uishownum uishownum - Instance ID for UIShow on page 1223 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 655 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.223. UnLoad - UnLoad a program module during execution Usage UnLoad is used to unload a program module from the program memory during execution. The program module must have previously been loaded into the program memory using the instructions Load or StartLoad - WaitLoad . Basic examples Basic examples of the instruction UnLoad are illustrated below. See also More examples below. Example 1 UnLoad diskhome \File:="PART_A.MOD"; UnLoad the program module PART_A.MOD from the program memory that was previously loaded into the program memory with Load . (See instruction Load ). diskhome is a predefined string constant "HOME:". Arguments UnLoad [\ErrIfChanged] | [\Save] FilePath [\File] [\ErrIfChanged] Data type: switch If this argument is used, and the module has been changed since it was loaded into the system, then the instruction will generate the error recovery code ERR_NOTSAVED . [\Save] Data type: switch If this argument is used then the program module is saved before the unloading starts. The program module will be saved at the original place specified in the Load or StartLoad instruction. FilePath Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file path and the file name must be the same as in the previously executed Load or StartLoad instruction. The file name shall be excluded when the argument \File is used. [\File] Data type: string When the file name is excluded in the argument FilePath , then it must be defined with this argument. The file name must be the same as in the previously executed Load or StartLoad instruction. Continues on next page 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 3HAC 16581-1 Revision: J 656 © Copyright 2004-2010 ABB. All rights reserved. Program execution To be able to execute an UnLoad instruction in the program, a Load or StartLoad - WaitLoad instruction with the same file path and name must have been executed earlier in the program. The program execution waits for the program module to finish unloading before the execution proceeds with the next instruction. After that the program module is unloaded, and the rest of the program modules will be linked. For more information see the instructions Load or StartLoad-Waitload . More examples More examples of how to use the instruction UnLoad are illustrated below. Example 1 UnLoad "HOME:/DOORDIR/DOOR1.MOD"; UnLoad the program module DOOR1.MOD from the program memory that was previously loaded into the program memory. Example 2 UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in example 1 above but another syntax. Example 3 Unload \Save, "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in examples 1 and 2 above but saves the program module before unloading. Limitations It is not allowed to unload a program module that is executing (program pointer in the module). TRAP routines, system I/O events, and other program tasks cannot execute during the unloading. Avoid ongoing robot movements during the unloading. Program stop during execution of UnLoad instruction can result in guard stop with motors off and error message "20025 Stop order timeout" on the FlexPendant. Error handling If the file in the UnLoad instruction cannot be unloaded because of ongoing execution within the module or wrong path (module not loaded with Load or StartLoad ) then the system variable ERRNO is set to ERR_UNLOAD . If the argument \ErrIfChanged is used and the module has been changed then the execution of this routine will set the system variable ERRNO to ERR_NOTSAVED . Those errors can then be handled in the error handler. 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
658
1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 655 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.223. UnLoad - UnLoad a program module during execution Usage UnLoad is used to unload a program module from the program memory during execution. The program module must have previously been loaded into the program memory using the instructions Load or StartLoad - WaitLoad . Basic examples Basic examples of the instruction UnLoad are illustrated below. See also More examples below. Example 1 UnLoad diskhome \File:="PART_A.MOD"; UnLoad the program module PART_A.MOD from the program memory that was previously loaded into the program memory with Load . (See instruction Load ). diskhome is a predefined string constant "HOME:". Arguments UnLoad [\ErrIfChanged] | [\Save] FilePath [\File] [\ErrIfChanged] Data type: switch If this argument is used, and the module has been changed since it was loaded into the system, then the instruction will generate the error recovery code ERR_NOTSAVED . [\Save] Data type: switch If this argument is used then the program module is saved before the unloading starts. The program module will be saved at the original place specified in the Load or StartLoad instruction. FilePath Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file path and the file name must be the same as in the previously executed Load or StartLoad instruction. The file name shall be excluded when the argument \File is used. [\File] Data type: string When the file name is excluded in the argument FilePath , then it must be defined with this argument. The file name must be the same as in the previously executed Load or StartLoad instruction. Continues on next page 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 3HAC 16581-1 Revision: J 656 © Copyright 2004-2010 ABB. All rights reserved. Program execution To be able to execute an UnLoad instruction in the program, a Load or StartLoad - WaitLoad instruction with the same file path and name must have been executed earlier in the program. The program execution waits for the program module to finish unloading before the execution proceeds with the next instruction. After that the program module is unloaded, and the rest of the program modules will be linked. For more information see the instructions Load or StartLoad-Waitload . More examples More examples of how to use the instruction UnLoad are illustrated below. Example 1 UnLoad "HOME:/DOORDIR/DOOR1.MOD"; UnLoad the program module DOOR1.MOD from the program memory that was previously loaded into the program memory. Example 2 UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in example 1 above but another syntax. Example 3 Unload \Save, "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in examples 1 and 2 above but saves the program module before unloading. Limitations It is not allowed to unload a program module that is executing (program pointer in the module). TRAP routines, system I/O events, and other program tasks cannot execute during the unloading. Avoid ongoing robot movements during the unloading. Program stop during execution of UnLoad instruction can result in guard stop with motors off and error message "20025 Stop order timeout" on the FlexPendant. Error handling If the file in the UnLoad instruction cannot be unloaded because of ongoing execution within the module or wrong path (module not loaded with Load or StartLoad ) then the system variable ERRNO is set to ERR_UNLOAD . If the argument \ErrIfChanged is used and the module has been changed then the execution of this routine will set the system variable ERRNO to ERR_NOTSAVED . Those errors can then be handled in the error handler. Continued Continues on next page 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 657 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UnLoad [’\’ErrIfChanged ’,’] | [’\’Save ’,’] [FilePath’:=’]<expression ( IN ) of string> [’\’File’:=’ <expression ( IN ) of string>]’;’ Related information For information about See Check program references CheckProgRef - Check program references on page 37 Load a program module Load - Load a program module during execution on page 208 StartLoad - Load a program module during execution on page 482 WaitLoad - Connect the loaded module to the task on page 682 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
659
1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 3HAC 16581-1 Revision: J 656 © Copyright 2004-2010 ABB. All rights reserved. Program execution To be able to execute an UnLoad instruction in the program, a Load or StartLoad - WaitLoad instruction with the same file path and name must have been executed earlier in the program. The program execution waits for the program module to finish unloading before the execution proceeds with the next instruction. After that the program module is unloaded, and the rest of the program modules will be linked. For more information see the instructions Load or StartLoad-Waitload . More examples More examples of how to use the instruction UnLoad are illustrated below. Example 1 UnLoad "HOME:/DOORDIR/DOOR1.MOD"; UnLoad the program module DOOR1.MOD from the program memory that was previously loaded into the program memory. Example 2 UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in example 1 above but another syntax. Example 3 Unload \Save, "HOME:" \File:="DOORDIR/DOOR1.MOD"; Same as in examples 1 and 2 above but saves the program module before unloading. Limitations It is not allowed to unload a program module that is executing (program pointer in the module). TRAP routines, system I/O events, and other program tasks cannot execute during the unloading. Avoid ongoing robot movements during the unloading. Program stop during execution of UnLoad instruction can result in guard stop with motors off and error message "20025 Stop order timeout" on the FlexPendant. Error handling If the file in the UnLoad instruction cannot be unloaded because of ongoing execution within the module or wrong path (module not loaded with Load or StartLoad ) then the system variable ERRNO is set to ERR_UNLOAD . If the argument \ErrIfChanged is used and the module has been changed then the execution of this routine will set the system variable ERRNO to ERR_NOTSAVED . Those errors can then be handled in the error handler. Continued Continues on next page 1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 657 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UnLoad [’\’ErrIfChanged ’,’] | [’\’Save ’,’] [FilePath’:=’]<expression ( IN ) of string> [’\’File’:=’ <expression ( IN ) of string>]’;’ Related information For information about See Check program references CheckProgRef - Check program references on page 37 Load a program module Load - Load a program module during execution on page 208 StartLoad - Load a program module during execution on page 482 WaitLoad - Connect the loaded module to the task on page 682 Continued 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 658 © Copyright 2004-2010 ABB. All rights reserved. 1.224. UnpackRawBytes - Unpack data from rawbytes data Usage UnpackRawBytes is used to unpack the contents of a container of type rawbytes to variables of type byte , num , dnum or string . Basic examples Basic examples of the instruction UnpackRawBytes are illustrated below. Example 1 VAR iodev io_device; VAR rawbytes raw_data_out; VAR rawbytes raw_data_in; VAR num integer; VAR dnum bigInt; VAR num float; VAR string string1; VAR byte byte1; VAR byte data1; ! Data packed in raw_data_out according to the protocol ... Open "chan1:", io_device\Bin; WriteRawBytes io_device, raw_data_out; ReadRawBytes io_device, raw_data_in\Time := 1; Close io_device; According to the protocol that is known to the programmer, the message is sent to device "chan1:" . Then the answer is read from the device. The answer contains, for an example, the following: UnpackRawBytes raw_data_in, 1, integer \IntX := DINT; The contents of integer will be 5 . UnpackRawBytes raw_data_in, 5, float \Float4; The contents of float will be 234.6 decimal. UnpackRawBytes raw_data_in, 9, string1 \ASCII:=17; The contents of string1 will be "This is real fun!" . UnpackRawBytes raw_data_in, 26, byte1 \Hex1; byte number: contents: 1-4 integer‘ 5’ 5-8 float‘ 234.6’ 9-25 string "This is real fun!" 26 hex value‘ 4D’ 27 ASCII code 122, i.e. ‘z’ 28-36 integer’ 4294967295’ 37-40 integer’ 4294967295’ Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
660
1 Instructions 1.223. UnLoad - UnLoad a program module during execution RobotWare - OS 657 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UnLoad [’\’ErrIfChanged ’,’] | [’\’Save ’,’] [FilePath’:=’]<expression ( IN ) of string> [’\’File’:=’ <expression ( IN ) of string>]’;’ Related information For information about See Check program references CheckProgRef - Check program references on page 37 Load a program module Load - Load a program module during execution on page 208 StartLoad - Load a program module during execution on page 482 WaitLoad - Connect the loaded module to the task on page 682 Continued 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 658 © Copyright 2004-2010 ABB. All rights reserved. 1.224. UnpackRawBytes - Unpack data from rawbytes data Usage UnpackRawBytes is used to unpack the contents of a container of type rawbytes to variables of type byte , num , dnum or string . Basic examples Basic examples of the instruction UnpackRawBytes are illustrated below. Example 1 VAR iodev io_device; VAR rawbytes raw_data_out; VAR rawbytes raw_data_in; VAR num integer; VAR dnum bigInt; VAR num float; VAR string string1; VAR byte byte1; VAR byte data1; ! Data packed in raw_data_out according to the protocol ... Open "chan1:", io_device\Bin; WriteRawBytes io_device, raw_data_out; ReadRawBytes io_device, raw_data_in\Time := 1; Close io_device; According to the protocol that is known to the programmer, the message is sent to device "chan1:" . Then the answer is read from the device. The answer contains, for an example, the following: UnpackRawBytes raw_data_in, 1, integer \IntX := DINT; The contents of integer will be 5 . UnpackRawBytes raw_data_in, 5, float \Float4; The contents of float will be 234.6 decimal. UnpackRawBytes raw_data_in, 9, string1 \ASCII:=17; The contents of string1 will be "This is real fun!" . UnpackRawBytes raw_data_in, 26, byte1 \Hex1; byte number: contents: 1-4 integer‘ 5’ 5-8 float‘ 234.6’ 9-25 string "This is real fun!" 26 hex value‘ 4D’ 27 ASCII code 122, i.e. ‘z’ 28-36 integer’ 4294967295’ 37-40 integer’ 4294967295’ Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 659 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The contents of byte1 will be ´4D´ hexadecimal. UnpackRawBytes raw_data_in, 27, data1 \ASCII:=1; The contents of data1 will be 122 , the ASCII code for "z". UnpackRawBytes raw_data_in, 28, bigInt \IntX := LINT; The contents of bigInt will be 4294967295 . UnpackRawBytes raw_data_in, 37, bigInt \IntX := UDINT; The contents of bigInt will be 4294967295 . Arguments UnpackRawBytes RawData [ \Network ] StartIndex Value [ \Hex1 ] | [ \IntX ] | [ \Float4 ] | [ \ASCII ] RawData Data type: rawbytes Variable container to unpack data from. [ \Network ] Data type: switch Indicates that integer and float shall be unpacked from big-endian (network order) represented in RawData . ProfiBus and InterBus use big-endian. Without this switch, integer and float will be unpacked in little-endian (not network order) representation from RawData . DeviceNet uses little-endian. Only relevant together with option parameter \IntX - UINT , UDINT , ULINT, INT, DINT, LINT and \Float4 . StartIndex Data type: num StartIndex , between 1 and 1024, indicates where to start unpacking data from RawData . Value Data type: anytype Variable containing the data that was unpacked from RawData . Allowed data types are: byte , num , dnum or string . Array cannot be used. [ \Hex1 ] Data type: switch The data to be unpacked and placed in Value has hexadecimal format in 1 byte and will be converted to decimal format in a byte variable. [ \IntX ] Data type: inttypes The data to be unpacked has the format according to the specified constant of data type inttypes . The data will be converted to a num or a dnum variable containing an integer and stored in Value . See Predefined data . 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
661
1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 658 © Copyright 2004-2010 ABB. All rights reserved. 1.224. UnpackRawBytes - Unpack data from rawbytes data Usage UnpackRawBytes is used to unpack the contents of a container of type rawbytes to variables of type byte , num , dnum or string . Basic examples Basic examples of the instruction UnpackRawBytes are illustrated below. Example 1 VAR iodev io_device; VAR rawbytes raw_data_out; VAR rawbytes raw_data_in; VAR num integer; VAR dnum bigInt; VAR num float; VAR string string1; VAR byte byte1; VAR byte data1; ! Data packed in raw_data_out according to the protocol ... Open "chan1:", io_device\Bin; WriteRawBytes io_device, raw_data_out; ReadRawBytes io_device, raw_data_in\Time := 1; Close io_device; According to the protocol that is known to the programmer, the message is sent to device "chan1:" . Then the answer is read from the device. The answer contains, for an example, the following: UnpackRawBytes raw_data_in, 1, integer \IntX := DINT; The contents of integer will be 5 . UnpackRawBytes raw_data_in, 5, float \Float4; The contents of float will be 234.6 decimal. UnpackRawBytes raw_data_in, 9, string1 \ASCII:=17; The contents of string1 will be "This is real fun!" . UnpackRawBytes raw_data_in, 26, byte1 \Hex1; byte number: contents: 1-4 integer‘ 5’ 5-8 float‘ 234.6’ 9-25 string "This is real fun!" 26 hex value‘ 4D’ 27 ASCII code 122, i.e. ‘z’ 28-36 integer’ 4294967295’ 37-40 integer’ 4294967295’ Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 659 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The contents of byte1 will be ´4D´ hexadecimal. UnpackRawBytes raw_data_in, 27, data1 \ASCII:=1; The contents of data1 will be 122 , the ASCII code for "z". UnpackRawBytes raw_data_in, 28, bigInt \IntX := LINT; The contents of bigInt will be 4294967295 . UnpackRawBytes raw_data_in, 37, bigInt \IntX := UDINT; The contents of bigInt will be 4294967295 . Arguments UnpackRawBytes RawData [ \Network ] StartIndex Value [ \Hex1 ] | [ \IntX ] | [ \Float4 ] | [ \ASCII ] RawData Data type: rawbytes Variable container to unpack data from. [ \Network ] Data type: switch Indicates that integer and float shall be unpacked from big-endian (network order) represented in RawData . ProfiBus and InterBus use big-endian. Without this switch, integer and float will be unpacked in little-endian (not network order) representation from RawData . DeviceNet uses little-endian. Only relevant together with option parameter \IntX - UINT , UDINT , ULINT, INT, DINT, LINT and \Float4 . StartIndex Data type: num StartIndex , between 1 and 1024, indicates where to start unpacking data from RawData . Value Data type: anytype Variable containing the data that was unpacked from RawData . Allowed data types are: byte , num , dnum or string . Array cannot be used. [ \Hex1 ] Data type: switch The data to be unpacked and placed in Value has hexadecimal format in 1 byte and will be converted to decimal format in a byte variable. [ \IntX ] Data type: inttypes The data to be unpacked has the format according to the specified constant of data type inttypes . The data will be converted to a num or a dnum variable containing an integer and stored in Value . See Predefined data . Continued Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 660 © Copyright 2004-2010 ABB. All rights reserved. [ \Float4 ] Data type: switch The data to be unpacked and placed in Value has float, 4 bytes, format, and it will be converted to a num variable containing a float. [ \ASCII ] Data type: num The data to be unpacked and placed in Value has byte or string format. If Value is of type byte then the data will be interpreted as ASCII code and converted to byte format (1 character). If Value is of type string then the data will be stored as string (1...80 characters). String data is not NULL terminated in data of type rawbytes . One of arguments \Hex1 , \IntX , \Float4 or \ASCII must be programmed. The following combinations are allowed: *) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , SINT, INT or DINT . **) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , ULINT, SINT, INT , DINT or LINT. Program execution During program execution data is unpacked from the container of type rawbytes into a variable of type anytype . Predefined data The following symbolic constants of the data type inttypes are predefined and can be used to specify the integer in parameter \IntX . Data type of Value: Allowed option parameters: num *) \IntX dnum **) \IntX num \Float4 string \ASCII:=n with n between 1 and 80 byte \Hex1 \ASCII:=1 Symbolic constant Constant value Integer format Integer value range USINT 1 Unsigned 1 byte integer 0 ... 255 UINT 2 Unsigned 2 byte integer 0 ... 65 535 UDINT 4 Unsigned 4 byte integer 0 ... 8 388 608 *) 0 ... 4 294 967 295 ****) ULINT 8 Unsigned 8 byte integer 0 ... 4 503 599 627 370 496**) SINT - 1 Signed 1 byte integer - 128... 127 INT - 2 Signed 2 byte integer - 32 768 ... 32 767 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
662
1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 659 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The contents of byte1 will be ´4D´ hexadecimal. UnpackRawBytes raw_data_in, 27, data1 \ASCII:=1; The contents of data1 will be 122 , the ASCII code for "z". UnpackRawBytes raw_data_in, 28, bigInt \IntX := LINT; The contents of bigInt will be 4294967295 . UnpackRawBytes raw_data_in, 37, bigInt \IntX := UDINT; The contents of bigInt will be 4294967295 . Arguments UnpackRawBytes RawData [ \Network ] StartIndex Value [ \Hex1 ] | [ \IntX ] | [ \Float4 ] | [ \ASCII ] RawData Data type: rawbytes Variable container to unpack data from. [ \Network ] Data type: switch Indicates that integer and float shall be unpacked from big-endian (network order) represented in RawData . ProfiBus and InterBus use big-endian. Without this switch, integer and float will be unpacked in little-endian (not network order) representation from RawData . DeviceNet uses little-endian. Only relevant together with option parameter \IntX - UINT , UDINT , ULINT, INT, DINT, LINT and \Float4 . StartIndex Data type: num StartIndex , between 1 and 1024, indicates where to start unpacking data from RawData . Value Data type: anytype Variable containing the data that was unpacked from RawData . Allowed data types are: byte , num , dnum or string . Array cannot be used. [ \Hex1 ] Data type: switch The data to be unpacked and placed in Value has hexadecimal format in 1 byte and will be converted to decimal format in a byte variable. [ \IntX ] Data type: inttypes The data to be unpacked has the format according to the specified constant of data type inttypes . The data will be converted to a num or a dnum variable containing an integer and stored in Value . See Predefined data . Continued Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 660 © Copyright 2004-2010 ABB. All rights reserved. [ \Float4 ] Data type: switch The data to be unpacked and placed in Value has float, 4 bytes, format, and it will be converted to a num variable containing a float. [ \ASCII ] Data type: num The data to be unpacked and placed in Value has byte or string format. If Value is of type byte then the data will be interpreted as ASCII code and converted to byte format (1 character). If Value is of type string then the data will be stored as string (1...80 characters). String data is not NULL terminated in data of type rawbytes . One of arguments \Hex1 , \IntX , \Float4 or \ASCII must be programmed. The following combinations are allowed: *) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , SINT, INT or DINT . **) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , ULINT, SINT, INT , DINT or LINT. Program execution During program execution data is unpacked from the container of type rawbytes into a variable of type anytype . Predefined data The following symbolic constants of the data type inttypes are predefined and can be used to specify the integer in parameter \IntX . Data type of Value: Allowed option parameters: num *) \IntX dnum **) \IntX num \Float4 string \ASCII:=n with n between 1 and 80 byte \Hex1 \ASCII:=1 Symbolic constant Constant value Integer format Integer value range USINT 1 Unsigned 1 byte integer 0 ... 255 UINT 2 Unsigned 2 byte integer 0 ... 65 535 UDINT 4 Unsigned 4 byte integer 0 ... 8 388 608 *) 0 ... 4 294 967 295 ****) ULINT 8 Unsigned 8 byte integer 0 ... 4 503 599 627 370 496**) SINT - 1 Signed 1 byte integer - 128... 127 INT - 2 Signed 2 byte integer - 32 768 ... 32 767 Continued Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 661 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. *) RAPID limitation for storage of integer in data type num . **) RAPID limitation for storage of integer in data type dnum . ***) Range when using a dnum variable and inttype DINT . ****) Range when using a dnum variable and inttype UDINT . Syntax UnpackRawBytes [RawData ´:=´ ] < variable ( VAR ) of rawbytes> [ ’\’ Network ] ´,´ [StartIndex ´:=´ ] < expression ( IN ) of num> ´,´ [Value ’:=’ ] < variable ( VAR ) of anytype> [ ’\’ Hex1 ] | [ ’\’ IntX’ :=’ < expression ( IN ) of inttypes>] | [’ \’ Float4 ] | [ ’\’ ASCII‘ :=’ < expression ( IN ) of num>] ’;’ Related information DINT - 4 Signed 4 byte integer - 8 388 607 ... 8 388 608 *) -2 147 483 648 ... 2 147 483 647 ***) LINT - 8 Signed 8 byte integer - 4 503 599 627 370 496... 4 503 599 627 370 496 **) Symbolic constant Constant value Integer format Integer value range For information about See rawbytes data rawbytes - Raw data on page 1165 Get the length of rawbytes data RawBytesLen - Get the length of rawbytes data on page 940 Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data on page 49 Copy the contents of rawbytes data CopyRawBytes - Copy the contents of rawbytes data on page 67 Pack DeviceNet header into rawbytes data PackDNHeader - Pack DeviceNet Header into rawbytes data on page 287 Pack data into rawbytes data PackRawBytes - Pack data into rawbytes data on page 290 Write rawbytes data WriteRawBytes - Write rawbytes data on page 725 Read rawbytes data ReadRawBytes - Read rawbytes data on page 352 Unpack data from rawbytes data UnpackRawBytes - Unpack data from rawbytes data on page 658 Bit/Byte Functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics - Bit Functions String functions Technical reference manual - RAPID overview , section RAPID Summary - String Functions Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
663
1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 3HAC 16581-1 Revision: J 660 © Copyright 2004-2010 ABB. All rights reserved. [ \Float4 ] Data type: switch The data to be unpacked and placed in Value has float, 4 bytes, format, and it will be converted to a num variable containing a float. [ \ASCII ] Data type: num The data to be unpacked and placed in Value has byte or string format. If Value is of type byte then the data will be interpreted as ASCII code and converted to byte format (1 character). If Value is of type string then the data will be stored as string (1...80 characters). String data is not NULL terminated in data of type rawbytes . One of arguments \Hex1 , \IntX , \Float4 or \ASCII must be programmed. The following combinations are allowed: *) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , SINT, INT or DINT . **) Must be an integer within the value range of selected symbolic constant USINT , UINT , UDINT , ULINT, SINT, INT , DINT or LINT. Program execution During program execution data is unpacked from the container of type rawbytes into a variable of type anytype . Predefined data The following symbolic constants of the data type inttypes are predefined and can be used to specify the integer in parameter \IntX . Data type of Value: Allowed option parameters: num *) \IntX dnum **) \IntX num \Float4 string \ASCII:=n with n between 1 and 80 byte \Hex1 \ASCII:=1 Symbolic constant Constant value Integer format Integer value range USINT 1 Unsigned 1 byte integer 0 ... 255 UINT 2 Unsigned 2 byte integer 0 ... 65 535 UDINT 4 Unsigned 4 byte integer 0 ... 8 388 608 *) 0 ... 4 294 967 295 ****) ULINT 8 Unsigned 8 byte integer 0 ... 4 503 599 627 370 496**) SINT - 1 Signed 1 byte integer - 128... 127 INT - 2 Signed 2 byte integer - 32 768 ... 32 767 Continued Continues on next page 1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 661 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. *) RAPID limitation for storage of integer in data type num . **) RAPID limitation for storage of integer in data type dnum . ***) Range when using a dnum variable and inttype DINT . ****) Range when using a dnum variable and inttype UDINT . Syntax UnpackRawBytes [RawData ´:=´ ] < variable ( VAR ) of rawbytes> [ ’\’ Network ] ´,´ [StartIndex ´:=´ ] < expression ( IN ) of num> ´,´ [Value ’:=’ ] < variable ( VAR ) of anytype> [ ’\’ Hex1 ] | [ ’\’ IntX’ :=’ < expression ( IN ) of inttypes>] | [’ \’ Float4 ] | [ ’\’ ASCII‘ :=’ < expression ( IN ) of num>] ’;’ Related information DINT - 4 Signed 4 byte integer - 8 388 607 ... 8 388 608 *) -2 147 483 648 ... 2 147 483 647 ***) LINT - 8 Signed 8 byte integer - 4 503 599 627 370 496... 4 503 599 627 370 496 **) Symbolic constant Constant value Integer format Integer value range For information about See rawbytes data rawbytes - Raw data on page 1165 Get the length of rawbytes data RawBytesLen - Get the length of rawbytes data on page 940 Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data on page 49 Copy the contents of rawbytes data CopyRawBytes - Copy the contents of rawbytes data on page 67 Pack DeviceNet header into rawbytes data PackDNHeader - Pack DeviceNet Header into rawbytes data on page 287 Pack data into rawbytes data PackRawBytes - Pack data into rawbytes data on page 290 Write rawbytes data WriteRawBytes - Write rawbytes data on page 725 Read rawbytes data ReadRawBytes - Read rawbytes data on page 352 Unpack data from rawbytes data UnpackRawBytes - Unpack data from rawbytes data on page 658 Bit/Byte Functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics - Bit Functions String functions Technical reference manual - RAPID overview , section RAPID Summary - String Functions Continued 1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 3HAC 16581-1 Revision: J 662 © Copyright 2004-2010 ABB. All rights reserved. 1.225. VelSet - Changes the programmed velocity Usage VelSet is used to increase or decrease the programmed velocity of all subsequent positioning instructions. This instruction is also used to maximize the velocity. 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 VelSet are illustrated below. See also More examples on page 663 . Example 1 VelSet 50, 800; All the programmed velocities are decreased to 50% of the value in the instruction. However, the TCP velocity is not permitted to exceed 800 mm/s. Arguments VelSet Override Max Override Data type: num Desired velocity as a percentage of programmed velocity. 100% corresponds to the programmed velocity. Max Data type: num Maximum TCP velocity in mm/s. Program execution The programmed velocity of all subsequent positioning instructions is affected until a new VelSet instruction is executed. The argument Override affects: • All velocity components (TCP, orientation, rotating, and linear external axes) in speeddata . • The programmed velocity override in the positioning instruction (the argument \V ). • Timed movements. The argument Override does not affect: • The welding speed in welddata . • The heating and filling speed in seamdata . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
664
1 Instructions 1.224. UnpackRawBytes - Unpack data from rawbytes data RobotWare - OS 661 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. *) RAPID limitation for storage of integer in data type num . **) RAPID limitation for storage of integer in data type dnum . ***) Range when using a dnum variable and inttype DINT . ****) Range when using a dnum variable and inttype UDINT . Syntax UnpackRawBytes [RawData ´:=´ ] < variable ( VAR ) of rawbytes> [ ’\’ Network ] ´,´ [StartIndex ´:=´ ] < expression ( IN ) of num> ´,´ [Value ’:=’ ] < variable ( VAR ) of anytype> [ ’\’ Hex1 ] | [ ’\’ IntX’ :=’ < expression ( IN ) of inttypes>] | [’ \’ Float4 ] | [ ’\’ ASCII‘ :=’ < expression ( IN ) of num>] ’;’ Related information DINT - 4 Signed 4 byte integer - 8 388 607 ... 8 388 608 *) -2 147 483 648 ... 2 147 483 647 ***) LINT - 8 Signed 8 byte integer - 4 503 599 627 370 496... 4 503 599 627 370 496 **) Symbolic constant Constant value Integer format Integer value range For information about See rawbytes data rawbytes - Raw data on page 1165 Get the length of rawbytes data RawBytesLen - Get the length of rawbytes data on page 940 Clear the contents of rawbytes data ClearRawBytes - Clear the contents of rawbytes data on page 49 Copy the contents of rawbytes data CopyRawBytes - Copy the contents of rawbytes data on page 67 Pack DeviceNet header into rawbytes data PackDNHeader - Pack DeviceNet Header into rawbytes data on page 287 Pack data into rawbytes data PackRawBytes - Pack data into rawbytes data on page 290 Write rawbytes data WriteRawBytes - Write rawbytes data on page 725 Read rawbytes data ReadRawBytes - Read rawbytes data on page 352 Unpack data from rawbytes data UnpackRawBytes - Unpack data from rawbytes data on page 658 Bit/Byte Functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics - Bit Functions String functions Technical reference manual - RAPID overview , section RAPID Summary - String Functions Continued 1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 3HAC 16581-1 Revision: J 662 © Copyright 2004-2010 ABB. All rights reserved. 1.225. VelSet - Changes the programmed velocity Usage VelSet is used to increase or decrease the programmed velocity of all subsequent positioning instructions. This instruction is also used to maximize the velocity. 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 VelSet are illustrated below. See also More examples on page 663 . Example 1 VelSet 50, 800; All the programmed velocities are decreased to 50% of the value in the instruction. However, the TCP velocity is not permitted to exceed 800 mm/s. Arguments VelSet Override Max Override Data type: num Desired velocity as a percentage of programmed velocity. 100% corresponds to the programmed velocity. Max Data type: num Maximum TCP velocity in mm/s. Program execution The programmed velocity of all subsequent positioning instructions is affected until a new VelSet instruction is executed. The argument Override affects: • All velocity components (TCP, orientation, rotating, and linear external axes) in speeddata . • The programmed velocity override in the positioning instruction (the argument \V ). • Timed movements. The argument Override does not affect: • The welding speed in welddata . • The heating and filling speed in seamdata . Continues on next page 1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 663 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument Max only affects the velocity of the TCP. The default values for Override and Max are 100% and vmax.v_tcp mm/s *) respectively. These values are automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. *) Max. TCP speed for the used robot type and normal practical TCP values. The RAPID function MaxRobSpeed returns the same value. More examples More examples of how to use the instruction VelSet are illustrated below. Example 1 VelSet 50, 800; MoveL p1, v1000, z10, tool1; MoveL p2, v2000, z10, tool1; MoveL p3, v1000\T:=5, z10, tool1; The speed is 500 mm/s to point p1 and 800 mm/s to p2 . It takes 10 seconds to move from p2 to p3 . Limitations The maximum speed is not taken into consideration when the time is specified in the positioning instruction. Syntax VelSet [ Override ´:=´ ] < expression ( IN ) of num > ´,´ [ Max ´:=´ ] < expression ( IN ) of num > ´;´ Related information For information about See Definition of velocity speeddata - Speed data on page 1185 Max. TCP speed for this robot MaxRobSpeed - Maximum robot speed on page 892 Positioning instructions Technical reference manual - RAPID overview , section RAPID summary - Motion Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
665
1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 3HAC 16581-1 Revision: J 662 © Copyright 2004-2010 ABB. All rights reserved. 1.225. VelSet - Changes the programmed velocity Usage VelSet is used to increase or decrease the programmed velocity of all subsequent positioning instructions. This instruction is also used to maximize the velocity. 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 VelSet are illustrated below. See also More examples on page 663 . Example 1 VelSet 50, 800; All the programmed velocities are decreased to 50% of the value in the instruction. However, the TCP velocity is not permitted to exceed 800 mm/s. Arguments VelSet Override Max Override Data type: num Desired velocity as a percentage of programmed velocity. 100% corresponds to the programmed velocity. Max Data type: num Maximum TCP velocity in mm/s. Program execution The programmed velocity of all subsequent positioning instructions is affected until a new VelSet instruction is executed. The argument Override affects: • All velocity components (TCP, orientation, rotating, and linear external axes) in speeddata . • The programmed velocity override in the positioning instruction (the argument \V ). • Timed movements. The argument Override does not affect: • The welding speed in welddata . • The heating and filling speed in seamdata . Continues on next page 1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 663 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument Max only affects the velocity of the TCP. The default values for Override and Max are 100% and vmax.v_tcp mm/s *) respectively. These values are automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. *) Max. TCP speed for the used robot type and normal practical TCP values. The RAPID function MaxRobSpeed returns the same value. More examples More examples of how to use the instruction VelSet are illustrated below. Example 1 VelSet 50, 800; MoveL p1, v1000, z10, tool1; MoveL p2, v2000, z10, tool1; MoveL p3, v1000\T:=5, z10, tool1; The speed is 500 mm/s to point p1 and 800 mm/s to p2 . It takes 10 seconds to move from p2 to p3 . Limitations The maximum speed is not taken into consideration when the time is specified in the positioning instruction. Syntax VelSet [ Override ´:=´ ] < expression ( IN ) of num > ´,´ [ Max ´:=´ ] < expression ( IN ) of num > ´;´ Related information For information about See Definition of velocity speeddata - Speed data on page 1185 Max. TCP speed for this robot MaxRobSpeed - Maximum robot speed on page 892 Positioning instructions Technical reference manual - RAPID overview , section RAPID summary - Motion Continued 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 664 © Copyright 2004-2010 ABB. All rights reserved. 1.226. WaitAI - Waits until an analog input signal value is set Usage WaitAI ( Wait Analog Input ) is used to wait until an analog input signal value is set. Basic examples Basic examples of the instruction WaitAI are illustrated below. Example 1 WaitAI ai1, \GT, 5; Program execution only continues after the ai1 analog input has value greater than 5. Example 2 WaitAI ai1, \LT, 5; Program execution only continues after the ai1 analog input has value less than 5. Arguments WaitAI Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalai The name of the analog input signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAI instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter the WaitAI instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
666
1 Instructions 1.225. VelSet - Changes the programmed velocity RobotWare - OS 663 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The argument Max only affects the velocity of the TCP. The default values for Override and Max are 100% and vmax.v_tcp mm/s *) respectively. These values are automatically set • at a cold start-up. • when a new program is loaded. • when starting program execution from the beginning. *) Max. TCP speed for the used robot type and normal practical TCP values. The RAPID function MaxRobSpeed returns the same value. More examples More examples of how to use the instruction VelSet are illustrated below. Example 1 VelSet 50, 800; MoveL p1, v1000, z10, tool1; MoveL p2, v2000, z10, tool1; MoveL p3, v1000\T:=5, z10, tool1; The speed is 500 mm/s to point p1 and 800 mm/s to p2 . It takes 10 seconds to move from p2 to p3 . Limitations The maximum speed is not taken into consideration when the time is specified in the positioning instruction. Syntax VelSet [ Override ´:=´ ] < expression ( IN ) of num > ´,´ [ Max ´:=´ ] < expression ( IN ) of num > ´;´ Related information For information about See Definition of velocity speeddata - Speed data on page 1185 Max. TCP speed for this robot MaxRobSpeed - Maximum robot speed on page 892 Positioning instructions Technical reference manual - RAPID overview , section RAPID summary - Motion Continued 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 664 © Copyright 2004-2010 ABB. All rights reserved. 1.226. WaitAI - Waits until an analog input signal value is set Usage WaitAI ( Wait Analog Input ) is used to wait until an analog input signal value is set. Basic examples Basic examples of the instruction WaitAI are illustrated below. Example 1 WaitAI ai1, \GT, 5; Program execution only continues after the ai1 analog input has value greater than 5. Example 2 WaitAI ai1, \LT, 5; Program execution only continues after the ai1 analog input has value less than 5. Arguments WaitAI Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalai The name of the analog input signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAI instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter the WaitAI instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 665 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAI are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ai1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ai1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ai1 is less than 5, or when timing out. If timing out, the value of the signal ai1 at timeout can be logged without another read of signal. 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
667
1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 664 © Copyright 2004-2010 ABB. All rights reserved. 1.226. WaitAI - Waits until an analog input signal value is set Usage WaitAI ( Wait Analog Input ) is used to wait until an analog input signal value is set. Basic examples Basic examples of the instruction WaitAI are illustrated below. Example 1 WaitAI ai1, \GT, 5; Program execution only continues after the ai1 analog input has value greater than 5. Example 2 WaitAI ai1, \LT, 5; Program execution only continues after the ai1 analog input has value less than 5. Arguments WaitAI Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalai The name of the analog input signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAI instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter the WaitAI instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 665 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAI are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ai1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ai1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ai1 is less than 5, or when timing out. If timing out, the value of the signal ai1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 666 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog input signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAI [ Signal ’:=’ ] < variable ( VAR ) of signalai> ´,´ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog output is set/reset WaitAO - Waits until an analog output signal value is set on page 667 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
668
1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 665 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAI are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ai1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ai1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ai1 is less than 5, or when timing out. If timing out, the value of the signal ai1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 666 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog input signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAI [ Signal ’:=’ ] < variable ( VAR ) of signalai> ´,´ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog output is set/reset WaitAO - Waits until an analog output signal value is set on page 667 Continued 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 667 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.227. WaitAO - Waits until an analog output signal value is set Usage WaitAO ( Wait Analog Output ) is used to wait until an analog output signal value is set. Basic examples Basic examples of the instruction WaitAO are illustrated below. Example 1 WaitAO ao1, \GT, 5; Program execution only continues after the ao1 analog output has value greater than 5. Example 2 WaitAO ao1, \LT, 5; Program execution only continues after the ao1 analog output has value less than 5. Arguments WaitAO Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalao The name of the analog output signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
669
1 Instructions 1.226. WaitAI - Waits until an analog input signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 666 © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog input signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAI [ Signal ’:=’ ] < variable ( VAR ) of signalai> ´,´ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog output is set/reset WaitAO - Waits until an analog output signal value is set on page 667 Continued 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 667 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.227. WaitAO - Waits until an analog output signal value is set Usage WaitAO ( Wait Analog Output ) is used to wait until an analog output signal value is set. Basic examples Basic examples of the instruction WaitAO are illustrated below. Example 1 WaitAO ao1, \GT, 5; Program execution only continues after the ao1 analog output has value greater than 5. Example 2 WaitAO ao1, \LT, 5; Program execution only continues after the ao1 analog output has value less than 5. Arguments WaitAO Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalao The name of the analog output signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 668 © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAO are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ao1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ao1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ao1 is less than 5, or when timing out. If timing out, the value of the signal ao1 at timeout can be logged without another read of signal. 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
670
1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 667 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.227. WaitAO - Waits until an analog output signal value is set Usage WaitAO ( Wait Analog Output ) is used to wait until an analog output signal value is set. Basic examples Basic examples of the instruction WaitAO are illustrated below. Example 1 WaitAO ao1, \GT, 5; Program execution only continues after the ao1 analog output has value greater than 5. Example 2 WaitAO ao1, \LT, 5; Program execution only continues after the ao1 analog output has value less than 5. Arguments WaitAO Signal [\LT] | [\GT] Value [\MaxTime] [\ValueAtTimeout] Signal Data type: signalao The name of the analog output signal. [\LT] Less Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitAO instruction waits until the analog signal value is greater than the value in Value . Value Data type: num The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. Continues on next page 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 668 © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAO are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ao1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ao1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ao1 is less than 5, or when timing out. If timing out, the value of the signal ao1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 669 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog output signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAO [ Signal ’:=’ ] < variable ( VAR ) of signalao> ´,’ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog input is set/reset WaitAI - Waits until an analog input signal value is set on page 664 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
671
1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 3HAC 16581-1 Revision: J 668 © Copyright 2004-2010 ABB. All rights reserved. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitAO are illustrated below. Example 1 VAR num myvalattimeout:=0; WaitAO ao1, \LT, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of ao1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if ao1 is less than 5, or when timing out. If timing out, the value of the signal ao1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 669 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog output signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAO [ Signal ’:=’ ] < variable ( VAR ) of signalao> ´,’ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog input is set/reset WaitAI - Waits until an analog input signal value is set on page 664 Continued 1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 3HAC 16581-1 Revision: J 670 © Copyright 2004-2010 ABB. All rights reserved. 1.228. WaitDI - Waits until a digital input signal is set Usage WaitDI ( Wait Digital Input ) is used to wait until a digital input is set. Basic examples Basic examples of the instruction WaitDI are illustrated below. Example 1 WaitDI di4, 1; Program execution continues only after the di4 input has been set. Example 2 WaitDI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitDI Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldi The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
672
1 Instructions 1.227. WaitAO - Waits until an analog output signal value is set RobotWare - OS 669 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value argument for the specified analog output signal Signal is outside limits, the system variable ERRNO is set to ERR_AO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitAO [ Signal ’:=’ ] < variable ( VAR ) of signalao> ´,’ [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num >] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an analog input is set/reset WaitAI - Waits until an analog input signal value is set on page 664 Continued 1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 3HAC 16581-1 Revision: J 670 © Copyright 2004-2010 ABB. All rights reserved. 1.228. WaitDI - Waits until a digital input signal is set Usage WaitDI ( Wait Digital Input ) is used to wait until a digital input is set. Basic examples Basic examples of the instruction WaitDI are illustrated below. Example 1 WaitDI di4, 1; Program execution continues only after the di4 input has been set. Example 2 WaitDI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitDI Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldi The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 671 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the signal value is not correct then the robot enters a waiting state and when the signal changes to the correct value, the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDI [ Signal ’:=’ ] < variable ( VAR ) of signaldi>’ ,’ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
673
1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 3HAC 16581-1 Revision: J 670 © Copyright 2004-2010 ABB. All rights reserved. 1.228. WaitDI - Waits until a digital input signal is set Usage WaitDI ( Wait Digital Input ) is used to wait until a digital input is set. Basic examples Basic examples of the instruction WaitDI are illustrated below. Example 1 WaitDI di4, 1; Program execution continues only after the di4 input has been set. Example 2 WaitDI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitDI Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldi The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 671 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the signal value is not correct then the robot enters a waiting state and when the signal changes to the correct value, the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDI [ Signal ’:=’ ] < variable ( VAR ) of signaldi>’ ,’ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Continued 1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 3HAC 16581-1 Revision: J 672 © Copyright 2004-2010 ABB. All rights reserved. 1.229. WaitDO - Waits until a digital output signal is set Usage WaitDO ( Wait Digital Output ) is used to wait until a digital output is set. Basic examples Basic examples of the instruction WaitDO are illustrated below. Example 1 WaitDO do4, 1; Program execution continues only after the do4 output has been set. Example 2 WaitDO grip_status, 0; Program execution continues only after the grip_status output has been reset. Arguments WaitDO Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldo The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met and the TimeFlag argument is not used then the error handler can be called with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the maximum time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
674
1 Instructions 1.228. WaitDI - Waits until a digital input signal is set RobotWare - OS 671 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the signal value is not correct then the robot enters a waiting state and when the signal changes to the correct value, the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDI [ Signal ’:=’ ] < variable ( VAR ) of signaldi>’ ,’ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>] ’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Continued 1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 3HAC 16581-1 Revision: J 672 © Copyright 2004-2010 ABB. All rights reserved. 1.229. WaitDO - Waits until a digital output signal is set Usage WaitDO ( Wait Digital Output ) is used to wait until a digital output is set. Basic examples Basic examples of the instruction WaitDO are illustrated below. Example 1 WaitDO do4, 1; Program execution continues only after the do4 output has been set. Example 2 WaitDO grip_status, 0; Program execution continues only after the grip_status output has been reset. Arguments WaitDO Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldo The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met and the TimeFlag argument is not used then the error handler can be called with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the maximum time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 673 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the output signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the value of the output signal is not correct then the robot enters a waiting state. When the signal changes to the correct value then the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the maximum time value then the program will continue if a TimeFlag is specified or raise an error if its not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set system parameter SimulateMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDO [ Signal ´:=´] < variable ( VAR ) of signaldo >´,´ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
675
1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 3HAC 16581-1 Revision: J 672 © Copyright 2004-2010 ABB. All rights reserved. 1.229. WaitDO - Waits until a digital output signal is set Usage WaitDO ( Wait Digital Output ) is used to wait until a digital output is set. Basic examples Basic examples of the instruction WaitDO are illustrated below. Example 1 WaitDO do4, 1; Program execution continues only after the do4 output has been set. Example 2 WaitDO grip_status, 0; Program execution continues only after the grip_status output has been reset. Arguments WaitDO Signal Value [\MaxTime] [\TimeFlag] Signal Data type: signaldo The name of the signal. Value Data type: dionum The desired value of the signal. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met and the TimeFlag argument is not used then the error handler can be called with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the maximum time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 673 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the output signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the value of the output signal is not correct then the robot enters a waiting state. When the signal changes to the correct value then the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the maximum time value then the program will continue if a TimeFlag is specified or raise an error if its not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set system parameter SimulateMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDO [ Signal ´:=´] < variable ( VAR ) of signaldo >´,´ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 674 © Copyright 2004-2010 ABB. All rights reserved. 1.230. WaitGI - Waits until a group of digital input signals are set Usage WaitGI ( Wait Group digital Input ) is used to wait until a group of digital input signals are set to specified values. Basic examples Basic examples of the instruction WaitGI are illustrated below. See also More examples on page 676 . Example 1 WaitGI gi4, 5; Program execution continues only after the gi4 input has the value 5. Example 2 WaitGI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitGI Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgi The name of the digital group input signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is greater than the value in Value . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
676
1 Instructions 1.229. WaitDO - Waits until a digital output signal is set RobotWare - OS 673 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the output signal is correct, when the instruction is executed, then the program simply continues with the following instruction. If the value of the output signal is not correct then the robot enters a waiting state. When the signal changes to the correct value then the program continues. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised, and if it exceeds the maximum time value then the program will continue if a TimeFlag is specified or raise an error if its not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to FALSE. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode, after waiting in 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set system parameter SimulateMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). 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. Syntax WaitDO [ Signal ´:=´] < variable ( VAR ) of signaldo >´,´ [ Value ’:=’ ] < expression ( IN ) of dionum> [’\’MaxTime’ :=’<expression ( IN ) of num>] [’\’TimeFlag’:=’<variable ( VAR ) of bool>]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 674 © Copyright 2004-2010 ABB. All rights reserved. 1.230. WaitGI - Waits until a group of digital input signals are set Usage WaitGI ( Wait Group digital Input ) is used to wait until a group of digital input signals are set to specified values. Basic examples Basic examples of the instruction WaitGI are illustrated below. See also More examples on page 676 . Example 1 WaitGI gi4, 5; Program execution continues only after the gi4 input has the value 5. Example 2 WaitGI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitGI Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgi The name of the digital group input signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is greater than the value in Value . Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 675 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called (if there is one) with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . 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
677
1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 674 © Copyright 2004-2010 ABB. All rights reserved. 1.230. WaitGI - Waits until a group of digital input signals are set Usage WaitGI ( Wait Group digital Input ) is used to wait until a group of digital input signals are set to specified values. Basic examples Basic examples of the instruction WaitGI are illustrated below. See also More examples on page 676 . Example 1 WaitGI gi4, 5; Program execution continues only after the gi4 input has the value 5. Example 2 WaitGI grip_status, 0; Program execution continues only after the grip_status input has been reset. Arguments WaitGI Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgi The name of the digital group input signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGI instruction waits until the digital group signal value is greater than the value in Value . Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 675 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called (if there is one) with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Continued Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 676 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is not correct, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGI are illustrated below. Example 1 WaitGI gi1,\NOTEQ,0; Program execution only continues after the gi1 differs from the value 0. Example 2 WaitGI gi1,\LT,1; Program execution only continues after the gi1 is less than 1. Example 3 WaitGI gi1,\GT,0; Program execution continues only after the gi1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGI gi1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of gi1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if gi1 is equal to 5, or when timing out. If timing out, the value of the signal gi1 at timeout can be logged without another read of signal. 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
678
1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 675 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group input signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called (if there is one) with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Continued Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 676 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is not correct, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGI are illustrated below. Example 1 WaitGI gi1,\NOTEQ,0; Program execution only continues after the gi1 differs from the value 0. Example 2 WaitGI gi1,\LT,1; Program execution only continues after the gi1 is less than 1. Example 3 WaitGI gi1,\GT,0; Program execution continues only after the gi1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGI gi1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of gi1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if gi1 is equal to 5, or when timing out. If timing out, the value of the signal gi1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 677 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group input signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGI [ Signal ’:=’ ] < variable ( VAR ) of signalgi> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital output signals are set/reset WaitGO - Waits until a group of digital output signals are set on page 678 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
679
1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 3HAC 16581-1 Revision: J 676 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is not correct, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGI are illustrated below. Example 1 WaitGI gi1,\NOTEQ,0; Program execution only continues after the gi1 differs from the value 0. Example 2 WaitGI gi1,\LT,1; Program execution only continues after the gi1 is less than 1. Example 3 WaitGI gi1,\GT,0; Program execution continues only after the gi1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGI gi1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of gi1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if gi1 is equal to 5, or when timing out. If timing out, the value of the signal gi1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 677 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group input signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGI [ Signal ’:=’ ] < variable ( VAR ) of signalgi> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital output signals are set/reset WaitGO - Waits until a group of digital output signals are set on page 678 Continued 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 678 © Copyright 2004-2010 ABB. All rights reserved. 1.231. WaitGO - Waits until a group of digital output signals are set Usage WaitGO ( Wait Group digital Output ) is used to wait until a group of digital output signals are set to a specified value. Basic examples Basic examples of the instruction WaitGO are illustrated below. See also More examples on page 680 . Example 1 WaitGO go4, 5; Program execution only continues after the go4 output has value 5. Example 2 WaitGO grip_status, 0; Program execution only continues after the grip_status output has been reset. Arguments WaitGO Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgo The name of the digital group output signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is greater than the value in Value . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
680
1 Instructions 1.230. WaitGI - Waits until a group of digital input signals are set RobotWare - OS 677 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group input signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGI [ Signal ’:=’ ] < variable ( VAR ) of signalgi> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital output signals are set/reset WaitGO - Waits until a group of digital output signals are set on page 678 Continued 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 678 © Copyright 2004-2010 ABB. All rights reserved. 1.231. WaitGO - Waits until a group of digital output signals are set Usage WaitGO ( Wait Group digital Output ) is used to wait until a group of digital output signals are set to a specified value. Basic examples Basic examples of the instruction WaitGO are illustrated below. See also More examples on page 680 . Example 1 WaitGO go4, 5; Program execution only continues after the go4 output has value 5. Example 2 WaitGO grip_status, 0; Program execution only continues after the grip_status output has been reset. Arguments WaitGO Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgo The name of the digital group output signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is greater than the value in Value . Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 679 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . 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
681
1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 678 © Copyright 2004-2010 ABB. All rights reserved. 1.231. WaitGO - Waits until a group of digital output signals are set Usage WaitGO ( Wait Group digital Output ) is used to wait until a group of digital output signals are set to a specified value. Basic examples Basic examples of the instruction WaitGO are illustrated below. See also More examples on page 680 . Example 1 WaitGO go4, 5; Program execution only continues after the go4 output has value 5. Example 2 WaitGO grip_status, 0; Program execution only continues after the grip_status output has been reset. Arguments WaitGO Signal [\NOTEQ] | [\LT] | [\GT] Value | Dvalue [\MaxTime] [\ValueAtTimeout] | [\DvalueAtTimeout] Signal Data type: signalgo The name of the digital group output signal. [\NOTEQ] NOT EQual Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value divides from the value in Value . [\LT] Less Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is less than the value in Value . [\GT] Greater Than Data type: switch If using this parameter, the WaitGO instruction waits until the digital group signal value is greater than the value in Value . Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 679 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Continued Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 680 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGO are illustrated below. Example 1 WaitGO go1,\NOTEQ,0; Program execution only continues after the go1 differs from the value 0. Example 2 WaitGO go1,\LT,1; Program execution only continues after the go1 is less than 1. Example 3 WaitGO go1,\GT,0; Program execution only continues after the go1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGO go1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of go1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if go1 is equal to 5, or when timing out. If timing out, the value of the signal go1 at timeout can be logged without another read of signal. 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
682
1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 679 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Value Data type: num The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. Max value that can be used in the Value argument is 8388608, and that is the value a 23 bit digital signal can have as maximum value. Dvalue Data type: dnum The desired value of the signal. Must be an integer value within the working range of the used digital group output signal. The permitted value is dependent on the number of signals in the group. The maximal amout of signal bits a digital group signal can have is 32. With a dnum variable it is possible to cover the value range 0-4294967295, which is the value range a 32 bits digital signal can have. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is met, the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler, the execution will be stopped. [\ValueAtTimeout] Data type: num If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . If the Dvalue argument is used, use argument DvalueAtTimeout to store current value on signal (reason: limitation of maximum integer value for num ). [\DvalueAtTimeout] Data type: dnum If the instruction time-out, the current signal value will be stored in this variable. The variable will only be set if the system variable ERRNO is set to ERR_WAIT_MAXTIME . Continued Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 680 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGO are illustrated below. Example 1 WaitGO go1,\NOTEQ,0; Program execution only continues after the go1 differs from the value 0. Example 2 WaitGO go1,\LT,1; Program execution only continues after the go1 is less than 1. Example 3 WaitGO go1,\GT,0; Program execution only continues after the go1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGO go1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of go1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if go1 is equal to 5, or when timing out. If timing out, the value of the signal go1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 681 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group output signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGO [ Signal ’:=’ ] < variable ( VAR ) of signalgo> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital input signals are set/reset WaitGI - Waits until a group of digital input signals are set on page 674 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
683
1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 3HAC 16581-1 Revision: J 680 © Copyright 2004-2010 ABB. All rights reserved. Program execution If the value of the signal is correct when the instruction is executed, the program simply continues with the following instruction. If the signal value is incorrect, the robot enters a waiting state and the program continues when the signal changes to the correct value. The change is detected with an interrupt, which gives a fast response (not polled). When the robot is waiting, the time is supervised. By default, the robot can wait forever, but the maximal waiting time can be specified with the optional argument \MaxTime . If this max. time is exceeded, an error is raised. If program execution is stopped, and later restarted, the instruction evaluates the currentvalue of the signal. Any change during program stop is rejected. In manual mode and if the waiting time is greater than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear, you can set the system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of the instruction WaitGO are illustrated below. Example 1 WaitGO go1,\NOTEQ,0; Program execution only continues after the go1 differs from the value 0. Example 2 WaitGO go1,\LT,1; Program execution only continues after the go1 is less than 1. Example 3 WaitGO go1,\GT,0; Program execution only continues after the go1 is greater than 0. Example 4 VAR num myvalattimeout:=0; WaitGO go1, 5 \MaxTime:=4 \ValueAtTimeout:=myvalattimeout; ERROR IF ERRNO=ERR_WAIT_MAXTIME THEN TPWrite "Value of go1 at timeout:" + ValToStr(myvalattimeout); TRYNEXT; ELSE ! No error recovery handling ENDIF Program execution continues only if go1 is equal to 5, or when timing out. If timing out, the value of the signal go1 at timeout can be logged without another read of signal. Continued Continues on next page 1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 681 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group output signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGO [ Signal ’:=’ ] < variable ( VAR ) of signalgo> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital input signals are set/reset WaitGI - Waits until a group of digital input signals are set on page 674 Continued 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 682 © Copyright 2004-2010 ABB. All rights reserved. 1.232. WaitLoad - Connect the loaded module to the task Usage WaitLoad is used to connect the with StartLoad loaded module to the program task. The loaded program module will be added to the modules already existing in the program memory. The with StartLoad loaded module must be connected to the program task with the instruction WaitLoad before any of its symbols/routines can be used. WaitLoad can also unload a program module if the optional switches are used. This will minimize the number of links (1 instead of 2). WaitLoad can also check for any unsolved references if the optional switch \CheckRef is used. Basic examples Basic examples of the instruction WaitLoad are illustrated below. See also More examples on page 683 . Example 1 VAR loadsession load1; ... StartLoad "HOME:/PART_A.MOD", load1; MoveL p10, v1000, z50, tool1 \WObj:=wobj1; MoveL p20, v1000, z50, tool1 \WObj:=wobj1; MoveL p30, v1000, z50, tool1 \WObj:=wobj1; MoveL p40, v1000, z50, tool1 \WObj:=wobj1; WaitLoad load1; %"routine_x"%; UnLoad "HOME:/PART_A.MOD"; Load the program module PART_A.MOD from HOME: into the program memory. In parallel, move the robot. Then connect the new program module to the program task and call the routine routine_x in the module PART_A . Arguments WaitLoad [\UnloadPath] [\UnloadFile] LoadNo [\CheckRef] [\UnloadPath] Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file name should be excluded when the argument \UnloadFile is used. [\UnloadFile] Data type: string When the file name is excluded in the argument \UnloadPath, then it must be defined with this argument. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
684
1 Instructions 1.231. WaitGO - Waits until a group of digital output signals are set RobotWare - OS 681 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Error handling If there is a time-out (parameter \MaxTime ) before the signal changes to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. If the programmed Value or Dvalue argument for the specified digital group output signal Signal is outside limits, the system variable ERRNO is set to ERR_GO_LIM and the execution continues in the error handler. These situations can then be dealt with by the error handler. Syntax WaitGO [ Signal ’:=’ ] < variable ( VAR ) of signalgo> ´,´ [’\’ NOTEQ] | [ ’\’ LT] | [ ’\’ GT] ’,’ [ Value ’:=’ ] < expression ( IN ) of num> | [ Dvalue’ :=’ ] < expression ( IN ) of dnum> [’\’MaxTime ´:=’<expression ( IN ) of num>] [ ’\’ValueAtTimeout’ :=’ < variable ( VAR ) of num > ] | [ ’\’DvalueAtTimeout’ :=’ < variable ( VAR ) of dnum > ]’;’ Related information For information about See Waiting until a condition is satisfied WaitUntil - Waits until a condition is met on page 697 Waiting for a specified period of time WaitTime - Waits a given amount of time on page 695 Waiting until a group of digital input signals are set/reset WaitGI - Waits until a group of digital input signals are set on page 674 Continued 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 682 © Copyright 2004-2010 ABB. All rights reserved. 1.232. WaitLoad - Connect the loaded module to the task Usage WaitLoad is used to connect the with StartLoad loaded module to the program task. The loaded program module will be added to the modules already existing in the program memory. The with StartLoad loaded module must be connected to the program task with the instruction WaitLoad before any of its symbols/routines can be used. WaitLoad can also unload a program module if the optional switches are used. This will minimize the number of links (1 instead of 2). WaitLoad can also check for any unsolved references if the optional switch \CheckRef is used. Basic examples Basic examples of the instruction WaitLoad are illustrated below. See also More examples on page 683 . Example 1 VAR loadsession load1; ... StartLoad "HOME:/PART_A.MOD", load1; MoveL p10, v1000, z50, tool1 \WObj:=wobj1; MoveL p20, v1000, z50, tool1 \WObj:=wobj1; MoveL p30, v1000, z50, tool1 \WObj:=wobj1; MoveL p40, v1000, z50, tool1 \WObj:=wobj1; WaitLoad load1; %"routine_x"%; UnLoad "HOME:/PART_A.MOD"; Load the program module PART_A.MOD from HOME: into the program memory. In parallel, move the robot. Then connect the new program module to the program task and call the routine routine_x in the module PART_A . Arguments WaitLoad [\UnloadPath] [\UnloadFile] LoadNo [\CheckRef] [\UnloadPath] Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file name should be excluded when the argument \UnloadFile is used. [\UnloadFile] Data type: string When the file name is excluded in the argument \UnloadPath, then it must be defined with this argument. Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 683 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. LoadNo Data type: loadsession This is a reference to the load session, created by the instruction StartLoad that is needed to connect the loaded program module to the program task. [\CheckRef] Data type: switch Check after loading of the module for unsolved references in the program task. If not used no check for unsolved references are done. Program execution The instruction WaitLoad will first wait for the loading to be completed, if it is not already done, and then the module will be linked and initialized. The initiation of the loaded module sets all variables at module level to their initial values. Unresolved references will always be accepted for the loading operations StartLoad - WaitLoad if parameter \CheckRef is not used, but it will be a run time error on execution of an unresolved reference. The system starts with the unloading operation, if specified. If the unloading of the module fails, then no new module will be loaded. If any error from the loading operation, including unresolved references if use of switch \CheckRef , the loaded module will not be available any more in the program memory. To obtain a good program structure, that is easy to understand and maintain, all loading and unloading of program modules should be done from the main module, which is always present in the program memory during execution. For loading a program that contains a main procedure to a main program (with another main procedure), see instruction Load . More examples More examples of the instruction WaitLoad are illustrated below. Example 1 StartLoad "HOME:/DOORDIR/DOOR2.MOD", load1; ... WaitLoad \UnloadPath:="HOME:/DOORDIR/DOOR1.MOD", load1; Load the program module DOOR2.MOD from HOME: in the directory DOORDIR into the program memory and connect the new module to the task. The program module DOOR1.MOD will be unloaded from the program memory. Example 2 StartLoad "HOME:" \File:="DOORDIR/DOOR2.MOD", load1; ! The robot can do some other work WaitLoad \UnloadPath:="HOME:" \File:= "DOORDIR/DOOR1.MOD", load1; It is the same as the instructions below but the robot can do some other work during the loading time and also do it faster (only one link instead of the two links below). Load "HOME:" \File:="DOORDIR/DOOR2.MOD"; UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; 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
685
1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 682 © Copyright 2004-2010 ABB. All rights reserved. 1.232. WaitLoad - Connect the loaded module to the task Usage WaitLoad is used to connect the with StartLoad loaded module to the program task. The loaded program module will be added to the modules already existing in the program memory. The with StartLoad loaded module must be connected to the program task with the instruction WaitLoad before any of its symbols/routines can be used. WaitLoad can also unload a program module if the optional switches are used. This will minimize the number of links (1 instead of 2). WaitLoad can also check for any unsolved references if the optional switch \CheckRef is used. Basic examples Basic examples of the instruction WaitLoad are illustrated below. See also More examples on page 683 . Example 1 VAR loadsession load1; ... StartLoad "HOME:/PART_A.MOD", load1; MoveL p10, v1000, z50, tool1 \WObj:=wobj1; MoveL p20, v1000, z50, tool1 \WObj:=wobj1; MoveL p30, v1000, z50, tool1 \WObj:=wobj1; MoveL p40, v1000, z50, tool1 \WObj:=wobj1; WaitLoad load1; %"routine_x"%; UnLoad "HOME:/PART_A.MOD"; Load the program module PART_A.MOD from HOME: into the program memory. In parallel, move the robot. Then connect the new program module to the program task and call the routine routine_x in the module PART_A . Arguments WaitLoad [\UnloadPath] [\UnloadFile] LoadNo [\CheckRef] [\UnloadPath] Data type: string The file path and the file name to the file that will be unloaded from the program memory. The file name should be excluded when the argument \UnloadFile is used. [\UnloadFile] Data type: string When the file name is excluded in the argument \UnloadPath, then it must be defined with this argument. Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 683 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. LoadNo Data type: loadsession This is a reference to the load session, created by the instruction StartLoad that is needed to connect the loaded program module to the program task. [\CheckRef] Data type: switch Check after loading of the module for unsolved references in the program task. If not used no check for unsolved references are done. Program execution The instruction WaitLoad will first wait for the loading to be completed, if it is not already done, and then the module will be linked and initialized. The initiation of the loaded module sets all variables at module level to their initial values. Unresolved references will always be accepted for the loading operations StartLoad - WaitLoad if parameter \CheckRef is not used, but it will be a run time error on execution of an unresolved reference. The system starts with the unloading operation, if specified. If the unloading of the module fails, then no new module will be loaded. If any error from the loading operation, including unresolved references if use of switch \CheckRef , the loaded module will not be available any more in the program memory. To obtain a good program structure, that is easy to understand and maintain, all loading and unloading of program modules should be done from the main module, which is always present in the program memory during execution. For loading a program that contains a main procedure to a main program (with another main procedure), see instruction Load . More examples More examples of the instruction WaitLoad are illustrated below. Example 1 StartLoad "HOME:/DOORDIR/DOOR2.MOD", load1; ... WaitLoad \UnloadPath:="HOME:/DOORDIR/DOOR1.MOD", load1; Load the program module DOOR2.MOD from HOME: in the directory DOORDIR into the program memory and connect the new module to the task. The program module DOOR1.MOD will be unloaded from the program memory. Example 2 StartLoad "HOME:" \File:="DOORDIR/DOOR2.MOD", load1; ! The robot can do some other work WaitLoad \UnloadPath:="HOME:" \File:= "DOORDIR/DOOR1.MOD", load1; It is the same as the instructions below but the robot can do some other work during the loading time and also do it faster (only one link instead of the two links below). Load "HOME:" \File:="DOORDIR/DOOR2.MOD"; UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; Continued Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 684 © Copyright 2004-2010 ABB. All rights reserved. Error handling If the file specified in the StartLoad instruction cannot be found then the system variable ERRNO is set to ERR_FILNOTFND at execution of WaitLoad . If some other type of problems to read the file to load then the system variable ERRNO will be set to ERR_IOERROR . If argument LoadNo refers to an unknown load session then the system variable ERRNO is set to ERR_UNKPROC . If the module cannot be loaded because the program memory is full then the system variable ERRNO is set to ERR_PRGMEMFULL . If the module is already loaded into the program memory then the system variable ERRNO is set to ERR_LOADED . If the loaded module contains syntax errors, the system variable ERRNO is set to ERR_SYNTAX . If the loaded module result in fatal link errors, the system variable ERRNO is set to ERR_LINKREF . If WaitLoad is used with the switch \ CheckRef to check for any reference error and the program memory contains unresolved references, the system variable ERRNO is set to ERR_LINKREF . The following errors can only occur when the argument \UnloadPath is used in the instruction WaitLoad : • If the module specified in the argument \ UnloadPath cannot be unloaded because of ongoing execution within the module then the system variable ERRNO is set to ERR_UNLOAD . • If the module specified in the argument \ UnloadPath cannot be unloaded because the program module is not loaded with Load or StartLoad-WaitLoad from the RAPID program then the system variable ERRNO is also set to ERR_UNLOAD . These errors can then be handled in the ERROR handler. If some of these error occurs, the actual module will be unloaded and will not be available in the ERROR handler. NOTE! RETRY cannot be used for error recovery for any errors from WaitLoad . Limitations It is not possible to change the current value of some PERS variable by loading the same module with a new init value for the actual PERS variable. Example: • File my_module.mod with declaration PERS num my_pers:=1; is loaded in the system. • The file my_module.mod is edited on disk with new persistent value eg. PERS num my_pers:=3; • The code below is executed. • After loading the my_module.mod again, the value of my_pers is still 1 instead of 3 . StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad \UnLoadPath:="HOME:/my_module.mod", load1; 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
686
1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 683 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. LoadNo Data type: loadsession This is a reference to the load session, created by the instruction StartLoad that is needed to connect the loaded program module to the program task. [\CheckRef] Data type: switch Check after loading of the module for unsolved references in the program task. If not used no check for unsolved references are done. Program execution The instruction WaitLoad will first wait for the loading to be completed, if it is not already done, and then the module will be linked and initialized. The initiation of the loaded module sets all variables at module level to their initial values. Unresolved references will always be accepted for the loading operations StartLoad - WaitLoad if parameter \CheckRef is not used, but it will be a run time error on execution of an unresolved reference. The system starts with the unloading operation, if specified. If the unloading of the module fails, then no new module will be loaded. If any error from the loading operation, including unresolved references if use of switch \CheckRef , the loaded module will not be available any more in the program memory. To obtain a good program structure, that is easy to understand and maintain, all loading and unloading of program modules should be done from the main module, which is always present in the program memory during execution. For loading a program that contains a main procedure to a main program (with another main procedure), see instruction Load . More examples More examples of the instruction WaitLoad are illustrated below. Example 1 StartLoad "HOME:/DOORDIR/DOOR2.MOD", load1; ... WaitLoad \UnloadPath:="HOME:/DOORDIR/DOOR1.MOD", load1; Load the program module DOOR2.MOD from HOME: in the directory DOORDIR into the program memory and connect the new module to the task. The program module DOOR1.MOD will be unloaded from the program memory. Example 2 StartLoad "HOME:" \File:="DOORDIR/DOOR2.MOD", load1; ! The robot can do some other work WaitLoad \UnloadPath:="HOME:" \File:= "DOORDIR/DOOR1.MOD", load1; It is the same as the instructions below but the robot can do some other work during the loading time and also do it faster (only one link instead of the two links below). Load "HOME:" \File:="DOORDIR/DOOR2.MOD"; UnLoad "HOME:" \File:="DOORDIR/DOOR1.MOD"; Continued Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 684 © Copyright 2004-2010 ABB. All rights reserved. Error handling If the file specified in the StartLoad instruction cannot be found then the system variable ERRNO is set to ERR_FILNOTFND at execution of WaitLoad . If some other type of problems to read the file to load then the system variable ERRNO will be set to ERR_IOERROR . If argument LoadNo refers to an unknown load session then the system variable ERRNO is set to ERR_UNKPROC . If the module cannot be loaded because the program memory is full then the system variable ERRNO is set to ERR_PRGMEMFULL . If the module is already loaded into the program memory then the system variable ERRNO is set to ERR_LOADED . If the loaded module contains syntax errors, the system variable ERRNO is set to ERR_SYNTAX . If the loaded module result in fatal link errors, the system variable ERRNO is set to ERR_LINKREF . If WaitLoad is used with the switch \ CheckRef to check for any reference error and the program memory contains unresolved references, the system variable ERRNO is set to ERR_LINKREF . The following errors can only occur when the argument \UnloadPath is used in the instruction WaitLoad : • If the module specified in the argument \ UnloadPath cannot be unloaded because of ongoing execution within the module then the system variable ERRNO is set to ERR_UNLOAD . • If the module specified in the argument \ UnloadPath cannot be unloaded because the program module is not loaded with Load or StartLoad-WaitLoad from the RAPID program then the system variable ERRNO is also set to ERR_UNLOAD . These errors can then be handled in the ERROR handler. If some of these error occurs, the actual module will be unloaded and will not be available in the ERROR handler. NOTE! RETRY cannot be used for error recovery for any errors from WaitLoad . Limitations It is not possible to change the current value of some PERS variable by loading the same module with a new init value for the actual PERS variable. Example: • File my_module.mod with declaration PERS num my_pers:=1; is loaded in the system. • The file my_module.mod is edited on disk with new persistent value eg. PERS num my_pers:=3; • The code below is executed. • After loading the my_module.mod again, the value of my_pers is still 1 instead of 3 . StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad \UnLoadPath:="HOME:/my_module.mod", load1; Continued Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 685 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. This limitation is a consequence of PERS variable characteristic. The current value of the PERS variable will not be changed by the new loaded PERS init value if the PERS variable is in any use at the loading time. The above problems will not occur if the following code is executed instead: UnLoad "HOME:/my_module.mod"; StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad load1; Another option is to use a CONST for the init value and do the following assignment in the beginning of the execution in the new module: my_pers := my_const; Syntax WaitLoad [ ’\’ UnloadPath ’:=’ <expression ( IN ) of string>’ ,’] [ ’\’ UnloadFile’ :=’ <expression ( IN ) of string> ’,’] [ LoadNo ’:=’ ] <variable ( VAR ) of loadsession> [ ’\’ CheckRef ] ’;’ Related information For information about See Load a program module during execution StartLoad - Load a program module during execution on page 482 Load session loadsession - Program load session on page 1138 Load a program module Load - Load a program module during execution on page 208 Unload a program module UnLoad - UnLoad a program module during execution on page 655 Cancel loading of a program module CancelLoad - Cancel loading of a module on page 35 Check program references CheckProgRef - Check program references on page 37 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
687
1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 3HAC 16581-1 Revision: J 684 © Copyright 2004-2010 ABB. All rights reserved. Error handling If the file specified in the StartLoad instruction cannot be found then the system variable ERRNO is set to ERR_FILNOTFND at execution of WaitLoad . If some other type of problems to read the file to load then the system variable ERRNO will be set to ERR_IOERROR . If argument LoadNo refers to an unknown load session then the system variable ERRNO is set to ERR_UNKPROC . If the module cannot be loaded because the program memory is full then the system variable ERRNO is set to ERR_PRGMEMFULL . If the module is already loaded into the program memory then the system variable ERRNO is set to ERR_LOADED . If the loaded module contains syntax errors, the system variable ERRNO is set to ERR_SYNTAX . If the loaded module result in fatal link errors, the system variable ERRNO is set to ERR_LINKREF . If WaitLoad is used with the switch \ CheckRef to check for any reference error and the program memory contains unresolved references, the system variable ERRNO is set to ERR_LINKREF . The following errors can only occur when the argument \UnloadPath is used in the instruction WaitLoad : • If the module specified in the argument \ UnloadPath cannot be unloaded because of ongoing execution within the module then the system variable ERRNO is set to ERR_UNLOAD . • If the module specified in the argument \ UnloadPath cannot be unloaded because the program module is not loaded with Load or StartLoad-WaitLoad from the RAPID program then the system variable ERRNO is also set to ERR_UNLOAD . These errors can then be handled in the ERROR handler. If some of these error occurs, the actual module will be unloaded and will not be available in the ERROR handler. NOTE! RETRY cannot be used for error recovery for any errors from WaitLoad . Limitations It is not possible to change the current value of some PERS variable by loading the same module with a new init value for the actual PERS variable. Example: • File my_module.mod with declaration PERS num my_pers:=1; is loaded in the system. • The file my_module.mod is edited on disk with new persistent value eg. PERS num my_pers:=3; • The code below is executed. • After loading the my_module.mod again, the value of my_pers is still 1 instead of 3 . StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad \UnLoadPath:="HOME:/my_module.mod", load1; Continued Continues on next page 1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 685 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. This limitation is a consequence of PERS variable characteristic. The current value of the PERS variable will not be changed by the new loaded PERS init value if the PERS variable is in any use at the loading time. The above problems will not occur if the following code is executed instead: UnLoad "HOME:/my_module.mod"; StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad load1; Another option is to use a CONST for the init value and do the following assignment in the beginning of the execution in the new module: my_pers := my_const; Syntax WaitLoad [ ’\’ UnloadPath ’:=’ <expression ( IN ) of string>’ ,’] [ ’\’ UnloadFile’ :=’ <expression ( IN ) of string> ’,’] [ LoadNo ’:=’ ] <variable ( VAR ) of loadsession> [ ’\’ CheckRef ] ’;’ Related information For information about See Load a program module during execution StartLoad - Load a program module during execution on page 482 Load session loadsession - Program load session on page 1138 Load a program module Load - Load a program module during execution on page 208 Unload a program module UnLoad - UnLoad a program module during execution on page 655 Cancel loading of a program module CancelLoad - Cancel loading of a module on page 35 Check program references CheckProgRef - Check program references on page 37 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call Continued 1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 3HAC 16581-1 Revision: J 686 © Copyright 2004-2010 ABB. All rights reserved. 1.233. WaitRob - Wait until stop point or zero speed Usage WaitRob waits until the robot and external axes have reached stop point or have zero speed. Basic examples Basic examples of the instruction WaitRob are illustrated below. See also More examples on page 686 . Example 1 WaitRob \InPos; Program execution waits until the robot and external axes have reached stop point. Arguments WaitRob [\InPos] | [\ZeroSpeed] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. [\ZeroSpeed] Zero Speed Data type: switch If this argument is used then the robot and external axes must have zero speed before the execution can continue. If none of the arguments \InPos and \ZeroSpeed are entered, an error message will be displayed. More examples More examples of how to use the instruction WaitRob are illustrated below. Example 1 PROC stop_event() WaitRob \ZeroSpeed; SetDO rob_moving, 0; ENDPROC The example shows an event routine that executes at program stop. The digital out signal rob_moving is 1 as long as the robot is moving and is set to 0 when the robot and external axes has stopped moving after a program stop. Syntax WaitRob [ ‘\’ InPos ] | [ ‘\’ ZeroSpeed ]’;’ Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
688
1 Instructions 1.232. WaitLoad - Connect the loaded module to the task RobotWare - OS 685 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. This limitation is a consequence of PERS variable characteristic. The current value of the PERS variable will not be changed by the new loaded PERS init value if the PERS variable is in any use at the loading time. The above problems will not occur if the following code is executed instead: UnLoad "HOME:/my_module.mod"; StartLoad \Dynamic, "HOME:/my_module.mod", load1; ... WaitLoad load1; Another option is to use a CONST for the init value and do the following assignment in the beginning of the execution in the new module: my_pers := my_const; Syntax WaitLoad [ ’\’ UnloadPath ’:=’ <expression ( IN ) of string>’ ,’] [ ’\’ UnloadFile’ :=’ <expression ( IN ) of string> ’,’] [ LoadNo ’:=’ ] <variable ( VAR ) of loadsession> [ ’\’ CheckRef ] ’;’ Related information For information about See Load a program module during execution StartLoad - Load a program module during execution on page 482 Load session loadsession - Program load session on page 1138 Load a program module Load - Load a program module during execution on page 208 Unload a program module UnLoad - UnLoad a program module during execution on page 655 Cancel loading of a program module CancelLoad - Cancel loading of a module on page 35 Check program references CheckProgRef - Check program references on page 37 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call Continued 1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 3HAC 16581-1 Revision: J 686 © Copyright 2004-2010 ABB. All rights reserved. 1.233. WaitRob - Wait until stop point or zero speed Usage WaitRob waits until the robot and external axes have reached stop point or have zero speed. Basic examples Basic examples of the instruction WaitRob are illustrated below. See also More examples on page 686 . Example 1 WaitRob \InPos; Program execution waits until the robot and external axes have reached stop point. Arguments WaitRob [\InPos] | [\ZeroSpeed] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. [\ZeroSpeed] Zero Speed Data type: switch If this argument is used then the robot and external axes must have zero speed before the execution can continue. If none of the arguments \InPos and \ZeroSpeed are entered, an error message will be displayed. More examples More examples of how to use the instruction WaitRob are illustrated below. Example 1 PROC stop_event() WaitRob \ZeroSpeed; SetDO rob_moving, 0; ENDPROC The example shows an event routine that executes at program stop. The digital out signal rob_moving is 1 as long as the robot is moving and is set to 0 when the robot and external axes has stopped moving after a program stop. Syntax WaitRob [ ‘\’ InPos ] | [ ‘\’ ZeroSpeed ]’;’ Continues on next page 1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 687 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Motion in general Technical reference manual - RA]PID overview , section Motion and I/O principles Other positioning instructions Technical reference manual - RA]PID overview , section RAPID summary - Motion Definition of stop point data stoppointdata - Stop point data on page 1189 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
689
1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 3HAC 16581-1 Revision: J 686 © Copyright 2004-2010 ABB. All rights reserved. 1.233. WaitRob - Wait until stop point or zero speed Usage WaitRob waits until the robot and external axes have reached stop point or have zero speed. Basic examples Basic examples of the instruction WaitRob are illustrated below. See also More examples on page 686 . Example 1 WaitRob \InPos; Program execution waits until the robot and external axes have reached stop point. Arguments WaitRob [\InPos] | [\ZeroSpeed] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. [\ZeroSpeed] Zero Speed Data type: switch If this argument is used then the robot and external axes must have zero speed before the execution can continue. If none of the arguments \InPos and \ZeroSpeed are entered, an error message will be displayed. More examples More examples of how to use the instruction WaitRob are illustrated below. Example 1 PROC stop_event() WaitRob \ZeroSpeed; SetDO rob_moving, 0; ENDPROC The example shows an event routine that executes at program stop. The digital out signal rob_moving is 1 as long as the robot is moving and is set to 0 when the robot and external axes has stopped moving after a program stop. Syntax WaitRob [ ‘\’ InPos ] | [ ‘\’ ZeroSpeed ]’;’ Continues on next page 1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 687 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Motion in general Technical reference manual - RA]PID overview , section Motion and I/O principles Other positioning instructions Technical reference manual - RA]PID overview , section RAPID summary - Motion Definition of stop point data stoppointdata - Stop point data on page 1189 Continued 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 688 © Copyright 2004-2010 ABB. All rights reserved. 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Usage WaitSyncTask is used to synchronize several program tasks at a special point in each program. Each program task waits until all program tasks have reach the named synchronization point. NOTE! WaitSyncTask only synchronize the program execution. To reach synchronization of both the program execution and the robot movements, the move instruction before the WaitSyncTask must be a stop-point in all involved program tasks. It is also possible to synchronize both the program execution and the robot movements by using WaitsyncTask \Inpos ... in all involved program tasks. WARNING! To reach safe synchronization functionality, the meeting point (parameter SyncID ) must have an unique name in each program task. The name must also be the same for the program tasks that should meet in the meeting point. Basic examples Basic examples of the instruction WaitSyncTask are illustrated below. See also More examples on page 690 . Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... Example 2 Program example in task T_ROB2 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... The program task, that first reaches WaitSyncTask with identity sync1 , waits until the other program task reaches its WaitSyncTask with the same identity sync1 . Then both program tasks T_ROB1 and T_ROB2 continue their 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
690
1 Instructions 1.233. WaitRob - Wait until stop point or zero speed RobotWare - OS 687 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Motion in general Technical reference manual - RA]PID overview , section Motion and I/O principles Other positioning instructions Technical reference manual - RA]PID overview , section RAPID summary - Motion Definition of stop point data stoppointdata - Stop point data on page 1189 Continued 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 688 © Copyright 2004-2010 ABB. All rights reserved. 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Usage WaitSyncTask is used to synchronize several program tasks at a special point in each program. Each program task waits until all program tasks have reach the named synchronization point. NOTE! WaitSyncTask only synchronize the program execution. To reach synchronization of both the program execution and the robot movements, the move instruction before the WaitSyncTask must be a stop-point in all involved program tasks. It is also possible to synchronize both the program execution and the robot movements by using WaitsyncTask \Inpos ... in all involved program tasks. WARNING! To reach safe synchronization functionality, the meeting point (parameter SyncID ) must have an unique name in each program task. The name must also be the same for the program tasks that should meet in the meeting point. Basic examples Basic examples of the instruction WaitSyncTask are illustrated below. See also More examples on page 690 . Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... Example 2 Program example in task T_ROB2 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... The program task, that first reaches WaitSyncTask with identity sync1 , waits until the other program task reaches its WaitSyncTask with the same identity sync1 . Then both program tasks T_ROB1 and T_ROB2 continue their execution. Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 689 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitSyncTask [\InPos] SyncID TaskList [\TimeOut] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before this program task starts waiting for other program tasks to reach its meeting point specified in the WaitSyncTask instruction. SyncID Synchronization identity Data type: syncident Variable that specifies the name of the synchronization (meeting) point. Data type syncident is a non-value type only used as an identifier for naming the synchronization point. The variable must be defined and have an equal name in all cooperated program tasks. It is recommended to always define the variable global in each program task ( VAR syncident ... ). TaskList Data type: tasks Persistent variable, that in a task list (array) specifies the name ( string ) of the program tasks, that should meet in the synchronization point with its name according to the argument SyncID . The persistent variable must be defined and have an equal name and equal contents in all cooperated program tasks. It is recommended to always define the variable global in the system ( PERS tasks ... ). [\TimeOut] Data type: num The max. time for waiting for the other program tasks to reach the synchronization point. Time-out in seconds (resolution 0.001s). If this argument is not specified then the program task will wait for ever. If this time runs out before all program tasks have reached the synchronization poin then the error handler will be called, if there is one, with the error code ERR_WAITSYNCTASK . If there is no error handler then the execution will be stopped. 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
691
1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 688 © Copyright 2004-2010 ABB. All rights reserved. 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Usage WaitSyncTask is used to synchronize several program tasks at a special point in each program. Each program task waits until all program tasks have reach the named synchronization point. NOTE! WaitSyncTask only synchronize the program execution. To reach synchronization of both the program execution and the robot movements, the move instruction before the WaitSyncTask must be a stop-point in all involved program tasks. It is also possible to synchronize both the program execution and the robot movements by using WaitsyncTask \Inpos ... in all involved program tasks. WARNING! To reach safe synchronization functionality, the meeting point (parameter SyncID ) must have an unique name in each program task. The name must also be the same for the program tasks that should meet in the meeting point. Basic examples Basic examples of the instruction WaitSyncTask are illustrated below. See also More examples on page 690 . Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... Example 2 Program example in task T_ROB2 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask sync1, task_list; ... The program task, that first reaches WaitSyncTask with identity sync1 , waits until the other program task reaches its WaitSyncTask with the same identity sync1 . Then both program tasks T_ROB1 and T_ROB2 continue their execution. Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 689 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitSyncTask [\InPos] SyncID TaskList [\TimeOut] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before this program task starts waiting for other program tasks to reach its meeting point specified in the WaitSyncTask instruction. SyncID Synchronization identity Data type: syncident Variable that specifies the name of the synchronization (meeting) point. Data type syncident is a non-value type only used as an identifier for naming the synchronization point. The variable must be defined and have an equal name in all cooperated program tasks. It is recommended to always define the variable global in each program task ( VAR syncident ... ). TaskList Data type: tasks Persistent variable, that in a task list (array) specifies the name ( string ) of the program tasks, that should meet in the synchronization point with its name according to the argument SyncID . The persistent variable must be defined and have an equal name and equal contents in all cooperated program tasks. It is recommended to always define the variable global in the system ( PERS tasks ... ). [\TimeOut] Data type: num The max. time for waiting for the other program tasks to reach the synchronization point. Time-out in seconds (resolution 0.001s). If this argument is not specified then the program task will wait for ever. If this time runs out before all program tasks have reached the synchronization poin then the error handler will be called, if there is one, with the error code ERR_WAITSYNCTASK . If there is no error handler then the execution will be stopped. Continued Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 690 © Copyright 2004-2010 ABB. All rights reserved. Program execution The actual program task will wait at WaitSyncTask until the other program tasks in the TaskList have reached the same SyncID point. At that time the respective program task will continue to execute its next instruction. WaitSyncTask can be programmed between move instructions with corner zone in between. Depending on the timing balance between the program tasks at execution time, the system can: • at best timing, keep all corner zones. • at worst timing, only keep the corner zone for the program task that reaches the WaitSyncTask last. For the other program tasks it will result in stop points. It is possible to exclude program tasks for testing purposes from FlexPendant - Task Selection Panel. The following principles can be used: • Principle 1) Exclude the program task cycle-permanent from Task Selection Panel before starting from main (after set of PP to main) - This disconnection will be valid during the whole program cycle. • Principle 2) Exclude the program task temporarily from the Task Selection Panel between some WaitSyncTask instructions in the program cycle - The system will only run the other connected tasks but will, with error message, force the user to connect the excluded program tasks before passing co-operated WaitSyncTask . • Principle 3) If running according principle 2, it is possible to exclude some program task’s permanent cycle from Task Selection Panel for further running according to principle 1 by executing the service routine SkipTaskExec . Note that the Task Selection Panel is locked when running the system in synchronized movements. More examples More examples of the instruction WaitSyncTask are illustrated below. Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask \InPos, sync1, task_list \TimeOut := 60; ... ERROR IF ERRNO = ERR_WAITSYNCTASK THEN RETRY; ENDIF 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
692
1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 689 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitSyncTask [\InPos] SyncID TaskList [\TimeOut] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before this program task starts waiting for other program tasks to reach its meeting point specified in the WaitSyncTask instruction. SyncID Synchronization identity Data type: syncident Variable that specifies the name of the synchronization (meeting) point. Data type syncident is a non-value type only used as an identifier for naming the synchronization point. The variable must be defined and have an equal name in all cooperated program tasks. It is recommended to always define the variable global in each program task ( VAR syncident ... ). TaskList Data type: tasks Persistent variable, that in a task list (array) specifies the name ( string ) of the program tasks, that should meet in the synchronization point with its name according to the argument SyncID . The persistent variable must be defined and have an equal name and equal contents in all cooperated program tasks. It is recommended to always define the variable global in the system ( PERS tasks ... ). [\TimeOut] Data type: num The max. time for waiting for the other program tasks to reach the synchronization point. Time-out in seconds (resolution 0.001s). If this argument is not specified then the program task will wait for ever. If this time runs out before all program tasks have reached the synchronization poin then the error handler will be called, if there is one, with the error code ERR_WAITSYNCTASK . If there is no error handler then the execution will be stopped. Continued Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 690 © Copyright 2004-2010 ABB. All rights reserved. Program execution The actual program task will wait at WaitSyncTask until the other program tasks in the TaskList have reached the same SyncID point. At that time the respective program task will continue to execute its next instruction. WaitSyncTask can be programmed between move instructions with corner zone in between. Depending on the timing balance between the program tasks at execution time, the system can: • at best timing, keep all corner zones. • at worst timing, only keep the corner zone for the program task that reaches the WaitSyncTask last. For the other program tasks it will result in stop points. It is possible to exclude program tasks for testing purposes from FlexPendant - Task Selection Panel. The following principles can be used: • Principle 1) Exclude the program task cycle-permanent from Task Selection Panel before starting from main (after set of PP to main) - This disconnection will be valid during the whole program cycle. • Principle 2) Exclude the program task temporarily from the Task Selection Panel between some WaitSyncTask instructions in the program cycle - The system will only run the other connected tasks but will, with error message, force the user to connect the excluded program tasks before passing co-operated WaitSyncTask . • Principle 3) If running according principle 2, it is possible to exclude some program task’s permanent cycle from Task Selection Panel for further running according to principle 1 by executing the service routine SkipTaskExec . Note that the Task Selection Panel is locked when running the system in synchronized movements. More examples More examples of the instruction WaitSyncTask are illustrated below. Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask \InPos, sync1, task_list \TimeOut := 60; ... ERROR IF ERRNO = ERR_WAITSYNCTASK THEN RETRY; ENDIF Continued Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 691 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The program task T_ROB1 waits in instruction WaitSyncTask until its mechanical units are in position and after that it waits for the program task T_ROB2 to reach its synchronization point with the same identity. After waiting for 60 s, the error handler is called with ERRNO equal to ERR_WAITSYNCTASK . Then the instruction WaitSyncTask is called again for an additional 60 s. Error handling If a time-out occurs because WaitSyncTask not ready in time then the system variable ERRNO is set to ERR_WAITSYNCTASK . This error can be handled in the ERROR handler. Limitation If this instruction is preceded by a move instruction then 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. WaitSyncTask \InPos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitSyncTask [´\´ InPos ´,´] [ SyncID ´:=´ ] < variable ( VAR ) of syncident> ´,´ [ TaskList ´:=´ ] < persistent array {*} ( PERS ) of tasks> [ ´\´ TimeOut ´:=´ < expression ( IN ) of num > ] ´;´ Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 Identity for synchronization point syncident - Identity for synchronization point on page 1200 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
693
1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 3HAC 16581-1 Revision: J 690 © Copyright 2004-2010 ABB. All rights reserved. Program execution The actual program task will wait at WaitSyncTask until the other program tasks in the TaskList have reached the same SyncID point. At that time the respective program task will continue to execute its next instruction. WaitSyncTask can be programmed between move instructions with corner zone in between. Depending on the timing balance between the program tasks at execution time, the system can: • at best timing, keep all corner zones. • at worst timing, only keep the corner zone for the program task that reaches the WaitSyncTask last. For the other program tasks it will result in stop points. It is possible to exclude program tasks for testing purposes from FlexPendant - Task Selection Panel. The following principles can be used: • Principle 1) Exclude the program task cycle-permanent from Task Selection Panel before starting from main (after set of PP to main) - This disconnection will be valid during the whole program cycle. • Principle 2) Exclude the program task temporarily from the Task Selection Panel between some WaitSyncTask instructions in the program cycle - The system will only run the other connected tasks but will, with error message, force the user to connect the excluded program tasks before passing co-operated WaitSyncTask . • Principle 3) If running according principle 2, it is possible to exclude some program task’s permanent cycle from Task Selection Panel for further running according to principle 1 by executing the service routine SkipTaskExec . Note that the Task Selection Panel is locked when running the system in synchronized movements. More examples More examples of the instruction WaitSyncTask are illustrated below. Example 1 Program example in task T_ROB1 PERS tasks task_list{2} := [ ["T_ROB1"], ["T_ROB2"] ]; VAR syncident sync1; ... WaitSyncTask \InPos, sync1, task_list \TimeOut := 60; ... ERROR IF ERRNO = ERR_WAITSYNCTASK THEN RETRY; ENDIF Continued Continues on next page 1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 691 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The program task T_ROB1 waits in instruction WaitSyncTask until its mechanical units are in position and after that it waits for the program task T_ROB2 to reach its synchronization point with the same identity. After waiting for 60 s, the error handler is called with ERRNO equal to ERR_WAITSYNCTASK . Then the instruction WaitSyncTask is called again for an additional 60 s. Error handling If a time-out occurs because WaitSyncTask not ready in time then the system variable ERRNO is set to ERR_WAITSYNCTASK . This error can be handled in the ERROR handler. Limitation If this instruction is preceded by a move instruction then 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. WaitSyncTask \InPos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitSyncTask [´\´ InPos ´,´] [ SyncID ´:=´ ] < variable ( VAR ) of syncident> ´,´ [ TaskList ´:=´ ] < persistent array {*} ( PERS ) of tasks> [ ´\´ TimeOut ´:=´ < expression ( IN ) of num > ] ´;´ Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 Identity for synchronization point syncident - Identity for synchronization point on page 1200 Continued 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 692 © Copyright 2004-2010 ABB. All rights reserved. 1.235. WaitTestAndSet - Wait until variable unset - then set Usage WaitTestAndSet instruction waits for a specified bool persistent variable value to become FALSE . When the variable value becomes FALSE , the instruction will set value to TRUE and continue the execution. The persistent variable can be used as a binary semaphore for synchronization and mutual exclusion. This instruction has the same underlying functionality as the TestAndSet function, but the WaitTestAndSet is waiting as long as the bool is FALSE while the TestAndSet instruction terminates immediately. It is not recommended to use WaitTestAndSet instruction in a TRAP routine, UNDO handler, or event routines. Examples of resources that can need protection from access at the same time: • Use of some RAPID routines with function problems when executed in parallel. • Use of the FlexPendant - Operator Log. Basic examples Basic examples of the instruction WaitTestAndSet are illustrated below. See also More examples on page 693 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from MAIN"; TPWrite "Second line from MAIN"; TPWrite "Third line from MAIN"; tproutine_inuse := FALSE; BACK1 program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from BACK1"; TPWrite "Second line from BACK1"; TPWrite "Third line from BACK1"; tproutine_inuse := FALSE; To avoid mixing up the lines in the Operator Log (one from MAIN and one from BACK1 ) the use of the WaitTestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore WaitTestAndSet(tproutine_inuse) first then program task BACK1 must wait until the program task MAIN has left the semaphore. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
694
1 Instructions 1.234. WaitSyncTask - Wait at synchronization point for other program tasks Multitasking 691 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The program task T_ROB1 waits in instruction WaitSyncTask until its mechanical units are in position and after that it waits for the program task T_ROB2 to reach its synchronization point with the same identity. After waiting for 60 s, the error handler is called with ERRNO equal to ERR_WAITSYNCTASK . Then the instruction WaitSyncTask is called again for an additional 60 s. Error handling If a time-out occurs because WaitSyncTask not ready in time then the system variable ERRNO is set to ERR_WAITSYNCTASK . This error can be handled in the ERROR handler. Limitation If this instruction is preceded by a move instruction then 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. WaitSyncTask \InPos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitSyncTask [´\´ InPos ´,´] [ SyncID ´:=´ ] < variable ( VAR ) of syncident> ´,´ [ TaskList ´:=´ ] < persistent array {*} ( PERS ) of tasks> [ ´\´ TimeOut ´:=´ < expression ( IN ) of num > ] ´;´ Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 Identity for synchronization point syncident - Identity for synchronization point on page 1200 Continued 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 692 © Copyright 2004-2010 ABB. All rights reserved. 1.235. WaitTestAndSet - Wait until variable unset - then set Usage WaitTestAndSet instruction waits for a specified bool persistent variable value to become FALSE . When the variable value becomes FALSE , the instruction will set value to TRUE and continue the execution. The persistent variable can be used as a binary semaphore for synchronization and mutual exclusion. This instruction has the same underlying functionality as the TestAndSet function, but the WaitTestAndSet is waiting as long as the bool is FALSE while the TestAndSet instruction terminates immediately. It is not recommended to use WaitTestAndSet instruction in a TRAP routine, UNDO handler, or event routines. Examples of resources that can need protection from access at the same time: • Use of some RAPID routines with function problems when executed in parallel. • Use of the FlexPendant - Operator Log. Basic examples Basic examples of the instruction WaitTestAndSet are illustrated below. See also More examples on page 693 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from MAIN"; TPWrite "Second line from MAIN"; TPWrite "Third line from MAIN"; tproutine_inuse := FALSE; BACK1 program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from BACK1"; TPWrite "Second line from BACK1"; TPWrite "Third line from BACK1"; tproutine_inuse := FALSE; To avoid mixing up the lines in the Operator Log (one from MAIN and one from BACK1 ) the use of the WaitTestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore WaitTestAndSet(tproutine_inuse) first then program task BACK1 must wait until the program task MAIN has left the semaphore. Continues on next page 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 693 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitTestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object must be a persistent variable PERS . If WaitTestAndSet are used between different program tasks then the object must be a global PERS . Program execution This instruction will in one indivisible step check and set the user defined persistent variable like code example below: • if it has the value FALSE , set it to TRUE • if it has the value TRUE, wait until it become FALSE and then set it to TRUE IF Object = FALSE THEN Object := TRUE; ELSE ! Wait until it become FALSE WaitUntil Object = FALSE; Object := TRUE; ENDIF After that the instruction is ready. To avoid problems, because persistent variables keep their value if program pointer PP is moved to main, always set the semaphore object to FALSE in the START event routine. More examples More examples of the instruction WaitTestAndSet are illustrated below. Example 1 PERS bool semPers:= FALSE; ... PROC doit(...) WaitTestAndSet semPers; ... semPers := FALSE; ENDPROC NOTE! If program execution is stopped in the routine doit and the program pointer is moved to main then the variable semPers will not be reset. To avoid this, reset the variable semPers to FALSE in the START event routine. Syntax WaitTestAndSet [ Object ’:=’ ] < persistent ( PERS ) of bool> ´;’ 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
695
1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 692 © Copyright 2004-2010 ABB. All rights reserved. 1.235. WaitTestAndSet - Wait until variable unset - then set Usage WaitTestAndSet instruction waits for a specified bool persistent variable value to become FALSE . When the variable value becomes FALSE , the instruction will set value to TRUE and continue the execution. The persistent variable can be used as a binary semaphore for synchronization and mutual exclusion. This instruction has the same underlying functionality as the TestAndSet function, but the WaitTestAndSet is waiting as long as the bool is FALSE while the TestAndSet instruction terminates immediately. It is not recommended to use WaitTestAndSet instruction in a TRAP routine, UNDO handler, or event routines. Examples of resources that can need protection from access at the same time: • Use of some RAPID routines with function problems when executed in parallel. • Use of the FlexPendant - Operator Log. Basic examples Basic examples of the instruction WaitTestAndSet are illustrated below. See also More examples on page 693 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from MAIN"; TPWrite "Second line from MAIN"; TPWrite "Third line from MAIN"; tproutine_inuse := FALSE; BACK1 program task: PERS bool tproutine_inuse := FALSE; ... WaitTestAndSet tproutine_inuse; TPWrite "First line from BACK1"; TPWrite "Second line from BACK1"; TPWrite "Third line from BACK1"; tproutine_inuse := FALSE; To avoid mixing up the lines in the Operator Log (one from MAIN and one from BACK1 ) the use of the WaitTestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore WaitTestAndSet(tproutine_inuse) first then program task BACK1 must wait until the program task MAIN has left the semaphore. Continues on next page 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 693 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitTestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object must be a persistent variable PERS . If WaitTestAndSet are used between different program tasks then the object must be a global PERS . Program execution This instruction will in one indivisible step check and set the user defined persistent variable like code example below: • if it has the value FALSE , set it to TRUE • if it has the value TRUE, wait until it become FALSE and then set it to TRUE IF Object = FALSE THEN Object := TRUE; ELSE ! Wait until it become FALSE WaitUntil Object = FALSE; Object := TRUE; ENDIF After that the instruction is ready. To avoid problems, because persistent variables keep their value if program pointer PP is moved to main, always set the semaphore object to FALSE in the START event routine. More examples More examples of the instruction WaitTestAndSet are illustrated below. Example 1 PERS bool semPers:= FALSE; ... PROC doit(...) WaitTestAndSet semPers; ... semPers := FALSE; ENDPROC NOTE! If program execution is stopped in the routine doit and the program pointer is moved to main then the variable semPers will not be reset. To avoid this, reset the variable semPers to FALSE in the START event routine. Syntax WaitTestAndSet [ Object ’:=’ ] < persistent ( PERS ) of bool> ´;’ Continued Continues on next page 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 694 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Test variable and set if unset (type polled with WaitTime) TestAndSet - Test variable and set if unset on page 1017 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
696
1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 693 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments WaitTestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object must be a persistent variable PERS . If WaitTestAndSet are used between different program tasks then the object must be a global PERS . Program execution This instruction will in one indivisible step check and set the user defined persistent variable like code example below: • if it has the value FALSE , set it to TRUE • if it has the value TRUE, wait until it become FALSE and then set it to TRUE IF Object = FALSE THEN Object := TRUE; ELSE ! Wait until it become FALSE WaitUntil Object = FALSE; Object := TRUE; ENDIF After that the instruction is ready. To avoid problems, because persistent variables keep their value if program pointer PP is moved to main, always set the semaphore object to FALSE in the START event routine. More examples More examples of the instruction WaitTestAndSet are illustrated below. Example 1 PERS bool semPers:= FALSE; ... PROC doit(...) WaitTestAndSet semPers; ... semPers := FALSE; ENDPROC NOTE! If program execution is stopped in the routine doit and the program pointer is moved to main then the variable semPers will not be reset. To avoid this, reset the variable semPers to FALSE in the START event routine. Syntax WaitTestAndSet [ Object ’:=’ ] < persistent ( PERS ) of bool> ´;’ Continued Continues on next page 1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 694 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Test variable and set if unset (type polled with WaitTime) TestAndSet - Test variable and set if unset on page 1017 Continued 1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 695 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.236. WaitTime - Waits a given amount of time Usage WaitTime is used to wait a given amount of time. This instruction can also be used to wait until the robot and external axes have come to a standstill. Basic examples Basic examples of the instruction WaitTime are illustrated below. See also More examples below. Example 1 WaitTime 0.5; Program execution waits 0.5 seconds. Arguments WaitTime [\InPos] Time [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before the waiting time starts to be counted. This argument can only be used if the task controls mechanical units. Time Data type: num The time, expressed in seconds, that program execution is to wait. Min. value 0 s. Max. value no limit. Resolution 0.001 s. Program execution Program execution temporarily stops for the given amount of time. Interrupt handling and other similar functions, nevertheless, are still active. In manual mode, if waiting time is greater than 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set the system parameter Controller/System Misc./ Simulate Menu to 0. More examples More examples of how to use the instruction WaitTime are illustrated below. Example 1 WaitTime \InPos,0; Program execution waits until the robot and the external axes have come to a standstill. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
697
1 Instructions 1.235. WaitTestAndSet - Wait until variable unset - then set RobotWare - OS 3HAC 16581-1 Revision: J 694 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Test variable and set if unset (type polled with WaitTime) TestAndSet - Test variable and set if unset on page 1017 Continued 1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 695 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.236. WaitTime - Waits a given amount of time Usage WaitTime is used to wait a given amount of time. This instruction can also be used to wait until the robot and external axes have come to a standstill. Basic examples Basic examples of the instruction WaitTime are illustrated below. See also More examples below. Example 1 WaitTime 0.5; Program execution waits 0.5 seconds. Arguments WaitTime [\InPos] Time [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before the waiting time starts to be counted. This argument can only be used if the task controls mechanical units. Time Data type: num The time, expressed in seconds, that program execution is to wait. Min. value 0 s. Max. value no limit. Resolution 0.001 s. Program execution Program execution temporarily stops for the given amount of time. Interrupt handling and other similar functions, nevertheless, are still active. In manual mode, if waiting time is greater than 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set the system parameter Controller/System Misc./ Simulate Menu to 0. More examples More examples of how to use the instruction WaitTime are illustrated below. Example 1 WaitTime \InPos,0; Program execution waits until the robot and the external axes have come to a standstill. Continues on next page 1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 3HAC 16581-1 Revision: J 696 © Copyright 2004-2010 ABB. All rights reserved. Limitations Argument \Inpos cannot be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitTime \Inpos cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitTime [’\’InPos’,’] [Time ’:=’] <expression ( IN ) of num>’;’ Related information For information about See Waiting until a condition is met WaitUntil - Waits until a condition is met on page 697 Waiting until an I/O is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
698
1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 695 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.236. WaitTime - Waits a given amount of time Usage WaitTime is used to wait a given amount of time. This instruction can also be used to wait until the robot and external axes have come to a standstill. Basic examples Basic examples of the instruction WaitTime are illustrated below. See also More examples below. Example 1 WaitTime 0.5; Program execution waits 0.5 seconds. Arguments WaitTime [\InPos] Time [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have come to a standstill before the waiting time starts to be counted. This argument can only be used if the task controls mechanical units. Time Data type: num The time, expressed in seconds, that program execution is to wait. Min. value 0 s. Max. value no limit. Resolution 0.001 s. Program execution Program execution temporarily stops for the given amount of time. Interrupt handling and other similar functions, nevertheless, are still active. In manual mode, if waiting time is greater than 3 s then an alert box will pop up asking if you want to simulate the instruction. If you do not want the alert box to appear you can set the system parameter Controller/System Misc./ Simulate Menu to 0. More examples More examples of how to use the instruction WaitTime are illustrated below. Example 1 WaitTime \InPos,0; Program execution waits until the robot and the external axes have come to a standstill. Continues on next page 1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 3HAC 16581-1 Revision: J 696 © Copyright 2004-2010 ABB. All rights reserved. Limitations Argument \Inpos cannot be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitTime \Inpos cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitTime [’\’InPos’,’] [Time ’:=’] <expression ( IN ) of num>’;’ Related information For information about See Waiting until a condition is met WaitUntil - Waits until a condition is met on page 697 Waiting until an I/O is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 697 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.237. WaitUntil - Waits until a condition is met Usage WaitUntil is used to wait until a logical condition is met; for example, it can wait until one or several inputs have been set. Basic examples Basic examples of the instruction WaitUntil are illustrated below. See also More examples on page 698 . Example 1 WaitUntil di4 = 1; Program execution continues only after the di4 input has been set. Arguments WaitUntil [\InPos] Cond [\MaxTime] [\TimeFlag] [\PollRate] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. This argument can only be used if the task controls mechanical units. Cond Data type: bool The logical expression that is to be waited for. [\MaxTime] Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is set then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
699
1 Instructions 1.236. WaitTime - Waits a given amount of time RobotWare - OS 3HAC 16581-1 Revision: J 696 © Copyright 2004-2010 ABB. All rights reserved. Limitations Argument \Inpos cannot be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitTime \Inpos cannot be executed in a RAPID routine connected to any of following special system events: PowerOn, Stop, QStop, Restart, or Step. Syntax WaitTime [’\’InPos’,’] [Time ’:=’] <expression ( IN ) of num>’;’ Related information For information about See Waiting until a condition is met WaitUntil - Waits until a condition is met on page 697 Waiting until an I/O is set/reset WaitDI - Waits until a digital input signal is set on page 670 Continued 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 697 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.237. WaitUntil - Waits until a condition is met Usage WaitUntil is used to wait until a logical condition is met; for example, it can wait until one or several inputs have been set. Basic examples Basic examples of the instruction WaitUntil are illustrated below. See also More examples on page 698 . Example 1 WaitUntil di4 = 1; Program execution continues only after the di4 input has been set. Arguments WaitUntil [\InPos] Cond [\MaxTime] [\TimeFlag] [\PollRate] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. This argument can only be used if the task controls mechanical units. Cond Data type: bool The logical expression that is to be waited for. [\MaxTime] Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is set then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 698 © Copyright 2004-2010 ABB. All rights reserved. [\PollRate] Polling Rate Data type: num The polling rate in seconds for checking if the condition in argument Cond is TRUE . This means that WaitUntil first check the condition at once, and if not TRUE then every specified second until TRUE . Min. polling rate value 0.01 s. If this argument is not used then the default polling rate is set to 0.1 s. Program execution If the programmed condition is not met on execution of a WaitUntil instruction then condition is checked again every 100 ms (or according value specified in argument Cond ). When the robot is waiting the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to false. In manual mode, after waiting more than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear then you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of how to use the instruction WaitUntil are illustrated below. Example 1 VAR bool timeout; WaitUntil start_input = 1 AND grip_status = 1\MaxTime := 60 \TimeFlag := timeout; IF timeout THEN TPWrite "No start order received within expected time"; ELSE start_next_cycle; ENDIF If the two input conditions are not met within 60 seconds then an error message will be written on the display of the FlexPendant. Example 2 WaitUntil \Inpos, di4 = 1; Program execution waits until the robot has come to a standstill and the di4 input has been set. 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
700
1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 697 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.237. WaitUntil - Waits until a condition is met Usage WaitUntil is used to wait until a logical condition is met; for example, it can wait until one or several inputs have been set. Basic examples Basic examples of the instruction WaitUntil are illustrated below. See also More examples on page 698 . Example 1 WaitUntil di4 = 1; Program execution continues only after the di4 input has been set. Arguments WaitUntil [\InPos] Cond [\MaxTime] [\TimeFlag] [\PollRate] [\InPos] In Position Data type: switch If this argument is used then the robot and external axes must have reached the stop point ( ToPoint of current move instruction) before the execution can continue. This argument can only be used if the task controls mechanical units. Cond Data type: bool The logical expression that is to be waited for. [\MaxTime] Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the condition is set then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the condition is met. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 698 © Copyright 2004-2010 ABB. All rights reserved. [\PollRate] Polling Rate Data type: num The polling rate in seconds for checking if the condition in argument Cond is TRUE . This means that WaitUntil first check the condition at once, and if not TRUE then every specified second until TRUE . Min. polling rate value 0.01 s. If this argument is not used then the default polling rate is set to 0.1 s. Program execution If the programmed condition is not met on execution of a WaitUntil instruction then condition is checked again every 100 ms (or according value specified in argument Cond ). When the robot is waiting the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to false. In manual mode, after waiting more than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear then you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of how to use the instruction WaitUntil are illustrated below. Example 1 VAR bool timeout; WaitUntil start_input = 1 AND grip_status = 1\MaxTime := 60 \TimeFlag := timeout; IF timeout THEN TPWrite "No start order received within expected time"; ELSE start_next_cycle; ENDIF If the two input conditions are not met within 60 seconds then an error message will be written on the display of the FlexPendant. Example 2 WaitUntil \Inpos, di4 = 1; Program execution waits until the robot has come to a standstill and the di4 input has been set. Continued Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 699 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 3 WaitUntil di4 = 1 \MaxTime:=5; .. ERROR IF ERRNO = ERR_NORUNUNIT THEN TPWrite "The I/O unit is not running"; TRYNEXT; ELSEIF ERRNO = ERR_WAIT_MAX THEN RAISE; ELSE Stop; ENDIF Program execution waits until the di4 input has been set. If the I/O unit has been disabled, or the waiting time expires, the execution continues in the error handler. Error handling If there is a time-out (parameter \MaxTime ) before the condition has changed to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is a signal used in the condition, and there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. These situations can then be dealt with by the error handler. Limitation Argument \Inpos can not be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitUntil \Inpos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. WaitUntil \Inpos cannot be used together with StopMove to detect if the movement has been stopped. The WaitUntil instruction can be hanging forever in that case. It does not detect that the movement has stopped, it detects that the robot and external axes has reached the last programmed ToPoint (MoveX, SearchX, TriggX). Syntax WaitUntil [’\’InPos’,’] [Cond ’:=’] <expression (IN) of bool> [’\’MaxTime’ :=’<expression (IN) of num>] [’\’TimeFlag’ :=’<variable (VAR) of bool>] [’\’PollRate’ :=’<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
701
1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 698 © Copyright 2004-2010 ABB. All rights reserved. [\PollRate] Polling Rate Data type: num The polling rate in seconds for checking if the condition in argument Cond is TRUE . This means that WaitUntil first check the condition at once, and if not TRUE then every specified second until TRUE . Min. polling rate value 0.01 s. If this argument is not used then the default polling rate is set to 0.1 s. Program execution If the programmed condition is not met on execution of a WaitUntil instruction then condition is checked again every 100 ms (or according value specified in argument Cond ). When the robot is waiting the time is supervised, and if it exceeds the max time value then the program will continue if a TimeFlag is specified or raise an error if it’s not. If a TimeFlag is specified then this will be set to TRUE if the time is exceeded. Otherwise it will be set to false. In manual mode, after waiting more than 3 s, an alert box will pop up asking if you want to simulate the instruction. If you don’t want the alert box to appear then you can set system parameter SimMenu to NO ( Technical reference manual - System parameters , section Controller - System Misc ). More examples More examples of how to use the instruction WaitUntil are illustrated below. Example 1 VAR bool timeout; WaitUntil start_input = 1 AND grip_status = 1\MaxTime := 60 \TimeFlag := timeout; IF timeout THEN TPWrite "No start order received within expected time"; ELSE start_next_cycle; ENDIF If the two input conditions are not met within 60 seconds then an error message will be written on the display of the FlexPendant. Example 2 WaitUntil \Inpos, di4 = 1; Program execution waits until the robot has come to a standstill and the di4 input has been set. Continued Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 699 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 3 WaitUntil di4 = 1 \MaxTime:=5; .. ERROR IF ERRNO = ERR_NORUNUNIT THEN TPWrite "The I/O unit is not running"; TRYNEXT; ELSEIF ERRNO = ERR_WAIT_MAX THEN RAISE; ELSE Stop; ENDIF Program execution waits until the di4 input has been set. If the I/O unit has been disabled, or the waiting time expires, the execution continues in the error handler. Error handling If there is a time-out (parameter \MaxTime ) before the condition has changed to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is a signal used in the condition, and there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. These situations can then be dealt with by the error handler. Limitation Argument \Inpos can not be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitUntil \Inpos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. WaitUntil \Inpos cannot be used together with StopMove to detect if the movement has been stopped. The WaitUntil instruction can be hanging forever in that case. It does not detect that the movement has stopped, it detects that the robot and external axes has reached the last programmed ToPoint (MoveX, SearchX, TriggX). Syntax WaitUntil [’\’InPos’,’] [Cond ’:=’] <expression (IN) of bool> [’\’MaxTime’ :=’<expression (IN) of num>] [’\’TimeFlag’ :=’<variable (VAR) of bool>] [’\’PollRate’ :=’<expression (IN) of num>]’;’ Continued Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 700 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Waiting a given amount of time WaitTime - Waits a given amount of time on page 695 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
702
1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 699 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Example 3 WaitUntil di4 = 1 \MaxTime:=5; .. ERROR IF ERRNO = ERR_NORUNUNIT THEN TPWrite "The I/O unit is not running"; TRYNEXT; ELSEIF ERRNO = ERR_WAIT_MAX THEN RAISE; ELSE Stop; ENDIF Program execution waits until the di4 input has been set. If the I/O unit has been disabled, or the waiting time expires, the execution continues in the error handler. Error handling If there is a time-out (parameter \MaxTime ) before the condition has changed to the right value, the system variable ERRNO is set to ERR_WAIT_MAXTIME and the execution continues in the error handler. If there is a signal used in the condition, and there is no contact with the I/O unit, the system variable ERRNO is set to ERR_NORUNUNIT and the execution continues in the error handler. These situations can then be dealt with by the error handler. Limitation Argument \Inpos can not be used together with SoftServo. If this instruction is preceded by a move instruction then 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. WaitUntil \Inpos cannot be executed in a RAPID routine connected to any of the following special system events: PowerOn, Stop, QStop, Restart, or Step. WaitUntil \Inpos cannot be used together with StopMove to detect if the movement has been stopped. The WaitUntil instruction can be hanging forever in that case. It does not detect that the movement has stopped, it detects that the robot and external axes has reached the last programmed ToPoint (MoveX, SearchX, TriggX). Syntax WaitUntil [’\’InPos’,’] [Cond ’:=’] <expression (IN) of bool> [’\’MaxTime’ :=’<expression (IN) of num>] [’\’TimeFlag’ :=’<variable (VAR) of bool>] [’\’PollRate’ :=’<expression (IN) of num>]’;’ Continued Continues on next page 1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 700 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Waiting a given amount of time WaitTime - Waits a given amount of time on page 695 Expressions Technical reference manual - RAPID overview , section Basic characteristics - Expressions Continued 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 701 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.238. WaitWObj - Wait for work object on conveyor Usage WaitWObj ( Wait Work Object ) connects to a work object in the start window on the conveyor mechanical unit. Basic examples Basic examples of the instruction WaitWObj are illustrated below. See also More examples on page 702 . Example 1 WaitWObj wobj_on_cnv1; The program connects to the first object in the object queue that is within the start window on the conveyor. If there is no object in the start window then execution waits for an object. Arguments WaitWObj WObj [ \RelDist ][\MaxTime][\TimeFlag] WObj Work Object Data type: wobjdata The moving work object (coordinate system) to which the robot position in the instruction is related. The mechanical unit conveyor is to be specified by the ufmec in the work object. [ \RelDist ] Relative Distance Data type: num Waits for an object to enter the start window and go beyond the distance specified by the argument. If the work object is already connected then execution waits until the object passes the given distance. If the object has already gone past the \RelDist then execution continues. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the object connection or \Reldist reached then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the object connection or \Reldist is reached. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
703
1 Instructions 1.237. WaitUntil - Waits until a condition is met RobotWare - OS 3HAC 16581-1 Revision: J 700 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Waiting until an input is set/reset WaitDI - Waits until a digital input signal is set on page 670 Waiting a given amount of time WaitTime - Waits a given amount of time on page 695 Expressions Technical reference manual - RAPID overview , section Basic characteristics - Expressions Continued 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 701 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.238. WaitWObj - Wait for work object on conveyor Usage WaitWObj ( Wait Work Object ) connects to a work object in the start window on the conveyor mechanical unit. Basic examples Basic examples of the instruction WaitWObj are illustrated below. See also More examples on page 702 . Example 1 WaitWObj wobj_on_cnv1; The program connects to the first object in the object queue that is within the start window on the conveyor. If there is no object in the start window then execution waits for an object. Arguments WaitWObj WObj [ \RelDist ][\MaxTime][\TimeFlag] WObj Work Object Data type: wobjdata The moving work object (coordinate system) to which the robot position in the instruction is related. The mechanical unit conveyor is to be specified by the ufmec in the work object. [ \RelDist ] Relative Distance Data type: num Waits for an object to enter the start window and go beyond the distance specified by the argument. If the work object is already connected then execution waits until the object passes the given distance. If the object has already gone past the \RelDist then execution continues. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the object connection or \Reldist reached then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the object connection or \Reldist is reached. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 3HAC 16581-1 Revision: J 702 © Copyright 2004-2010 ABB. All rights reserved. Program execution If there is no object in the start window then program execution waits. If an object is present then the work object is connected to the conveyor and execution continues. If a second WaitWObj instruction is issued while connected then an error is returned unless the \RelDist optional argument is used. More examples More examples of the instruction WaitWObj are illustrated below. Example 1 WaitWObj wobj_on_cnv1\RelDist:=500.0; If not connected then wait for the object to enter the start window and then wait for the object to pass the 500 mm point on the conveyor. If already connected to the object then wait for the object to pass 500 mm. If not connected then wait for an object in the start window. Example 2 WaitWObj wobj_on_cnv1\RelDist:=0.0; If already connected then continue execution as the object has already gone past 0.0 mm. Example 3 WaitWObj wobj_on_cnv1; WaitWObj wobj_on_cnv1\RelDist:=0.0; The first WaitWObj connects to the object in the start window. The second WaitWObj will return immediately if the object is still connected. But it will wait for the next object if the previous object had moved past the maximum distance or was dropped. Example 4 WaitWObj wobj_on_cnv1\RelDist:=500.0\MaxTime:=0.1 \Timeflag:=flag1; The WaitWobj will return immediately if the object has passed 500 mm but otherwise will wait 0.1 sec for an object. If no object passes 500 mm during this 0.1 sec the instruction will return with flag1 = TRUE . Limitations It requires 50 ms to connect to the first object in the start window. Once connected, a second WaitWObj with \RelDist optional argument will take only normal RAPID instruction execution time. Error handling If the following errors occur during execution of the WaitWobj instruction then the system variable ERRNO will be set. These errors can then be handled in the error handler. ERR_CNV_NOT_ACT The conveyor is not activated. ERR_CNV_CONNECT The WaitWobj instruction is already connected. ERR_CNV_DROPPED The object that the instruction WaitWobj was waiting for has been dropped by another task. (DSQC 354Revision 2: an object had passed the start window) ERR_WAIT_MAXTIME The object did not come in time and there is no Timeflag 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
704
1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 701 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.238. WaitWObj - Wait for work object on conveyor Usage WaitWObj ( Wait Work Object ) connects to a work object in the start window on the conveyor mechanical unit. Basic examples Basic examples of the instruction WaitWObj are illustrated below. See also More examples on page 702 . Example 1 WaitWObj wobj_on_cnv1; The program connects to the first object in the object queue that is within the start window on the conveyor. If there is no object in the start window then execution waits for an object. Arguments WaitWObj WObj [ \RelDist ][\MaxTime][\TimeFlag] WObj Work Object Data type: wobjdata The moving work object (coordinate system) to which the robot position in the instruction is related. The mechanical unit conveyor is to be specified by the ufmec in the work object. [ \RelDist ] Relative Distance Data type: num Waits for an object to enter the start window and go beyond the distance specified by the argument. If the work object is already connected then execution waits until the object passes the given distance. If the object has already gone past the \RelDist then execution continues. [\MaxTime] Maximum Time Data type: num The maximum period of waiting time permitted, expressed in seconds. If this time runs out before the object connection or \Reldist reached then the error handler will be called, if there is one, with the error code ERR_WAIT_MAXTIME . If there is no error handler then the execution will be stopped. [\TimeFlag] Timeout Flag Data type: bool The output parameter that contains the value TRUE if the maximum permitted waiting time runs out before the object connection or \Reldist is reached. If this parameter is included in the instruction then it is not considered to be an error if the max. time runs out. This argument is ignored if the MaxTime argument is not included in the instruction. Continues on next page 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 3HAC 16581-1 Revision: J 702 © Copyright 2004-2010 ABB. All rights reserved. Program execution If there is no object in the start window then program execution waits. If an object is present then the work object is connected to the conveyor and execution continues. If a second WaitWObj instruction is issued while connected then an error is returned unless the \RelDist optional argument is used. More examples More examples of the instruction WaitWObj are illustrated below. Example 1 WaitWObj wobj_on_cnv1\RelDist:=500.0; If not connected then wait for the object to enter the start window and then wait for the object to pass the 500 mm point on the conveyor. If already connected to the object then wait for the object to pass 500 mm. If not connected then wait for an object in the start window. Example 2 WaitWObj wobj_on_cnv1\RelDist:=0.0; If already connected then continue execution as the object has already gone past 0.0 mm. Example 3 WaitWObj wobj_on_cnv1; WaitWObj wobj_on_cnv1\RelDist:=0.0; The first WaitWObj connects to the object in the start window. The second WaitWObj will return immediately if the object is still connected. But it will wait for the next object if the previous object had moved past the maximum distance or was dropped. Example 4 WaitWObj wobj_on_cnv1\RelDist:=500.0\MaxTime:=0.1 \Timeflag:=flag1; The WaitWobj will return immediately if the object has passed 500 mm but otherwise will wait 0.1 sec for an object. If no object passes 500 mm during this 0.1 sec the instruction will return with flag1 = TRUE . Limitations It requires 50 ms to connect to the first object in the start window. Once connected, a second WaitWObj with \RelDist optional argument will take only normal RAPID instruction execution time. Error handling If the following errors occur during execution of the WaitWobj instruction then the system variable ERRNO will be set. These errors can then be handled in the error handler. ERR_CNV_NOT_ACT The conveyor is not activated. ERR_CNV_CONNECT The WaitWobj instruction is already connected. ERR_CNV_DROPPED The object that the instruction WaitWobj was waiting for has been dropped by another task. (DSQC 354Revision 2: an object had passed the start window) ERR_WAIT_MAXTIME The object did not come in time and there is no Timeflag Continued Continues on next page 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 703 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax WaitWObj [ WObj’ :=’]< persistent ( PERS ) of wobjdata> ‘;’ [ ’\’ RelDist ’:=’ < expression ( IN ) of num > ] [’\’MaxTime ’:=’<expression ( IN ) of num>] [’\’TimeFlag ’:=’<variable ( VAR ) of bool>]’ ;’ Related information For information about See Drop workobject on conveyor DropWObj - Drop work object on conveyor on page 86 Conveyor tracking Application manual - Conveyor tracking Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
705
1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 3HAC 16581-1 Revision: J 702 © Copyright 2004-2010 ABB. All rights reserved. Program execution If there is no object in the start window then program execution waits. If an object is present then the work object is connected to the conveyor and execution continues. If a second WaitWObj instruction is issued while connected then an error is returned unless the \RelDist optional argument is used. More examples More examples of the instruction WaitWObj are illustrated below. Example 1 WaitWObj wobj_on_cnv1\RelDist:=500.0; If not connected then wait for the object to enter the start window and then wait for the object to pass the 500 mm point on the conveyor. If already connected to the object then wait for the object to pass 500 mm. If not connected then wait for an object in the start window. Example 2 WaitWObj wobj_on_cnv1\RelDist:=0.0; If already connected then continue execution as the object has already gone past 0.0 mm. Example 3 WaitWObj wobj_on_cnv1; WaitWObj wobj_on_cnv1\RelDist:=0.0; The first WaitWObj connects to the object in the start window. The second WaitWObj will return immediately if the object is still connected. But it will wait for the next object if the previous object had moved past the maximum distance or was dropped. Example 4 WaitWObj wobj_on_cnv1\RelDist:=500.0\MaxTime:=0.1 \Timeflag:=flag1; The WaitWobj will return immediately if the object has passed 500 mm but otherwise will wait 0.1 sec for an object. If no object passes 500 mm during this 0.1 sec the instruction will return with flag1 = TRUE . Limitations It requires 50 ms to connect to the first object in the start window. Once connected, a second WaitWObj with \RelDist optional argument will take only normal RAPID instruction execution time. Error handling If the following errors occur during execution of the WaitWobj instruction then the system variable ERRNO will be set. These errors can then be handled in the error handler. ERR_CNV_NOT_ACT The conveyor is not activated. ERR_CNV_CONNECT The WaitWobj instruction is already connected. ERR_CNV_DROPPED The object that the instruction WaitWobj was waiting for has been dropped by another task. (DSQC 354Revision 2: an object had passed the start window) ERR_WAIT_MAXTIME The object did not come in time and there is no Timeflag Continued Continues on next page 1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 703 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax WaitWObj [ WObj’ :=’]< persistent ( PERS ) of wobjdata> ‘;’ [ ’\’ RelDist ’:=’ < expression ( IN ) of num > ] [’\’MaxTime ’:=’<expression ( IN ) of num>] [’\’TimeFlag ’:=’<variable ( VAR ) of bool>]’ ;’ Related information For information about See Drop workobject on conveyor DropWObj - Drop work object on conveyor on page 86 Conveyor tracking Application manual - Conveyor tracking Continued 1 Instructions 1.239. WarmStart - Restart the controller RobotWare - OS 3HAC 16581-1 Revision: J 704 © Copyright 2004-2010 ABB. All rights reserved. 1.239. WarmStart - Restart the controller Usage WarmStart is used to restart the controller. The system parameters can be changed from RAPID with the instruction WriteCfgData . You must restart the controller in order for a change to have effect on some of the system parameters. The restart can be done with this instruction WarmStart . Basic examples Basic examples of the instruction WarmStart are illustrated below. Example 1 WriteCfgData "/MOC/MOTOR_CALIB/rob1_1","cal_offset",offset1; WarmStart; Writes the value of the num variable offset1 as calibration offset for axis 1 on rob1 and generates a restart of the controller. Program execution Warmstart takes effect at once and the program pointer is set to the next instruction. Syntax WarmStart ´;´ Related information For information about See Write attribute of a system parameter WriteCfgData - Writes attribute of a system parameter on page 721 Configuration 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
706
1 Instructions 1.238. WaitWObj - Wait for work object on conveyor Conveyor Tracking 703 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax WaitWObj [ WObj’ :=’]< persistent ( PERS ) of wobjdata> ‘;’ [ ’\’ RelDist ’:=’ < expression ( IN ) of num > ] [’\’MaxTime ’:=’<expression ( IN ) of num>] [’\’TimeFlag ’:=’<variable ( VAR ) of bool>]’ ;’ Related information For information about See Drop workobject on conveyor DropWObj - Drop work object on conveyor on page 86 Conveyor tracking Application manual - Conveyor tracking Continued 1 Instructions 1.239. WarmStart - Restart the controller RobotWare - OS 3HAC 16581-1 Revision: J 704 © Copyright 2004-2010 ABB. All rights reserved. 1.239. WarmStart - Restart the controller Usage WarmStart is used to restart the controller. The system parameters can be changed from RAPID with the instruction WriteCfgData . You must restart the controller in order for a change to have effect on some of the system parameters. The restart can be done with this instruction WarmStart . Basic examples Basic examples of the instruction WarmStart are illustrated below. Example 1 WriteCfgData "/MOC/MOTOR_CALIB/rob1_1","cal_offset",offset1; WarmStart; Writes the value of the num variable offset1 as calibration offset for axis 1 on rob1 and generates a restart of the controller. Program execution Warmstart takes effect at once and the program pointer is set to the next instruction. Syntax WarmStart ´;´ Related information For information about See Write attribute of a system parameter WriteCfgData - Writes attribute of a system parameter on page 721 Configuration Technical reference manual - System parameters 1 Instructions 1.240. WHILE - Repeats as long as ... RobotWare - OS 705 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 1.240. WHILE - Repeats as long as ... Usage WHILE is used when a number of instructions are to be repeated as long as a given condition expression evaluates to a TRUE value. Basic examples Basic examples of the instruction WHILE are illustrated below. Example 1 WHILE reg1 < reg2 DO ... reg1 := reg1 + 1; ENDWHILE Repeats the instructions in the WHILE -block as long as reg1 < reg2 . Arguments WHILE Condition DO ... ENDWHILE Condition Data type: bool The condition that must be evaluated to a TRUE value for the instructions in the WHILE -block to be executed. Program execution 1. The condition expression is evaluated. If the expression evaluates to a TRUE value then the instructions in the WHILE -block are executed. 2. The condition expression is then evaluated again, and if the result of this evaluation is TRUE then the instructions in the WHILE -block are executed again. 3. This process continues until the result of the expression evaluation becomes FALSE . The iteration is then terminated and the program execution continues from the instruction after the WHILE -block. If the result of the expression evaluation is FALSE at the very outset then the instructions in the WHILE -block are not executed at all, and the program control transfers immediately to the instruction that follows after the WHILE -block. Remarks If it is possible to determine the number of repetitions then the FOR instruction can be used. Syntax (EBNF) WHILE <conditional expression> DO <instruction list> ENDWHILE Continues on next page