Home
SIMO - User`s Manual – Appendix B Version 3.2
Contents
1. I R Read this parameter from keyboard I I Ignore this line from macro file I S Stop reading from macro file I I gt Select option If an error occurs when the program is run in batch IBATCH 1 or 2 an error message will be written to the output device If IBATCH 1 IERR 1 will be returned to the calling routine If IBATCH 2 a division by 0 is performed in order to provoke a program stop 2001 516412 01131501 Page B12 of B12
2. the program will not make any pause 2001 516412 01131501 Page B6 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 B2 MACRO SYSTEM B2 1 Macro commands Macro commands can be used anywhere where the program waits for input The commands must contain enough characters so that they are unique Can be stored in macro file Y N HELP Y Writes a list of all macro system commands with short explanations OPEN file N The command opens the given file for writing All questions and answers until CLOSE is given will be stored on the macro file The fiie name is converted to uppercase and suffix MAC is added if is not in the file name If the command is given a second time before CLOSE DO file is stored at the macro file CLOSE N The command closes the file Message is written at the screen DO finame lt n gt Y Input is read from specified file with name FINAME MAC lt n gt times If lt n gt is omitted the file is read once In the command the file name can be written in uppercase and lowercase letters with or without the extension LIST file N The content of the file is listed SPAWN N The program is set in a waiting condition A new process is created This means that all operating system commands can be given WAIT ON OFF Y Changes the program switch IWAIT to 1 0 respectively IWAIT 0 pauses are not enabled IWAIT 1 enables pau
3. 3 6 Program pause Answers to these are not recorded and such input is read from keyboard in interactive execution mode It might be a good idea to put YWAIT OFF in the macro file to avoid program pauses B2 4 Reading from macro file If the parameter IDISP 1 both questions written by the program and input read from a macro file will be displayed on the screen If IDISP 0 only comment lines error messages questions that should be answered from the keyboard will be displayed If an error occurs when the program is run in demand IBATCH 0 a menu will be displayed A wrong identificator will result in the following output MACRO file error Identifiers are not identical Expexted from program INPMOD MAIN MENU Read from macro file Body data manipu INMOD MAIN MENU gt Alternatives A Accept this input R Read this parameter from keyboard I Ignore this line from macro file S Stop reading from macro file gt Select option 2001 516412 01131501 Page B11 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 If for instance one parameter is outside the allowable range when input is read from a macro file the following output will be written WARNING Valid range of parameter 1 is 10 00 10 00 MACRO file error Wrong input Read from macro file 300 First real number I gt Alternatives I
4. 1 Parameter input Only input that is accepted by the program is stored at the macro file Example Vessel position 0 5a 30 Macro file TOn 25 30 Vessel position If a is stored in the macro file then this parameter will always be read from the keyboard Example Vessel position X pos m 0 0 10 Y pos m 0 0 E Y pos m 0 0 Due Heading deg 0 0 Macro file Vessel position 10 X pos m x Y pos m 0 Heading deg 2001 516412 01131501 Page B9 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 B2 3 2 Integer array input Example Parameters to be plotted Max 2 numbers 1 2 Macro file 12 B2 3 3 Menu input Example gt MAIN MENU Input module Static module Dynamic module Terminate Ko O w N He gt Select option DYNAMIC Macro file DYNAMIC MAINMENU B2 3 4 Yes no input Example Do you want to store the data Y NO Macro file NO Do you want to store the data Y 2001 516412 01131501 Page B10 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 B2 3 5 Text input Example Give 3 text lines Old 1 T Run 4 2 TRE ZZ E 4 JUL 1988 3 3 Calculations performed by NN Macro file Run 4 4 JUL 1988 Calculations performed by NN B2
5. A macro file is defined as an ascii file which contains input that can be read by the program Comments explaining text may be stored in the file in addition to the program input The macro file may consist of 2 types of lines e Comment lines are lines where 66 9 99 is the first nonblank character Comment lines may be placed anywhere on the macro file They are read and written on the screen when the macro file is used but have no effect on the calculations e Input lines An input line may also contain a comment field starting with Comment text which is located between the first and second occurrence of is during execution checked against the prompt text normally shown on the screen If inconsistency is found a warning is 2001 516412 01131501 Page B8 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 displayed and the user is asked whether the next line on the file should be read or the macro file s should be closed Some of the macro commands may be stored in a macro file B2 3 Generating a macro file interactively After the command OPEN lt file gt has been given the user input will be logged at the file Input that is not accepted by the program is not stored If for instance an erroneous option is given in a menu the menu will be displayed again and only the valid option will be stored at the macro file B2 3
6. SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 APPENDIX B MAIS Use of application programs 2001 516412 01131501 Page BI of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK al lene V 3 4 June 2004 CONTENTS Bl INPUT TYPES 00 e 3 B1 1 Param ter A O 3 B1 2 Inte ser array A Sted sea eaniecte ck ised Baebes aac kieenee ew ates 4 B1 3 Selection of options from a Menu fi 2 3 Seacvonc Riosa 4 B1 4 VES MO UE A di 5 B1 5 TEMP A A ER at eee 5 B1 6 PLO STAIN PAU cenena a aa Ea EE EE S EARE Ana ee aa 6 B2 MACRO SYSTEM apartada 7 B2 1 Macro commands icsseaienn ors a n ede tain sat Mea ec E R alee a 7 B2 2 Macro file ESCAPA di te ddan eect ees 8 B2 3 Generating a macro file interactively oonnconinoninncnonaconnaconoconnnonancnan ccoo noc nocnnncnnnnnos 9 B23 Parameter pu 9 B2 3 2 Integer ON AY AN PUL J ornu eats casa site oar tates scam eae A A t 10 B2 3 3 Men A A e aoaes 10 B2 3 4 A nia Mis Begins Antena ia aaa ee eae 10 A A vane oe e E a eee aa aout S 11 2 3 0 Program PAUSE it ia 11 B2 4 A ate aut Se aca a raat Sao oyet Ste 11 2001 516412 01131501 Page B2 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 Bl INPUT TYPES B1 1 Parameter input The parameters to a command may be of different types character real integer and are normall
7. e of application programs MARINTEK V 3 4 June 2004 B1 4 Yes no question The defualt answer is indicated behind the question The program tests the first character different from space in the input The defualt value is obtained by giving or by pressing lt return gt If the first letter is different from y Y n or N the question will be repeated Example Do you want to store the data Y Comment The default value here is YES The followin input would be interpreted as NO n no thanks NEI B1 5 Text input Text input may contain up to 70 characters in each line any number of lines In the example below 30 characters is used The text can not start with or in any line because these characters have a special meaning If the user gives spaces or nothing the default character string is used The string is cleared if gt is given Example Give 3 text lines old 1 Run 1 EXE L Run 4 old 2 Txt 2 4 JUL 1988 Old 3 Txt 3 Calculations performed by NN 2001 516412 01131501 Page B5 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 B1 6 Program pause A pause in the program may or may not be followed by the message Press lt return gt to continue The program resumes execution when the lt return gt key is struck If the command WAIT OFF see chapter B2 1 has been given
8. ses in the program execution Such stops are normally followed by the message Press lt return gt to continue DISP ON OFF Y Changes the program switch IDISP which determines the 2001 516412 01131501 Page B7 of B12 MARINTEK RANGE ON OFF Y STATUS Y SIMO User s Manual Appendix B MAIS Use of application programs V 3 4 June 2004 amount of output to screen when executing a macro file IDISP 0 Only comment lines from the macro file are written on the screen IDISP 1 All questions answeres and comment lines are written on the screen when input is read from a macro file Changes the program switch IRCK IRCK 0 No check that input values are within allowable range IRCK 1 default Check on allowable range is enabled Lists the values of the macro switches and gives information about the macro files in use Marks that this parameter shall be read from the keyboard when input is read from a macro file The effect of the last two program switches depends on the implementation of these in the application program FILE IFILE Y RESULT IRESU Y B2 2 Macro file description Changes the program switch IFILE Allowable range is 0 5 The switch is returned to the calling routine to change the amount of results to the print file Changes the program switch IRESU Allowable range is 0 5 The switch is returned to the calling routine to change the amount of results shown at the screen
9. y given on a single line separated by spaces Default values are obtained by slashes If an incorrect number of parameters are given the program asks for each parameter Default values are then obtained by giving or by pressing lt return gt All real and integer variables have a defined allowable range and all variables have default values Ifone of the parameters is outside the allowable range the program prompts for all parameters Character parameters may only be single words maximum 16 characters Example The command Modify vessel position requires 3 real parameters X pos Y pos Vessel position TOs 5 30 Comment The input was accepted Vessel position 10 5 WARNING 3 input parameters are required X pos m 0 00 35 LO Y pos m A E Heading deg 00 Ye 5 130 Comment The program produces warnings if too few or too many input parameters are given The only exception is when is given as input to obtain the default values See below Vessel position 5 13572 62471 30 WARNING Allowable range of parameter 1 is 9999 9999 WARNING Allowable range of parameter 2 is 9999 9999 X pos m OO BO Y pos m 0 Heading deg 0 2 30 0 0 Note Test on allowable range may be omitted by giving the macro command RANGE OFF see Section B2 1 of this appendix 3 default values are obtained by typing 3 slashes separated b
10. y spaces Vessel position Hany ane ae 2001 516412 01131501 Page B3 of B12 SIMO User s Manual Appendix B MAIS Use of application programs MARINTEK V 3 4 June 2004 B1 2 Integer array input An arbitrary number of integers up to a maximum number may be read Any validation of the given parameters may be coded outside the MAIS routine Example Parameters to be plotted Max 2 numbers 1 2 B1 3 Selection of options from a menu Answers in menus can be given as e A number corresponding to the number in the option list e Characters with lower case or upper case letters and with spaces before or after the text The input string is first converted to an integer which is compared to the option list If the conversion fails the text is split into words and the words are compared to the option texts Examples gt INPUT MODULE Return Read wind coefficients Read wave coefficients Read current coefficients WON FO gt Select option gt MAIN MENU 1 Input module 2 Static module 3 Dynamic module 99 Terminate gt Select option Examples of answers gt Select option dYn Accepted gt Select option d Yn Not accepted gt Select option d m Accepted gt Select option Not accepted gt Select option A 3 Accepted gt Select option DYNAMISK Not accepted 2001 516412 01131501 Page B4 of B12 SIMO User s Manual Appendix B MAIS Us
Download Pdf Manuals
Related Search
Related Contents
BM 160 - Domyos Modelos da VSM Serie 960 Manual do Usuário Stovax Huntingdon 30 User's Manual HELIA 5, K16i De'Longhi HR720B User's Manual ÇÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇÇ Universal Remote Control zx6000 User's Manual Copyright © All rights reserved.
Failed to retrieve file