28.11.2012 Views

Table of Contents - TG Drives

Table of Contents - TG Drives

Table of Contents - TG Drives

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

52<br />

Text mode<br />

TRead RAW CH 7<br />

PL2 MNEMONICS<br />

TRead LINE Will read a line <strong>of</strong> data to the input buffer.<br />

TRead NUM Can then be used to read a numerical value from<br />

the buffer.<br />

TRead CH Can be used to read a character from the buffer.<br />

TRead UCH Does also read a character from the buffer, but it<br />

skips all leading spaces and then converts the<br />

character to uppercase format.<br />

(Uppercase convert does only work for 7-bit<br />

characters.)<br />

This is more convenient if you will accept both ”Y”<br />

and ”y” as a positive answer to a question.<br />

To be able to use TREAD NUM, TREAD CH or TREAD UCH, you must first<br />

execute TREAD LINE to get data into the input buffer and set the read-pointer to<br />

the start <strong>of</strong> the buffer.<br />

TRead LINE CLR UCH Will clear the input buffer, read a line into the input<br />

buffer and then skip all the leading spaces, get the first<br />

character and convert it to uppercase.<br />

TRead LINE CLR NUM Will clear the input buffer, read a line into the input<br />

buffer, and then read a numerical value.<br />

TRead NUM/CH/UCH Can be used to read additional characters/numbers<br />

entered on the same line.<br />

All these TREAD statements work with ECHO enabled, and the line-editor is also<br />

active, in the same way as it is in the command monitor.<br />

The only exception to this is the:<br />

TRead RAW CH This statement will read the first character it finds,<br />

directly from the input buffer, this is useful if you want to<br />

control the terminal completely by the PL code, if no<br />

character is available it will return the code 0.<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!