need RAPID instruction help
gomzy04
✭
hi friends,
Is ther any RAPID instruction which can accept character or string from the user?
Such as Scanf in C language...
Regards,
Ashwin Gomes
Is ther any RAPID instruction which can accept character or string from the user?
Such as Scanf in C language...
Regards,
Ashwin Gomes
0
Comments
-
Please go through the instruction starting with TPXXXXXX.
Lingaa0 -
Hi lin,
wel, so far i have used tpreadfk, for reading function keys and tpreadnum, for reading numbers . I m looking for a instrucion or method to get an alphabetical kep pad. which wil than allow the user to type characters.
Can u sugget something for me plz?
Regards,
Ashwin Gomez
0 -
See the function UIAlphaEntry.Russell Drown0
-
thanks russd,
I could not find this fuction on rapid manuls..Is this a part of Flexpendent SDK?
Regards,
Ashwin Gomes
0 -
Ac Copyright 2004-2009 ABB All rights reserved.
Functions UIAlphaEntry - User Alpha Entry <- -> - Usage UIAlphaEntry (User Interaction Alpha Entry) is used to enter a string from the available User Device such as the FlexPendant. After that the output information has been written, the user specified string is transferred to the program. Basic examples Basic examples of the instruction UIAlpaEntry are illustrated below.See More examples .Example 1VAR string answer; ...answer := UIAlphaEntry( Header:= "UIAlphaEntry Header",Message:= "Which procedure do You want to run?"Icon:=iconInfoInitString:= "default_proc"); %answer%;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. Return value Data type: stringThis 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: stringHeader text to be written at the top of the message box. Max. 40 characters.[Message]Data type: stringOne text line to be written on the display. Max 55 characters.[MsgArray]Message ArrayData type: stringSeveral text lines from an array to be written on the display.Only one of parameter Messageor MsgArray can be used at the same time.Max. layout space is 9 lines with 55 characters.[Wrap]Data type: switchIf 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: icondataDefines the icon to be displayed. Only one of the predefined icons of type icondata can be used. See Predefined data .Default no icon.[InitString]Data type:stringAn initial string to be display in the text entry box as default.[MaxTime]Data type: numThe 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 BreakFlagis used (see below). The constant ERR_TP_MAXTIMEcan be used to test whether or not the maximum time has elapsed.[DIBreak]Digital Input BreakData type: signaldiThe 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 BreakData type: signaldoThe 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 theBreakFlag is used (see below). The constant ERR_TP_DOBREAKcan be used to test whether or not this has occurred.[BreakFlag] Data type: errnumA variable (before used set to 0 by the system) that will hold the error code if MaxTime,DIBreakor 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 transfered 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 UIAlphaEntry are illustrated below.Example 1VAR 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:=iconInfoInitString:= "signal.log" MaxTime:=60 DIBreak:=di5BreakFlag:=err_var);TEST err_varCASE ERR_TP_MAXTIME:CASE ERR_TP_DIBREAK:! No operator answerlogfile:="signal.log";CASE 0:! Operator answerlogfile := answer;DEFAULT: ! Not such case definedENDTESTThe 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?_Ts 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 ERRNOis 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 Flex Pendant, 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. Syntax UIAlphaEntryA'(A'[A'A'Header?_T:=?_T <expression (IN) of string>][A'A' Message?_T:=?_T <expression (IN) of string>]| [A'A'MsgArray?_T:=?_T<array {*} (IN) of string>][A'A'Wrap][A'A'Icon?_T:=?_T <expression (IN) of icondata>][A'A'InitString?_T:=?_T<expression (IN) ofstring>][A'A'MaxTime?_T:=?_T <expression (IN) ofnum>][A'A'DIBreak?_T:=?_T <variable (VAR) ofsignaldi>][A'A'DOBreakA':=A'<variable (VAR) of signaldo>][?_T?_TBreakFlag A':=A' <var or pers (INOUT) of errnum>]?_~)?_TA function with return value of the data type string. Related information For information about See Icon display data icondata - Icon display data User Interaction Message Box type basic UIMsgBox - User Message Dialog Box type basic User Interaction Message Box type advanced UIMessageBox - User Message Box type advanced User Interaction Number Entry UINumEntry - User Number Entry User Interaction Number Tune UINumTune - User Number Tune User Interaction List View UIListView - User List View System connected to FlexPendant etc. UIClientExist - Exist User Client Procedure call with Late binding Technical reference manual - RAPID overview, section Basic characteristics - Routines - Procedure call Best Regards
Klaus Soenderhegn
www.cadalysator.dk0 -
Cheers Klaus
0 -
Hi Klaus,
Can u upload pdf file for me plz?
Regards,
Ashwin Gomes
0 -
I think it was introduced in RW 5.07 or 5.08.Russell Drown0
-
Hi
Check on your CD installation for documentation0 -
Best Regards
Klaus Soenderhegn
www.cadalysator.dk0 -
hi klaus,
I'm not able to open that link...Can u load a zip file?
0
Categories
- All Categories
- 5.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings