User-Defined Questions
The user-defined question section of QUEST is defined by the post-processor or control emulator developer. The question definitions reside in an external text file on disk. It appears as the last sub-section in the General Information section. The user-defined questions give developers the ability to add their own questions to the questionnaire. The responses to these custom questions can be examined in GENER or CERUN macros using a standard set of macro system variables.
The following steps are necessary to create user-defined questions:
Create an empty text file in your icam_appdata directory and give the new file a unique name. (e.g., C:\
ProgramData\ ICAM\ 270\ quest.txt). Edit the new file and add user-defined questions as described in the “Question Tags” section below.
Run the Configuration utility (see “The Icam Configuration Utility”); select the QUEST tab; then edit the “User defined questions” field and enter the new user-defined questions file name (e.g., quest.txt).
Changes made to the user-defined questions file will be seen the next time QUEST is run.
Macro System Variables
The user-defined question answers are stored in a special set of macro system variables. Text data is stored in $TUDQ, integer data in $IUDQ and real data in $WUDQ. Each of these macro system variables is actually an array.
The character data has 10 elements (80 characters each). They are named $TUDQ(1) through $TUDQ(10).
The integer data has 100 elements, $IUDQ(1) through $IUDQ(100).
The real data has 50 elements, $WUDQ(1) through $WUDQ(50).
Example
The following lists a sample definition of a user-defined question section. Lines beginning with an ! (exclamation) are comments and are included as documentation.
! user-defined questions sample /S SSpecial questions ! Question number 1.00 is a CASE question. /Q 100 case ! This is the short prompt. Must always end with a colon /P Machine identifier: ! This is the long description. A <br> causes a line ! break, a <p> causes QUEST to skip a line. /T Each machine has an identifier.<p>Select one of the identifiers in the list below. ! The default response is element 1; ingersoll. /D 1 ! The answer will be stored in $IUDQ(1). /L 1 ! These are the possible answers. /O ingersoll,fanuc,mazak,omni ! Question number 2.00 is a YESNO question. /Q 200 yesno /P Automatic documentation: /T Do you want to generate automatic documentation? ! The default response is 1 (Yes). /D 1 ! The answer will be stored in $IUDQ(2). /L 2 ! Question number 3.00 is a CCHAR question. /Q 300 cchar /P Machine class: /T Enter a letter indicating the machine class ! Ascii code 57 is the default. /D 57 ! The answer will be stored in $IUDQ(3). /L 3 ! NA is a valid option. /O -1 ! Question number 4.00 is a CVALUE question. /Q 400 cvalue /P Comments: /T Are there any comments concerning this post-processor? ! No comment is the default answer. /D No comment ! The answer will be stored in $TUDQ(1). /L 1 ! The string size is 1 to 20 characters. /O 1 20 ! Question number 5.00 is a IVALUE question. /Q 500 ivalue /P Site number: /T What is your site number? ! The default answer is 10 /D 10 ! The answer will be stored in $IUDQ(4). /L 4 ! The answer must be >= 20 and <= 200, the resolution is ! 10 which means the answer will be rounded to the nearest ! multiple of 10. /O 1 20 1 200 10 ! Question number 6.01 is a WVALUE question. /Q 601 wvalue /P Integration factor: /T Specify the integration factor for this post-processor. ! The default answer is 0. /D 0 ! The answer will be stored in $WUDQ(1) /L 1 ! No range checking or resolution /O 0 0 0 0 0
The responses to these questions are accessible from macros in GENER and CERUN. Their usage is entirely up to the user.
! comment character
An ! character appearing in column 1 indicates that the line is a comment.