Tag identifier
OP
Easy XML
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
Meaning
The tag executes the specified operations.
The operations listed in Chapter "Operators (Page 43)" can be executed.
For the purpose of accessing the NC, PLC, and drive data, the complete variable name
should be placed in quotation marks. Chapter "Component addressing" (Page 74) describes
how addresses are formed.
PLC: "PLC/MB170"
NC: "NC/Channel/..."
Example:
<LET name = "tmpVar" type="INT"> </LET>
<OP> tmpVar = "plc/mb170" </OP>
<OP> tmpVar = tmpVar *2 </OP>
<OP> "plc/mb170" = tmpVar </OP>
More than one equation can be used within an operation tag. A semicolon marks the end
of the instruction.
Example:
<op>
x = x+1;
y = y+1;
</op>
Character string processing:
The operation instruction is able to process character strings and assign the results to the
string variable specified in the equation.
The identifier _T should be placed at the start as a means of identifying text terms. Format‐
ting of variable values is also possible. The identifier _F should be placed at the start of the
formatting regulation, followed by the format instruction. The address is then specified for
the variable.
Example:
<LET name="buffer" type="string"></LET>
...
...
...
<OP> buffer = _T"unformatted value R0= " + "nck/Channel/Parameter/
R[0]" + _T" and " + _T"$$85051" + _T" formatted value R1 " + _F
%9.3f"nck/Channel/Parameter/R[1]" </OP>
Generating user dialogs
1.6 XML identifier
29