Professional Documents
Culture Documents
Technical Reference
Contents
1. Instructions ..................................................................................... 2
2. Functions ....................................................................................... 27
3. Index ............................................................................................. 45
Instructions
1. Instructions
Instructions
lbl (Label)
jmp (Unconditional jump)
je (Jump if equal)
jne (Jump if not equal)
jle (Jump if less or equal)
jl (Jump if less)
jge (Jump if greater or equal)
jg (Jump if greater)
js (Jump if signed)
jz (Jump if zero)
jerr (Jump if error)
cflg (Clear flags)
1.6 Calculations
Instructions
General Instructions
Makes a call to the function with the name defined by <string>. call <string>
call fopen
Executes the procedure with the name defined by <string>. exec <string>
Executes the procedure with the name contained in the string exes sr?
register sr?.
srs sr1, moveTo
exes sr1
Copies the content of any register into a register of the move <reg>,<reg>
same data type.
srf fr1, 3.141593
move fr2, fr1
This instruction removes leading blanks and tabs from the tls sr?
defined string-register sr?. If the remaining string is
empty, the ZERO-flag is set.
srs sr3, " OPEN MIND"
tls sr3
This instruction removes terminating blanks and tabs from trs sr?
the content of a string register sr?. If the remaining
string is empty, the ZERO-flag is set.
srs sr2, "OPEN MIND "
trs sr2
The integer-register ir? defines the length of the right xrs sr?,ir?
substring of the defined string-register sr? which will be
extracted. The result is stored in the same string-register.
In case of an empty string, the ZERO–flag is set.
srs sr2, "OPEN MIND Technologies"
sri ir3,12
xrs sr2, ir3
This instruction copies the character from the position, xcs sr?,ir?
which is defined by the integer-register ir?, from the
string register sr? to the integer-register ir3. The
numbering of the positions starts with 0. If the position
is outside the string or the character is 0, ir3 finally
contains the value 0 and the ZERO-flag is set.
srs sr2, "OPEN MIND"
sri ir2, 5
xcs sr2, ir2
All the characters in the specified string register sr? are lwr sr?
converted to lowercase.
srs sr3, "BALL MILL"
lwr sr3
All the characters in the specified string-register sr? are upr sr?
converted to uppercase.
srs sr2, "Tool"
lwr sr2
Defines the length of the character string in sr? and slen ir?,sr?
transfers the result in ir?. If the string length is 0,
then the ZERO-flag is set.
Searches in the defined string register sr? the first fcs sr?,ir?
occurrence of the character on which through the ASCII-
value has been defined. Should the symbol be found,
ir1 contains the position (beginning with 0). Otherwise
ZERO-flag is set.
srs sr1, "OPEN MIND"
sri ir3, 77 ; 77 = M
fcs sr1, ir3
Similar to fcs, however the last occurrence of the character is fcsr sr?,ir?
sought, not the first.
Removes the ending of the defined string in sr? including rrs sr?,ir?
from the defined position in ir? (beginning with 0). The
result is always stored in sr2. If sr2 is empty, then an
additional ZERO-flag is set.
srs sr1, "OPEN MIND"
sri ir3, 4
rrs srl, ir3
Arithmetic Operations
Adds the content of two integer-registers and assigns the addi ir?,ir?
result to the first integer-register ir?. If the result is 0,
the ZERO-flag is set; in case of a negative result, the
SIGN-flag is set.
sri ir3, 106
sri ir2, 222
addi ir2, ir3
Adds the value of the second float-register fr? to the value addf fr?,fr?
of the first float-register fr?. A result of 0 yields a set
ZERO-flag, a negative value, set a SIGN-flag.
srf fr1, 106.22
srf fr2, 424.08
addf fr2, fr1
Subtracts from the first integer-register ir? the value of subi ir?,ir?
the second integer-register ir?. In case of a 0 result, the
ZERO-flag is set, in case of a negative result, the SIGN-
flag is set.
sri ir3, 328
sri ir1, 928
subi ir1, ir3
Arithmetic Operations
Multiplies the value of the first float-register fr? by the mulf fr?,fr?
value of the second float-register fr?. In case of the
result 0, the ZERO-flag is set or in case of a negative
result, the SIGN-flag is set.
srf fr3, 2.34
srf fr2, -1.047
mulf fr2, fr3
Divides the value of the first integer-register ir? by the divi ir?,ir?
value of the second integer-register ir?. A division by 0,
yields -2147483647,0 or 2147483647 depending on the
value of the first register ir?. According to the result, the
ZERO-flag or the SIGN-flag is set.
sri ir1, 13
sri ir2, 184
divi ir2, ir1
The value of the first float-register fr? is divided by the divf fr?,fr?
content of the second float-register fr?. If the absolute
value of the denominator is less than 1.0e-30, the result
will depends on the sign of the first value ir?. If the
absolute value is less than 1.0e-30 the result is 0,
otherwise 9.9e30. In case of a negative result the
SIGN-flag is set, in case of 0 as result, the ZERO-flag
is set.
srf fr2, 57.2
srf fr3, 1041.04
divf fr3, fr2
Arithmetic Operations
If the ZERO-flag is not set, the execution of the current jne <label>
procedure is continued at the given <label>.
If the SIGN-flag is not set, the execution of the current jge <label>
procedure is continued at the defined <label>.
ZERO_FLAG =1
SIGN_FLAG =2
ERROR_FLAG = 16
sri ir3, 3
cflg ir3
Calculations
1.6 Calculations
Calculates the absolute value of the specified float register fabs fr?
fr?. The result is always stored in fr1. If the result is 0,
the ZERO-flag is set. In case of a negative result,
the SIGN-flag is set.
srf fr2, -23.4
fabs fr2
Calculates the largest integer that is less than or equal floor fr?
to the value of the given float-register fr?. The result
is always stored in fr1. In case of 0 or negative result,
the ZERO- or the SIGN-flag is set.
srf fr3, -16.023
floor fr3
This function calculates the sine function of the given sin fr?
float-register fr? as angle in degrees. fr1 always contains
the result. Depending on the result (0 or negative)
the ZERO- or the SIGN-flag is set.
srf fr2, 30.0
sin fr2
Calculations
Calculates the cosine for the value (angle in degrees) of cos fr?
the specified float-register fr?. The result is stored in fr1.
The ZERO-flag (result is 0) or the SIGN-flag (result <0)
may be set.
srf fr3, 120.0
cos fr3
The specified float-registers fr?, fr? hold the y and x value atan2 fr?,fr?
(in this order) for the length of the opposite and adjacent
leg of the right triangle. If the absolute value of y and x
are both less than 1.0e-9 the result stored in fr1 is 0°,
otherwise values between –180.0° and 180.° may occur.
If fr1 contains 0, the ZERO-flag is set or in case of a
negative result, the SIGN-flag is set.
srf fr2, -0.5
srf fr3, -0.866025403784439
atan2 fr2, fr3
Calculations
Computes the square root of the value specified by fr?. sqrt fr?
A negative value yields an error message. Otherwise the
result is stored in fr1. In case of the result 0,
the SIGN-flag is set.
srf fr2, 1169.64
sqrt fr2
Calculations
Global Variables
This instruction is similar to cvi except from the register cvri sr?
argument sr? which defines the name of the new variable.
srs sr2, IntVar_1
cvri sr2
This instruction is similar to cvf except from the register cvrf sr?
argument sr? which defines the name of the new variable.
srs sr2, FloatVar_1
cvrf sr2
Global Variables
This instruction is similar to the svi except from the svri sr?,ir?
register argument sr? which defines the name of the
variable.
sri ir3, 750
srs sr2, IntVar_1
svri sr2, ir3
This instruction works analogous to svf except from the svrf sr?,fr?
register argument sr? which defines the name of the
variable.
sri fr2, 3.1315
srs sr2, FloatVar_1
svrf sr2, fr2
Global Variables
This instructions works analogous to svs except from the svrs sr?,sr?
register argument sr? which defines the name of the
variable.
srs sr2, StrVar_1
srs sr3, "OPEN MIND"
svrs sr2, sr3
Analogous to lvi, this instruction leads the value of the lvri ir?,sr?
variable which is specified by sr? into the integer register
ir?.
srs sr2, InvVar_1
lvri ir2, sr2
Analogous to lvi, this instruction loads the value of the lvrf ir?,sr?
variable which is specified by sr? into the float register
fr?.
srs sr2, FloatVar_1
lvrf fr3, sr2
Global Variables
The string content of the variable <string> will be copied lvs sr?,<string>
to sr?. In case of a not existing variable an error is
messaged.
lvs sr2, StrVar_1
Analogous to lvs, this instruction loads the value of the lvrs sr?,sr?
string variable which is specified by the second argument
sr? into the string register sr? defined by the first
argument.
srs sr1, StrVar_1
lvrs sr2, sr1
Analogous to dvf, this instruction destroys the global float dvrf sr?
variable which is determined by sr?.
srs sr2, FloatVar_1
dvrf sr2
Local Variables
If a local integer variable with the defined name <string> cli <string>
does not yet exist, the variable is created and initialized
with 0.
cli IntVar_L1
If not existing the local float variable <string> is created clf <string>
and set to 0.
clf FloatVar_L1
The value of ir? is assigned to the local integer variable sli <string>,ir?
<string>. An error message is generated if the specified
variable cannot be found.
sri ir3, 328
sli IntVar_L1, ir3
The local float variable <string> is set to the value of fr?. slf <string>,fr?
If the variable is missing an error message will be
generated.
srf fr2, 8.125
slf FloatVar_L1, fr2
Local Variables
The register ir? is set to the value of the local integer lli ir?,<string>
variable <string>. A not existing variable leads to an
error is message.
lli ir3, IntVar_L1
The value of the local float variable <string> is assigned llf fr?,<string>
to fr?. In case of a not existing variable, an error is
messaged.
llf fr1, FloatVar_L1
The value of the local string variable <string> is copied lls sr?,<string>
to the string register sr?. If the variable does not exist,
an error message is output.
lls sr2, StrVar_L1
This instruction removes the local integer variable, the dli <string>
name of which is determined by <string>.
dli IntVar_L1
The local float variable which has the name <string> is dlf <string>
destroyed.
dlf FloatVar_L1
The local string variable with the specified name <string> dls <string>
is destroyed.
dls StrVar_L1
This instruction tests whether a procedure with the given xpr <string>
name <string> exists. If the procedure is not found, the
ZERO-flag is set.
xpr "changeFrame"
This instruction looks for a procedure which has the xrpr sr?
name specified by sr?. If the procedure does not exist,
the ZERO-flag is set.
srs sr2, "changeFrame"
xrpr sr2
The function which is specified through sr? is searched for xrfc sr?
and in case of failure, the ZERO-flag is set.
srs sr2, "frmchck"
xrfc sr2
The global integer variable defined by sr? is searched for xvri sr?
and if it cannot be found, the ZERO-flag is set.
srs sr2, IntVar_1
xvri sr2
This instruction tests the existence of the global float xvf <string>
variable <string>. If the variable doesn´t exist, the
ZERO-flag is set.
xvf FloatVar_1
If the search for the global string variable specified by sr? xvrs sr?
has no success, the ZERO-flag is set.
srs sr1, StrVar_1
xvrs sr1
Functions
2. Functions
2.4 Output
Functions
2.7 Interpolation
2.9 Miscellaneous
"<name>": = "<type>:<value>"
I for integer
B for boolean
F for float and
S for string
The assignment
"number" := "I:-535"
has the same effect as the OMA-instructions
cvi number
sri ir1, -535
svi number, ir1
This function load the OMA data which is defined by sr1. load_oma
In case of an equal name, the old procedure is (sr1)
overwritten.
Flow Control
Output
2.4 Output
1 read
2 overwrite an existing file
4 append in case of an existing file
16 binary (default: text)
256 write
This function writes the content of register sr1 to the file fwrite
which is referenced by the file handle in ir1. (sr1, ir1)
srs sr1, "OPEN MIND\n"
lvi ir1, fileHandle
call fwrite
If ir1 contains no valid file handle, ir2 and ir3 are set to
–1.
Output
This function copies the content of the file defined by sr1 fcopy
to the file defined by sr2. If the target file already exists, (sr1, sr2 : ir3)
the content of the first file is appended.
0 File copied
-1 Failed to access source file
-2 Failed to access target file
srs sr1, "source.dat"
srs sr2, "dest.dat"
call fcopy
This function copies the content of the file defined by sr1 fcopyC
to the current NC file by means of the procedure comment. (sr1 : ir3)
This function copies the content of the file defined by sr1 fcopyN
to the current NC file by means of the procedure literal. (sr1 : ir3)
Output
N = N + dN;
If ( N > Nmax) N = NO;
Output
Removes all entries from the internal string list which has clrcmnt
a type fitting to ir3 (--> pushcmnt) (ir3 : -)
Stores the next block number N as the start of the block blkopen
which may be repeated. The block ID is to be defined in (ir3)
ir3.
This function loads the definition of a block, i.e. the block blkset
numbers into the integer variables N_start and N_end. (ir3)
The ID of the block is given through ir3.
Returns the size of the latest opened and not yet closed sizeof_pds
dataset in ir3. In case of failure ir3 is set to –1 and the (-:ir3)
ZERO-flag is set.
I integer variable
F float variable
S string variable
P procedure
Interpolation
2.7 Interpolation
Apart from internal actions this function writes the value ippnt
of tx, ty and tz point object to the interpolation OMX-file.
This function removes any zero point which was previously reset_zero_offsets
defined by the function def_zero_offset.
call reset_zero_offsets
Miscellaneous
2.9 Miscellaneous
This function calculates the angle between the line which is g1_angle
defined by current position (current_x, current_y, current_z) (- : fr1)
and target position (tx, ty, tz) and the positive z-axis.
The result is stored in fr1.
Index
3. Index
Index
svi (instr)
svrf (instr)
svri (instr)
svrs (instr)
svs (instr)
tls (instr)
trs (instr)
upr (instr)
xcs (instr)
xfc (instr)
xfilter (fct)
xls (instr)
xpr (instr)
xrfc (instr)
xrpr (instr)
xrs (instr)
xvf (instr)
xvi (instr)
xvrf (instr)
xvri (instr)
xvrs (instr)
xvs (instr)