EasyManua.ls Logo

Omron CX-PROGRAMMER V8.1 - Page 222

Omron CX-PROGRAMMER V8.1
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
197
Function Descriptions Appendix C
•Example
For further information and precautions on related Auxiliary Area flags, refer to the section on RXD Serial Com-
munications Instruction in the CS/CJ-series Instruction Reference Manual.
RXD_SCB: Receive String via Serial Port on Serial Communications Board
Function
Receives a text string from a serial port on a Serial Communications Board (SCB).
Application
RXD_SCB (Storage_location, Number_of_characters, Serial_port)
Conditions
The serial communications mode of the serial port must be set to no-protocol communications.
Arguments and Return Values
Related Auxiliary
Area Flag
Address Description
RS-232C Port
Reception Com-
pleted Flag
A392.06 ON when reception has been completed in no-protocol mode.
RS-232C Port
Reception Overflow
Flag
A392.07 ON when a data overflow occurred during reception in no-pro-
tocol mode.
RS-232C Port
Reception Counter
A393 Contains the number of characters received in no-protocol
mode.
Variable name Data type Description
Storage_location STRING Specifies the storage location for the received
text string.
Number_of_characters INT, UINT, WORD Specifies the number of characters to receive.
0 to 255
Serial_port INT, UINT, WORD Specifies the number of the serial port.
1: Serial port 1
2: Serial port 2
Variables
BOOL P_DoRecvData (* Variable to control receive function *)
STRING Message (* Variable to store received message *)
BOOL P_EndRecvCPUPort (* Reception Completed Flag *) AT A392.06
(* Receive data when P_DoRecvData is ON and reception has been completed*)
IF (P_DoRecvData = TRUE) AND (P_EndRecvCPUPort = TRUE) THEN
(* Get 16 characters *)
RXD_CPU(Message, 16);
P_DoRecvData := FALSE;
END_IF;
Barcode reader
CPU Unit
RS-232C
port
Message Value to read

Table of Contents

Related product manuals