28.11.2012 Views

Table of Contents - TG Drives

Table of Contents - TG Drives

Table of Contents - TG Drives

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

30<br />

Compiler Symbols<br />

PL2 NATIVE POSITION LANGUAGE<br />

Reg, XReg, or instruction-dependent operators. Use<br />

parentheses to force the compiler to parse the expression if<br />

the expression is a const_expr.Format:<br />

[Let] Reg = Reg let_operator SConst<br />

[Let] XReg = XReg let_operator SConst<br />

Example:<br />

[Let] MyRegister = MyRegister * MyValue + 3<br />

MyValue + 3 is a const_expr and is evaluated during<br />

compilation.<br />

indirect_reg Designates an internal 32-bit register and is accessed as<br />

R(Rnnn).<br />

COMPILER SYMBOLS<br />

A symbol can contain the letters “A” to “Z” and “a” to “z”, the underscore ’_’<br />

character, and digits “0” to “9”. With the following restrictions:<br />

• The first character must be a letter or an underscore.<br />

• By default, the compiler recognizes only the first 64 characters as significant.<br />

VSymbol Alias for a value. A VSymbol can be used as an alias for const<br />

or const_expr. VSymbols are constant values and are defined<br />

using .DEFINE directives.<br />

Example:<br />

.DEFINE ENDPOS = 1000<br />

.DEFINE STAPOS = ENDPOS + 2000<br />

RSymbol Alias for a register. RSymbols that can be used as an alias for<br />

Reg. Rsymbols are constant values and are defined using<br />

.DEFINE directives.<br />

Example:<br />

.DEFINE REG12 = R12<br />

.DEFINE MAXSPD = REG12<br />

XSymbol Alias for an extended register. An XSymbol can be used as an<br />

alias for XReg. XSymbols are constant values and are<br />

defined using .DEFINE directives.<br />

Example:<br />

.DEFINE MPOLES = Motor.Poles<br />

.DEFINE MPOL = MPOLES<br />

ISymbol Alias for an indirect register address. An ISymbol can be used<br />

as an alias for an indirect_reg. ISymbols are constant values<br />

are defined using .DEFINE directives.<br />

Example:<br />

.DEFINE IDXREG = R(R40)<br />

.DEFINE IDX = IDXREG<br />

.DEFINE IDXFOO = R(REG12)<br />

ISymbol Alias for an indirect register address. An ISymbol can be used<br />

as an alias for an indirect_reg. ISymbols are constant values<br />

are defined using .DEFINE directives.<br />

Example:<br />

.DEFINE IDXREG = R(R40)<br />

.DEFINE IDX = IDXREG<br />

.DEFINE IDXFOO = R(REG12)<br />

User's Manual 5.1 Inmotion Technologies AB<br />

Doc. No.9032 0027 01 (B), Rev. 11.07.2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!