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.

PL2 MNEMONICS<br />

TRACE RELATED MNEMONICS<br />

Trace Related Mnemonics<br />

Used in combination with SET and GET<br />

instructions to simplify indexing into extended<br />

registers.<br />

Regencode R100,4,5 would give the adress to<br />

the register<br />

Pg.Posspeed.(32768+256*group+member)<br />

The Trace function allows the user to trace the execution <strong>of</strong> the PL program. The<br />

trace will save a time stamp and the current line number where code is executing.<br />

There is room for 512 entries in the buffer. If the PL program is modified<br />

after/during the trace, it will make the trace invalid. To conserve space in the buffer,<br />

the tracing can be limited to interesting parts, by use <strong>of</strong> the Trace OFF/Trace<br />

CONT command or a snapshot that fills the buffer, Trace ONCE. To inspect the<br />

trace buffer content, use the TLIST command. When the Trace is active it slows<br />

down the PL2 rate to about 70 % <strong>of</strong> the normal. That means if Trace is used for<br />

measuring execution speed that has to be compensated for. It also states that<br />

leaving trace active during normal operation is a waste <strong>of</strong> resources!!! To debug an<br />

error situation the Trace can be used like this:<br />

Turn on the Trace function with TRACE ON at the beginning <strong>of</strong> the program. Put<br />

TRACE OFF at the end <strong>of</strong> the error handling routine. When the error occurs there<br />

will be a log <strong>of</strong> the last 512 lines <strong>of</strong> PL2 code that lead up to the error.<br />

Trace ON Initializes the trace buffer and starts trace.<br />

Trace OFF Stops the trace.<br />

Trace CONT Continue trace without initializing the buffer.<br />

Trace ONCE Trace until buffer is full.(Single shot trace)<br />

LAN1/ LAN1 RELATED MNEMONICS<br />

SetObj Lan1 Sval Map the content in MsgObjLan1 to the priority<br />

level specified in Sval.<br />

For a detailed description see the LAN1<br />

group.<br />

GetObj Lan1 Sval Fill in the MsgObjLan1 with the message<br />

object at priority level Sval.<br />

For a detailed description see the LAN1<br />

group.<br />

Read Lan1 Reg, len, level Read len bytes and put in register Reg from<br />

the buffer for message object at level. Where<br />

len and level are Sval.<br />

For a detailed description see the LAN1<br />

group. If len is specified as negative the data<br />

will be byte swapped.<br />

Write Lan1 Reg, len, level Write len bytes to the buffer for message<br />

object at level from register Reg.<br />

For a detailed description see the LAN1<br />

group. If len is specified as negative the data<br />

will be byte swapped.<br />

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

Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />

45

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

Saved successfully!

Ooh no, something went wrong!