UD70
Issue code: 70nu2
Reference
7-13
FLOAT
Syntax
result = FLOAT (integer expression%
This function converts an integer variable into a floating-point variable.
Example
error% = 123
result = error% / 1000
This produces an output of [result = 0] since 123 / 1000 = 0 in integer
arithmetic. To produce the correct answer, one of the operands need to be
converted to floating-point.
error% = 123
result = FLOAT(error%) / 1000
This produces the correct answer: result = 0.123
result = 0.123
See also
INT
instruction.
GETCHAR
Syntax
result% = GETCHAR
This is a
RS485
port function which reads in a character from the
RS485
communications port.
The returned value is –
–11 if no characters have been received in the buffer,
otherwise the value is the
ASCII
code for the character read in.
See also
PUTCHAR
instruction.
GETKEY
Syntax
result% = GETKEY
This is a
RS232
port function which reads in a character from the
RS232
PC
communications port. This function can be used only when Toolkit
communications are disabled (see Disable Toolkit communications in
Chapter 10, Parameters).
This function can only be used if Dumb-terminal Mode is enabled (see Enable
dumb-terminal mode in Chapter 10 Parameters).
The returned value is the
ASCII
code of the character read in. If there is no
character, the value is –
–11.
The data format of the
RS232
port is fixed as follows:
19200 baud, 8 data bits, No parity, 1 start bit, 1 stop bit.
See also
PUTKEY
instruction.
Summary of Contents for UD70
Page 6: ......
Page 14: ...UD70 Issue code 70nu2 2 6 Installation...
Page 42: ...UD70 Issue code 70nu2 4 20 DPL programming...
Page 98: ...UD70 Issue code 70nu2 7 22 Reference...