1806 HEIDENHAIN Technical Manual MANUALplus 620
Module 9113 Receive ASCII characters via data interface
You must first assign the interface to the PLC and initialize it with Module
9100.
Module 9113 reads a single ASCII character from the receiving buffer of a
serial interface and resets the receiving buffer.
If there is more than one character in the receiving buffer, the first is returned
and the others are stored in a special buffer.
You can interrogate the current state with Module 9102, bit 8.
As long as data remains in the buffer, no further characters are collected from
the interface.
Can only be called in a submit job or spawn job!
Call:
PS B/W/D/K <>Interface>
0: RS232
1: RS422
CM 9113
PL W/D <>ASCII character read
[0 to 255 = ASCII characters; –1 = error>
Error recognition:
Store the result in at least one word so that the values to 255 will be
recognized.
Marker Value Meaning
NN_GenApiModule
Error (M4203)
0 Character was received
1 Error code in NN_GenApiModuleErrorCode
(W1022)
NN_GenApiModule
ErrorCode (W1022)
1 Incorrect interface
12 String too long
13 Interface not ready or no connection
14 Interface not assigned
16 Receiving buffer empty
18 Transmission error or input/output not ready
20 Module was not called in a spawn job or
submit job
37 Receiving queue is full