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
1,007
2 Functions 2.126. StrOrder - Checks if strings are ordered RobotWare - OS 3HAC 16581-1 Revision: J 1004 © Copyright 2004-2010 ABB. All rights reserved. Str2 String 2 Data type: string Second string value. Order Data type: string Sequence of characters that define the ordering. See also Predefined data on page 1004 . Syntax StrOrder’(’ [ Str1 ’:=’ ] <expression ( IN ) of string> ´,´ [ Str2 ’:=’ ] <expression ( IN ) of string> ´,´ [ Order ’:=’ ] <expression ( IN ) of string> ’)’ A function with a return value of the data type bool . Predefined data A number of predefined string constants are available in the system and can be used together with string functions. Related information Name Character set STR_DIGIT <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 STR_UPPER <upper case letter> ::= A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | À | Á | Â | Ã | Ä | Å | Æ | Ç | È | É | Ê | Ë | Ì | Í | Î | Ï | 1)| Ñ | Ò | Ó | Ô | Õ | Ö | Ø | Ù | Ú | Û | Ü | 2) | 3) STR_LOWER <lower case letter> ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï | 1) | ñ | ò | ó | ô | õ | ö | ø | ù | ú | û | ü | 2) | 3) | ß | ÿ- STR_WHITE <blank character> ::= For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.127. StrPart - Finds a part of a string RobotWare - OS 1005 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.127. StrPart - Finds a part of a string Usage StrPart ( String Part) is used to find a part of a string, as a new string. Basic examples Basic examples of the function StrPart are illustrated below. Example 1 VAR string part; part := StrPart("Robotics",1,5); The variable part is given the value "Robot" . Return value Data type: string The substring of the specified string which has the specified length and starts at the specified character position. Arguments StrPart (Str ChPos Len) Str String Data type: string The string in which a part is to be found. ChPos Character Position Start character position. A runtime error is generated if the position is outside the string. Len Length Data type: num Length of string part. A runtime error is generated if the length is negative or greater than the length of the string, or if the substring is (partially) outside the string. Syntax StrPart’(’ [ Str ’:=’ ] <expression ( IN ) of string> ’,’ [ ChPos ’:=’ ] <expression ( IN ) of num> ’,’ [ Len ’:=’ ] <expression ( IN ) of num> ’)’ A function with a return value of the data type string . Continues on next page 2 Functions 2.127. StrPart - Finds a part of a string RobotWare - OS 3HAC 16581-1 Revision: J 1006 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String Functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,008
2 Functions 2.127. StrPart - Finds a part of a string RobotWare - OS 1005 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.127. StrPart - Finds a part of a string Usage StrPart ( String Part) is used to find a part of a string, as a new string. Basic examples Basic examples of the function StrPart are illustrated below. Example 1 VAR string part; part := StrPart("Robotics",1,5); The variable part is given the value "Robot" . Return value Data type: string The substring of the specified string which has the specified length and starts at the specified character position. Arguments StrPart (Str ChPos Len) Str String Data type: string The string in which a part is to be found. ChPos Character Position Start character position. A runtime error is generated if the position is outside the string. Len Length Data type: num Length of string part. A runtime error is generated if the length is negative or greater than the length of the string, or if the substring is (partially) outside the string. Syntax StrPart’(’ [ Str ’:=’ ] <expression ( IN ) of string> ’,’ [ ChPos ’:=’ ] <expression ( IN ) of num> ’,’ [ Len ’:=’ ] <expression ( IN ) of num> ’)’ A function with a return value of the data type string . Continues on next page 2 Functions 2.127. StrPart - Finds a part of a string RobotWare - OS 3HAC 16581-1 Revision: J 1006 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String Functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1007 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.128. StrToByte - Converts a string to a byte data Usage StrToByte ( String To Byte ) is used to convert a string with a defined byte data format into a byte data. Basic examples Basic examples of the function StrToByte are illustrated below. Example 1 VAR string con_data_buffer{5} := ["10", "AE", "176", "00001010", "A"]; VAR byte data_buffer{5}; data_buffer{1} := StrToByte(con_data_buffer{1}); The content of the array component data_buffer{1} will be 10 decimal after the StrToByte ... function. data_buffer{2} := StrToByte(con_data_buffer{2}\Hex); The content of the array component data_buffer{2} will be 174 decimal after the StrToByte ... function. data_buffer{3} := StrToByte(con_data_buffer{3}\Okt); The content of the array component data_buffer{3} will be 126 decimal after the StrToByte ... function. data_buffer{4} := StrToByte(con_data_buffer{4}\Bin); The content of the array component data_buffer{4} will be 10 decimal after the StrToByte ... function. data_buffer{5} := StrToByte(con_data_buffer{5}\Char); The content of the array component data_buffer{5} will be 65 decimal after the StrToByte ... function. Return value Data type: byte The result of the conversion operation in decimal representation. Arguments StrToByte (ConStr [\Hex] | [\Okt] | [\Bin] | [\Char]) ConStr Convert String Data type: string The string data to be converted. If the optional switch argument is omitted, the string to be converted has decimal (Dec) format. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,009
2 Functions 2.127. StrPart - Finds a part of a string RobotWare - OS 3HAC 16581-1 Revision: J 1006 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String Functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1007 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.128. StrToByte - Converts a string to a byte data Usage StrToByte ( String To Byte ) is used to convert a string with a defined byte data format into a byte data. Basic examples Basic examples of the function StrToByte are illustrated below. Example 1 VAR string con_data_buffer{5} := ["10", "AE", "176", "00001010", "A"]; VAR byte data_buffer{5}; data_buffer{1} := StrToByte(con_data_buffer{1}); The content of the array component data_buffer{1} will be 10 decimal after the StrToByte ... function. data_buffer{2} := StrToByte(con_data_buffer{2}\Hex); The content of the array component data_buffer{2} will be 174 decimal after the StrToByte ... function. data_buffer{3} := StrToByte(con_data_buffer{3}\Okt); The content of the array component data_buffer{3} will be 126 decimal after the StrToByte ... function. data_buffer{4} := StrToByte(con_data_buffer{4}\Bin); The content of the array component data_buffer{4} will be 10 decimal after the StrToByte ... function. data_buffer{5} := StrToByte(con_data_buffer{5}\Char); The content of the array component data_buffer{5} will be 65 decimal after the StrToByte ... function. Return value Data type: byte The result of the conversion operation in decimal representation. Arguments StrToByte (ConStr [\Hex] | [\Okt] | [\Bin] | [\Char]) ConStr Convert String Data type: string The string data to be converted. If the optional switch argument is omitted, the string to be converted has decimal (Dec) format. Continues on next page 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 3HAC 16581-1 Revision: J 1008 © Copyright 2004-2010 ABB. All rights reserved. [\Hex] Hexadecimal Data type: switch The string to be converted has hexadecimal format. [\Okt] Octal Data type: switch The string to be converted has octal format. [\Bin] Binary Data type: switch The string to be converted has binary format. [\Char] Character Data type: switch The string to be converted has ASCII character format. Limitations Depending on the format of the string to be converted, the following string data is valid: RAPID character codes (e.g. “\07” for BEL control character) can be used as arguments in ConStr . Syntax StrToByte’(’ [ConStr’ :=’] <expression ( IN ) of string> [’\’ Hex ] | [’\’ Okt] | [’\’ Bin] | [’\’ Char] ’)’ A function with a return value of the data type byte . Format String length Range Dec .....: ’0’ - ’9’ 3 "0" - "255" Hex .....: ’0’ - ’9’, ’a’ -’f’, ’A’ - ’F’ 2 "0" - "FF" Okt ......: ’0’ - ’7’ 3 "0" - "377" Bin ......: ’0’ - ’1’ 8 "0" - "11111111" Char ....: Any ASCII character 1 One ASCII char 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
1,010
2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1007 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.128. StrToByte - Converts a string to a byte data Usage StrToByte ( String To Byte ) is used to convert a string with a defined byte data format into a byte data. Basic examples Basic examples of the function StrToByte are illustrated below. Example 1 VAR string con_data_buffer{5} := ["10", "AE", "176", "00001010", "A"]; VAR byte data_buffer{5}; data_buffer{1} := StrToByte(con_data_buffer{1}); The content of the array component data_buffer{1} will be 10 decimal after the StrToByte ... function. data_buffer{2} := StrToByte(con_data_buffer{2}\Hex); The content of the array component data_buffer{2} will be 174 decimal after the StrToByte ... function. data_buffer{3} := StrToByte(con_data_buffer{3}\Okt); The content of the array component data_buffer{3} will be 126 decimal after the StrToByte ... function. data_buffer{4} := StrToByte(con_data_buffer{4}\Bin); The content of the array component data_buffer{4} will be 10 decimal after the StrToByte ... function. data_buffer{5} := StrToByte(con_data_buffer{5}\Char); The content of the array component data_buffer{5} will be 65 decimal after the StrToByte ... function. Return value Data type: byte The result of the conversion operation in decimal representation. Arguments StrToByte (ConStr [\Hex] | [\Okt] | [\Bin] | [\Char]) ConStr Convert String Data type: string The string data to be converted. If the optional switch argument is omitted, the string to be converted has decimal (Dec) format. Continues on next page 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 3HAC 16581-1 Revision: J 1008 © Copyright 2004-2010 ABB. All rights reserved. [\Hex] Hexadecimal Data type: switch The string to be converted has hexadecimal format. [\Okt] Octal Data type: switch The string to be converted has octal format. [\Bin] Binary Data type: switch The string to be converted has binary format. [\Char] Character Data type: switch The string to be converted has ASCII character format. Limitations Depending on the format of the string to be converted, the following string data is valid: RAPID character codes (e.g. “\07” for BEL control character) can be used as arguments in ConStr . Syntax StrToByte’(’ [ConStr’ :=’] <expression ( IN ) of string> [’\’ Hex ] | [’\’ Okt] | [’\’ Bin] | [’\’ Char] ’)’ A function with a return value of the data type byte . Format String length Range Dec .....: ’0’ - ’9’ 3 "0" - "255" Hex .....: ’0’ - ’9’, ’a’ -’f’, ’A’ - ’F’ 2 "0" - "FF" Okt ......: ’0’ - ’7’ 3 "0" - "377" Bin ......: ’0’ - ’1’ 8 "0" - "11111111" Char ....: Any ASCII character 1 One ASCII char Continued Continues on next page 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1009 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Convert a byte to a string data ByteToStr - Converts a byte to a string data on page 784 Other bit (byte) functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics - Bit functions Other 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
1,011
2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 3HAC 16581-1 Revision: J 1008 © Copyright 2004-2010 ABB. All rights reserved. [\Hex] Hexadecimal Data type: switch The string to be converted has hexadecimal format. [\Okt] Octal Data type: switch The string to be converted has octal format. [\Bin] Binary Data type: switch The string to be converted has binary format. [\Char] Character Data type: switch The string to be converted has ASCII character format. Limitations Depending on the format of the string to be converted, the following string data is valid: RAPID character codes (e.g. “\07” for BEL control character) can be used as arguments in ConStr . Syntax StrToByte’(’ [ConStr’ :=’] <expression ( IN ) of string> [’\’ Hex ] | [’\’ Okt] | [’\’ Bin] | [’\’ Char] ’)’ A function with a return value of the data type byte . Format String length Range Dec .....: ’0’ - ’9’ 3 "0" - "255" Hex .....: ’0’ - ’9’, ’a’ -’f’, ’A’ - ’F’ 2 "0" - "FF" Okt ......: ’0’ - ’7’ 3 "0" - "377" Bin ......: ’0’ - ’1’ 8 "0" - "11111111" Char ....: Any ASCII character 1 One ASCII char Continued Continues on next page 2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1009 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Convert a byte to a string data ByteToStr - Converts a byte to a string data on page 784 Other bit (byte) functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics - Bit functions Other string functions Technical reference manual - RAPID overview , section RAPID summary - String functions Continued 2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 3HAC 16581-1 Revision: J 1010 © Copyright 2004-2010 ABB. All rights reserved. 2.129. StrToVal - Converts a string to a value Usage StrToVal ( String To Value ) is used to convert a string to a value of any data type. Basic examples Basic examples of the function StrToVal are illustrated below. See also More examples on page 1011 . Example 1 VAR bool ok; VAR num nval; ok := StrToVal("3.85",nval); The variable ok is given the value TRUE and nval is given the value 3.85 . Return value Data type: bool TRUE if the requested conversion succeeded, FALSE otherwise. Arguments StrToVal ( Str Val ) Str String Data type: string A string value containing literal data with format corresponding to the data type used in argument Val . Valid format as for RAPID literal aggregates. Val Value Data type: ANYTYPE Name of the variable or persistent of any data type for storage of the result from the conversion. All type of value data with structure atomic, record, record component, array or array element can be used. The data is unchanged if the requested conversion failed because the format don’t correspond to the data used in argument Str . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,012
2 Functions 2.128. StrToByte - Converts a string to a byte data RobotWare - OS 1009 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Convert a byte to a string data ByteToStr - Converts a byte to a string data on page 784 Other bit (byte) functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics - Bit functions Other string functions Technical reference manual - RAPID overview , section RAPID summary - String functions Continued 2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 3HAC 16581-1 Revision: J 1010 © Copyright 2004-2010 ABB. All rights reserved. 2.129. StrToVal - Converts a string to a value Usage StrToVal ( String To Value ) is used to convert a string to a value of any data type. Basic examples Basic examples of the function StrToVal are illustrated below. See also More examples on page 1011 . Example 1 VAR bool ok; VAR num nval; ok := StrToVal("3.85",nval); The variable ok is given the value TRUE and nval is given the value 3.85 . Return value Data type: bool TRUE if the requested conversion succeeded, FALSE otherwise. Arguments StrToVal ( Str Val ) Str String Data type: string A string value containing literal data with format corresponding to the data type used in argument Val . Valid format as for RAPID literal aggregates. Val Value Data type: ANYTYPE Name of the variable or persistent of any data type for storage of the result from the conversion. All type of value data with structure atomic, record, record component, array or array element can be used. The data is unchanged if the requested conversion failed because the format don’t correspond to the data used in argument Str . Continues on next page 2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 1011 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function StrToVal are illustrated below. Example 1 VAR string str15 := "[600, 500, 225.3]"; VAR bool ok; VAR pos pos15; ok := StrToVal(str15,pos15); The variable ok is given the value TRUE and the variable pos15 is given the value that are specified in the string str15 . Syntax StrToVal’(’ [ Str ’:=’ ] <expression ( IN ) of string> ´,´ [ Val ’:=’ ] <var or pers ( INOUT ) of ANYTYPE> ’)’ A function with a return value of the data type bool . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,013
2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 3HAC 16581-1 Revision: J 1010 © Copyright 2004-2010 ABB. All rights reserved. 2.129. StrToVal - Converts a string to a value Usage StrToVal ( String To Value ) is used to convert a string to a value of any data type. Basic examples Basic examples of the function StrToVal are illustrated below. See also More examples on page 1011 . Example 1 VAR bool ok; VAR num nval; ok := StrToVal("3.85",nval); The variable ok is given the value TRUE and nval is given the value 3.85 . Return value Data type: bool TRUE if the requested conversion succeeded, FALSE otherwise. Arguments StrToVal ( Str Val ) Str String Data type: string A string value containing literal data with format corresponding to the data type used in argument Val . Valid format as for RAPID literal aggregates. Val Value Data type: ANYTYPE Name of the variable or persistent of any data type for storage of the result from the conversion. All type of value data with structure atomic, record, record component, array or array element can be used. The data is unchanged if the requested conversion failed because the format don’t correspond to the data used in argument Str . Continues on next page 2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 1011 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function StrToVal are illustrated below. Example 1 VAR string str15 := "[600, 500, 225.3]"; VAR bool ok; VAR pos pos15; ok := StrToVal(str15,pos15); The variable ok is given the value TRUE and the variable pos15 is given the value that are specified in the string str15 . Syntax StrToVal’(’ [ Str ’:=’ ] <expression ( IN ) of string> ´,´ [ Val ’:=’ ] <var or pers ( INOUT ) of ANYTYPE> ’)’ A function with a return value of the data type bool . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.130. Tan - Calculates the tangent value RobotWare - OS 3HAC 16581-1 Revision: J 1012 © Copyright 2004-2010 ABB. All rights reserved. 2.130. Tan - Calculates the tangent value Usage Tan ( Tangent ) is used to calculate the tangent value from an angle value. Basic examples Basic examples of the function are illustrated below. Example 1 VAR num angle; VAR num value; ... ... value := Tan(angle); value will get the tangent value of angle . Return value Data type: num The tangent value. Arguments Tan (Angle) Angle Data type: num The angle value, expressed in degrees. Syntax Tan’(’ [Angle ’:=’] <expression ( IN ) of num> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics Arc tangent with return value in the range [-180, 180] ATan2 - Calculates the arc tangent2 value on page 769
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,014
2 Functions 2.129. StrToVal - Converts a string to a value RobotWare - OS 1011 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function StrToVal are illustrated below. Example 1 VAR string str15 := "[600, 500, 225.3]"; VAR bool ok; VAR pos pos15; ok := StrToVal(str15,pos15); The variable ok is given the value TRUE and the variable pos15 is given the value that are specified in the string str15 . Syntax StrToVal’(’ [ Str ’:=’ ] <expression ( IN ) of string> ´,´ [ Val ’:=’ ] <var or pers ( INOUT ) of ANYTYPE> ’)’ A function with a return value of the data type bool . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.130. Tan - Calculates the tangent value RobotWare - OS 3HAC 16581-1 Revision: J 1012 © Copyright 2004-2010 ABB. All rights reserved. 2.130. Tan - Calculates the tangent value Usage Tan ( Tangent ) is used to calculate the tangent value from an angle value. Basic examples Basic examples of the function are illustrated below. Example 1 VAR num angle; VAR num value; ... ... value := Tan(angle); value will get the tangent value of angle . Return value Data type: num The tangent value. Arguments Tan (Angle) Angle Data type: num The angle value, expressed in degrees. Syntax Tan’(’ [Angle ’:=’] <expression ( IN ) of num> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics Arc tangent with return value in the range [-180, 180] ATan2 - Calculates the arc tangent2 value on page 769 2 Functions 2.131. TaskRunMec - Check if task controls any mechanical unit RobotWare - OS 1013 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.131. TaskRunMec - Check if task controls any mechanical unit Usage TaskRunMec is used to check if the program task controls any mechanical units (robot with TCP or manipulator without TCP). Basic examples Basic examples of the function TaskRunMec are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunMec( ); If current task controls any mechanical unit flag will be TRUE , otherwise FALSE . Return value Data type: bool If current task controls any mechanical unit the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls any mechanical unit. Syntax TaskRunMec’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task control some robot TaskRunRob - Check if task controls some robot on page 1014 Activating/Deactivating mech. units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units 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
1,015
2 Functions 2.130. Tan - Calculates the tangent value RobotWare - OS 3HAC 16581-1 Revision: J 1012 © Copyright 2004-2010 ABB. All rights reserved. 2.130. Tan - Calculates the tangent value Usage Tan ( Tangent ) is used to calculate the tangent value from an angle value. Basic examples Basic examples of the function are illustrated below. Example 1 VAR num angle; VAR num value; ... ... value := Tan(angle); value will get the tangent value of angle . Return value Data type: num The tangent value. Arguments Tan (Angle) Angle Data type: num The angle value, expressed in degrees. Syntax Tan’(’ [Angle ’:=’] <expression ( IN ) of num> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID Summary - Mathematics Arc tangent with return value in the range [-180, 180] ATan2 - Calculates the arc tangent2 value on page 769 2 Functions 2.131. TaskRunMec - Check if task controls any mechanical unit RobotWare - OS 1013 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.131. TaskRunMec - Check if task controls any mechanical unit Usage TaskRunMec is used to check if the program task controls any mechanical units (robot with TCP or manipulator without TCP). Basic examples Basic examples of the function TaskRunMec are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunMec( ); If current task controls any mechanical unit flag will be TRUE , otherwise FALSE . Return value Data type: bool If current task controls any mechanical unit the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls any mechanical unit. Syntax TaskRunMec’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task control some robot TaskRunRob - Check if task controls some robot on page 1014 Activating/Deactivating mech. units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units Technical reference manual - System parameters 2 Functions 2.132. TaskRunRob - Check if task controls some robot RobotWare - OS 3HAC 16581-1 Revision: J 1014 © Copyright 2004-2010 ABB. All rights reserved. 2.132. TaskRunRob - Check if task controls some robot Usage TaskRunRob is used to check if the program task controls some robot (mechanical unit with TCP). Basic examples Basic examples of the function TaskRunRob are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunRob( ); If current task controls some robot, flag will be set to TRUE , otherwise FALSE . Return value Data type: bool If current task controls some robot, the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls some robot. Syntax TaskRunRob ’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task controls any mechanical unit TaskRunMec - Check if task controls any mechanical unit on page 1013 Activating/Deactivating mechanical units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units 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
1,016
2 Functions 2.131. TaskRunMec - Check if task controls any mechanical unit RobotWare - OS 1013 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.131. TaskRunMec - Check if task controls any mechanical unit Usage TaskRunMec is used to check if the program task controls any mechanical units (robot with TCP or manipulator without TCP). Basic examples Basic examples of the function TaskRunMec are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunMec( ); If current task controls any mechanical unit flag will be TRUE , otherwise FALSE . Return value Data type: bool If current task controls any mechanical unit the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls any mechanical unit. Syntax TaskRunMec’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task control some robot TaskRunRob - Check if task controls some robot on page 1014 Activating/Deactivating mech. units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units Technical reference manual - System parameters 2 Functions 2.132. TaskRunRob - Check if task controls some robot RobotWare - OS 3HAC 16581-1 Revision: J 1014 © Copyright 2004-2010 ABB. All rights reserved. 2.132. TaskRunRob - Check if task controls some robot Usage TaskRunRob is used to check if the program task controls some robot (mechanical unit with TCP). Basic examples Basic examples of the function TaskRunRob are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunRob( ); If current task controls some robot, flag will be set to TRUE , otherwise FALSE . Return value Data type: bool If current task controls some robot, the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls some robot. Syntax TaskRunRob ’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task controls any mechanical unit TaskRunMec - Check if task controls any mechanical unit on page 1013 Activating/Deactivating mechanical units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units Technical reference manual - System parameters 2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 1015 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.133. TasksInSync - Returns the number of synchronized tasks Usage TasksInSync is used to retrieve the number of synchronized tasks. Basic examples A basic example of the function TasksInSync is illustrated below. Example 1 VAR tasks tasksInSyncList{6}; ... PROC main () VAR num noOfSynchTasks; ... noOfSynchTasks:= TasksInSync (tasksInSyncList); TPWrite "No of synchronized tasks = "\Num:=noOfSynchTasks; ENDPROC The variable noOfSynchTasks is assigned the number of synchronized tasks and the tasksInSyncList will contain the names of the synchronized tasks. In this example the task list is a variable but it can also be a persistent. Return value Data type: num The number of synchronized tasks. Arguments TaskInSync (TaskList) TaskList Data type: tasks Inout argument that in a task list (array) will present the name ( string ) of the program tasks that are synchronized. The task list can be either of type VAR or PERS . Program execution The function returns the number of synchronized tasks in the system. The names of the synchronized tasks are presented in the inout argument TaskList. In cases where there are no synchronized tasks, the list will only contain empty strings. Limitations Currently only one synch group is supported, so TasksInSync returns the number of tasks that are synchronized in that group. Syntax TasksInSync [ TaskList‘ :=’ ] < var or pers array {*} ( INOUT ) of tasks> ´,’ A function with a return value of the data type num . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,017
2 Functions 2.132. TaskRunRob - Check if task controls some robot RobotWare - OS 3HAC 16581-1 Revision: J 1014 © Copyright 2004-2010 ABB. All rights reserved. 2.132. TaskRunRob - Check if task controls some robot Usage TaskRunRob is used to check if the program task controls some robot (mechanical unit with TCP). Basic examples Basic examples of the function TaskRunRob are illustrated below. Example 1 VAR bool flag; ... flag := TaskRunRob( ); If current task controls some robot, flag will be set to TRUE , otherwise FALSE . Return value Data type: bool If current task controls some robot, the return value will be TRUE , otherwise FALSE . Program execution Check if current program task controls some robot. Syntax TaskRunRob ’(’ ’)’ A function with a return value of the data type bool . Related information For information about See Check if task controls any mechanical unit TaskRunMec - Check if task controls any mechanical unit on page 1013 Activating/Deactivating mechanical units ActUnit - Activates a mechanical unit on page 17 DeactUnit - Deactivates a mechanical unit on page 79 Configuration of mechanical units Technical reference manual - System parameters 2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 1015 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.133. TasksInSync - Returns the number of synchronized tasks Usage TasksInSync is used to retrieve the number of synchronized tasks. Basic examples A basic example of the function TasksInSync is illustrated below. Example 1 VAR tasks tasksInSyncList{6}; ... PROC main () VAR num noOfSynchTasks; ... noOfSynchTasks:= TasksInSync (tasksInSyncList); TPWrite "No of synchronized tasks = "\Num:=noOfSynchTasks; ENDPROC The variable noOfSynchTasks is assigned the number of synchronized tasks and the tasksInSyncList will contain the names of the synchronized tasks. In this example the task list is a variable but it can also be a persistent. Return value Data type: num The number of synchronized tasks. Arguments TaskInSync (TaskList) TaskList Data type: tasks Inout argument that in a task list (array) will present the name ( string ) of the program tasks that are synchronized. The task list can be either of type VAR or PERS . Program execution The function returns the number of synchronized tasks in the system. The names of the synchronized tasks are presented in the inout argument TaskList. In cases where there are no synchronized tasks, the list will only contain empty strings. Limitations Currently only one synch group is supported, so TasksInSync returns the number of tasks that are synchronized in that group. Syntax TasksInSync [ TaskList‘ :=’ ] < var or pers array {*} ( INOUT ) of tasks> ´,’ A function with a return value of the data type num . Continues on next page 2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 3HAC 16581-1 Revision: J 1016 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 SyncMoveOn - Start coordinated synchro- nized movements on page 534 Start coordinated synchronized movements SyncMoveOn - Start coordinated synchro- nized movements on page 534 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,018
2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 1015 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.133. TasksInSync - Returns the number of synchronized tasks Usage TasksInSync is used to retrieve the number of synchronized tasks. Basic examples A basic example of the function TasksInSync is illustrated below. Example 1 VAR tasks tasksInSyncList{6}; ... PROC main () VAR num noOfSynchTasks; ... noOfSynchTasks:= TasksInSync (tasksInSyncList); TPWrite "No of synchronized tasks = "\Num:=noOfSynchTasks; ENDPROC The variable noOfSynchTasks is assigned the number of synchronized tasks and the tasksInSyncList will contain the names of the synchronized tasks. In this example the task list is a variable but it can also be a persistent. Return value Data type: num The number of synchronized tasks. Arguments TaskInSync (TaskList) TaskList Data type: tasks Inout argument that in a task list (array) will present the name ( string ) of the program tasks that are synchronized. The task list can be either of type VAR or PERS . Program execution The function returns the number of synchronized tasks in the system. The names of the synchronized tasks are presented in the inout argument TaskList. In cases where there are no synchronized tasks, the list will only contain empty strings. Limitations Currently only one synch group is supported, so TasksInSync returns the number of tasks that are synchronized in that group. Syntax TasksInSync [ TaskList‘ :=’ ] < var or pers array {*} ( INOUT ) of tasks> ´,’ A function with a return value of the data type num . Continues on next page 2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 3HAC 16581-1 Revision: J 1016 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 SyncMoveOn - Start coordinated synchro- nized movements on page 534 Start coordinated synchronized movements SyncMoveOn - Start coordinated synchro- nized movements on page 534 Continued 2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 1017 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.134. TestAndSet - Test variable and set if unset Usage TestAndSet can be used together with a normal data object of the type bool , as a binary semaphore, to retrieve exclusive right to specific RAPID code areas or system resources. The function could be used both between different program tasks and different execution levels (TRAP or Event Routines) within the same program task. Example 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 function TestAndSet are illustrated below. See also More examples on page 1018 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitUntil TestAndSet(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; ... WaitUntil TestAndSet(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 TestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore TestAndSet(tproutine_inuse) first, then program task BACK1 must wait until the program task MAIN has left the semaphore. Return value Data type: bool TRUE if the semaphore has been taken by me (executor of TestAndSet function), otherwise FALSE . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,019
2 Functions 2.133. TasksInSync - Returns the number of synchronized tasks RobotWare - OS 3HAC 16581-1 Revision: J 1016 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Specify cooperated program tasks tasks - RAPID program tasks on page 1204 SyncMoveOn - Start coordinated synchro- nized movements on page 534 Start coordinated synchronized movements SyncMoveOn - Start coordinated synchro- nized movements on page 534 Continued 2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 1017 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.134. TestAndSet - Test variable and set if unset Usage TestAndSet can be used together with a normal data object of the type bool , as a binary semaphore, to retrieve exclusive right to specific RAPID code areas or system resources. The function could be used both between different program tasks and different execution levels (TRAP or Event Routines) within the same program task. Example 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 function TestAndSet are illustrated below. See also More examples on page 1018 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitUntil TestAndSet(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; ... WaitUntil TestAndSet(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 TestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore TestAndSet(tproutine_inuse) first, then program task BACK1 must wait until the program task MAIN has left the semaphore. Return value Data type: bool TRUE if the semaphore has been taken by me (executor of TestAndSet function), otherwise FALSE . Continues on next page 2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 3HAC 16581-1 Revision: J 1018 © Copyright 2004-2010 ABB. All rights reserved. Arguments TestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object could be a variable VAR or a persistent variable PERS . If TestAndSet are used between different program tasks, the object must be a persistent variable PERS or an installed variable VAR (intertask objects). Program execution This function will in one indivisible step check the user defined variable and, if it is unset, will set it and return TRUE , otherwise it will return FALSE . IF Object = FALSE THEN Object := TRUE; RETURN TRUE; ELSE RETURN FALSE; ENDIF More examples More examples of the function TestAndSet are illustrated below. Example 1 LOCAL VAR bool doit_inuse := FALSE; ... PROC doit(...) WaitUntil TestAndSet (doit_inuse); ... doit_inuse := FALSE; ENDPROC If a module is installed built-in and shared, it is possible to use a local module variable for protection of access from different program tasks at the same time. NOTE! In this case with installed built-in modules and when using persistent variable as semaphore object: If program execution is stopped in the routine doit and the program pointer is moved to main , the variable doit_inuse will not be reset. To avoid this, reset the variable doit_inuse to FALSE in the START event routine. Syntax TestAndSet ´(´ [ Object ’:=’ ] < variable or persistent ( INOUT ) of bool> ´)´ A function with a return value of the data type bool . Related information For information about See Wait until variable unset - then set (type wait with interrupt control) WaitTestAndSet - Wait until variable unset - then set on page 692 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,020
2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 1017 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.134. TestAndSet - Test variable and set if unset Usage TestAndSet can be used together with a normal data object of the type bool , as a binary semaphore, to retrieve exclusive right to specific RAPID code areas or system resources. The function could be used both between different program tasks and different execution levels (TRAP or Event Routines) within the same program task. Example 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 function TestAndSet are illustrated below. See also More examples on page 1018 . Example 1 MAIN program task: PERS bool tproutine_inuse := FALSE; ... WaitUntil TestAndSet(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; ... WaitUntil TestAndSet(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 TestAndSet function guarantees that all three lines from each task are not separated. If program task MAIN takes the semaphore TestAndSet(tproutine_inuse) first, then program task BACK1 must wait until the program task MAIN has left the semaphore. Return value Data type: bool TRUE if the semaphore has been taken by me (executor of TestAndSet function), otherwise FALSE . Continues on next page 2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 3HAC 16581-1 Revision: J 1018 © Copyright 2004-2010 ABB. All rights reserved. Arguments TestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object could be a variable VAR or a persistent variable PERS . If TestAndSet are used between different program tasks, the object must be a persistent variable PERS or an installed variable VAR (intertask objects). Program execution This function will in one indivisible step check the user defined variable and, if it is unset, will set it and return TRUE , otherwise it will return FALSE . IF Object = FALSE THEN Object := TRUE; RETURN TRUE; ELSE RETURN FALSE; ENDIF More examples More examples of the function TestAndSet are illustrated below. Example 1 LOCAL VAR bool doit_inuse := FALSE; ... PROC doit(...) WaitUntil TestAndSet (doit_inuse); ... doit_inuse := FALSE; ENDPROC If a module is installed built-in and shared, it is possible to use a local module variable for protection of access from different program tasks at the same time. NOTE! In this case with installed built-in modules and when using persistent variable as semaphore object: If program execution is stopped in the routine doit and the program pointer is moved to main , the variable doit_inuse will not be reset. To avoid this, reset the variable doit_inuse to FALSE in the START event routine. Syntax TestAndSet ´(´ [ Object ’:=’ ] < variable or persistent ( INOUT ) of bool> ´)´ A function with a return value of the data type bool . Related information For information about See Wait until variable unset - then set (type wait with interrupt control) WaitTestAndSet - Wait until variable unset - then set on page 692 Continued 2 Functions 2.135. TestDI - Tests if a digital input is set RobotWare - OS 1019 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.135. TestDI - Tests if a digital input is set Usage TestDI is used to test whether a digital input is set. Basic examples Basic examples of the function TestDI are illustrated below. Example 1 IF TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 1 , then . . . IF NOT TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 0 , then . . . WaitUntil TestDI(di1) AND TestDI(di2); Program execution continues only after both the di1 input and the di2 input have been set. Return value Data type: bool TRUE = The current value of the signal is equal to 1. FALSE = The current value of the signal is equal to 0. Arguments TestDI (Signal) Signal Data type: signaldi The name of the signal to be tested. Syntax TestDI ’(’ [ Signal’ :=’ ] < variable ( VAR ) of signaldi > ’)’ A function with a return value of the data type bool . Related information For information about See Reading the value of a digital input signal signalxx - Digital and analog signals on page 1181 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,021
2 Functions 2.134. TestAndSet - Test variable and set if unset RobotWare - OS 3HAC 16581-1 Revision: J 1018 © Copyright 2004-2010 ABB. All rights reserved. Arguments TestAndSet Object Object Data type: bool User defined data object to be used as semaphore. The data object could be a variable VAR or a persistent variable PERS . If TestAndSet are used between different program tasks, the object must be a persistent variable PERS or an installed variable VAR (intertask objects). Program execution This function will in one indivisible step check the user defined variable and, if it is unset, will set it and return TRUE , otherwise it will return FALSE . IF Object = FALSE THEN Object := TRUE; RETURN TRUE; ELSE RETURN FALSE; ENDIF More examples More examples of the function TestAndSet are illustrated below. Example 1 LOCAL VAR bool doit_inuse := FALSE; ... PROC doit(...) WaitUntil TestAndSet (doit_inuse); ... doit_inuse := FALSE; ENDPROC If a module is installed built-in and shared, it is possible to use a local module variable for protection of access from different program tasks at the same time. NOTE! In this case with installed built-in modules and when using persistent variable as semaphore object: If program execution is stopped in the routine doit and the program pointer is moved to main , the variable doit_inuse will not be reset. To avoid this, reset the variable doit_inuse to FALSE in the START event routine. Syntax TestAndSet ´(´ [ Object ’:=’ ] < variable or persistent ( INOUT ) of bool> ´)´ A function with a return value of the data type bool . Related information For information about See Wait until variable unset - then set (type wait with interrupt control) WaitTestAndSet - Wait until variable unset - then set on page 692 Continued 2 Functions 2.135. TestDI - Tests if a digital input is set RobotWare - OS 1019 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.135. TestDI - Tests if a digital input is set Usage TestDI is used to test whether a digital input is set. Basic examples Basic examples of the function TestDI are illustrated below. Example 1 IF TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 1 , then . . . IF NOT TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 0 , then . . . WaitUntil TestDI(di1) AND TestDI(di2); Program execution continues only after both the di1 input and the di2 input have been set. Return value Data type: bool TRUE = The current value of the signal is equal to 1. FALSE = The current value of the signal is equal to 0. Arguments TestDI (Signal) Signal Data type: signaldi The name of the signal to be tested. Syntax TestDI ’(’ [ Signal’ :=’ ] < variable ( VAR ) of signaldi > ’)’ A function with a return value of the data type bool . Related information For information about See Reading the value of a digital input signal signalxx - Digital and analog signals on page 1181 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals 2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 3HAC 16581-1 Revision: J 1020 © Copyright 2004-2010 ABB. All rights reserved. 2.136. TestSignRead - Read test signal value Usage TestSignRead is used to read the actual test signal value. This function returns the momentary value or the mean value of the latest samples, depending on channel specification in instruction TestSignDefine . Basic examples Basic examples of the function TestSignRead are illustrated below. See also More examples on page 1021 . Example 1 CONST num speed_channel:=1; VAR num speed_value; ... TestSignDefine speed_channel, speed, orbit, 1, 0; ... ! During some movements with orbit’s axis 1 speed_value := TestSignRead(speed_channel); ... TestSignReset; speed_value is assigned the mean value of the latest 8 samples generated each 0.5 ms of the test signal speed on channel speed_channel defined as channel 1 . The channel speed_channel measures the speed of axis 1 on the mechanical unit orbit . Return value Data type: num The numeric value in SI units on the motor side for the specified channel according to the definition in instruction TestSignDefine . Arguments TestSignRead (Channel) Channel Data type: num The channel number 1-12 for the test signal to be read. The same number must be used in the definition instruction TestSignDefine. Program execution Returns the momentary value or the mean value of the latest samples, depending on the channel specification in the instruction TestSignDefine . For predefined test signals with valid SI units for external manipulator axes, see data type testsignal . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,022
2 Functions 2.135. TestDI - Tests if a digital input is set RobotWare - OS 1019 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.135. TestDI - Tests if a digital input is set Usage TestDI is used to test whether a digital input is set. Basic examples Basic examples of the function TestDI are illustrated below. Example 1 IF TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 1 , then . . . IF NOT TestDI (di2) THEN . . . If the current value of the signal di2 is equal to 0 , then . . . WaitUntil TestDI(di1) AND TestDI(di2); Program execution continues only after both the di1 input and the di2 input have been set. Return value Data type: bool TRUE = The current value of the signal is equal to 1. FALSE = The current value of the signal is equal to 0. Arguments TestDI (Signal) Signal Data type: signaldi The name of the signal to be tested. Syntax TestDI ’(’ [ Signal’ :=’ ] < variable ( VAR ) of signaldi > ’)’ A function with a return value of the data type bool . Related information For information about See Reading the value of a digital input signal signalxx - Digital and analog signals on page 1181 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals 2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 3HAC 16581-1 Revision: J 1020 © Copyright 2004-2010 ABB. All rights reserved. 2.136. TestSignRead - Read test signal value Usage TestSignRead is used to read the actual test signal value. This function returns the momentary value or the mean value of the latest samples, depending on channel specification in instruction TestSignDefine . Basic examples Basic examples of the function TestSignRead are illustrated below. See also More examples on page 1021 . Example 1 CONST num speed_channel:=1; VAR num speed_value; ... TestSignDefine speed_channel, speed, orbit, 1, 0; ... ! During some movements with orbit’s axis 1 speed_value := TestSignRead(speed_channel); ... TestSignReset; speed_value is assigned the mean value of the latest 8 samples generated each 0.5 ms of the test signal speed on channel speed_channel defined as channel 1 . The channel speed_channel measures the speed of axis 1 on the mechanical unit orbit . Return value Data type: num The numeric value in SI units on the motor side for the specified channel according to the definition in instruction TestSignDefine . Arguments TestSignRead (Channel) Channel Data type: num The channel number 1-12 for the test signal to be read. The same number must be used in the definition instruction TestSignDefine. Program execution Returns the momentary value or the mean value of the latest samples, depending on the channel specification in the instruction TestSignDefine . For predefined test signals with valid SI units for external manipulator axes, see data type testsignal . Continues on next page 2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 1021 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function TestSignRead are illustrated below. Example 1 CONST num torque_channel:=2; VAR num torque_value; VAR intnum timer_int; CONST jointtarget psync := [...]; ... CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; TestSignDefine torque_channel, torque_ref, IRBP_K, 2, 0.001; ... MoveAbsJ psync \NoEOffs, v5, fine, tool0; ... IDelete timer_int; TestSignReset; TRAP TorqueTrap IF (TestSignRead(torque_channel) > 6) THEN TPWrite "Torque pos = " + ValToStr(CJointT()); Stop; ELSE IDelete timer_int; CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; ENDIF ENDTRAP When the torque reference for manipulator IRBP_K axis 2 is for the first time greater than 6 Nm on the motor side during the slow movement to position psync , the joint position is displayed on the FlexPendant. Syntax TestSignRead’(’ [ Channel ’:=’] <expression ( IN ) of num>’)’ A function with a return value of the type num . Related information For information about See Define test signal TestSignDefine - Define test signal on page 551 Reset test signals TestSignReset - Reset all test signal definitions on page 553 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,023
2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 3HAC 16581-1 Revision: J 1020 © Copyright 2004-2010 ABB. All rights reserved. 2.136. TestSignRead - Read test signal value Usage TestSignRead is used to read the actual test signal value. This function returns the momentary value or the mean value of the latest samples, depending on channel specification in instruction TestSignDefine . Basic examples Basic examples of the function TestSignRead are illustrated below. See also More examples on page 1021 . Example 1 CONST num speed_channel:=1; VAR num speed_value; ... TestSignDefine speed_channel, speed, orbit, 1, 0; ... ! During some movements with orbit’s axis 1 speed_value := TestSignRead(speed_channel); ... TestSignReset; speed_value is assigned the mean value of the latest 8 samples generated each 0.5 ms of the test signal speed on channel speed_channel defined as channel 1 . The channel speed_channel measures the speed of axis 1 on the mechanical unit orbit . Return value Data type: num The numeric value in SI units on the motor side for the specified channel according to the definition in instruction TestSignDefine . Arguments TestSignRead (Channel) Channel Data type: num The channel number 1-12 for the test signal to be read. The same number must be used in the definition instruction TestSignDefine. Program execution Returns the momentary value or the mean value of the latest samples, depending on the channel specification in the instruction TestSignDefine . For predefined test signals with valid SI units for external manipulator axes, see data type testsignal . Continues on next page 2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 1021 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function TestSignRead are illustrated below. Example 1 CONST num torque_channel:=2; VAR num torque_value; VAR intnum timer_int; CONST jointtarget psync := [...]; ... CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; TestSignDefine torque_channel, torque_ref, IRBP_K, 2, 0.001; ... MoveAbsJ psync \NoEOffs, v5, fine, tool0; ... IDelete timer_int; TestSignReset; TRAP TorqueTrap IF (TestSignRead(torque_channel) > 6) THEN TPWrite "Torque pos = " + ValToStr(CJointT()); Stop; ELSE IDelete timer_int; CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; ENDIF ENDTRAP When the torque reference for manipulator IRBP_K axis 2 is for the first time greater than 6 Nm on the motor side during the slow movement to position psync , the joint position is displayed on the FlexPendant. Syntax TestSignRead’(’ [ Channel ’:=’] <expression ( IN ) of num>’)’ A function with a return value of the type num . Related information For information about See Define test signal TestSignDefine - Define test signal on page 551 Reset test signals TestSignReset - Reset all test signal definitions on page 553 Continued 2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 3HAC 16581-1 Revision: J 1022 © Copyright 2004-2010 ABB. All rights reserved. 2.137. TextGet - Get text from system text tables Usage TextGet is used to get a text string from the system text tables. Basic examples Basic examples of the function TextGet are illustrated below. Example 1 VAR string text1; ... text1 := TextGet(14, 5); The variable text1 is assigned the text stored in text resource 14 and index 5 . Return value Data type: string Specified text from the system text tables. Arguments TextGet ( Table Index ) Table Data type: num The text table number (positive integer). Index Data type: num The index number (positive integer) within the text table. Error handling If table or index is not valid, and no text string can be fetched from the system text tables, the system variable ERRNO is set to ERR_TXTNOEXIST . The execution continues in the error handler. Syntax TextGet ’(’ [ Table ’:=’ ] < expression ( IN ) of num > ’,’ [ Index ’:=’ ] < expression ( IN ) of num> ’)’ A function with a return value of the data type string . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,024
2 Functions 2.136. TestSignRead - Read test signal value RobotWare - OS 1021 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function TestSignRead are illustrated below. Example 1 CONST num torque_channel:=2; VAR num torque_value; VAR intnum timer_int; CONST jointtarget psync := [...]; ... CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; TestSignDefine torque_channel, torque_ref, IRBP_K, 2, 0.001; ... MoveAbsJ psync \NoEOffs, v5, fine, tool0; ... IDelete timer_int; TestSignReset; TRAP TorqueTrap IF (TestSignRead(torque_channel) > 6) THEN TPWrite "Torque pos = " + ValToStr(CJointT()); Stop; ELSE IDelete timer_int; CONNECT timer_int WITH TorqueTrap; ITimer \Single, 0.05, timer_int; ENDIF ENDTRAP When the torque reference for manipulator IRBP_K axis 2 is for the first time greater than 6 Nm on the motor side during the slow movement to position psync , the joint position is displayed on the FlexPendant. Syntax TestSignRead’(’ [ Channel ’:=’] <expression ( IN ) of num>’)’ A function with a return value of the type num . Related information For information about See Define test signal TestSignDefine - Define test signal on page 551 Reset test signals TestSignReset - Reset all test signal definitions on page 553 Continued 2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 3HAC 16581-1 Revision: J 1022 © Copyright 2004-2010 ABB. All rights reserved. 2.137. TextGet - Get text from system text tables Usage TextGet is used to get a text string from the system text tables. Basic examples Basic examples of the function TextGet are illustrated below. Example 1 VAR string text1; ... text1 := TextGet(14, 5); The variable text1 is assigned the text stored in text resource 14 and index 5 . Return value Data type: string Specified text from the system text tables. Arguments TextGet ( Table Index ) Table Data type: num The text table number (positive integer). Index Data type: num The index number (positive integer) within the text table. Error handling If table or index is not valid, and no text string can be fetched from the system text tables, the system variable ERRNO is set to ERR_TXTNOEXIST . The execution continues in the error handler. Syntax TextGet ’(’ [ Table ’:=’ ] < expression ( IN ) of num > ’,’ [ Index ’:=’ ] < expression ( IN ) of num> ’)’ A function with a return value of the data type string . Continues on next page 2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 1023 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Get text table number TextTabGet - Get text table number on page 1026 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,025
2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 3HAC 16581-1 Revision: J 1022 © Copyright 2004-2010 ABB. All rights reserved. 2.137. TextGet - Get text from system text tables Usage TextGet is used to get a text string from the system text tables. Basic examples Basic examples of the function TextGet are illustrated below. Example 1 VAR string text1; ... text1 := TextGet(14, 5); The variable text1 is assigned the text stored in text resource 14 and index 5 . Return value Data type: string Specified text from the system text tables. Arguments TextGet ( Table Index ) Table Data type: num The text table number (positive integer). Index Data type: num The index number (positive integer) within the text table. Error handling If table or index is not valid, and no text string can be fetched from the system text tables, the system variable ERRNO is set to ERR_TXTNOEXIST . The execution continues in the error handler. Syntax TextGet ’(’ [ Table ’:=’ ] < expression ( IN ) of num > ’,’ [ Index ’:=’ ] < expression ( IN ) of num> ’)’ A function with a return value of the data type string . Continues on next page 2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 1023 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Get text table number TextTabGet - Get text table number on page 1026 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 3HAC 16581-1 Revision: J 1024 © Copyright 2004-2010 ABB. All rights reserved. 2.138. TextTabFreeToUse - Test whether text table is free Usage TextTabFreeToUse should be used to test whether the text table name (text resource string) is free to use (not already installed in the system), i.e. whether it is possible to install the text table in the system or not. Basic examples Basic examples of the function TextTabFreeToUse are illustrated below. Example 1 ! System Module with Event Routine to be executed at event ! POWER ON, RESET or START PROC install_text() IF TextTabFreeToUse("text_table_name") THEN TextTabInstall "HOME:/text_file.eng"; ENDIF ENDPROC The first time the event routine install_text is executed, the function TextTabFreeToUse returns TRUE and the text file text_file.eng is installed in the system. After that the installed text strings can be fetched from the system to RAPID by the functions TextTabGet and TextGet . Next time the event routine install_text is executed, the function TextTabFreeToUse returns FALSE and the installation is not repeated. Return value Data type: bool This function returns: • TRUE , if the text table is not already installed in the system • FALSE , if the text table is already installed in the system Arguments TextTabFreeToUse ( TableName ) TableName Data type: string The text table name (a string with max. 80 characters). Refer to <text_resource> :: in RAPID Reference Manual - RAPID Kernel , section Text files . The string text_resource is the text table name. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,026
2 Functions 2.137. TextGet - Get text from system text tables RobotWare - OS 1023 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Get text table number TextTabGet - Get text table number on page 1026 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 3HAC 16581-1 Revision: J 1024 © Copyright 2004-2010 ABB. All rights reserved. 2.138. TextTabFreeToUse - Test whether text table is free Usage TextTabFreeToUse should be used to test whether the text table name (text resource string) is free to use (not already installed in the system), i.e. whether it is possible to install the text table in the system or not. Basic examples Basic examples of the function TextTabFreeToUse are illustrated below. Example 1 ! System Module with Event Routine to be executed at event ! POWER ON, RESET or START PROC install_text() IF TextTabFreeToUse("text_table_name") THEN TextTabInstall "HOME:/text_file.eng"; ENDIF ENDPROC The first time the event routine install_text is executed, the function TextTabFreeToUse returns TRUE and the text file text_file.eng is installed in the system. After that the installed text strings can be fetched from the system to RAPID by the functions TextTabGet and TextGet . Next time the event routine install_text is executed, the function TextTabFreeToUse returns FALSE and the installation is not repeated. Return value Data type: bool This function returns: • TRUE , if the text table is not already installed in the system • FALSE , if the text table is already installed in the system Arguments TextTabFreeToUse ( TableName ) TableName Data type: string The text table name (a string with max. 80 characters). Refer to <text_resource> :: in RAPID Reference Manual - RAPID Kernel , section Text files . The string text_resource is the text table name. Continues on next page 2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 1025 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Limitations for installation of text tables (text resources) in the system: • It is not possible to install the same text table more than once in the system • It is not possible to uninstall (free) a single text table from the system. The only way to uninstall text tables from the system is to cold start the system. All text tables (both system and user defined) will then be uninstalled. Syntax TextTabFreeToUse’(’ [ TableName’:=’ ] < expression ( IN ) of string > ’)’ A function with a return value of the data type bool Related information For information about See Install text table TextTabInstall - Installing a text table on page 554 Format of text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files Get text table number TextTabGet - Get text table number on page 1026 Get text from system text tables TextGet - Get text from system text tables on page 1022 String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,027
2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 3HAC 16581-1 Revision: J 1024 © Copyright 2004-2010 ABB. All rights reserved. 2.138. TextTabFreeToUse - Test whether text table is free Usage TextTabFreeToUse should be used to test whether the text table name (text resource string) is free to use (not already installed in the system), i.e. whether it is possible to install the text table in the system or not. Basic examples Basic examples of the function TextTabFreeToUse are illustrated below. Example 1 ! System Module with Event Routine to be executed at event ! POWER ON, RESET or START PROC install_text() IF TextTabFreeToUse("text_table_name") THEN TextTabInstall "HOME:/text_file.eng"; ENDIF ENDPROC The first time the event routine install_text is executed, the function TextTabFreeToUse returns TRUE and the text file text_file.eng is installed in the system. After that the installed text strings can be fetched from the system to RAPID by the functions TextTabGet and TextGet . Next time the event routine install_text is executed, the function TextTabFreeToUse returns FALSE and the installation is not repeated. Return value Data type: bool This function returns: • TRUE , if the text table is not already installed in the system • FALSE , if the text table is already installed in the system Arguments TextTabFreeToUse ( TableName ) TableName Data type: string The text table name (a string with max. 80 characters). Refer to <text_resource> :: in RAPID Reference Manual - RAPID Kernel , section Text files . The string text_resource is the text table name. Continues on next page 2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 1025 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Limitations for installation of text tables (text resources) in the system: • It is not possible to install the same text table more than once in the system • It is not possible to uninstall (free) a single text table from the system. The only way to uninstall text tables from the system is to cold start the system. All text tables (both system and user defined) will then be uninstalled. Syntax TextTabFreeToUse’(’ [ TableName’:=’ ] < expression ( IN ) of string > ’)’ A function with a return value of the data type bool Related information For information about See Install text table TextTabInstall - Installing a text table on page 554 Format of text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files Get text table number TextTabGet - Get text table number on page 1026 Get text from system text tables TextGet - Get text from system text tables on page 1022 String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 Continued 2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 3HAC 16581-1 Revision: J 1026 © Copyright 2004-2010 ABB. All rights reserved. 2.139. TextTabGet - Get text table number Usage TextTabGet is used to get the text table number of a user defined text table during run time. Basic examples Basic examples of the function TextTabGet are illustrated below. A new text table named deburr_part1 for user defined texts. The new text table has the file name deburr.eng. # deburr.eng - USERS deburr_part1 english text description file # # DESCRIPTION: # Users text file for RAPID development # deburr_part1:: 0: RAPID S4: Users text table deburring part1 1: Part 1 is not in pos 2: Identity of worked part: XYZ 3: Part error in line 1 # # End of file Example 1 VAR num text_res_no; ... text_res_no := TextTabGet("deburr_part1"); The variable text_res_no is assigned the text table number for the defined text table deburr_part1 . Example 2 ErrWrite TextGet(text_res_no, 1), TextGet(text_res_no, 2); A message is stored in the robot log. The message is also shown on the FlexPendant display. The messages will be taken from the text table deburr_part1 : Part 1 is not in pos Identity of worked part: XYZ Return value Data type: num The text table number of the defined text table. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,028
2 Functions 2.138. TextTabFreeToUse - Test whether text table is free RobotWare - OS 1025 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Limitations Limitations for installation of text tables (text resources) in the system: • It is not possible to install the same text table more than once in the system • It is not possible to uninstall (free) a single text table from the system. The only way to uninstall text tables from the system is to cold start the system. All text tables (both system and user defined) will then be uninstalled. Syntax TextTabFreeToUse’(’ [ TableName’:=’ ] < expression ( IN ) of string > ’)’ A function with a return value of the data type bool Related information For information about See Install text table TextTabInstall - Installing a text table on page 554 Format of text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual - Text files Get text table number TextTabGet - Get text table number on page 1026 Get text from system text tables TextGet - Get text from system text tables on page 1022 String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 Continued 2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 3HAC 16581-1 Revision: J 1026 © Copyright 2004-2010 ABB. All rights reserved. 2.139. TextTabGet - Get text table number Usage TextTabGet is used to get the text table number of a user defined text table during run time. Basic examples Basic examples of the function TextTabGet are illustrated below. A new text table named deburr_part1 for user defined texts. The new text table has the file name deburr.eng. # deburr.eng - USERS deburr_part1 english text description file # # DESCRIPTION: # Users text file for RAPID development # deburr_part1:: 0: RAPID S4: Users text table deburring part1 1: Part 1 is not in pos 2: Identity of worked part: XYZ 3: Part error in line 1 # # End of file Example 1 VAR num text_res_no; ... text_res_no := TextTabGet("deburr_part1"); The variable text_res_no is assigned the text table number for the defined text table deburr_part1 . Example 2 ErrWrite TextGet(text_res_no, 1), TextGet(text_res_no, 2); A message is stored in the robot log. The message is also shown on the FlexPendant display. The messages will be taken from the text table deburr_part1 : Part 1 is not in pos Identity of worked part: XYZ Return value Data type: num The text table number of the defined text table. Continues on next page 2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 1027 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TextTabGet ( TableName ) TableName Data type: string The text table name. Syntax TextTabGet ’(’ [ TableName’ =’ ] < expression ( IN ) of string > ’;)’ A function with a return value of the data type num . Related information For information about See Get text from system text tables TextGet - Get text from system text tables on page 1022 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual -Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,029
2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 3HAC 16581-1 Revision: J 1026 © Copyright 2004-2010 ABB. All rights reserved. 2.139. TextTabGet - Get text table number Usage TextTabGet is used to get the text table number of a user defined text table during run time. Basic examples Basic examples of the function TextTabGet are illustrated below. A new text table named deburr_part1 for user defined texts. The new text table has the file name deburr.eng. # deburr.eng - USERS deburr_part1 english text description file # # DESCRIPTION: # Users text file for RAPID development # deburr_part1:: 0: RAPID S4: Users text table deburring part1 1: Part 1 is not in pos 2: Identity of worked part: XYZ 3: Part error in line 1 # # End of file Example 1 VAR num text_res_no; ... text_res_no := TextTabGet("deburr_part1"); The variable text_res_no is assigned the text table number for the defined text table deburr_part1 . Example 2 ErrWrite TextGet(text_res_no, 1), TextGet(text_res_no, 2); A message is stored in the robot log. The message is also shown on the FlexPendant display. The messages will be taken from the text table deburr_part1 : Part 1 is not in pos Identity of worked part: XYZ Return value Data type: num The text table number of the defined text table. Continues on next page 2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 1027 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TextTabGet ( TableName ) TableName Data type: string The text table name. Syntax TextTabGet ’(’ [ TableName’ =’ ] < expression ( IN ) of string > ’;)’ A function with a return value of the data type num . Related information For information about See Get text from system text tables TextGet - Get text from system text tables on page 1022 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual -Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 3HAC 16581-1 Revision: J 1028 © Copyright 2004-2010 ABB. All rights reserved. 2.140. Trunc - Truncates a numeric value Usage Trunc ( Truncate ) is used to truncate a numeric value to a specified number of decimals or to an integer value. Basic examples Basic examples of the function Trunc are illustrated below. Example 1 VAR num val; val := Trunc(0.38521\Dec:=3); The variable val is given the value 0.385 . Example 2 reg1 := 0.38521 val := Trunc(reg1\Dec:=1); The variable val is given the value 0.3 . Example 3 val := Trunc(0.38521); The variable val is given the value 0 . Return value Data type: num The numeric value truncated to the specified number of decimals. Arguments Trunc ( Val [\Dec] ) Val Value Data type: num The numeric value to be truncated. [\Dec] Decimals Data type: num Number of decimals. If the specified number of decimals is 0 or if the argument is omitted, the value is truncated to an integer. The number of decimals must not be negative or greater than the available precision for numeric values. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,030
2 Functions 2.139. TextTabGet - Get text table number RobotWare - OS 1027 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments TextTabGet ( TableName ) TableName Data type: string The text table name. Syntax TextTabGet ’(’ [ TableName’ =’ ] < expression ( IN ) of string > ’;)’ A function with a return value of the data type num . Related information For information about See Get text from system text tables TextGet - Get text from system text tables on page 1022 Install text table TextTabInstall - Installing a text table on page 554 Format text files Technical reference manual - RAPID kernel , section RAPID Kernel reference manual -Text files String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 3HAC 16581-1 Revision: J 1028 © Copyright 2004-2010 ABB. All rights reserved. 2.140. Trunc - Truncates a numeric value Usage Trunc ( Truncate ) is used to truncate a numeric value to a specified number of decimals or to an integer value. Basic examples Basic examples of the function Trunc are illustrated below. Example 1 VAR num val; val := Trunc(0.38521\Dec:=3); The variable val is given the value 0.385 . Example 2 reg1 := 0.38521 val := Trunc(reg1\Dec:=1); The variable val is given the value 0.3 . Example 3 val := Trunc(0.38521); The variable val is given the value 0 . Return value Data type: num The numeric value truncated to the specified number of decimals. Arguments Trunc ( Val [\Dec] ) Val Value Data type: num The numeric value to be truncated. [\Dec] Decimals Data type: num Number of decimals. If the specified number of decimals is 0 or if the argument is omitted, the value is truncated to an integer. The number of decimals must not be negative or greater than the available precision for numeric values. Continues on next page 2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 1029 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Trunc’(’ [ Val ’:=’ ] <expression ( IN ) of num> [ \Dec ’:=’ <expression ( IN ) of num> ] ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Rounding a value Round - Round is a numeric value on page 969 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,031
2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 3HAC 16581-1 Revision: J 1028 © Copyright 2004-2010 ABB. All rights reserved. 2.140. Trunc - Truncates a numeric value Usage Trunc ( Truncate ) is used to truncate a numeric value to a specified number of decimals or to an integer value. Basic examples Basic examples of the function Trunc are illustrated below. Example 1 VAR num val; val := Trunc(0.38521\Dec:=3); The variable val is given the value 0.385 . Example 2 reg1 := 0.38521 val := Trunc(reg1\Dec:=1); The variable val is given the value 0.3 . Example 3 val := Trunc(0.38521); The variable val is given the value 0 . Return value Data type: num The numeric value truncated to the specified number of decimals. Arguments Trunc ( Val [\Dec] ) Val Value Data type: num The numeric value to be truncated. [\Dec] Decimals Data type: num Number of decimals. If the specified number of decimals is 0 or if the argument is omitted, the value is truncated to an integer. The number of decimals must not be negative or greater than the available precision for numeric values. Continues on next page 2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 1029 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Trunc’(’ [ Val ’:=’ ] <expression ( IN ) of num> [ \Dec ’:=’ <expression ( IN ) of num> ] ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Rounding a value Round - Round is a numeric value on page 969 Continued 2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 3HAC 16581-1 Revision: J 1030 © Copyright 2004-2010 ABB. All rights reserved. 2.141. Type - Get the data type name for a variable Usage Type is used to get the data type name for the specified variable in argument Data . Basic examples Basic examples of the function Type are illustrated below. Example 1 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: intnum" Example 2 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype \BaseName); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Example 3 VAR string rettype; VAR num numtype; rettype := Type(numtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Return value Data type: string A string with the data type name for the specified variable in argument Data . Arguments Type (Data [\BaseName]) Data Data object name Data type: anytype The name of the variable to get the data type name for. [\BaseName] Base data type Name Data type: switch If used, then the function returns the underlying data type name, when the specified Data is an ALIAS declared data type. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,032
2 Functions 2.140. Trunc - Truncates a numeric value RobotWare - OS 1029 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Trunc’(’ [ Val ’:=’ ] <expression ( IN ) of num> [ \Dec ’:=’ <expression ( IN ) of num> ] ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Rounding a value Round - Round is a numeric value on page 969 Continued 2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 3HAC 16581-1 Revision: J 1030 © Copyright 2004-2010 ABB. All rights reserved. 2.141. Type - Get the data type name for a variable Usage Type is used to get the data type name for the specified variable in argument Data . Basic examples Basic examples of the function Type are illustrated below. Example 1 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: intnum" Example 2 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype \BaseName); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Example 3 VAR string rettype; VAR num numtype; rettype := Type(numtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Return value Data type: string A string with the data type name for the specified variable in argument Data . Arguments Type (Data [\BaseName]) Data Data object name Data type: anytype The name of the variable to get the data type name for. [\BaseName] Base data type Name Data type: switch If used, then the function returns the underlying data type name, when the specified Data is an ALIAS declared data type. Continues on next page 2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 1031 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Type’(’ [ Data‘ :=’ ] < reference ( REF ) of anytype > [ ‘\’ BaseName ] ’)’ A function with a return value of the data type string . Related information For information about See Definition of Alias types. Technical reference manual - RAPID kernel , section Lexical elements - Alias types Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,033
2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 3HAC 16581-1 Revision: J 1030 © Copyright 2004-2010 ABB. All rights reserved. 2.141. Type - Get the data type name for a variable Usage Type is used to get the data type name for the specified variable in argument Data . Basic examples Basic examples of the function Type are illustrated below. Example 1 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: intnum" Example 2 VAR string rettype; VAR intnum intnumtype; rettype := Type(intnumtype \BaseName); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Example 3 VAR string rettype; VAR num numtype; rettype := Type(numtype); TPWrite "Data type name: " + rettype; The print out will be: "Data type name: num" Return value Data type: string A string with the data type name for the specified variable in argument Data . Arguments Type (Data [\BaseName]) Data Data object name Data type: anytype The name of the variable to get the data type name for. [\BaseName] Base data type Name Data type: switch If used, then the function returns the underlying data type name, when the specified Data is an ALIAS declared data type. Continues on next page 2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 1031 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Type’(’ [ Data‘ :=’ ] < reference ( REF ) of anytype > [ ‘\’ BaseName ] ’)’ A function with a return value of the data type string . Related information For information about See Definition of Alias types. Technical reference manual - RAPID kernel , section Lexical elements - Alias types Continued 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1032 © Copyright 2004-2010 ABB. All rights reserved. 2.142. UIAlphaEntry - User Alpha Entry Usage UIAlphaEntry ( User Interaction Alpha Entry ) is used to let the operator enter a string from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a text string. The string is then transferred back to the program. Basic examples Basic examples of the instruction UIAlpaEntry are illustrated below. See More examples on page 1035 . Example 1 VAR string answer; ... answer := UIAlphaEntry( \Header:= "UIAlphaEntry Header", \Message:= "Which procedure do You want to run?" \Icon:=iconInfo \InitString:= "default_proc"); %answer%; xx0500002437 Above alpha message box with icon, header, message, and init string are written on the FlexPendant display. The user edit init string or write a new string with the supported Alpha Pad. Program execution waits until OK is pressed and then the written string is returned in the variable answer . The program then calls the specified procedure with late binding. ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,034
2 Functions 2.141. Type - Get the data type name for a variable RobotWare - OS 1031 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax Type’(’ [ Data‘ :=’ ] < reference ( REF ) of anytype > [ ‘\’ BaseName ] ’)’ A function with a return value of the data type string . Related information For information about See Definition of Alias types. Technical reference manual - RAPID kernel , section Lexical elements - Alias types Continued 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1032 © Copyright 2004-2010 ABB. All rights reserved. 2.142. UIAlphaEntry - User Alpha Entry Usage UIAlphaEntry ( User Interaction Alpha Entry ) is used to let the operator enter a string from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a text string. The string is then transferred back to the program. Basic examples Basic examples of the instruction UIAlpaEntry are illustrated below. See More examples on page 1035 . Example 1 VAR string answer; ... answer := UIAlphaEntry( \Header:= "UIAlphaEntry Header", \Message:= "Which procedure do You want to run?" \Icon:=iconInfo \InitString:= "default_proc"); %answer%; xx0500002437 Above alpha message box with icon, header, message, and init string are written on the FlexPendant display. The user edit init string or write a new string with the supported Alpha Pad. Program execution waits until OK is pressed and then the written string is returned in the variable answer . The program then calls the specified procedure with late binding. ![Image] Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1033 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: string This functions returns the input string. If function breaks via \ BreakFlag: - If parameter \InitString is specified, this string is returned - If parameter \ InitString is not specified, empty string "" is returned. If function breaks via ERROR handler, no return value will be returned at all. Arguments UIAlphaEntry ([\Header][\Message]|[\MsgArray] [\Wrap][\Icon][\InitString] [\MaxTime][\DIBreak][\DOBreak][\BreakFlag]) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \ Message or \ MsgArray can be used at the same time. Max. layout space is 9 lines with 55 characters. [\Wrap] Data type: switch If selected, all the specified strings in the argument \ MsgArray will be concatenated to one string with single space between each individual strings and spread out on as few lines as possible. Default, each string in the argument \ MsgArray will be on separate line on the display. [\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 1034 . Default no icon. [\InitString] Data type: string An initial string to be display in the text entry box as default. 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
1,035
2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1032 © Copyright 2004-2010 ABB. All rights reserved. 2.142. UIAlphaEntry - User Alpha Entry Usage UIAlphaEntry ( User Interaction Alpha Entry ) is used to let the operator enter a string from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a text string. The string is then transferred back to the program. Basic examples Basic examples of the instruction UIAlpaEntry are illustrated below. See More examples on page 1035 . Example 1 VAR string answer; ... answer := UIAlphaEntry( \Header:= "UIAlphaEntry Header", \Message:= "Which procedure do You want to run?" \Icon:=iconInfo \InitString:= "default_proc"); %answer%; xx0500002437 Above alpha message box with icon, header, message, and init string are written on the FlexPendant display. The user edit init string or write a new string with the supported Alpha Pad. Program execution waits until OK is pressed and then the written string is returned in the variable answer . The program then calls the specified procedure with late binding. ![Image] Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1033 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: string This functions returns the input string. If function breaks via \ BreakFlag: - If parameter \InitString is specified, this string is returned - If parameter \ InitString is not specified, empty string "" is returned. If function breaks via ERROR handler, no return value will be returned at all. Arguments UIAlphaEntry ([\Header][\Message]|[\MsgArray] [\Wrap][\Icon][\InitString] [\MaxTime][\DIBreak][\DOBreak][\BreakFlag]) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \ Message or \ MsgArray can be used at the same time. Max. layout space is 9 lines with 55 characters. [\Wrap] Data type: switch If selected, all the specified strings in the argument \ MsgArray will be concatenated to one string with single space between each individual strings and spread out on as few lines as possible. Default, each string in the argument \ MsgArray will be on separate line on the display. [\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 1034 . Default no icon. [\InitString] Data type: string An initial string to be display in the text entry box as default. Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1034 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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 the OK button is not pressed before 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_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used 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, the error handler will be executed. Program execution The alpha message box with alpha pad, icon, header, message lines, and init string are displayed according to the programmed arguments. Program execution waits until the user edits or creates a new string and presses OK, or the message box is interrupted by time-out or signal action. The input string and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,036
2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1033 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: string This functions returns the input string. If function breaks via \ BreakFlag: - If parameter \InitString is specified, this string is returned - If parameter \ InitString is not specified, empty string "" is returned. If function breaks via ERROR handler, no return value will be returned at all. Arguments UIAlphaEntry ([\Header][\Message]|[\MsgArray] [\Wrap][\Icon][\InitString] [\MaxTime][\DIBreak][\DOBreak][\BreakFlag]) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \ Message or \ MsgArray can be used at the same time. Max. layout space is 9 lines with 55 characters. [\Wrap] Data type: switch If selected, all the specified strings in the argument \ MsgArray will be concatenated to one string with single space between each individual strings and spread out on as few lines as possible. Default, each string in the argument \ MsgArray will be on separate line on the display. [\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 1034 . Default no icon. [\InitString] Data type: string An initial string to be display in the text entry box as default. Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1034 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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 the OK button is not pressed before 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_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used 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, the error handler will be executed. Program execution The alpha message box with alpha pad, icon, header, message lines, and init string are displayed according to the programmed arguments. Program execution waits until the user edits or creates a new string and presses OK, or the message box is interrupted by time-out or signal action. The input string and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1035 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function UIAlphaEntry are illustrated below. Example 1 VAR errnum err_var; VAR string answer; VAR string logfile; ... answer := UIAlphaEntry (\Header:= "Log file name:" \Message:= "Enter the name of the log file to create?" \Icon:=iconInfo \InitString:= "signal.log" \MaxTime:=60 \DIBreak:=di5\BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer logfile:="signal.log"; CASE 0: ! Operator answer logfile := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a string and press OK. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \ BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \ MaxTime when UIAlphaEntry is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of 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
1,037
2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1034 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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 the OK button is not pressed before 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_DOBREAK can be used to test whether or not this has occurred. [\BreakFlag] Data type: errnum A variable (before used 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, the error handler will be executed. Program execution The alpha message box with alpha pad, icon, header, message lines, and init string are displayed according to the programmed arguments. Program execution waits until the user edits or creates a new string and presses OK, or the message box is interrupted by time-out or signal action. The input string and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1035 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function UIAlphaEntry are illustrated below. Example 1 VAR errnum err_var; VAR string answer; VAR string logfile; ... answer := UIAlphaEntry (\Header:= "Log file name:" \Message:= "Enter the name of the log file to create?" \Icon:=iconInfo \InitString:= "signal.log" \MaxTime:=60 \DIBreak:=di5\BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer logfile:="signal.log"; CASE 0: ! Operator answer logfile := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a string and press OK. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \ BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \ MaxTime when UIAlphaEntry is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1036 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIAlphaEntry´(´ [´\´Header’:=’ <expression ( IN ) of string>] [´\´ Message’:=’ <expression ( IN ) of string>] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitString’:=’<expression ( IN ) of string>] [´\´MaxTime’:=’ <expression ( IN ) of num>] [´\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´<variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type string. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call 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
1,038
2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 1035 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. More examples More examples of the function UIAlphaEntry are illustrated below. Example 1 VAR errnum err_var; VAR string answer; VAR string logfile; ... answer := UIAlphaEntry (\Header:= "Log file name:" \Message:= "Enter the name of the log file to create?" \Icon:=iconInfo \InitString:= "signal.log" \MaxTime:=60 \DIBreak:=di5\BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer logfile:="signal.log"; CASE 0: ! Operator answer logfile := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a string and press OK. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \ BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \ MaxTime when UIAlphaEntry is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1036 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIAlphaEntry´(´ [´\´Header’:=’ <expression ( IN ) of string>] [´\´ Message’:=’ <expression ( IN ) of string>] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitString’:=’<expression ( IN ) of string>] [´\´MaxTime’:=’ <expression ( IN ) of num>] [´\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´<variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type string. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.143. UIClientExist - Exist User Client RobotWare - OS 1037 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.143. UIClientExist - Exist User Client Usage UIClientExist ( User Interaction Client Exist ) is used to check if some User Device such as the FlexPendant is connected to the controller. Basic examples Basic examples of the function UIClientExist are illustrated below. Example 1 IF UIClientExist() THEN ! Possible to get answer from the operator ! The TPReadFK and UIMsgBox ... can be used ELSE ! Not possible to communicate with any operator ENDIF The test is done if it is possible to get some answer from the operator of the system. Return value Data type: bool Returns TRUE if a FlexPendant is connected to the system, otherwise FALSE . Limitations UIClientExist returns TRUE up to 16 seconds. After that, the FlexPendant is removed. After that time, UIClientExist returns FALSE (i.e when network connection lost from FlexPendent is detected). Same limitation when the FlexPendant is connected again. Syntax UIClientExist’(’ ’) A function with return value of the type bool . Related information For information about See User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,039
2 Functions 2.142. UIAlphaEntry - User Alpha Entry RobotWare-OS 3HAC 16581-1 Revision: J 1036 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIAlphaEntry´(´ [´\´Header’:=’ <expression ( IN ) of string>] [´\´ Message’:=’ <expression ( IN ) of string>] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitString’:=’<expression ( IN ) of string>] [´\´MaxTime’:=’ <expression ( IN ) of num>] [´\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´<variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type string. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 List View UIListView - User List View on page 1050 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 Procedure call with Late binding Technical reference manual - RAPID overview , section Basic characteristics - Routines - Procedure call Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.143. UIClientExist - Exist User Client RobotWare - OS 1037 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.143. UIClientExist - Exist User Client Usage UIClientExist ( User Interaction Client Exist ) is used to check if some User Device such as the FlexPendant is connected to the controller. Basic examples Basic examples of the function UIClientExist are illustrated below. Example 1 IF UIClientExist() THEN ! Possible to get answer from the operator ! The TPReadFK and UIMsgBox ... can be used ELSE ! Not possible to communicate with any operator ENDIF The test is done if it is possible to get some answer from the operator of the system. Return value Data type: bool Returns TRUE if a FlexPendant is connected to the system, otherwise FALSE . Limitations UIClientExist returns TRUE up to 16 seconds. After that, the FlexPendant is removed. After that time, UIClientExist returns FALSE (i.e when network connection lost from FlexPendent is detected). Same limitation when the FlexPendant is connected again. Syntax UIClientExist’(’ ’) A function with return value of the type bool . Related information For information about See User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1038 © Copyright 2004-2010 ABB. All rights reserved. 2.144. UIDnumEntry - User Number Entry Usage UIDnumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumEntry are illustrated below. See also More examples on page 1041 . Example 1 VAR dnum answer; ... answer := UIDnumEntry( \Header:="UIDnumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=50000000 \MinValue:=10000000 \MaxValue:=100000000 \AsInteger); xx0900001064 ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,040
2 Functions 2.143. UIClientExist - Exist User Client RobotWare - OS 1037 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.143. UIClientExist - Exist User Client Usage UIClientExist ( User Interaction Client Exist ) is used to check if some User Device such as the FlexPendant is connected to the controller. Basic examples Basic examples of the function UIClientExist are illustrated below. Example 1 IF UIClientExist() THEN ! Possible to get answer from the operator ! The TPReadFK and UIMsgBox ... can be used ELSE ! Not possible to communicate with any operator ENDIF The test is done if it is possible to get some answer from the operator of the system. Return value Data type: bool Returns TRUE if a FlexPendant is connected to the system, otherwise FALSE . Limitations UIClientExist returns TRUE up to 16 seconds. After that, the FlexPendant is removed. After that time, UIClientExist returns FALSE (i.e when network connection lost from FlexPendent is detected). Same limitation when the FlexPendant is connected again. Syntax UIClientExist’(’ ’) A function with return value of the type bool . Related information For information about See User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1038 © Copyright 2004-2010 ABB. All rights reserved. 2.144. UIDnumEntry - User Number Entry Usage UIDnumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumEntry are illustrated below. See also More examples on page 1041 . Example 1 VAR dnum answer; ... answer := UIDnumEntry( \Header:="UIDnumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=50000000 \MinValue:=10000000 \MaxValue:=100000000 \AsInteger); xx0900001064 ![Image] Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1039 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric message box with icon, header, message, init-, max-, and minvalue written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. Return value Data type: dnum This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler there is no return value at all. Arguments UIDnumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1041 . Default no icon. 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
1,041
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1038 © Copyright 2004-2010 ABB. All rights reserved. 2.144. UIDnumEntry - User Number Entry Usage UIDnumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumEntry are illustrated below. See also More examples on page 1041 . Example 1 VAR dnum answer; ... answer := UIDnumEntry( \Header:="UIDnumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=50000000 \MinValue:=10000000 \MaxValue:=100000000 \AsInteger); xx0900001064 ![Image] Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1039 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric message box with icon, header, message, init-, max-, and minvalue written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. Return value Data type: dnum This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler there is no return value at all. Arguments UIDnumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1041 . Default no icon. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1040 © Copyright 2004-2010 ABB. All rights reserved. [\InitValue] Data type: dnum Initial value that is displayed in the entry box. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. 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
1,042
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1039 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric message box with icon, header, message, init-, max-, and minvalue written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. Return value Data type: dnum This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler there is no return value at all. Arguments UIDnumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1041 . Default no icon. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1040 © Copyright 2004-2010 ABB. All rights reserved. [\InitValue] Data type: dnum Initial value that is displayed in the entry box. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1041 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumEntry are illustrated below. Example 1 VAR errnum err_var; VAR dnum answer; VAR dnum distance; ... answer := UIDnumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! No such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. 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
1,043
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1040 © Copyright 2004-2010 ABB. All rights reserved. [\InitValue] Data type: dnum Initial value that is displayed in the entry box. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1041 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumEntry are illustrated below. Example 1 VAR errnum err_var; VAR dnum answer; VAR dnum distance; ... answer := UIDnumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! No such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1042 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, these situations can then be dealt with by the error handler: • If there is a timeout (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 a 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. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumEntry is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like the slow response of the FlexPendant. Syntax UIDnumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of dnum>] [´\´MinValue’:=’<expression ( IN ) of dnum>] [´\´MaxValue’:=’<expression ( IN ) of dnum>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type dnum . 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
1,044
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1041 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumEntry are illustrated below. Example 1 VAR errnum err_var; VAR dnum answer; VAR dnum distance; ... answer := UIDnumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! No such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1042 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, these situations can then be dealt with by the error handler: • If there is a timeout (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 a 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. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumEntry is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like the slow response of the FlexPendant. Syntax UIDnumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of dnum>] [´\´MinValue’:=’<expression ( IN ) of dnum>] [´\´MaxValue’:=’<expression ( IN ) of dnum>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type dnum . Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1043 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 UIDnumTune - User Number Tune on page 1044 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 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
1,045
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1042 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, these situations can then be dealt with by the error handler: • If there is a timeout (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 a 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. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumEntry is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like the slow response of the FlexPendant. Syntax UIDnumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of dnum>] [´\´MinValue’:=’<expression ( IN ) of dnum>] [´\´MaxValue’:=’<expression ( IN ) of dnum>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type dnum . Continued Continues on next page 2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1043 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 UIDnumTune - User Number Tune on page 1044 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1044 © Copyright 2004-2010 ABB. All rights reserved. 2.145. UIDnumTune - User Number Tune Usage UIDnumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumTune are illustrated below. See also More examples on page 1047 . Example 1 VAR dnum flow; ... flow := UIDnumTune( \Header:="UIDnumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 10000000, 1000000 \MinValue:=1000000 \MaxValue:=20000000); xx0900001063 ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,046
2 Functions 2.144. UIDnumEntry - User Number Entry RobotWare - OS 1043 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 UIDnumTune - User Number Tune on page 1044 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1044 © Copyright 2004-2010 ABB. All rights reserved. 2.145. UIDnumTune - User Number Tune Usage UIDnumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumTune are illustrated below. See also More examples on page 1047 . Example 1 VAR dnum flow; ... flow := UIDnumTune( \Header:="UIDnumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 10000000, 1000000 \MinValue:=1000000 \MaxValue:=20000000); xx0900001063 ![Image] Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1045 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric tune message box with icon, header, message, init-, increment, max-, and minvalue written on the FlexPendant display. The message box checks that the operator tunes the flow value with step 1000000 from init value 10000000 and is within the value range 1000000-20000000. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: dnum This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UIDnumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1047 . Default no icon. 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
1,047
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1044 © Copyright 2004-2010 ABB. All rights reserved. 2.145. UIDnumTune - User Number Tune Usage UIDnumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UIDnumTune are illustrated below. See also More examples on page 1047 . Example 1 VAR dnum flow; ... flow := UIDnumTune( \Header:="UIDnumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 10000000, 1000000 \MinValue:=1000000 \MaxValue:=20000000); xx0900001063 ![Image] Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1045 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric tune message box with icon, header, message, init-, increment, max-, and minvalue written on the FlexPendant display. The message box checks that the operator tunes the flow value with step 1000000 from init value 10000000 and is within the value range 1000000-20000000. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: dnum This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UIDnumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1047 . Default no icon. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1046 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: dnum Initial value that is displayed in the entry box. Increment Data type: dnum This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. 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
1,048
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1045 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above, the numeric tune message box with icon, header, message, init-, increment, max-, and minvalue written on the FlexPendant display. The message box checks that the operator tunes the flow value with step 1000000 from init value 10000000 and is within the value range 1000000-20000000. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: dnum This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UIDnumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max. 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1047 . Default no icon. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1046 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: dnum Initial value that is displayed in the entry box. Increment Data type: dnum This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1047 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumTune are illustrated below. Example 1 VAR errnum err_var; VAR dnum tune_answer; VAR dnum distance; ... tune_answer := UIDnumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! No such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with timeout or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. 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
1,049
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1046 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: dnum Initial value that is displayed in the entry box. Increment Data type: dnum This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: dnum The minimum value for the return value. [\MaxValue] Data type: dnum The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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, 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1047 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumTune are illustrated below. Example 1 VAR errnum err_var; VAR dnum tune_answer; VAR dnum distance; ... tune_answer := UIDnumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! No such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with timeout or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1048 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a timeout (parameter \MaxTime ) before an input from the operator, the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If a digital input is set (parameter \DIBreak ) before an input from the operator, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumTune is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like a slow response of the FlexPendant. Syntax UIDnumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of dnum> ’,’ [Increment’:=’ ] <expression ( IN ) of dnum> [’\’MinValue’:=’ <expression ( IN ) of dnum>] [’\’MaxValue’:=’ <expression( IN ) of dnum>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type dnum . 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
1,050
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1047 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue is displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by timeout or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UIDnumTune are illustrated below. Example 1 VAR errnum err_var; VAR dnum tune_answer; VAR dnum distance; ... tune_answer := UIDnumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! No such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with timeout or break by digital input signal. In the program, it is possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1048 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a timeout (parameter \MaxTime ) before an input from the operator, the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If a digital input is set (parameter \DIBreak ) before an input from the operator, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumTune is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like a slow response of the FlexPendant. Syntax UIDnumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of dnum> ’,’ [Increment’:=’ ] <expression ( IN ) of dnum> [’\’MinValue’:=’ <expression ( IN ) of dnum>] [’\’MaxValue’:=’ <expression( IN ) of dnum>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type dnum . Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1049 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UIDnumEntry - User Number Entry on page 1038 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 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
1,051
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1048 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a timeout (parameter \MaxTime ) before an input from the operator, the system variable ERRNO is set to ERR_TP_MAXTIME and the execution continues in the error handler. • If a digital input is set (parameter \DIBreak ) before an input from the operator, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the timeout parameter \MaxTime when UIDnumTune is frequently executed, for example, in a loop. It can result in unpredictable behavior from the system performance, like a slow response of the FlexPendant. Syntax UIDnumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of dnum> ’,’ [Increment’:=’ ] <expression ( IN ) of dnum> [’\’MinValue’:=’ <expression ( IN ) of dnum>] [’\’MaxValue’:=’ <expression( IN ) of dnum>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type dnum . Continued Continues on next page 2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1049 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UIDnumEntry - User Number Entry on page 1038 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1050 © Copyright 2004-2010 ABB. All rights reserved. 2.146. UIListView - User List View Usage UIListView ( User Interaction List View ) is used to define menu lists with text and optional icons on the available User Device such as the FlexPendant. The menu has two different styles, one with validations buttons and one that reacts instantly to the user selection. Basic examples Basic examples of the function UIListView are illustrated below. See also More examples on page 1054 . Example 1 CONST listitem list{3} := [ ["","Item 1"], ["","Item 2"], ["","Item 3"] ]; VAR num list_item; VAR btnres button_answer; ... list_item := UIListView ( \Result:=button_answer \Header:="UIListView Header", list \Buttons:=btnOKCancel \Icon:=iconInfo \DefaultIndex:=1); IF button_answer = resOK THEN IF list_item = 1 THEN ! Do item1 ELSEIF list_item = 2 THEN ! Do item 2 ELSE ! Do item3 ENDIF ELSE ! User has select Cancel ENDIF Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,052
2 Functions 2.145. UIDnumTune - User Number Tune RobotWare - OS 1049 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 User Interaction Number Entry UIDnumEntry - User Number Entry on page 1038 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1050 © Copyright 2004-2010 ABB. All rights reserved. 2.146. UIListView - User List View Usage UIListView ( User Interaction List View ) is used to define menu lists with text and optional icons on the available User Device such as the FlexPendant. The menu has two different styles, one with validations buttons and one that reacts instantly to the user selection. Basic examples Basic examples of the function UIListView are illustrated below. See also More examples on page 1054 . Example 1 CONST listitem list{3} := [ ["","Item 1"], ["","Item 2"], ["","Item 3"] ]; VAR num list_item; VAR btnres button_answer; ... list_item := UIListView ( \Result:=button_answer \Header:="UIListView Header", list \Buttons:=btnOKCancel \Icon:=iconInfo \DefaultIndex:=1); IF button_answer = resOK THEN IF list_item = 1 THEN ! Do item1 ELSEIF list_item = 2 THEN ! Do item 2 ELSE ! Do item3 ENDIF ELSE ! User has select Cancel ENDIF Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1051 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002416 Above menu list with icon, header, menu Item 1 ... Item 3 , and buttons are written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. Both the selection in the list and the pressed button are transfered to the program. Return value Data type: num This function returns the user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . If the function breaks via \BreakFlag : • If parameter \DefaultIndex is specified, this index is returned • If parameter \DefaultIndex is not specified, 0 is returned If function breaks via ERROR handler, no return value is returned at all. Arguments UIListView ( [\Result] [\Header] ListItems [\Buttons] | [\BtnArray] [\Icon] [\DefaultIndex ] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag]) [\Result] Data type: btnres The numeric value of the button that is selected from the list menu box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. Argument \Result set to resUnkwn equal to 0 if one of following condition: • none of parameters \Buttons or \BtnArray are used • argument \Buttons:=btnNone is used • if the function breaks via \BreakFlag or ERROR handler See Predefined data on page 1054 . ![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
1,053
2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1050 © Copyright 2004-2010 ABB. All rights reserved. 2.146. UIListView - User List View Usage UIListView ( User Interaction List View ) is used to define menu lists with text and optional icons on the available User Device such as the FlexPendant. The menu has two different styles, one with validations buttons and one that reacts instantly to the user selection. Basic examples Basic examples of the function UIListView are illustrated below. See also More examples on page 1054 . Example 1 CONST listitem list{3} := [ ["","Item 1"], ["","Item 2"], ["","Item 3"] ]; VAR num list_item; VAR btnres button_answer; ... list_item := UIListView ( \Result:=button_answer \Header:="UIListView Header", list \Buttons:=btnOKCancel \Icon:=iconInfo \DefaultIndex:=1); IF button_answer = resOK THEN IF list_item = 1 THEN ! Do item1 ELSEIF list_item = 2 THEN ! Do item 2 ELSE ! Do item3 ENDIF ELSE ! User has select Cancel ENDIF Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1051 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002416 Above menu list with icon, header, menu Item 1 ... Item 3 , and buttons are written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. Both the selection in the list and the pressed button are transfered to the program. Return value Data type: num This function returns the user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . If the function breaks via \BreakFlag : • If parameter \DefaultIndex is specified, this index is returned • If parameter \DefaultIndex is not specified, 0 is returned If function breaks via ERROR handler, no return value is returned at all. Arguments UIListView ( [\Result] [\Header] ListItems [\Buttons] | [\BtnArray] [\Icon] [\DefaultIndex ] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag]) [\Result] Data type: btnres The numeric value of the button that is selected from the list menu box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. Argument \Result set to resUnkwn equal to 0 if one of following condition: • none of parameters \Buttons or \BtnArray are used • argument \Buttons:=btnNone is used • if the function breaks via \BreakFlag or ERROR handler See Predefined data on page 1054 . ![Image] Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1052 © Copyright 2004-2010 ABB. All rights reserved. [\Header] Data type: string Header text to be written at the top of the list menu box. Max. 40 characters. ListItem Data type: listitem An array with one or several list menu items to be displayed consisting of: Component image of type string : The name of the icon image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown can have the width and height of 28 pixels. If the image is bigger, then it will be resized to show only 28 * 28 pixels. 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. Use empty string ”” or stEmpty if no icon to display. Component text of type string : • The text for the menu line to display. • Max. 75 characters for each list menu item. [\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 1054 . [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. If none of the parameters \Buttons or \BtnArray or argument \Buttons:=btnNone are used then the menu list reacts instantly to the user selection. Max. 5 buttons with 42 characters each. 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
1,054
2 Functions 2.146. UIListView - User List View RobotWare - OS 1051 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. xx0500002416 Above menu list with icon, header, menu Item 1 ... Item 3 , and buttons are written on the FlexPendant display. Program execution waits until OK or Cancel is pressed. Both the selection in the list and the pressed button are transfered to the program. Return value Data type: num This function returns the user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . If the function breaks via \BreakFlag : • If parameter \DefaultIndex is specified, this index is returned • If parameter \DefaultIndex is not specified, 0 is returned If function breaks via ERROR handler, no return value is returned at all. Arguments UIListView ( [\Result] [\Header] ListItems [\Buttons] | [\BtnArray] [\Icon] [\DefaultIndex ] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag]) [\Result] Data type: btnres The numeric value of the button that is selected from the list menu box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. Argument \Result set to resUnkwn equal to 0 if one of following condition: • none of parameters \Buttons or \BtnArray are used • argument \Buttons:=btnNone is used • if the function breaks via \BreakFlag or ERROR handler See Predefined data on page 1054 . ![Image] Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1052 © Copyright 2004-2010 ABB. All rights reserved. [\Header] Data type: string Header text to be written at the top of the list menu box. Max. 40 characters. ListItem Data type: listitem An array with one or several list menu items to be displayed consisting of: Component image of type string : The name of the icon image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown can have the width and height of 28 pixels. If the image is bigger, then it will be resized to show only 28 * 28 pixels. 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. Use empty string ”” or stEmpty if no icon to display. Component text of type string : • The text for the menu line to display. • Max. 75 characters for each list menu item. [\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 1054 . [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. If none of the parameters \Buttons or \BtnArray or argument \Buttons:=btnNone are used then the menu list reacts instantly to the user selection. Max. 5 buttons with 42 characters each. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1053 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. Default no icon. See Predefined data on page 1054 . [\DefaultIndex] Data type: num The default user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is pressed or no selection is done 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 pressed or no selection is done before 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_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 pressed or no selection is done before 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 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, the error handler will be executed. Program execution The menu list with icon, header, list items, and default item are displayed according to the programmed arguments. Program execution waits until the operator has done the selection or the menu list is interrupted by time-out or signal action. The selected list item and interrupt reason are transferred back to the program. New menu list on TRAP level takes focus from menu list on 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
1,055
2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1052 © Copyright 2004-2010 ABB. All rights reserved. [\Header] Data type: string Header text to be written at the top of the list menu box. Max. 40 characters. ListItem Data type: listitem An array with one or several list menu items to be displayed consisting of: Component image of type string : The name of the icon image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown can have the width and height of 28 pixels. If the image is bigger, then it will be resized to show only 28 * 28 pixels. 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. Use empty string ”” or stEmpty if no icon to display. Component text of type string : • The text for the menu line to display. • Max. 75 characters for each list menu item. [\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 1054 . [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. If none of the parameters \Buttons or \BtnArray or argument \Buttons:=btnNone are used then the menu list reacts instantly to the user selection. Max. 5 buttons with 42 characters each. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1053 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. Default no icon. See Predefined data on page 1054 . [\DefaultIndex] Data type: num The default user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is pressed or no selection is done 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 pressed or no selection is done before 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_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 pressed or no selection is done before 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 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, the error handler will be executed. Program execution The menu list with icon, header, list items, and default item are displayed according to the programmed arguments. Program execution waits until the operator has done the selection or the menu list is interrupted by time-out or signal action. The selected list item and interrupt reason are transferred back to the program. New menu list on TRAP level takes focus from menu list on basic level. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1054 © 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 the function UIListView are illustrated below. Example 1 CONST listitem list{2} := [ ["","Calibrate tool1"], ["","Calibrate tool2"] ]; VAR num list_item; VAR errnum err_var; ... list_item := UIListView ( \Header:="Select tool ?", list \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer CASE 0: Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,056
2 Functions 2.146. UIListView - User List View RobotWare - OS 1053 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\Icon] Data type: icondata Defines the icon to be displayed. Only one of the predefined icons of type icondata can be used. Default no icon. See Predefined data on page 1054 . [\DefaultIndex] Data type: num The default user selection in the list menu corresponding to the index in the array specified in the parameter ListItems . [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is pressed or no selection is done 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 pressed or no selection is done before 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_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 pressed or no selection is done before 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 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, the error handler will be executed. Program execution The menu list with icon, header, list items, and default item are displayed according to the programmed arguments. Program execution waits until the operator has done the selection or the menu list is interrupted by time-out or signal action. The selected list item and interrupt reason are transferred back to the program. New menu list on TRAP level takes focus from menu list on basic level. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1054 © 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 the function UIListView are illustrated below. Example 1 CONST listitem list{2} := [ ["","Calibrate tool1"], ["","Calibrate tool2"] ]; VAR num list_item; VAR errnum err_var; ... list_item := UIListView ( \Header:="Select tool ?", list \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer CASE 0: Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1055 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. ! Operator answer IF list_item =1 THEN ! Calibrate tool1 ELSEIF list_item=2 THEN ! Calibrate tool2 ENDIF DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can select an item in the list. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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 a value for the time-out parameter \MaxTime when UIListView is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of 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
1,057
2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1054 © 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 the function UIListView are illustrated below. Example 1 CONST listitem list{2} := [ ["","Calibrate tool1"], ["","Calibrate tool2"] ]; VAR num list_item; VAR errnum err_var; ... list_item := UIListView ( \Header:="Select tool ?", list \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer CASE 0: Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 1055 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. ! Operator answer IF list_item =1 THEN ! Calibrate tool1 ELSEIF list_item=2 THEN ! Calibrate tool2 ENDIF DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can select an item in the list. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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 a value for the time-out parameter \MaxTime when UIListView is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1056 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIListView ’(’ [[’\’Result ´:=´ <var or pers ( INOUT ) of btnres>] [’\’Header ´:=´ <expression ( IN ) of string>] ’,’] [ListItems ´=´] <array {*} ( IN ) of listitem> [’\’Buttons ´:=´ <expression ( IN ) of buttondata>] | [’\’BtnArray ´:=´<array {*} ( IN ) of string>] [’\’Icon ’:=’ <expression ( IN ) of icondata>] [’\’DefaultIndex ´:=´<expression ( IN ) of num>] [’\’MaxTime ´:=´ <expression ( IN ) of num>] [’\’DIBreak ´:=´ <variable ( VAR ) of signaldi>] [’\’DOBreak ´:=´ <variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type num . 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 List item data structure listitem - List item data structure on page 1131 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 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
1,058
2 Functions 2.146. UIListView - User List View RobotWare - OS 1055 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. ! Operator answer IF list_item =1 THEN ! Calibrate tool1 ELSEIF list_item=2 THEN ! Calibrate tool2 ENDIF DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can select an item in the list. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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 a value for the time-out parameter \MaxTime when UIListView is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1056 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIListView ’(’ [[’\’Result ´:=´ <var or pers ( INOUT ) of btnres>] [’\’Header ´:=´ <expression ( IN ) of string>] ’,’] [ListItems ´=´] <array {*} ( IN ) of listitem> [’\’Buttons ´:=´ <expression ( IN ) of buttondata>] | [’\’BtnArray ´:=´<array {*} ( IN ) of string>] [’\’Icon ’:=’ <expression ( IN ) of icondata>] [’\’DefaultIndex ´:=´<expression ( IN ) of num>] [’\’MaxTime ´:=´ <expression ( IN ) of num>] [’\’DIBreak ´:=´ <variable ( VAR ) of signaldi>] [’\’DOBreak ´:=´ <variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type num . 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 List item data structure listitem - List item data structure on page 1131 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1057 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.147. UIMessageBox - User Message Box type advanced Usage UIMessageBox ( 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 function UIMessageBox are illustrated below. See also More examples on page 1061 . Example 1 VAR btnres answer; CONST string my_message{5}:= ["Message Line 1","Message Line 2", "Message Line 3","Message Line 4","Message Line 5"]; CONST string my_buttons{2}:=["OK","Skip"]; ... answer:= UIMessageBox ( \Header:="UIMessageBox Header" \MsgArray:=my_message \BtnArray:=my_buttons \Icon:=iconInfo); IF answer = 1 THEN ! Operator selection OK ELSEIF answer = 2 THEN ! Operator selection Skip ELSE ! No such case defined ENDIF xx0500002409 ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,059
2 Functions 2.146. UIListView - User List View RobotWare - OS 3HAC 16581-1 Revision: J 1056 © Copyright 2004-2010 ABB. All rights reserved. Syntax UIListView ’(’ [[’\’Result ´:=´ <var or pers ( INOUT ) of btnres>] [’\’Header ´:=´ <expression ( IN ) of string>] ’,’] [ListItems ´=´] <array {*} ( IN ) of listitem> [’\’Buttons ´:=´ <expression ( IN ) of buttondata>] | [’\’BtnArray ´:=´<array {*} ( IN ) of string>] [’\’Icon ’:=’ <expression ( IN ) of icondata>] [’\’DefaultIndex ´:=´<expression ( IN ) of num>] [’\’MaxTime ´:=´ <expression ( IN ) of num>] [’\’DIBreak ´:=´ <variable ( VAR ) of signaldi>] [’\’DOBreak ´:=´ <variable ( VAR ) of signaldo>] [’\’BreakFlag ´:=´ <var or pers ( INOUT ) of errnum>]‘)’ A function with return value of the data type num . 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 List item data structure listitem - List item data structure on page 1131 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 System connected to FlexPendant etc. UIClientExist - Exist User Client on page 1037 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1057 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.147. UIMessageBox - User Message Box type advanced Usage UIMessageBox ( 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 function UIMessageBox are illustrated below. See also More examples on page 1061 . Example 1 VAR btnres answer; CONST string my_message{5}:= ["Message Line 1","Message Line 2", "Message Line 3","Message Line 4","Message Line 5"]; CONST string my_buttons{2}:=["OK","Skip"]; ... answer:= UIMessageBox ( \Header:="UIMessageBox Header" \MsgArray:=my_message \BtnArray:=my_buttons \Icon:=iconInfo); IF answer = 1 THEN ! Operator selection OK ELSEIF answer = 2 THEN ! Operator selection Skip ELSE ! No such case defined ENDIF xx0500002409 ![Image] Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1058 © Copyright 2004-2010 ABB. All rights reserved. Above message box is with icon, header, message, and user defined push buttons that are written on the FlexPendant display. Program execution waits until OK or Skip is pressed. In other words, answer will be assigned 1 (OK) or 2 (Skip) depending on which of the buttons is pressed (corresponding array index). NOTE! Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Return value Data type: btnres The numeric value of the button that is selected from the message box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. If function breaks via \BreakFlag or if \Buttons:=btnNone : • If parameter \DefaultBtn is specified, this index is returned. • If parameter \DefaultBtn is not specified, resUnkwn equal to 0 is returned. If function breaks via ERROR handler, there is no return value at all. Arguments UIMessageBox ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Buttons] | [\BtnArray] [\DefaultBtn] [\Icon] [\Image] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 55 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray will be concatenated to one string with single spaces between each individual string and spread out on as few lines as possible. Default, each string in the argument \MsgArray will be on separate line on the display. 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
1,060
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1057 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 2.147. UIMessageBox - User Message Box type advanced Usage UIMessageBox ( 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 function UIMessageBox are illustrated below. See also More examples on page 1061 . Example 1 VAR btnres answer; CONST string my_message{5}:= ["Message Line 1","Message Line 2", "Message Line 3","Message Line 4","Message Line 5"]; CONST string my_buttons{2}:=["OK","Skip"]; ... answer:= UIMessageBox ( \Header:="UIMessageBox Header" \MsgArray:=my_message \BtnArray:=my_buttons \Icon:=iconInfo); IF answer = 1 THEN ! Operator selection OK ELSEIF answer = 2 THEN ! Operator selection Skip ELSE ! No such case defined ENDIF xx0500002409 ![Image] Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1058 © Copyright 2004-2010 ABB. All rights reserved. Above message box is with icon, header, message, and user defined push buttons that are written on the FlexPendant display. Program execution waits until OK or Skip is pressed. In other words, answer will be assigned 1 (OK) or 2 (Skip) depending on which of the buttons is pressed (corresponding array index). NOTE! Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Return value Data type: btnres The numeric value of the button that is selected from the message box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. If function breaks via \BreakFlag or if \Buttons:=btnNone : • If parameter \DefaultBtn is specified, this index is returned. • If parameter \DefaultBtn is not specified, resUnkwn equal to 0 is returned. If function breaks via ERROR handler, there is no return value at all. Arguments UIMessageBox ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Buttons] | [\BtnArray] [\DefaultBtn] [\Icon] [\Image] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 55 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray will be concatenated to one string with single spaces between each individual string and spread out on as few lines as possible. Default, each string in the argument \MsgArray will be on separate line on the display. Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1059 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\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 1060 . Default, the system displays the OK button. [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. Max. 5 buttons with 42 characters each. [\DefaultBtn] Default Button Data type: btnres Allows to specify a value that should be returned if the message box is interrupted by \MaxTime , \DIBreak , or \DOBreak . It’s possible to specify the predefined symbolic constant of type btnres or any user defined value. See Predefined data on page 1060 . [\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 1060 . Default, no icon. [\Image] Data type: string The name of the image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown 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
1,061
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1058 © Copyright 2004-2010 ABB. All rights reserved. Above message box is with icon, header, message, and user defined push buttons that are written on the FlexPendant display. Program execution waits until OK or Skip is pressed. In other words, answer will be assigned 1 (OK) or 2 (Skip) depending on which of the buttons is pressed (corresponding array index). NOTE! Message Line 1 ... Message Line 5 are displayed on separate lines 1 to 5 (the switch \Wrap is not used). Return value Data type: btnres The numeric value of the button that is selected from the message box. If argument \Buttons is used, the predefined symbolic constants of type btnres is returned. If argument \BtnArray is used, the corresponding array index is returned. If function breaks via \BreakFlag or if \Buttons:=btnNone : • If parameter \DefaultBtn is specified, this index is returned. • If parameter \DefaultBtn is not specified, resUnkwn equal to 0 is returned. If function breaks via ERROR handler, there is no return value at all. Arguments UIMessageBox ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Buttons] | [\BtnArray] [\DefaultBtn] [\Icon] [\Image] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 55 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 55 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray will be concatenated to one string with single spaces between each individual string and spread out on as few lines as possible. Default, each string in the argument \MsgArray will be on separate line on the display. Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1059 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\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 1060 . Default, the system displays the OK button. [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. Max. 5 buttons with 42 characters each. [\DefaultBtn] Default Button Data type: btnres Allows to specify a value that should be returned if the message box is interrupted by \MaxTime , \DIBreak , or \DOBreak . It’s possible to specify the predefined symbolic constant of type btnres or any user defined value. See Predefined data on page 1060 . [\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 1060 . Default, no icon. [\Image] Data type: string The name of the image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown 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 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1060 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time, 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) then 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 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, 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. A new message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,062
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1059 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. [\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 1060 . Default, the system displays the OK button. [\BtnArray] Button Array Data type: string Own definition of push buttons stored in an array of strings. This function returns the array index when corresponding string is selected. Only one of parameter \Buttons or \BtnArray can be used at the same time. Max. 5 buttons with 42 characters each. [\DefaultBtn] Default Button Data type: btnres Allows to specify a value that should be returned if the message box is interrupted by \MaxTime , \DIBreak , or \DOBreak . It’s possible to specify the predefined symbolic constant of type btnres or any user defined value. See Predefined data on page 1060 . [\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 1060 . Default, no icon. [\Image] Data type: string The name of the image that should be used. To launch own images, the images has 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 loads the images. A demand on the system is that the RobotWare option FlexPendant Interface is used. The image that will be shown 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 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1060 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time, 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) then 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 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, 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. A new message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1061 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. !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 the function UIMessageBox are illustrated below. Example 1 VAR errnum err_var; VAR btnres answer; ... answer := UIMessageBox (\Header:= "Cycle step 3" \Message:="Continue with the calibration ?" \Buttons:=btnOKCancel \DefaultBtn:=resCancel \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); IF answer = resOK THEN ! OK from the operator ELSE ! Cancel from the operator or operation break TEST err_var CASE ERR_TP_MAXTIME: ! Time out CASE ERR_TP_DIBREAK: ! Input signal break DEFAULT: ! Not such case defined ENDTEST ENDIF The message box is displayed, and the operator can answer OK or Cancel. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason. 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
1,063
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1060 © Copyright 2004-2010 ABB. All rights reserved. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If no button is selected within this time, 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) then 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 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, 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. A new message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1061 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. !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 the function UIMessageBox are illustrated below. Example 1 VAR errnum err_var; VAR btnres answer; ... answer := UIMessageBox (\Header:= "Cycle step 3" \Message:="Continue with the calibration ?" \Buttons:=btnOKCancel \DefaultBtn:=resCancel \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); IF answer = resOK THEN ! OK from the operator ELSE ! Cancel from the operator or operation break TEST err_var CASE ERR_TP_MAXTIME: ! Time out CASE ERR_TP_DIBREAK: ! Input signal break DEFAULT: ! Not such case defined ENDTEST ENDIF The message box is displayed, and the operator can answer OK or Cancel. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason. Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1062 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UIMessageBox is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMessageBox´(´ [´\´Header´:=´ <expression ( IN ) of string>] [´\´Message´:=´ <expression ( IN ) of string>] | [´\´MsgArray´:=´<array {*} ( IN ) of string>] [´\´Wrap] [´\´Buttons´=´ <expression ( IN ) of buttondata>] | [´\´BtnArray´:=´<array {*}( IN ) of string>] [‘\’DefaultBtn´:=´<expression ( IN ) of btnres>] [‘\’Icon´:=´<expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type btnres . 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
1,064
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1061 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. !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 the function UIMessageBox are illustrated below. Example 1 VAR errnum err_var; VAR btnres answer; ... answer := UIMessageBox (\Header:= "Cycle step 3" \Message:="Continue with the calibration ?" \Buttons:=btnOKCancel \DefaultBtn:=resCancel \Icon:=iconInfo \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); IF answer = resOK THEN ! OK from the operator ELSE ! Cancel from the operator or operation break TEST err_var CASE ERR_TP_MAXTIME: ! Time out CASE ERR_TP_DIBREAK: ! Input signal break DEFAULT: ! Not such case defined ENDTEST ENDIF The message box is displayed, and the operator can answer OK or Cancel. The message box can also be interrupted with time out or break by digital input signal. In the program it’s possible to find out the reason. Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1062 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UIMessageBox is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMessageBox´(´ [´\´Header´:=´ <expression ( IN ) of string>] [´\´Message´:=´ <expression ( IN ) of string>] | [´\´MsgArray´:=´<array {*} ( IN ) of string>] [´\´Wrap] [´\´Buttons´=´ <expression ( IN ) of buttondata>] | [´\´BtnArray´:=´<array {*}( IN ) of string>] [‘\’DefaultBtn´:=´<expression ( IN ) of btnres>] [‘\’Icon´:=´<expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type btnres . Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1063 3HAC 16581-1 Revision: J © 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 basic UIMsgBox - User Message Dialog Box type basic on page 644 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
1,065
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 3HAC 16581-1 Revision: J 1062 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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, 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, 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, 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, the system variable ERRNO is set to ERR_TP_NO_CLIENT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UIMessageBox is frequently executed, for example in a loop. It can result in an unpredictable behavior of the system performance, like slow response of the FlexPendant. Syntax UIMessageBox´(´ [´\´Header´:=´ <expression ( IN ) of string>] [´\´Message´:=´ <expression ( IN ) of string>] | [´\´MsgArray´:=´<array {*} ( IN ) of string>] [´\´Wrap] [´\´Buttons´=´ <expression ( IN ) of buttondata>] | [´\´BtnArray´:=´<array {*}( IN ) of string>] [‘\’DefaultBtn´:=´<expression ( IN ) of btnres>] [‘\’Icon´:=´<expression ( IN ) of icondata>] [‘\’Image´:=´<expression ( IN ) of string>] [´\´MaxTime´:=´ <expression ( IN ) of num>] [´\´DIBreak´:=´ <variable ( VAR ) of signaldi>] [´\´DOBreak´:=´ <variable ( VAR ) of signaldo>] [´\´BreakFlag´:=´ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type btnres . Continued Continues on next page 2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1063 3HAC 16581-1 Revision: J © 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 basic UIMsgBox - User Message Dialog Box type basic on page 644 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 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1064 © Copyright 2004-2010 ABB. All rights reserved. 2.148. UINumEntry - User Number Entry Usage UINumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumEntry are illustrated below. See also More examples on page 1067 . Example 1 VAR num answer; ... answer := UINumEntry( \Header:="UINumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=5 \MinValue:=1 \MaxValue:=10 \AsInteger); FOR i FROM 1 TO answer DO produce_part; ENDFOR xx0500002412 Above numeric message box with icon, header, message, init-, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. The routine produce_part is then repeated the number of input times via the FlexPendant. ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,066
2 Functions 2.147. UIMessageBox - User Message Box type advanced RobotWare - OS 1063 3HAC 16581-1 Revision: J © 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 basic UIMsgBox - User Message Dialog Box type basic on page 644 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 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1064 © Copyright 2004-2010 ABB. All rights reserved. 2.148. UINumEntry - User Number Entry Usage UINumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumEntry are illustrated below. See also More examples on page 1067 . Example 1 VAR num answer; ... answer := UINumEntry( \Header:="UINumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=5 \MinValue:=1 \MaxValue:=10 \AsInteger); FOR i FROM 1 TO answer DO produce_part; ENDFOR xx0500002412 Above numeric message box with icon, header, message, init-, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. The routine produce_part is then repeated the number of input times via the FlexPendant. ![Image] Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1065 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: num This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler, no return value at all. Arguments UINumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1067 . Default no icon. [\InitValue] Data type: num Initial value that is displayed in the entry box. 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
1,067
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1064 © Copyright 2004-2010 ABB. All rights reserved. 2.148. UINumEntry - User Number Entry Usage UINumEntry ( User Interaction Number Entry ) is used to let the operator enter a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who answers with a numeric value. The numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumEntry are illustrated below. See also More examples on page 1067 . Example 1 VAR num answer; ... answer := UINumEntry( \Header:="UINumEntry Header" \Message:="How many units should be produced?" \Icon:=iconInfo \InitValue:=5 \MinValue:=1 \MaxValue:=10 \AsInteger); FOR i FROM 1 TO answer DO produce_part; ENDFOR xx0500002412 Above numeric message box with icon, header, message, init-, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator selects an integer within the value range. Program execution waits until OK is pressed and then the selected numerical value is returned. The routine produce_part is then repeated the number of input times via the FlexPendant. ![Image] Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1065 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: num This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler, no return value at all. Arguments UINumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1067 . Default no icon. [\InitValue] Data type: num Initial value that is displayed in the entry box. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1066 © Copyright 2004-2010 ABB. All rights reserved. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. 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
1,068
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1065 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Return value Data type: num This function returns the input numeric value. If function breaks via \BreakFlag : • If parameter \ InitValue is specified, this value is returned • If parameter \ InitValue is not specified, value 0 is returned. If function breaks via ERROR handler, no return value at all. Arguments UINumEntry ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] [\InitValue] [\MinValue] [\MaxValue] [\AsInteger] [\MaxTime] [\DIBreak] [\DOBreak] \BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 9 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on a separate line on the display. [\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 1067 . Default no icon. [\InitValue] Data type: num Initial value that is displayed in the entry box. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1066 © Copyright 2004-2010 ABB. All rights reserved. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1067 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and presses OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level take focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumEntry are illustrated below. Example 1 VAR errnum err_var; VAR num answer; VAR num distance; ... answer := UINumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. 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
1,069
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1066 © Copyright 2004-2010 ABB. All rights reserved. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\AsInteger] Data type: switch Eliminates the decimal point from the number pad to ensure that the return value is an integer. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1067 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and presses OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level take focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumEntry are illustrated below. Example 1 VAR errnum err_var; VAR num answer; VAR num distance; ... answer := UINumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1068 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater then the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. • If the initial value (parameter \InitValue ) is not an integer as specified in the parameter \AsInteger then the system variable ERRNO is set to ERR_UI_NOTINT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumEntry is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of 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
1,070
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1067 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric message box with numeric pad, icon, header, message lines, init-, max-, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has entered an approved numeric value and presses OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level take focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumEntry are illustrated below. Example 1 VAR errnum err_var; VAR num answer; VAR num distance; ... answer := UINumEntry (\Header:= "BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo \InitValue:=5 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0 ! Operator answer distance := answer; DEFAULT: ! Not such case defined ENDTEST The message box is displayed and the operator can enter a numeric value and press OK. The message box can also be interrupted with a time out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1068 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater then the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. • If the initial value (parameter \InitValue ) is not an integer as specified in the parameter \AsInteger then the system variable ERRNO is set to ERR_UI_NOTINT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumEntry is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1069 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UINumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of num>] [´\´MinValue’:=’<expression ( IN ) of num>] [´\´MaxValue’:=’<expression ( IN ) of num>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type num . Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 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 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
1,071
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 3HAC 16581-1 Revision: J 1068 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater then the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. • If the initial value (parameter \InitValue ) is not an integer as specified in the parameter \AsInteger then the system variable ERRNO is set to ERR_UI_NOTINT and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumEntry is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Continued Continues on next page 2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1069 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UINumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of num>] [´\´MinValue’:=’<expression ( IN ) of num>] [´\´MaxValue’:=’<expression ( IN ) of num>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type num . Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1070 © Copyright 2004-2010 ABB. All rights reserved. 2.149. UINumTune - User Number Tune Usage UINumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumTune are illustrated below. See also More examples on page 1073 . Example 1 VAR num flow; ... flow := UINumTune( \Header:="UINumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 2.5, 0.1 \MinValue:=1.5 \MaxValue:=3.5); xx0500002414 ![Image] Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,072
2 Functions 2.148. UINumEntry - User Number Entry RobotWare - OS 1069 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax UINumEntry´(´ [´\´Header´:=´ <expression ( IN ) of string>] [Message’:=’ <expression ( IN ) of string> ] | [´\´MsgArray’:=’<array {*} ( IN ) of string>] [´\´Wrap] [´\´Icon’:=’ <expression ( IN ) of icondata>] [´\´InitValue’:=’<expression ( IN ) of num>] [´\´MinValue’:=’<expression ( IN ) of num>] [´\´MaxValue’:=’<expression ( IN ) of num>] [´\´AsInteger] [´\´MaxTime’:=’ <expression ( IN ) of num>] [\´DIBreak’:=’ <variable ( VAR ) of signaldi>] [´\´DOBreak’:=’ <variable ( VAR ) of signaldo>] [´\´BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ´)´ A function with return value of the data type num . Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced on page 1057 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1070 © Copyright 2004-2010 ABB. All rights reserved. 2.149. UINumTune - User Number Tune Usage UINumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumTune are illustrated below. See also More examples on page 1073 . Example 1 VAR num flow; ... flow := UINumTune( \Header:="UINumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 2.5, 0.1 \MinValue:=1.5 \MaxValue:=3.5); xx0500002414 ![Image] Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1071 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above numeric tune message box with icon, header, message, init-, increment, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator tune the flow value with step 0.1 from init value 2.5 is within the value range 1.5 .. 3.5. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: num This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UINumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on separate line on the display. [\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 1073 . Default no icon. 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
1,073
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1070 © Copyright 2004-2010 ABB. All rights reserved. 2.149. UINumTune - User Number Tune Usage UINumTune ( User Interaction Number Tune ) is used to let the operator tune a numeric value from the available user device, such as the FlexPendant. A message is written to the operator, who tunes a numeric value. The tuned numeric value is then checked, approved and transferred back to the program. Basic examples Basic examples of the function UINumTune are illustrated below. See also More examples on page 1073 . Example 1 VAR num flow; ... flow := UINumTune( \Header:="UINumTune Header" \Message:="Tune the flow?" \Icon:=iconInfo, 2.5, 0.1 \MinValue:=1.5 \MaxValue:=3.5); xx0500002414 ![Image] Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1071 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above numeric tune message box with icon, header, message, init-, increment, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator tune the flow value with step 0.1 from init value 2.5 is within the value range 1.5 .. 3.5. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: num This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UINumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on separate line on the display. [\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 1073 . Default no icon. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1072 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: num Initial value that is displayed in the entry box. Increment Data type: num This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. 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
1,074
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1071 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Above numeric tune message box with icon, header, message, init-, increment, max-, and minvalue are written on the FlexPendant display. The message box checks that the operator tune the flow value with step 0.1 from init value 2.5 is within the value range 1.5 .. 3.5. Program execution waits until OK is pressed and then the selected numerical value is returned and stored in the variable flow . Return value Data type: num This function returns the tuned numeric value. If function breaks via \BreakFlag , the specified InitValue is returned. If function breaks via ERROR handler, no return value is returned at all. Arguments UINumTune ( [\Header] [\Message] | [\MsgArray] [\Wrap] [\Icon] InitValue Increment [\MinValue] [\MaxValue] [\MaxTime] [\DIBreak] [\DOBreak] [\BreakFlag] ) [\Header] Data type: string Header text to be written at the top of the message box. Max. 40 characters. [\Message] Data type: string One text line to be written on the display. Max 40 characters. [\MsgArray] Message Array Data type: string Several text lines from an array to be written on the display. Only one of parameter \Message or \MsgArray can be used at the same time. Max. layout space is 11 lines with 40 characters each. [\Wrap] Data type: switch If selected, all the specified strings in the argument \MsgArray 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 string in the argument \MsgArray will be on separate line on the display. [\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 1073 . Default no icon. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1072 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: num Initial value that is displayed in the entry box. Increment Data type: num This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1073 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumTune are illustrated below. Example 1 VAR errnum err_var; VAR num tune_answer; VAR num distance; ... tune_answer := UINumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! Not such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with time-out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. 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
1,075
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1072 © Copyright 2004-2010 ABB. All rights reserved. InitValue Initial Value Data type: num Initial value that is displayed in the entry box. Increment Data type: num This parameter specifies how much the value should change when the plus or minus button is pressed. [\MinValue] Data type: num The minimum value for the return value. [\MaxValue] Data type: num The maximum value for the return value. [\MaxTime] Data type: num The maximum amount of time in seconds that program execution waits. If the OK button is not pressed within this time, 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 the OK button is not pressed before 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_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 the OK button is not pressed before 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 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, the error handler will be executed. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1073 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumTune are illustrated below. Example 1 VAR errnum err_var; VAR num tune_answer; VAR num distance; ... tune_answer := UINumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! Not such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with time-out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1074 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator, 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, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumTune is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Syntax UINumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of num> ’,’ [Increment’:=’ ] <expression ( IN ) of num> [’\’MinValue’:=’<expression ( IN ) of num>] [’\’MaxValue’:=’<expression( IN ) of num>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type 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
1,076
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1073 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Program execution The numeric tune message box with tune +/- buttons, icon, header, message lines, init-, increment, max, and minvalue are displayed according to the programmed arguments. Program execution waits until the user has tuned the numeric value and pressed OK or the message box is interrupted by time-out or signal action. The input numeric value and interrupt reason are transferred back to the program. New message box on TRAP level takes focus from message box on basic level. Predefined data !Icons: CONST icondata iconNone := 0; CONST icondata iconInfo := 1; CONST icondata iconWarning := 2; CONST icondata iconError := 3; More examples More examples of the function UINumTune are illustrated below. Example 1 VAR errnum err_var; VAR num tune_answer; VAR num distance; ... tune_answer := UINumTune (\Header:=" BWD move on path" \Message:="Enter the path overlap ?" \Icon:=iconInfo, 5, 1 \MinValue:=0 \MaxValue:=10 \MaxTime:=60 \DIBreak:=di5 \BreakFlag:=err_var); TEST err_var CASE ERR_TP_MAXTIME: CASE ERR_TP_DIBREAK: ! No operator answer distance := 5; CASE 0: ! Operator answer distance := tune_answer; DEFAULT: ! Not such case defined ENDTEST The tune message box is displayed and the operator can tune the numeric value and press OK. The message box can also be interrupted with time-out or break by digital input signal. In the program it’s possible to find out the reason and take the appropriate action. Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1074 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator, 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, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumTune is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Syntax UINumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of num> ’,’ [Increment’:=’ ] <expression ( IN ) of num> [’\’MinValue’:=’<expression ( IN ) of num>] [’\’MaxValue’:=’<expression( IN ) of num>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type num . Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1075 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 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 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
1,077
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 3HAC 16581-1 Revision: J 1074 © Copyright 2004-2010 ABB. All rights reserved. Error handling If parameter \BreakFlag is not used then these situations can be dealt with by the error handler: • If there is a time-out (parameter \MaxTime ) before an input from the operator, 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, 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, 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. • If the initial value (parameter \InitValue ) is not specified within the range of the minimum and maximum value (parameters \MinValue and \MaxValue ) then the system variable ERRNO is set to ERR_UI_INITVALUE and the execution continues in the error handler. • If the minimum value (parameter \MinValue ) is greater than the maximum value (parameter \MaxValue ) then the system variable ERRNO is set to ERR_UI_MAXMIN and the execution continues in the error handler. Limitations Avoid using too small a value for the time-out parameter \MaxTime when UINumTune is frequently executed, for example in a loop. It can result in unpredictable behavior from the system performance, like slow response of the FlexPendant. Syntax UINumTune’(’ [’\’Header’:=’ <expression ( IN ) of string>] [’\’Message’:=’ <expression ( IN ) of string> ] | [‘\’MsgArray’:=’<array {*} ( IN ) of string>] [’\’Wrap] [’\’Icon’:=’ <expression ( IN ) of icondata>] ’,’] [InitValue’:=’ ] <expression ( IN ) of num> ’,’ [Increment’:=’ ] <expression ( IN ) of num> [’\’MinValue’:=’<expression ( IN ) of num>] [’\’MaxValue’:=’<expression( IN ) of num>] [’\’MaxTime’:=’ <expression ( IN ) of num>] [’\’DIBreak’:=’ <variable ( VAR ) of signaldi>] [’\’DOBreak’:=’ <variable ( VAR ) of signaldo>] [’\’BreakFlag’:=’ <var or pers ( INOUT ) of errnum>] ’)’ A function with return value of the data type num . Continued Continues on next page 2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1075 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 3HAC 16581-1 Revision: J 1076 © Copyright 2004-2010 ABB. All rights reserved. 2.150. ValidIO - Valid I/O signal to access Usage ValidIO is used to check if the specified I/O signal can be accessed without any error at present. Basic examples Basic examples of the function ValidIO are illustrated below. Example 1 IF ValidIO(mydosignal) SetDO mydosignal, 1; Set the digital output signal mydosignal to 1 if it’s I/O unit is up and running. Return value Data type: bool Returns TRUE is valid signal and the I/O unit for the signal is up and running, else FALSE . Arguments ValidIO (Signal) Signal Data type: signalxx The signal name. Must be of data type signaldo, signaldi, signalgo, signalgi, signalao or signalai . Program execution Execution behaviour: • Check if valid I/O signal • Check if the I/O unit for the signal is up and running. No error messages are generated. Syntax ValidIO ’(’ [Signal ’:=’] <variable ( VAR ) of anytype> ’)’ A function with a return value of the data type bool . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,078
2 Functions 2.149. UINumTune - User Number Tune RobotWare - OS 1075 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Icon display data icondata - Icon display data on page 1121 User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic on page 644 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 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 Clean up the Operator window TPErase - Erases text printed on the FlexPendant on page 556 Continued 2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 3HAC 16581-1 Revision: J 1076 © Copyright 2004-2010 ABB. All rights reserved. 2.150. ValidIO - Valid I/O signal to access Usage ValidIO is used to check if the specified I/O signal can be accessed without any error at present. Basic examples Basic examples of the function ValidIO are illustrated below. Example 1 IF ValidIO(mydosignal) SetDO mydosignal, 1; Set the digital output signal mydosignal to 1 if it’s I/O unit is up and running. Return value Data type: bool Returns TRUE is valid signal and the I/O unit for the signal is up and running, else FALSE . Arguments ValidIO (Signal) Signal Data type: signalxx The signal name. Must be of data type signaldo, signaldi, signalgo, signalgi, signalao or signalai . Program execution Execution behaviour: • Check if valid I/O signal • Check if the I/O unit for the signal is up and running. No error messages are generated. Syntax ValidIO ’(’ [Signal ’:=’] <variable ( VAR ) of anytype> ’)’ A function with a return value of the data type bool . Continues on next page 2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 1077 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Define I/O signal with alias name AliasIO - Define I/O signal with alias name on page 21 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,079
2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 3HAC 16581-1 Revision: J 1076 © Copyright 2004-2010 ABB. All rights reserved. 2.150. ValidIO - Valid I/O signal to access Usage ValidIO is used to check if the specified I/O signal can be accessed without any error at present. Basic examples Basic examples of the function ValidIO are illustrated below. Example 1 IF ValidIO(mydosignal) SetDO mydosignal, 1; Set the digital output signal mydosignal to 1 if it’s I/O unit is up and running. Return value Data type: bool Returns TRUE is valid signal and the I/O unit for the signal is up and running, else FALSE . Arguments ValidIO (Signal) Signal Data type: signalxx The signal name. Must be of data type signaldo, signaldi, signalgo, signalgi, signalao or signalai . Program execution Execution behaviour: • Check if valid I/O signal • Check if the I/O unit for the signal is up and running. No error messages are generated. Syntax ValidIO ’(’ [Signal ’:=’] <variable ( VAR ) of anytype> ’)’ A function with a return value of the data type bool . Continues on next page 2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 1077 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Define I/O signal with alias name AliasIO - Define I/O signal with alias name on page 21 Continued 2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 3HAC 16581-1 Revision: J 1078 © Copyright 2004-2010 ABB. All rights reserved. 2.151. ValToStr - Converts a value to a string Usage ValToStr ( Value To String ) is used to convert a value of any data type to a string. Basic examples Basic examples of the function ValToStr are illustrated below. Example 1 VAR string str; VAR pos p := [100,200,300]; str := ValToStr(p); The variable str is given the value "[100,200,300]" . Example 2 str := ValToStr(TRUE); The variable str is given the value " TRUE ". Example 3 str := ValToStr(1.234567890123456789); The variable str is given the value "1.23456789012346" . Example 4 VAR num numtype:=1.234567890123456789; str := ValToStr(numtype); The variable str is given the value "1.23457" . Example 5 VAR dnum dnumtype:=1.234567890123456789; str := ValToStr(dnumtype); The variable str is given the value "1.23456789012346" . Return value Data type: string The value is converted to a string with standard RAPID format. This means, in principle, 6 significant digits. Literal value interpreted as a dnum (see example 3) and dnum variabels (see example 5) though have 15 significant digits. A runtime error is generated if the resulting string is too long. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,080
2 Functions 2.150. ValidIO - Valid I/O signal to access RobotWare - OS 1077 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters Define I/O signal with alias name AliasIO - Define I/O signal with alias name on page 21 Continued 2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 3HAC 16581-1 Revision: J 1078 © Copyright 2004-2010 ABB. All rights reserved. 2.151. ValToStr - Converts a value to a string Usage ValToStr ( Value To String ) is used to convert a value of any data type to a string. Basic examples Basic examples of the function ValToStr are illustrated below. Example 1 VAR string str; VAR pos p := [100,200,300]; str := ValToStr(p); The variable str is given the value "[100,200,300]" . Example 2 str := ValToStr(TRUE); The variable str is given the value " TRUE ". Example 3 str := ValToStr(1.234567890123456789); The variable str is given the value "1.23456789012346" . Example 4 VAR num numtype:=1.234567890123456789; str := ValToStr(numtype); The variable str is given the value "1.23457" . Example 5 VAR dnum dnumtype:=1.234567890123456789; str := ValToStr(dnumtype); The variable str is given the value "1.23456789012346" . Return value Data type: string The value is converted to a string with standard RAPID format. This means, in principle, 6 significant digits. Literal value interpreted as a dnum (see example 3) and dnum variabels (see example 5) though have 15 significant digits. A runtime error is generated if the resulting string is too long. Continues on next page 2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 1079 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments ValToStr ( Val ) Val Value Data type: anytype A value of any data type. All types of value data with structure atomic, record, record component, array, or array element can be used. Syntax ValToStr’(’ [ Val ’:=’ ] <expression ( IN ) of anytype> ’)’ A function with a return value of the data type string . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,081
2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 3HAC 16581-1 Revision: J 1078 © Copyright 2004-2010 ABB. All rights reserved. 2.151. ValToStr - Converts a value to a string Usage ValToStr ( Value To String ) is used to convert a value of any data type to a string. Basic examples Basic examples of the function ValToStr are illustrated below. Example 1 VAR string str; VAR pos p := [100,200,300]; str := ValToStr(p); The variable str is given the value "[100,200,300]" . Example 2 str := ValToStr(TRUE); The variable str is given the value " TRUE ". Example 3 str := ValToStr(1.234567890123456789); The variable str is given the value "1.23456789012346" . Example 4 VAR num numtype:=1.234567890123456789; str := ValToStr(numtype); The variable str is given the value "1.23457" . Example 5 VAR dnum dnumtype:=1.234567890123456789; str := ValToStr(dnumtype); The variable str is given the value "1.23456789012346" . Return value Data type: string The value is converted to a string with standard RAPID format. This means, in principle, 6 significant digits. Literal value interpreted as a dnum (see example 3) and dnum variabels (see example 5) though have 15 significant digits. A runtime error is generated if the resulting string is too long. Continues on next page 2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 1079 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments ValToStr ( Val ) Val Value Data type: anytype A value of any data type. All types of value data with structure atomic, record, record component, array, or array element can be used. Syntax ValToStr’(’ [ Val ’:=’ ] <expression ( IN ) of anytype> ’)’ A function with a return value of the data type string . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1080 © Copyright 2004-2010 ABB. All rights reserved. 2.152. VectMagn - Magnitude of a pos vector Usage VectMagn ( Vector Magnitude ) is used to calculate the magnitude of a pos vector. Basic examples Basic examples of the function VectMagn are illustrated below. Example 1 xx0500002446 A vector A can be written as the sum of its components in the three orthogonal directions: . The magnitude of A is: . The vector is described by the data type pos and the magnitude by the data type num : VAR num magnitude; VAR pos vector; ... vector := [1,1,1]; magnitude := VectMagn(vector); Return value Data type: num The magnitude of the vector (data type pos ). Arguments VectMagn (Vector) Vector Data type: pos The vector described by the data type pos . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,082
2 Functions 2.151. ValToStr - Converts a value to a string RobotWare - OS 1079 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Arguments ValToStr ( Val ) Val Value Data type: anytype A value of any data type. All types of value data with structure atomic, record, record component, array, or array element can be used. Syntax ValToStr’(’ [ Val ’:=’ ] <expression ( IN ) of anytype> ’)’ A function with a return value of the data type string . Related information For information about See String functions Technical reference manual - RAPID overview , section RAPID summary - String functions Definition of string string - Strings on page 1195 String values Technical reference manual - RAPID overview , section Basic characteristics - Basic elements Continued 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1080 © Copyright 2004-2010 ABB. All rights reserved. 2.152. VectMagn - Magnitude of a pos vector Usage VectMagn ( Vector Magnitude ) is used to calculate the magnitude of a pos vector. Basic examples Basic examples of the function VectMagn are illustrated below. Example 1 xx0500002446 A vector A can be written as the sum of its components in the three orthogonal directions: . The magnitude of A is: . The vector is described by the data type pos and the magnitude by the data type num : VAR num magnitude; VAR pos vector; ... vector := [1,1,1]; magnitude := VectMagn(vector); Return value Data type: num The magnitude of the vector (data type pos ). Arguments VectMagn (Vector) Vector Data type: pos The vector described by the data type pos . Continues on next page 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 1081 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax VectMagn’(’ [Vector ’:=’] <expression ( IN ) of pos> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,083
2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1080 © Copyright 2004-2010 ABB. All rights reserved. 2.152. VectMagn - Magnitude of a pos vector Usage VectMagn ( Vector Magnitude ) is used to calculate the magnitude of a pos vector. Basic examples Basic examples of the function VectMagn are illustrated below. Example 1 xx0500002446 A vector A can be written as the sum of its components in the three orthogonal directions: . The magnitude of A is: . The vector is described by the data type pos and the magnitude by the data type num : VAR num magnitude; VAR pos vector; ... vector := [1,1,1]; magnitude := VectMagn(vector); Return value Data type: num The magnitude of the vector (data type pos ). Arguments VectMagn (Vector) Vector Data type: pos The vector described by the data type pos . Continues on next page 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 1081 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax VectMagn’(’ [Vector ’:=’] <expression ( IN ) of pos> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Continued 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1082 © Copyright 2004-2010 ABB. All rights reserved.
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,084
2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 1081 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Syntax VectMagn’(’ [Vector ’:=’] <expression ( IN ) of pos> ’)’ A function with a return value of the data type num . Related information For information about See Mathematical instructions and functions Technical reference manual - RAPID overview , section RAPID summary - Mathematics Continued 2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1082 © Copyright 2004-2010 ABB. All rights reserved. 3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 1083 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3 Data types 3.1. aiotrigg - Analog I/O trigger condition Usage aiotrigg ( Analog I/O Trigger ) is used to define the condition to generate an interrupt for an analog input or output signal. Description Data of the type aiotrigg defines the way a low and a high threshold will be used to determine whether the logical value of an analog signal satisfies a condition to generate an interrupt. Basic examples Basic examples of the data type aiotrigg are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Predefined data The following symbolic constants of the data type aiotrigg are predefined and can be used when specifying a condition for the instructions ISignalAI and ISignalAO . Characteristics aiotrigg is an alias data type for num and consequently inherits its characteristics. Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,085
2 Functions 2.152. VectMagn - Magnitude of a pos vector RobotWare - OS 3HAC 16581-1 Revision: J 1082 © Copyright 2004-2010 ABB. All rights reserved. 3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 1083 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3 Data types 3.1. aiotrigg - Analog I/O trigger condition Usage aiotrigg ( Analog I/O Trigger ) is used to define the condition to generate an interrupt for an analog input or output signal. Description Data of the type aiotrigg defines the way a low and a high threshold will be used to determine whether the logical value of an analog signal satisfies a condition to generate an interrupt. Basic examples Basic examples of the data type aiotrigg are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Predefined data The following symbolic constants of the data type aiotrigg are predefined and can be used when specifying a condition for the instructions ISignalAI and ISignalAO . Characteristics aiotrigg is an alias data type for num and consequently inherits its characteristics. Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continues on next page 3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 3HAC 16581-1 Revision: J 1084 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,086
3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 1083 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3 Data types 3.1. aiotrigg - Analog I/O trigger condition Usage aiotrigg ( Analog I/O Trigger ) is used to define the condition to generate an interrupt for an analog input or output signal. Description Data of the type aiotrigg defines the way a low and a high threshold will be used to determine whether the logical value of an analog signal satisfies a condition to generate an interrupt. Basic examples Basic examples of the data type aiotrigg are illustrated below. Example 1 VAR intnum sig1int; CONNECT sig1int WITH iroutine1; ISignalAI \Single, ai1, AIO_BETWEEN, 1.5, 0.5, 0, sig1int; Orders an interrupt which is to occur the first time the logical value of the analog input signal ai1 is between 0.5 and 1.5 . A call is then made to the iroutine1 trap routine. Predefined data The following symbolic constants of the data type aiotrigg are predefined and can be used when specifying a condition for the instructions ISignalAI and ISignalAO . Characteristics aiotrigg is an alias data type for num and consequently inherits its characteristics. Value Symbolic constant Comment 1 AIO_ABOVE_HIGH Signal will generate interrupts if above specified high value 2 AIO_BELOW_HIGH Signal will generate interrupts if below specified high value 3 AIO_ABOVE_LOW Signal will generate interrupts if above specified low value 4 AIO_BELOW_LOW Signal will generate interrupts if below specified low value 5 AIO_BETWEEN Signal will generate interrupts if between specified low and high values 6 AIO_OUTSIDE Signal will generate interrupts if below specified low value or above specified high value 7 AIO_ALWAYS Signal will always generate interrupts Continues on next page 3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 3HAC 16581-1 Revision: J 1084 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued 3 Data types 3.2. bool - Logical values RobotWare - OS 1085 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.2. bool - Logical values Usage bool is used for logical values (true/false). Description The value of data of the type bool can be either TRUE or FALSE . Basic examples Basic examples of the data type bool are illustrated below. Example 1 flag1 := TRUE; flag is assigned the value TRUE. Example 2 VAR bool highvalue; VAR num reg1; ... highvalue := reg1 > 100; highvalue is assigned the value TRUE if reg1 is greater than 100 ; otherwise, FALSE is assigned. Example 3 IF highvalue Set do1; The do1 signal is set if highvalue is TRUE . Example 4 highvalue := reg1 > 100; mediumvalue := reg1 > 20 AND NOT highvalue; mediumvalue is assigned the value TRUE if reg1 is between 20 and 100 . Related information For information about See Logical expressions Technical reference manual - RAPID overview , section Basic characteristics - Expressions Operations using logical values Technical reference manual - RAPID overview , section Basic characteristics - Expressions
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,087
3 Data types 3.1. aiotrigg - Analog I/O trigger condition RobotWare - OS 3HAC 16581-1 Revision: J 1084 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Interrupt from analog input signal ISignalAI - Interrupts from analog input signal on page 171 Interrupt from analog output signal ISignalAO - Interrupts from analog output signal on page 182 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued 3 Data types 3.2. bool - Logical values RobotWare - OS 1085 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.2. bool - Logical values Usage bool is used for logical values (true/false). Description The value of data of the type bool can be either TRUE or FALSE . Basic examples Basic examples of the data type bool are illustrated below. Example 1 flag1 := TRUE; flag is assigned the value TRUE. Example 2 VAR bool highvalue; VAR num reg1; ... highvalue := reg1 > 100; highvalue is assigned the value TRUE if reg1 is greater than 100 ; otherwise, FALSE is assigned. Example 3 IF highvalue Set do1; The do1 signal is set if highvalue is TRUE . Example 4 highvalue := reg1 > 100; mediumvalue := reg1 > 20 AND NOT highvalue; mediumvalue is assigned the value TRUE if reg1 is between 20 and 100 . Related information For information about See Logical expressions Technical reference manual - RAPID overview , section Basic characteristics - Expressions Operations using logical values Technical reference manual - RAPID overview , section Basic characteristics - Expressions 3 Data types 3.3. btnres - Push button result data RobotWare - OS 3HAC 16581-1 Revision: J 1086 © Copyright 2004-2010 ABB. All rights reserved. 3.3. btnres - Push button result data Usage btnres ( button result ) is used for representing the user selection of the push button display on the User Device such as the FlexPendant. Description A btnres constant is intended to be used when checking the result value from the instruction UIMsgBox and the return value from the functions UIMessageBox and UIListView . Basic examples Basic examples of the data type btnres are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSEIF answer =ResNo THEN ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button on the user interface. The user selection will be stored in the variable answer . Predefined data The following constants of the data type btnres are predefined in the system It is possible to work with user defined push buttons that answer with the functions UIMessageBox and UIListView . Characteristics btnres is an alias data type for num and consequently inherits its characteristics. Value Constants Button answer 0 resUnkwn Unknown result 1 resOK OK 2 resAbort Abort 3 resRetry Retry 4 resIgnore Ignore 5 resCancel Cancel 6 resYes Yes 7 resNo No Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,088
3 Data types 3.2. bool - Logical values RobotWare - OS 1085 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.2. bool - Logical values Usage bool is used for logical values (true/false). Description The value of data of the type bool can be either TRUE or FALSE . Basic examples Basic examples of the data type bool are illustrated below. Example 1 flag1 := TRUE; flag is assigned the value TRUE. Example 2 VAR bool highvalue; VAR num reg1; ... highvalue := reg1 > 100; highvalue is assigned the value TRUE if reg1 is greater than 100 ; otherwise, FALSE is assigned. Example 3 IF highvalue Set do1; The do1 signal is set if highvalue is TRUE . Example 4 highvalue := reg1 > 100; mediumvalue := reg1 > 20 AND NOT highvalue; mediumvalue is assigned the value TRUE if reg1 is between 20 and 100 . Related information For information about See Logical expressions Technical reference manual - RAPID overview , section Basic characteristics - Expressions Operations using logical values Technical reference manual - RAPID overview , section Basic characteristics - Expressions 3 Data types 3.3. btnres - Push button result data RobotWare - OS 3HAC 16581-1 Revision: J 1086 © Copyright 2004-2010 ABB. All rights reserved. 3.3. btnres - Push button result data Usage btnres ( button result ) is used for representing the user selection of the push button display on the User Device such as the FlexPendant. Description A btnres constant is intended to be used when checking the result value from the instruction UIMsgBox and the return value from the functions UIMessageBox and UIListView . Basic examples Basic examples of the data type btnres are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSEIF answer =ResNo THEN ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button on the user interface. The user selection will be stored in the variable answer . Predefined data The following constants of the data type btnres are predefined in the system It is possible to work with user defined push buttons that answer with the functions UIMessageBox and UIListView . Characteristics btnres is an alias data type for num and consequently inherits its characteristics. Value Constants Button answer 0 resUnkwn Unknown result 1 resOK OK 2 resAbort Abort 3 resRetry Retry 4 resIgnore Ignore 5 resCancel Cancel 6 resYes Yes 7 resNo No Continues on next page 3 Data types 3.3. btnres - Push button result data RobotWare - OS 1087 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button data buttondata - Push button data on page 1089 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,089
3 Data types 3.3. btnres - Push button result data RobotWare - OS 3HAC 16581-1 Revision: J 1086 © Copyright 2004-2010 ABB. All rights reserved. 3.3. btnres - Push button result data Usage btnres ( button result ) is used for representing the user selection of the push button display on the User Device such as the FlexPendant. Description A btnres constant is intended to be used when checking the result value from the instruction UIMsgBox and the return value from the functions UIMessageBox and UIListView . Basic examples Basic examples of the data type btnres are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSEIF answer =ResNo THEN ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button on the user interface. The user selection will be stored in the variable answer . Predefined data The following constants of the data type btnres are predefined in the system It is possible to work with user defined push buttons that answer with the functions UIMessageBox and UIListView . Characteristics btnres is an alias data type for num and consequently inherits its characteristics. Value Constants Button answer 0 resUnkwn Unknown result 1 resOK OK 2 resAbort Abort 3 resRetry Retry 4 resIgnore Ignore 5 resCancel Cancel 6 resYes Yes 7 resNo No Continues on next page 3 Data types 3.3. btnres - Push button result data RobotWare - OS 1087 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button data buttondata - Push button data on page 1089 Continued 3 Data types 3.4. busstate - State of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 1088 © Copyright 2004-2010 ABB. All rights reserved. 3.4. busstate - State of I/O bus Usage busstate is used to mirror which state an I/O bus is currently in. Description A busstate constant is intended to be used when checking the return value from the instruction IOBusState . Basic examples Basic example of the data type busstate is illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access some signal on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST Predefined data The predefined symbolic constants of the data type busstate can be viewed in instruction IOBusState . Characteristics busstate is an alias data type for num and consequently inherits its characteristics. Related information For information about See Get current state of I/O bus IOBusState - Get current state of I/O bus on page 156 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,090
3 Data types 3.3. btnres - Push button result data RobotWare - OS 1087 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button data buttondata - Push button data on page 1089 Continued 3 Data types 3.4. busstate - State of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 1088 © Copyright 2004-2010 ABB. All rights reserved. 3.4. busstate - State of I/O bus Usage busstate is used to mirror which state an I/O bus is currently in. Description A busstate constant is intended to be used when checking the return value from the instruction IOBusState . Basic examples Basic example of the data type busstate is illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access some signal on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST Predefined data The predefined symbolic constants of the data type busstate can be viewed in instruction IOBusState . Characteristics busstate is an alias data type for num and consequently inherits its characteristics. Related information For information about See Get current state of I/O bus IOBusState - Get current state of I/O bus on page 156 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters 3 Data types 3.5. buttondata - Push button data RobotWare - OS 1089 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.5. buttondata - Push button data Usage buttondata is used for representing a standard push button combination for display on the User Device such as the FlexPendant. Description A buttondata constant is used for representing response push buttons in instruction UIMsgBox and functions UIMessageBox and UIListView . Basic examples Basic examples of the data type buttondata are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSE ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button. Predefined data The following constants of the data type buttondata are predefined in the system. It is possible to display user defined push buttons with the functions UIMessageBox and UIListView . Characteristics buttondata is an alias data type for num and consequently inherits its characteristics. Value Constants Button displayed - 1 btnNone No button 0 btnOK OK 1 btnAbrtRtryIgn Abort, Retry and Ignore 2 btnOKCancel OK and Cancel 3 btnRetryCancel Retry and Cancel 4 btnYesNo Yes and No 5 btnYesNoCancel Yes, No and Cancel Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,091
3 Data types 3.4. busstate - State of I/O bus RobotWare - OS 3HAC 16581-1 Revision: J 1088 © Copyright 2004-2010 ABB. All rights reserved. 3.4. busstate - State of I/O bus Usage busstate is used to mirror which state an I/O bus is currently in. Description A busstate constant is intended to be used when checking the return value from the instruction IOBusState . Basic examples Basic example of the data type busstate is illustrated below. Example 1 VAR busstate bstate; IOBusState "IBS", bstate \Phys; TEST bstate CASE IOBUS_PHYS_STATE_RUNNING: ! Possible to access some signal on the IBS bus DEFAULT: ! Actions for not up and running IBS bus ENDTEST Predefined data The predefined symbolic constants of the data type busstate can be viewed in instruction IOBusState . Characteristics busstate is an alias data type for num and consequently inherits its characteristics. Related information For information about See Get current state of I/O bus IOBusState - Get current state of I/O bus on page 156 Input/Output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and Output Signals Input/Output functionality in general Technical reference manual - RAPID overview , section Motion and I/O Principles - I/O Principles Configuration of I/O Technical reference manual - System parameters 3 Data types 3.5. buttondata - Push button data RobotWare - OS 1089 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.5. buttondata - Push button data Usage buttondata is used for representing a standard push button combination for display on the User Device such as the FlexPendant. Description A buttondata constant is used for representing response push buttons in instruction UIMsgBox and functions UIMessageBox and UIListView . Basic examples Basic examples of the data type buttondata are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSE ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button. Predefined data The following constants of the data type buttondata are predefined in the system. It is possible to display user defined push buttons with the functions UIMessageBox and UIListView . Characteristics buttondata is an alias data type for num and consequently inherits its characteristics. Value Constants Button displayed - 1 btnNone No button 0 btnOK OK 1 btnAbrtRtryIgn Abort, Retry and Ignore 2 btnOKCancel OK and Cancel 3 btnRetryCancel Retry and Cancel 4 btnYesNo Yes and No 5 btnYesNoCancel Yes, No and Cancel Continues on next page 3 Data types 3.5. buttondata - Push button data RobotWare - OS 3HAC 16581-1 Revision: J 1090 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button result btnres - Push button result data on page 1086 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic Characteristics - Data Types Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,092
3 Data types 3.5. buttondata - Push button data RobotWare - OS 1089 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.5. buttondata - Push button data Usage buttondata is used for representing a standard push button combination for display on the User Device such as the FlexPendant. Description A buttondata constant is used for representing response push buttons in instruction UIMsgBox and functions UIMessageBox and UIListView . Basic examples Basic examples of the data type buttondata are illustrated below. Example 1 VAR btnres answer; UIMsgBox "More ?" \Buttons:=btnYesNo \Result:= answer; IF answer= resYes THEN ... ELSE ... ENDIF The standard button enumeration btnYesNo will give one Yes and one No push button. Predefined data The following constants of the data type buttondata are predefined in the system. It is possible to display user defined push buttons with the functions UIMessageBox and UIListView . Characteristics buttondata is an alias data type for num and consequently inherits its characteristics. Value Constants Button displayed - 1 btnNone No button 0 btnOK OK 1 btnAbrtRtryIgn Abort, Retry and Ignore 2 btnOKCancel OK and Cancel 3 btnRetryCancel Retry and Cancel 4 btnYesNo Yes and No 5 btnYesNoCancel Yes, No and Cancel Continues on next page 3 Data types 3.5. buttondata - Push button data RobotWare - OS 3HAC 16581-1 Revision: J 1090 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button result btnres - Push button result data on page 1086 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic Characteristics - Data Types Continued 3 Data types 3.6. byte - Integer values 0 - 255 RobotWare - OS 1091 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.6. byte - Integer values 0 - 255 Usage byte is used for integer values (0 - 255) according to the range of a byte. This data type is used in conjunction with instructions and functions that handle the bit manipulations and convert features. Description Data of the type byte represents an integer byte value. Basic examples Basic examples of the data type byte are illustrated below. Example 1 VAR byte data1 := 130; Definition of a variable data1 with a decimal value 130. Example 2 CONST num parity_bit := 8; VAR byte data1 := 130; BitClear data1, parity_bit; Bit number 8 ( parity_bit ) in the variable data1 will be set to 0, e.g. the content of the variable data1 will be changed from 130 to 2 (integer representation). Error handling If an argument of the type byte has a value that is not in the range between 0 and 255, an error is returned on program execution. Characteristics byte is an alias data type for num and consequently inherits its characteristics. Related information For information about See Alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Bit functions Technical reference manual - RAPID overview , section RAPID summary - Bit functions
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,093
3 Data types 3.5. buttondata - Push button data RobotWare - OS 3HAC 16581-1 Revision: J 1090 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See User Interaction Message Box UIMsgBox - User Message Dialog Box type basic on page 644 User Interaction Message Box UIMessageBox - User Message Box type advanced on page 1057 User Interaction List View UIListView - User List View on page 1050 Alias data type button result btnres - Push button result data on page 1086 Data types in general, alias data types Technical reference manual - RAPID overview , section Basic Characteristics - Data Types Continued 3 Data types 3.6. byte - Integer values 0 - 255 RobotWare - OS 1091 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.6. byte - Integer values 0 - 255 Usage byte is used for integer values (0 - 255) according to the range of a byte. This data type is used in conjunction with instructions and functions that handle the bit manipulations and convert features. Description Data of the type byte represents an integer byte value. Basic examples Basic examples of the data type byte are illustrated below. Example 1 VAR byte data1 := 130; Definition of a variable data1 with a decimal value 130. Example 2 CONST num parity_bit := 8; VAR byte data1 := 130; BitClear data1, parity_bit; Bit number 8 ( parity_bit ) in the variable data1 will be set to 0, e.g. the content of the variable data1 will be changed from 130 to 2 (integer representation). Error handling If an argument of the type byte has a value that is not in the range between 0 and 255, an error is returned on program execution. Characteristics byte is an alias data type for num and consequently inherits its characteristics. Related information For information about See Alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Bit functions Technical reference manual - RAPID overview , section RAPID summary - Bit functions 3 Data types 3.7. clock - Time measurement RobotWare - OS 3HAC 16581-1 Revision: J 1092 © Copyright 2004-2010 ABB. All rights reserved. 3.7. clock - Time measurement Usage Clock is used for time measurement. A clock functions like a stopwatch used for timing. Description Data of the type clock stores a time measurement in seconds and has a resolution of 0.01 seconds. Basic examples Basic examples of the data type clock are illustrated below. Example 1 VAR clock myclock; ClkReset myclock; The clock, myclock, is declared and reset. Before using ClkReset , ClkStart , ClkStop , and ClkRead , you must declare a variable of data type clock in your program. Limitations The maximum time that can be stored in a clock variable is approximately 49 days (4,294,967 seconds). The instructions ClkStart , ClkStop , and ClkRead report clock overflows in the very unlikely event that one occurs. A clock must be declared as a VAR variable type, not as a persistent variable type. Characteristics clock is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Summary of Time and Date Instructions Technical reference manual - RAPID overview , section RAPID summary - System & time Non-value data type characteristics Technical reference manual - RAPID overview , section Basic characteristics - Data types
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,094
3 Data types 3.6. byte - Integer values 0 - 255 RobotWare - OS 1091 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.6. byte - Integer values 0 - 255 Usage byte is used for integer values (0 - 255) according to the range of a byte. This data type is used in conjunction with instructions and functions that handle the bit manipulations and convert features. Description Data of the type byte represents an integer byte value. Basic examples Basic examples of the data type byte are illustrated below. Example 1 VAR byte data1 := 130; Definition of a variable data1 with a decimal value 130. Example 2 CONST num parity_bit := 8; VAR byte data1 := 130; BitClear data1, parity_bit; Bit number 8 ( parity_bit ) in the variable data1 will be set to 0, e.g. the content of the variable data1 will be changed from 130 to 2 (integer representation). Error handling If an argument of the type byte has a value that is not in the range between 0 and 255, an error is returned on program execution. Characteristics byte is an alias data type for num and consequently inherits its characteristics. Related information For information about See Alias data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Bit functions Technical reference manual - RAPID overview , section RAPID summary - Bit functions 3 Data types 3.7. clock - Time measurement RobotWare - OS 3HAC 16581-1 Revision: J 1092 © Copyright 2004-2010 ABB. All rights reserved. 3.7. clock - Time measurement Usage Clock is used for time measurement. A clock functions like a stopwatch used for timing. Description Data of the type clock stores a time measurement in seconds and has a resolution of 0.01 seconds. Basic examples Basic examples of the data type clock are illustrated below. Example 1 VAR clock myclock; ClkReset myclock; The clock, myclock, is declared and reset. Before using ClkReset , ClkStart , ClkStop , and ClkRead , you must declare a variable of data type clock in your program. Limitations The maximum time that can be stored in a clock variable is approximately 49 days (4,294,967 seconds). The instructions ClkStart , ClkStop , and ClkRead report clock overflows in the very unlikely event that one occurs. A clock must be declared as a VAR variable type, not as a persistent variable type. Characteristics clock is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Summary of Time and Date Instructions Technical reference manual - RAPID overview , section RAPID summary - System & time Non-value data type characteristics Technical reference manual - RAPID overview , section Basic characteristics - Data types 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1093 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.8. confdata - Robot configuration data Usage confdata is used to define the axis configurations of the robot. Description All positions of the robot are defined and stored using rectangular coordinates. When calculating the corresponding axis positions, there will often be two or more possible solutions. This means that the robot is able to achieve the same position, i.e. the tool is in the same position and with the same orientation with several different positions or configurations of the robots axes. Some robot types use iterative numerical methods to determine the robot axes positions. In these cases the configuration parameters may be used to define good starting values for the joints to be used by the iterative procedure. To unambiguously denote one of these possible configurations, the robot configuration is specified using four axis values. For a rotating axis, the value defines the current quadrant of the robot axis. The quadrants are numbered 0, 1, 2, etc. (they can also be negative). The quadrant number is connected to the current joint angle of the axis. For each axis, quadrant 0 is the first quarter revolution, 0 to 90°, in a positive direction from the zero position; quadrant 1 is the next revolution, 90 to 180°, etc. Quadrant -1 is the revolution 0° to (-90°), etc. (see figure below). The figure shows the configuration quadrants for axis 6. xx0500002398 For a linear axis, the value defines a meter interval for the robot axis. For each axis, value 0 means a position between 0 and 1 meters and 1 means a position between 1 and 2 meters. For negative values, -1 means a position between -1 and 0 meters, etc. (see figure below). The figure shows configuration values for a linear axis. xx0500002399 Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,095
3 Data types 3.7. clock - Time measurement RobotWare - OS 3HAC 16581-1 Revision: J 1092 © Copyright 2004-2010 ABB. All rights reserved. 3.7. clock - Time measurement Usage Clock is used for time measurement. A clock functions like a stopwatch used for timing. Description Data of the type clock stores a time measurement in seconds and has a resolution of 0.01 seconds. Basic examples Basic examples of the data type clock are illustrated below. Example 1 VAR clock myclock; ClkReset myclock; The clock, myclock, is declared and reset. Before using ClkReset , ClkStart , ClkStop , and ClkRead , you must declare a variable of data type clock in your program. Limitations The maximum time that can be stored in a clock variable is approximately 49 days (4,294,967 seconds). The instructions ClkStart , ClkStop , and ClkRead report clock overflows in the very unlikely event that one occurs. A clock must be declared as a VAR variable type, not as a persistent variable type. Characteristics clock is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Summary of Time and Date Instructions Technical reference manual - RAPID overview , section RAPID summary - System & time Non-value data type characteristics Technical reference manual - RAPID overview , section Basic characteristics - Data types 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1093 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.8. confdata - Robot configuration data Usage confdata is used to define the axis configurations of the robot. Description All positions of the robot are defined and stored using rectangular coordinates. When calculating the corresponding axis positions, there will often be two or more possible solutions. This means that the robot is able to achieve the same position, i.e. the tool is in the same position and with the same orientation with several different positions or configurations of the robots axes. Some robot types use iterative numerical methods to determine the robot axes positions. In these cases the configuration parameters may be used to define good starting values for the joints to be used by the iterative procedure. To unambiguously denote one of these possible configurations, the robot configuration is specified using four axis values. For a rotating axis, the value defines the current quadrant of the robot axis. The quadrants are numbered 0, 1, 2, etc. (they can also be negative). The quadrant number is connected to the current joint angle of the axis. For each axis, quadrant 0 is the first quarter revolution, 0 to 90°, in a positive direction from the zero position; quadrant 1 is the next revolution, 90 to 180°, etc. Quadrant -1 is the revolution 0° to (-90°), etc. (see figure below). The figure shows the configuration quadrants for axis 6. xx0500002398 For a linear axis, the value defines a meter interval for the robot axis. For each axis, value 0 means a position between 0 and 1 meters and 1 means a position between 1 and 2 meters. For negative values, -1 means a position between -1 and 0 meters, etc. (see figure below). The figure shows configuration values for a linear axis. xx0500002399 Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1094 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 140, 6600, 6650, 7600 There are three singularities within the robot’s working range (See RAPID reference manual - RAPID summary , section Motion and I/O principles - Singularities ). • cf1 is the quadrant number for axis 1. • cf4 is the quadrant number for axis 4. • cf6 is the quadrant number for axis 6. cfx is used to select one of eight possible robot configurations numbered from 0 through 7. The table below describes each one of them in terms of how the robot is positioned relative to the three singularities. The pictures below give an example of how the same tool position and orientation is attained by using the eight different configurations. The following figure shows an example of robot configuration 0 and 1. Note the different signs of the axis 5 angle. xx0500002400 cfx Wrist center relative to axis 1 Wrist center relative to lower arm Axis 5 angle 0 In front of In front of Positive 1 In front of In front of Negative 2 In front of Behind Positive 3 In front of Behind Negative 4 Behind In front of Positive 5 Behind In front of Negative 6 Behind Behind Positive 7 Behind Behind Negative 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
1,096
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1093 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.8. confdata - Robot configuration data Usage confdata is used to define the axis configurations of the robot. Description All positions of the robot are defined and stored using rectangular coordinates. When calculating the corresponding axis positions, there will often be two or more possible solutions. This means that the robot is able to achieve the same position, i.e. the tool is in the same position and with the same orientation with several different positions or configurations of the robots axes. Some robot types use iterative numerical methods to determine the robot axes positions. In these cases the configuration parameters may be used to define good starting values for the joints to be used by the iterative procedure. To unambiguously denote one of these possible configurations, the robot configuration is specified using four axis values. For a rotating axis, the value defines the current quadrant of the robot axis. The quadrants are numbered 0, 1, 2, etc. (they can also be negative). The quadrant number is connected to the current joint angle of the axis. For each axis, quadrant 0 is the first quarter revolution, 0 to 90°, in a positive direction from the zero position; quadrant 1 is the next revolution, 90 to 180°, etc. Quadrant -1 is the revolution 0° to (-90°), etc. (see figure below). The figure shows the configuration quadrants for axis 6. xx0500002398 For a linear axis, the value defines a meter interval for the robot axis. For each axis, value 0 means a position between 0 and 1 meters and 1 means a position between 1 and 2 meters. For negative values, -1 means a position between -1 and 0 meters, etc. (see figure below). The figure shows configuration values for a linear axis. xx0500002399 Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1094 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 140, 6600, 6650, 7600 There are three singularities within the robot’s working range (See RAPID reference manual - RAPID summary , section Motion and I/O principles - Singularities ). • cf1 is the quadrant number for axis 1. • cf4 is the quadrant number for axis 4. • cf6 is the quadrant number for axis 6. cfx is used to select one of eight possible robot configurations numbered from 0 through 7. The table below describes each one of them in terms of how the robot is positioned relative to the three singularities. The pictures below give an example of how the same tool position and orientation is attained by using the eight different configurations. The following figure shows an example of robot configuration 0 and 1. Note the different signs of the axis 5 angle. xx0500002400 cfx Wrist center relative to axis 1 Wrist center relative to lower arm Axis 5 angle 0 In front of In front of Positive 1 In front of In front of Negative 2 In front of Behind Positive 3 In front of Behind Negative 4 Behind In front of Positive 5 Behind In front of Negative 6 Behind Behind Positive 7 Behind Behind Negative Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1095 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The following figure shows an example of robot configuration 2 and 3. Note the different signs of the axis 5 angle. xx0500002401 The following figure shows an example of robot configuration 4 and 5. Note the different signs of the axis 5 angle. xx0500002402 The following figure shows an example of robot configuration 6 and 7. Note the different signs of the axis 5 angle. xx0500002403 Robot configuration data for IRB 340 Only the configuration parameter cf4 is used. Robot configuration data for IRB 260, 660 Only the configuration parameter cf6 is used. 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
1,097
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1094 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 140, 6600, 6650, 7600 There are three singularities within the robot’s working range (See RAPID reference manual - RAPID summary , section Motion and I/O principles - Singularities ). • cf1 is the quadrant number for axis 1. • cf4 is the quadrant number for axis 4. • cf6 is the quadrant number for axis 6. cfx is used to select one of eight possible robot configurations numbered from 0 through 7. The table below describes each one of them in terms of how the robot is positioned relative to the three singularities. The pictures below give an example of how the same tool position and orientation is attained by using the eight different configurations. The following figure shows an example of robot configuration 0 and 1. Note the different signs of the axis 5 angle. xx0500002400 cfx Wrist center relative to axis 1 Wrist center relative to lower arm Axis 5 angle 0 In front of In front of Positive 1 In front of In front of Negative 2 In front of Behind Positive 3 In front of Behind Negative 4 Behind In front of Positive 5 Behind In front of Negative 6 Behind Behind Positive 7 Behind Behind Negative Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1095 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The following figure shows an example of robot configuration 2 and 3. Note the different signs of the axis 5 angle. xx0500002401 The following figure shows an example of robot configuration 4 and 5. Note the different signs of the axis 5 angle. xx0500002402 The following figure shows an example of robot configuration 6 and 7. Note the different signs of the axis 5 angle. xx0500002403 Robot configuration data for IRB 340 Only the configuration parameter cf4 is used. Robot configuration data for IRB 260, 660 Only the configuration parameter cf6 is used. Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1096 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 1400, 2400, 3400, 4400, 6400 Only the three configuration parameters cf1 , cf4 , and cf6 are used. Robot configuration data for IRB 5400 All four configuration parameters are used. cf1 , cf4 , cf6 for joints 1, 4, and 6 respectively and cfx for joint 5. Robot configuration data for IRB 5404, 5406 The robots have two rotation axes (arms 1 and 2) and one linear axis (arm 3). • cf1 is used for the rotating axis 1 • cfx is used for the rotating axis 2 • cf4 and cf6 are not used Robot configuration data for IRB 5413, 5414, 5423 The robots have two linear axes (arms 1 and 2) and one or two rotating axes (arms 4 and 5). (Arm 3 locked). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Robot configuration data for IRB 840 The robot has three linear axes (arms 1, 2 and 3) and one rotating axis (arm 4). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Because of the robot’s mainly linear structure, the correct setting of the configuration parameters c1 , cx is of less importance. Components cf1 Data type: num Rotating axis: The current quadrant of axis 1, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 1, expressed as a positive or negative integer. 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
1,098
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1095 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. The following figure shows an example of robot configuration 2 and 3. Note the different signs of the axis 5 angle. xx0500002401 The following figure shows an example of robot configuration 4 and 5. Note the different signs of the axis 5 angle. xx0500002402 The following figure shows an example of robot configuration 6 and 7. Note the different signs of the axis 5 angle. xx0500002403 Robot configuration data for IRB 340 Only the configuration parameter cf4 is used. Robot configuration data for IRB 260, 660 Only the configuration parameter cf6 is used. Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1096 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 1400, 2400, 3400, 4400, 6400 Only the three configuration parameters cf1 , cf4 , and cf6 are used. Robot configuration data for IRB 5400 All four configuration parameters are used. cf1 , cf4 , cf6 for joints 1, 4, and 6 respectively and cfx for joint 5. Robot configuration data for IRB 5404, 5406 The robots have two rotation axes (arms 1 and 2) and one linear axis (arm 3). • cf1 is used for the rotating axis 1 • cfx is used for the rotating axis 2 • cf4 and cf6 are not used Robot configuration data for IRB 5413, 5414, 5423 The robots have two linear axes (arms 1 and 2) and one or two rotating axes (arms 4 and 5). (Arm 3 locked). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Robot configuration data for IRB 840 The robot has three linear axes (arms 1, 2 and 3) and one rotating axis (arm 4). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Because of the robot’s mainly linear structure, the correct setting of the configuration parameters c1 , cx is of less importance. Components cf1 Data type: num Rotating axis: The current quadrant of axis 1, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 1, expressed as a positive or negative integer. Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1097 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. cf4 Data type: num Rotating axis: The current quadrant of axis 4, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 4, expressed as a positive or negative integer. cf6 Data type: num Rotating axis: The current quadrant of axis 6, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 6, expressed as a positive or negative integer. cfx Data type: num Rotating axis: For the IRB 140, the current robot configuration, expressed as an integer in the range from 0 to 7. For the IRB 5400, the current quadrant of axis 5, expressed as a positive or negative integer. For other robots, using the current quadrant of axis 2, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 2, expressed as a positive or negative integer. Basic examples Basic examples of the data type confdata are illustrated below. Example 1 VAR confdata conf15 := [1, -1, 0, 0] A robot configuration conf15 for robot type IRB 5400 is defined as follows: • The axis configuration of the robot axis 1 is quadrant 1, i.e. 90-180º. • The axis configuration of the robot axis 4 is quadrant -1 , i.e. 0-(-90º). • The axis configuration of the robot axis 6 is quadrant 0 , i.e. 0 - 90º. • The axis configuration of the robot axis 5 is quadrant 0 , i.e. 0 - 90º. Structure < dataobject of confdata > < cf1 of num > < cf4 of num > < cf6 of num > < cfx 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
1,099
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1096 © Copyright 2004-2010 ABB. All rights reserved. Robot configuration data for IRB 1400, 2400, 3400, 4400, 6400 Only the three configuration parameters cf1 , cf4 , and cf6 are used. Robot configuration data for IRB 5400 All four configuration parameters are used. cf1 , cf4 , cf6 for joints 1, 4, and 6 respectively and cfx for joint 5. Robot configuration data for IRB 5404, 5406 The robots have two rotation axes (arms 1 and 2) and one linear axis (arm 3). • cf1 is used for the rotating axis 1 • cfx is used for the rotating axis 2 • cf4 and cf6 are not used Robot configuration data for IRB 5413, 5414, 5423 The robots have two linear axes (arms 1 and 2) and one or two rotating axes (arms 4 and 5). (Arm 3 locked). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Robot configuration data for IRB 840 The robot has three linear axes (arms 1, 2 and 3) and one rotating axis (arm 4). • cf1 is used for the linear axis 1 • cfx is used for the linear axis 2 • cf4 is used for the rotating axis 4 • cf6 is not used Because of the robot’s mainly linear structure, the correct setting of the configuration parameters c1 , cx is of less importance. Components cf1 Data type: num Rotating axis: The current quadrant of axis 1, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 1, expressed as a positive or negative integer. Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1097 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. cf4 Data type: num Rotating axis: The current quadrant of axis 4, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 4, expressed as a positive or negative integer. cf6 Data type: num Rotating axis: The current quadrant of axis 6, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 6, expressed as a positive or negative integer. cfx Data type: num Rotating axis: For the IRB 140, the current robot configuration, expressed as an integer in the range from 0 to 7. For the IRB 5400, the current quadrant of axis 5, expressed as a positive or negative integer. For other robots, using the current quadrant of axis 2, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 2, expressed as a positive or negative integer. Basic examples Basic examples of the data type confdata are illustrated below. Example 1 VAR confdata conf15 := [1, -1, 0, 0] A robot configuration conf15 for robot type IRB 5400 is defined as follows: • The axis configuration of the robot axis 1 is quadrant 1, i.e. 90-180º. • The axis configuration of the robot axis 4 is quadrant -1 , i.e. 0-(-90º). • The axis configuration of the robot axis 6 is quadrant 0 , i.e. 0 - 90º. • The axis configuration of the robot axis 5 is quadrant 0 , i.e. 0 - 90º. Structure < dataobject of confdata > < cf1 of num > < cf4 of num > < cf6 of num > < cfx of num > Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1098 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Coordinate systems Technical reference manual - RAPID overview , section Motion and I/O principles - Coordinate systems Handling configuration data Technical reference manual - RAPID overview , section Motion and I/O principles - Robot configura- tion Position data robtarget - Position data on page 1176 Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,100
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 1097 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. cf4 Data type: num Rotating axis: The current quadrant of axis 4, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 4, expressed as a positive or negative integer. cf6 Data type: num Rotating axis: The current quadrant of axis 6, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 6, expressed as a positive or negative integer. cfx Data type: num Rotating axis: For the IRB 140, the current robot configuration, expressed as an integer in the range from 0 to 7. For the IRB 5400, the current quadrant of axis 5, expressed as a positive or negative integer. For other robots, using the current quadrant of axis 2, expressed as a positive or negative integer. Linear axis: The current meter interval of axis 2, expressed as a positive or negative integer. Basic examples Basic examples of the data type confdata are illustrated below. Example 1 VAR confdata conf15 := [1, -1, 0, 0] A robot configuration conf15 for robot type IRB 5400 is defined as follows: • The axis configuration of the robot axis 1 is quadrant 1, i.e. 90-180º. • The axis configuration of the robot axis 4 is quadrant -1 , i.e. 0-(-90º). • The axis configuration of the robot axis 6 is quadrant 0 , i.e. 0 - 90º. • The axis configuration of the robot axis 5 is quadrant 0 , i.e. 0 - 90º. Structure < dataobject of confdata > < cf1 of num > < cf4 of num > < cf6 of num > < cfx of num > Continued Continues on next page 3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1098 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Coordinate systems Technical reference manual - RAPID overview , section Motion and I/O principles - Coordinate systems Handling configuration data Technical reference manual - RAPID overview , section Motion and I/O principles - Robot configura- tion Position data robtarget - Position data on page 1176 Continued 3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 1099 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.9. corrdescr - Correction generator descriptor Usage corrdescr ( Correction generator descriptor ) is used by correction generators. A correction generator adds geometric offsets in the path coordinate system. Description Data of the type corrdescr contains a reference to a correction generator. Connection to a correction generator is done by the instruction CorrCon and the descriptor (the reference to the correction generator) can be used to deliver geometric offsets in the path coordinate system with the instruction CorrWrite . Offsets provided earlier can be removed by disconnecting a correction generator with the instruction CorrDiscon . All connected correction generators can be removed with the instruction CorrClear . The function CorrRead returns the sum of all the delivered offsets so far (includes all connected correction generators). Basic examples Basic examples of the data type corrdescr are illustrated below. Example 1 VAR corrdescr id; VAR pos offset; ... CorrCon id; offset := [1, 2 ,3]; CorrWrite id, offset; A correction generator is connected with the instruction CorrCon and referenced by the descriptor id . Offsets are then delivered to the correction generator (with reference id ) using the instruction CorrWrite . Characteristics corrdescr is a non-value data type. Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,101
3 Data types 3.8. confdata - Robot configuration data RobotWare - OS 3HAC 16581-1 Revision: J 1098 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Coordinate systems Technical reference manual - RAPID overview , section Motion and I/O principles - Coordinate systems Handling configuration data Technical reference manual - RAPID overview , section Motion and I/O principles - Robot configura- tion Position data robtarget - Position data on page 1176 Continued 3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 1099 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.9. corrdescr - Correction generator descriptor Usage corrdescr ( Correction generator descriptor ) is used by correction generators. A correction generator adds geometric offsets in the path coordinate system. Description Data of the type corrdescr contains a reference to a correction generator. Connection to a correction generator is done by the instruction CorrCon and the descriptor (the reference to the correction generator) can be used to deliver geometric offsets in the path coordinate system with the instruction CorrWrite . Offsets provided earlier can be removed by disconnecting a correction generator with the instruction CorrDiscon . All connected correction generators can be removed with the instruction CorrClear . The function CorrRead returns the sum of all the delivered offsets so far (includes all connected correction generators). Basic examples Basic examples of the data type corrdescr are illustrated below. Example 1 VAR corrdescr id; VAR pos offset; ... CorrCon id; offset := [1, 2 ,3]; CorrWrite id, offset; A correction generator is connected with the instruction CorrCon and referenced by the descriptor id . Offsets are then delivered to the correction generator (with reference id ) using the instruction CorrWrite . Characteristics corrdescr is a non-value data type. Continues on next page 3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 3HAC 16581-1 Revision: J 1100 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Connects to a correction generator CorrCon - Connects to a correction generator on page 71 Disconnects from a correction generator CorrDiscon - Disconnects from a correction generator on page 76 Writes to a correction generator CorrWrite - Writes to a correction generator on page 77 Reads the current total offsets CorrRead - Reads the current total offsets on page 803 Removes all correction generators CorrClear - Removes all correction generators on page 70 Characteristics of non-value data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,102
3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 1099 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.9. corrdescr - Correction generator descriptor Usage corrdescr ( Correction generator descriptor ) is used by correction generators. A correction generator adds geometric offsets in the path coordinate system. Description Data of the type corrdescr contains a reference to a correction generator. Connection to a correction generator is done by the instruction CorrCon and the descriptor (the reference to the correction generator) can be used to deliver geometric offsets in the path coordinate system with the instruction CorrWrite . Offsets provided earlier can be removed by disconnecting a correction generator with the instruction CorrDiscon . All connected correction generators can be removed with the instruction CorrClear . The function CorrRead returns the sum of all the delivered offsets so far (includes all connected correction generators). Basic examples Basic examples of the data type corrdescr are illustrated below. Example 1 VAR corrdescr id; VAR pos offset; ... CorrCon id; offset := [1, 2 ,3]; CorrWrite id, offset; A correction generator is connected with the instruction CorrCon and referenced by the descriptor id . Offsets are then delivered to the correction generator (with reference id ) using the instruction CorrWrite . Characteristics corrdescr is a non-value data type. Continues on next page 3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 3HAC 16581-1 Revision: J 1100 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Connects to a correction generator CorrCon - Connects to a correction generator on page 71 Disconnects from a correction generator CorrDiscon - Disconnects from a correction generator on page 76 Writes to a correction generator CorrWrite - Writes to a correction generator on page 77 Reads the current total offsets CorrRead - Reads the current total offsets on page 803 Removes all correction generators CorrClear - Removes all correction generators on page 70 Characteristics of non-value data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued 3 Data types 3.10. datapos - Enclosing block for a data object RobotWare - OS 1101 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.10. datapos - Enclosing block for a data object Usage datapos is the enclosing block to a data object (internal system data) retrieved with the function GetNextSym . Description Data of the type datapos contains information of where a certain object is defined in the system. It is used for instructions GetDataVal and SetDataVal . Basic examples Basic examples of the data type datapos are illustrated below. Example 1 VAR datapos block; VAR string name; VAR bool truevar:=TRUE; ... SetDataSearch "bool" \Object:="my.*" \InMod:="mymod"\LocalSym; WHILE GetNextSym(name,block) DO SetDataVal name\Block:=block,truevar; ENDWHILE This session will set all local bool data objects that begin with my in the module mymod to TRUE . Characteristics datapos is a non-value data type. Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Get the value of a data object GetDataVal - Get the value of a data object on page 110 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many object SetAllDataVal - Set a value to all data objects in a defined set on page 429
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,103
3 Data types 3.9. corrdescr - Correction generator descriptor Path Offset 3HAC 16581-1 Revision: J 1100 © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Connects to a correction generator CorrCon - Connects to a correction generator on page 71 Disconnects from a correction generator CorrDiscon - Disconnects from a correction generator on page 76 Writes to a correction generator CorrWrite - Writes to a correction generator on page 77 Reads the current total offsets CorrRead - Reads the current total offsets on page 803 Removes all correction generators CorrClear - Removes all correction generators on page 70 Characteristics of non-value data types Technical reference manual - RAPID overview , section Basic characteristics - Data types Continued 3 Data types 3.10. datapos - Enclosing block for a data object RobotWare - OS 1101 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.10. datapos - Enclosing block for a data object Usage datapos is the enclosing block to a data object (internal system data) retrieved with the function GetNextSym . Description Data of the type datapos contains information of where a certain object is defined in the system. It is used for instructions GetDataVal and SetDataVal . Basic examples Basic examples of the data type datapos are illustrated below. Example 1 VAR datapos block; VAR string name; VAR bool truevar:=TRUE; ... SetDataSearch "bool" \Object:="my.*" \InMod:="mymod"\LocalSym; WHILE GetNextSym(name,block) DO SetDataVal name\Block:=block,truevar; ENDWHILE This session will set all local bool data objects that begin with my in the module mymod to TRUE . Characteristics datapos is a non-value data type. Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Get the value of a data object GetDataVal - Get the value of a data object on page 110 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many object SetAllDataVal - Set a value to all data objects in a defined set on page 429 3 Data types 3.11. dionum - Digital values (0 - 1) RobotWare - OS 3HAC 16581-1 Revision: J 1102 © Copyright 2004-2010 ABB. All rights reserved. 3.11. dionum - Digital values (0 - 1) Usage dionum (digital input output numeric) is used for digital values (0 or 1). This data type is used in conjunction with instructions and functions that handle digital input or output signals. Description Data of the type dionum represents a digital value 0 or 1. Basic examples Basic examples of the data type dionum are illustrated below. Example 1 CONST dionum close := 1; SetDO grip1, close; Definition of a constant close with a value equal to 1 . The signal grip1 is then set to close , i.e. 1 . Predefined data The constants high , low , and edge are predefined in the system module base.sys : CONST dionum low:=0; CONST dionum high:=1; CONST dionum edge:=2; The constants low and high are designed for IO instructions. Edge can be used together with the interrupt instructions ISignalDI and ISignalDO . Characteristics dionum is an alias data type for num and consequently inherits its characteristics. Related information For information about See Summary input/output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Configuration of I/O Technical reference manual - System parameters Alias data types Technical reference manual - RAPID overview , section Basic Characteristics- Data types
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,104
3 Data types 3.10. datapos - Enclosing block for a data object RobotWare - OS 1101 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.10. datapos - Enclosing block for a data object Usage datapos is the enclosing block to a data object (internal system data) retrieved with the function GetNextSym . Description Data of the type datapos contains information of where a certain object is defined in the system. It is used for instructions GetDataVal and SetDataVal . Basic examples Basic examples of the data type datapos are illustrated below. Example 1 VAR datapos block; VAR string name; VAR bool truevar:=TRUE; ... SetDataSearch "bool" \Object:="my.*" \InMod:="mymod"\LocalSym; WHILE GetNextSym(name,block) DO SetDataVal name\Block:=block,truevar; ENDWHILE This session will set all local bool data objects that begin with my in the module mymod to TRUE . Characteristics datapos is a non-value data type. Related information For information about See Define a symbol set in a search session SetDataSearch - Define the symbol set in a search sequence on page 433 Get next matching symbol GetNextSym - Get next matching symbol on page 855 Get the value of a data object GetDataVal - Get the value of a data object on page 110 Set the value of a data object SetDataVal - Set the value of a data object on page 437 Set the value of many object SetAllDataVal - Set a value to all data objects in a defined set on page 429 3 Data types 3.11. dionum - Digital values (0 - 1) RobotWare - OS 3HAC 16581-1 Revision: J 1102 © Copyright 2004-2010 ABB. All rights reserved. 3.11. dionum - Digital values (0 - 1) Usage dionum (digital input output numeric) is used for digital values (0 or 1). This data type is used in conjunction with instructions and functions that handle digital input or output signals. Description Data of the type dionum represents a digital value 0 or 1. Basic examples Basic examples of the data type dionum are illustrated below. Example 1 CONST dionum close := 1; SetDO grip1, close; Definition of a constant close with a value equal to 1 . The signal grip1 is then set to close , i.e. 1 . Predefined data The constants high , low , and edge are predefined in the system module base.sys : CONST dionum low:=0; CONST dionum high:=1; CONST dionum edge:=2; The constants low and high are designed for IO instructions. Edge can be used together with the interrupt instructions ISignalDI and ISignalDO . Characteristics dionum is an alias data type for num and consequently inherits its characteristics. Related information For information about See Summary input/output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Configuration of I/O Technical reference manual - System parameters Alias data types Technical reference manual - RAPID overview , section Basic Characteristics- Data types 3 Data types 3.12. dir - File directory structure RobotWare - OS 1103 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.12. dir - File directory structure Usage dir ( directory ) is used to traverse directory structures. Description Data of the type dir contains a reference to a directory on disk or network. It can be linked to the physical directory by means of the instruction OpenDir and then used for reading. Basic examples Basic examples of the data type dir are illustrated below. Example 1 PROC lsdir(string dirname) VAR dir directory; VAR string filename; OpenDir directory, dirname; WHILE ReadDir(directory, filename) DO TPWrite filename; ENDWHILE CloseDir directory; ENDPROC This example prints out the names of all files or subdirectories under the specified directory. Characteristics dir is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Open a directory OpenDir - Open a directory on page 285 Make a directory MakeDir - Create a new directory on page 218 Read a directory ReadDir - Read next entry in a directory on page 944 Close a directory CloseDir - Close a directory on page 56 Remove a directory RemoveDir - Delete a directory on page 355 Remove a file RemoveFile - Delete a file on page 356 Rename a file RenameFile - Rename a file on page 357 Check file type IsFile - Check the type of a file on page 878
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,105
3 Data types 3.11. dionum - Digital values (0 - 1) RobotWare - OS 3HAC 16581-1 Revision: J 1102 © Copyright 2004-2010 ABB. All rights reserved. 3.11. dionum - Digital values (0 - 1) Usage dionum (digital input output numeric) is used for digital values (0 or 1). This data type is used in conjunction with instructions and functions that handle digital input or output signals. Description Data of the type dionum represents a digital value 0 or 1. Basic examples Basic examples of the data type dionum are illustrated below. Example 1 CONST dionum close := 1; SetDO grip1, close; Definition of a constant close with a value equal to 1 . The signal grip1 is then set to close , i.e. 1 . Predefined data The constants high , low , and edge are predefined in the system module base.sys : CONST dionum low:=0; CONST dionum high:=1; CONST dionum edge:=2; The constants low and high are designed for IO instructions. Edge can be used together with the interrupt instructions ISignalDI and ISignalDO . Characteristics dionum is an alias data type for num and consequently inherits its characteristics. Related information For information about See Summary input/output instructions Technical reference manual - RAPID overview , section RAPID Summary - Input and output signals Configuration of I/O Technical reference manual - System parameters Alias data types Technical reference manual - RAPID overview , section Basic Characteristics- Data types 3 Data types 3.12. dir - File directory structure RobotWare - OS 1103 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.12. dir - File directory structure Usage dir ( directory ) is used to traverse directory structures. Description Data of the type dir contains a reference to a directory on disk or network. It can be linked to the physical directory by means of the instruction OpenDir and then used for reading. Basic examples Basic examples of the data type dir are illustrated below. Example 1 PROC lsdir(string dirname) VAR dir directory; VAR string filename; OpenDir directory, dirname; WHILE ReadDir(directory, filename) DO TPWrite filename; ENDWHILE CloseDir directory; ENDPROC This example prints out the names of all files or subdirectories under the specified directory. Characteristics dir is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Open a directory OpenDir - Open a directory on page 285 Make a directory MakeDir - Create a new directory on page 218 Read a directory ReadDir - Read next entry in a directory on page 944 Close a directory CloseDir - Close a directory on page 56 Remove a directory RemoveDir - Delete a directory on page 355 Remove a file RemoveFile - Delete a file on page 356 Rename a file RenameFile - Rename a file on page 357 Check file type IsFile - Check the type of a file on page 878 3 Data types 3.13. dnum - Double numeric values RobotWare - OS 3HAC 16581-1 Revision: J 1104 © Copyright 2004-2010 ABB. All rights reserved. 3.13. dnum - Double numeric values Usage dnum is used for numeric values, for example counters. It can handle larger integer values than data type num but its characteristics and function is the same as for num . Description The value of the dnum data type can be: • An integer, for example -5 • A decimal number, for example 3.45 It can also be written exponentially, for example 2E3 (= 2*10^3 = 2000), 2.5E-2 (= 0.025). Integers between -4503599627370496 and +4503599627370496 are always stored as exact integers. Basic examples Basic examples of the data type dnum are illustrated below. Example 1 VAR dnum reg1; ... reg1:=1000000; reg1 is assigned the value 1000000 . Example 2 VAR dnum hex; Var dnum bin; VAR dnum oct; ! Hexadecimal representation of decimal value 4294967295 hex := 0xFFFFFFFF; ! Binary representation of decimal value 255 bin := 0b11111111; ! Octal representation of decimal value 255 oct := 0o377; Example 3 VAR dnum a:=0; VAR dnum b:=0; a := 10 DIV 3; b := 10 MOD 3; Integer division where a is assigned an integer (=3) and b is assigned the remainder (=1). Limitations Literal values between -4503599627370496 to 4503599627370496 assigned to a dnum variable are stored as exact integers. If a literal value that has been interpreted as a num is assigned/used as a dnum , it is automatically converted to a dnum . Continues on next page
ABB_Technical_Reference_Manual
https://library.e.abb.com/public/688894b98123f87bc1257cc50044e809/Technical%20reference%20manual_RAPID_3HAC16581-1_revJ_en.pdf
1,106
3 Data types 3.12. dir - File directory structure RobotWare - OS 1103 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. 3.12. dir - File directory structure Usage dir ( directory ) is used to traverse directory structures. Description Data of the type dir contains a reference to a directory on disk or network. It can be linked to the physical directory by means of the instruction OpenDir and then used for reading. Basic examples Basic examples of the data type dir are illustrated below. Example 1 PROC lsdir(string dirname) VAR dir directory; VAR string filename; OpenDir directory, dirname; WHILE ReadDir(directory, filename) DO TPWrite filename; ENDWHILE CloseDir directory; ENDPROC This example prints out the names of all files or subdirectories under the specified directory. Characteristics dir is a non-value data type and cannot be used in value-oriented operations. Related information For information about See Open a directory OpenDir - Open a directory on page 285 Make a directory MakeDir - Create a new directory on page 218 Read a directory ReadDir - Read next entry in a directory on page 944 Close a directory CloseDir - Close a directory on page 56 Remove a directory RemoveDir - Delete a directory on page 355 Remove a file RemoveFile - Delete a file on page 356 Rename a file RenameFile - Rename a file on page 357 Check file type IsFile - Check the type of a file on page 878 3 Data types 3.13. dnum - Double numeric values RobotWare - OS 3HAC 16581-1 Revision: J 1104 © Copyright 2004-2010 ABB. All rights reserved. 3.13. dnum - Double numeric values Usage dnum is used for numeric values, for example counters. It can handle larger integer values than data type num but its characteristics and function is the same as for num . Description The value of the dnum data type can be: • An integer, for example -5 • A decimal number, for example 3.45 It can also be written exponentially, for example 2E3 (= 2*10^3 = 2000), 2.5E-2 (= 0.025). Integers between -4503599627370496 and +4503599627370496 are always stored as exact integers. Basic examples Basic examples of the data type dnum are illustrated below. Example 1 VAR dnum reg1; ... reg1:=1000000; reg1 is assigned the value 1000000 . Example 2 VAR dnum hex; Var dnum bin; VAR dnum oct; ! Hexadecimal representation of decimal value 4294967295 hex := 0xFFFFFFFF; ! Binary representation of decimal value 255 bin := 0b11111111; ! Octal representation of decimal value 255 oct := 0o377; Example 3 VAR dnum a:=0; VAR dnum b:=0; a := 10 DIV 3; b := 10 MOD 3; Integer division where a is assigned an integer (=3) and b is assigned the remainder (=1). Limitations Literal values between -4503599627370496 to 4503599627370496 assigned to a dnum variable are stored as exact integers. If a literal value that has been interpreted as a num is assigned/used as a dnum , it is automatically converted to a dnum . Continues on next page 3 Data types 3.13. dnum - Double numeric values RobotWare - OS 1105 3HAC 16581-1 Revision: J © Copyright 2004-2010 ABB. All rights reserved. Related information For information about See Numeric values using data type num num - Numeric values on page 1146 Numeric expressions Technical reference manual - RAPID overview, section Basic RAPID programming Operations using numeric values Technical reference manual - RAPID overview, section Basic RAPID programming Continued