Professional Documents
Culture Documents
C
Command
d fil
file editor
dit assists
i t in
i preparing
i COMI fil
files
For example
THREED TYPE=COMP COMP=EMOD
COMMAND !
Gives details of all the
parameters of a command
COMMAND !!
Requests prompting for
values for each parameter
of a command
Post-Processor
P t P E
Example
l
CIRCLE !
Keyword highlighting,
highlighting showing the command and parameter names.
names
Access to the command and parameter names and documentation (via
Commands -> List commands)
Command and parameter names can be added to the command file by
double-clicking on the words in the list.
Running the command file currently being edited (via Commands ->
Run current file).
Copying the contents of the current log file (via File -> Open current
log file).
R1=SQRT(X1*2)
R1 is a numeric parameter and X1 is another parameter of the
same command. The expression is evaluated and the value is
stored
COMPONENT=BMOD/HMOD/MU0
COMPONENT BMOD/HMOD/MU0
COMPONENT is a functional parameter. BMOD, HMOD and MU0
are system variables. The expression is stored and evaluated at
each output point
Expression Analyzer
Trigonometric functions
SIN,
SIN COS,
COS TAN,
TAN COSH
COSH, COTAN
COTAN, SINH
SINH, ASIN
ASIN, ACOS
ACOS, ATAN,
ATAN ATAN2 ..
SIND, COSD, TAND, ASIND ...
Same as other trigonometric functions with argument in degrees
SIND(30) = SIN(PI/6) = 0.5
Arithmetic functions
EXP, LOG, LOG10, SQRT, MOD, ABS, INT, NINT, MIN, MAX, SIGN ..
Conditional behaviour functions
DELTA,
DELTA SWITCH
SWITCH, IF
IF, RANGE
Logical arithmetic
Example
(BX>=BY&&BX>=BZ)*BX+(BY>=BX&&BY>=BZ)*BY+(BZ>=BX&&BZ>=BY)*BZ
Gives the most positive of BX, BY or BZ
Text functions:
Create a text string
%INT, %REAL, %EXPR ..
Manipulate text strings
%COMPARE, %FIND, %SUBSTR
Use filenames and directories
%FILECOUNT,
%FILECOUNT %FILEPATH ..
CONSTANTS
Retain the value they had when first defined
$CONSTANT #FLUX INTEGRAL
PARAMETERS
Retain the expression used to define them
$PARAMETER #BN BX*NX+BY*NY+BZ*NZ
MODELDIMENSION
Variables used in the Modeller to parameterize geometry
Example
$STRING picfilename file_%INT(#I*#J).png
PICTURE SAVE=YES FILE=&picfilename& TYPE=PNG
$IF #A GT 0.0
$CONSTANT #B #B+#A
$ELSE
$CONSTANT #B #B-#A
$END IF
16 3-4: Command Interpreter and Expression Analyser Cobham Technical Services
$DO #Y 0 10 2
LINE 0 #Y 0 0 #Y 20 NP=100 | PLOT COMPONENT=BY
$PAUSE
END DO
$PAUSE
Waits for Enter key to continue to next commands
$PAUSE value waits for value seconds before continuing
$ ASK command
$ ASK #name numeric_variable
Requests user for the value of #name => constant
$ PROMPT
$ PROMPT name character_variable
$ COMI filename mode
Runs a series of pre-defined commands which are stored in a .comi file
in text format
$ OS command
Issues an OS (Operating System) command
$OPEN, $CLOSE
Access other files for reading and writing
$ASK #H Enter_Cylinder_Height
$DO #J 0 2
CYLINDER Name=CYL%int(#J) X0=0 Y0=0 Z0=0 X1=0 Y1=#H-#J Z1=0,
MAJORRADIUS #J 1 MINORRADIUS=#J+1
MAJORRADIUS=#J+1 MINORRADIUS #J 1 TOPRADIUS=#J+1
TOPRADIUS #J 1
PICK OPTION=ADD PROPERTY=Name LABEL=CYL%int(#J)
PICK OPTION=CHANGE TYPE=CELL
CELLDATA OPTION=MODIFY MATERIALLABEL=TUBE_%INT(#J)
$END DO
Result
esu t for
o #H = 4
$ CLOSE stream
Closes a logical stream
$ FORMAT EXAMPLES
$FORMAT 20 EXPO 0
Floating point format for numerical data