
Series 30i/ 31i/ 32i-A
C executor library for conversion
Programming manual
01 04.05.06
S. Hasegawa
New registration
B-64183EN/01
EDIT
DATE
DESIG.
DESCRIPTION
150/226
DRAW.NO.
3.10.10
Read from the Reader / Puncher Interface
[Name]
pl_rsrd
[Syntax]
#include <pmclib.h>
short pl_rsrd(char * buf, unsigned short * size);
[Arguments]
Input
buf: Pointer to the buffer
Set the pointer to the array that the read data is stored.
*size: Size of the buffer
Set size of the buffer. The maximum size is 256 bytes.
Output
*buf: Read data
The read data is stored.
*size: Size of read data
The size of read data is returned. The value is equal or less than
the specified value at calling.
[Return]
0: Normal completion.
-11: The reader / puncher interface is not opened.
2: The "*size" is invalid.
5: The argument or read value is invalid.
20: The communication status is invalid or the "DR" signal is OFF.
21: There is no data in communication buffer. After certain time, call
this function again.
[Description]
This function reads data from reader / puncher interface.
You should open the interface by the calling of pl_rsopen(), not
pl_rsopen2(), before the calling of pl_rsrd(). You should close the
interface by the calling of pl_rsclose(), not pl_rsclose2(), after the calling
of pl_rsrd().
When you use this function, you cannot use the conventional function
related to The RS-232C communication in "C library for C executor"
together.
[Related Function]
rs_read()