EasyManua.ls Logo

Omron CX-PROGRAMMER V8.1 - Page 223

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...
198
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_SCU: Receive String via Serial Port on Serial Communications Unit
Function
Receives a text string from a serial port on a Serial Communications Unit (SCU).
Application
RXD_SCU (Storage_location, Number_of_characters, SCU_unit_number, Serial_port,
Internal_logic_port);
Conditions
The serial communications mode of the serial port must be set to no-protocol communications.
Related Auxiliary
Area Flag
Address Description
Port 1 Reception
Completed Flag
A356.06 ON when reception has been completed in no-protocol mode.
Port 1 Reception
Overflow Flag
A356.07 ON when a data overflow occurred during reception in no-pro-
tocol mode.
Port 1 Reception
Counter
A357 Contains the number of characters received in no-protocol
mode.
Port 2 Reception
Completed Flag
A356.14 ON when reception has been completed in no-protocol mode.
Port 2 Reception
Overflow Flag
A356.15 ON when a data overflow occurred during reception in no-pro-
tocol mode.
Port 2 Reception
Counter
A358 Contains the number of characters received in no-protocol
mode.
Variables
BOOL P_DoRecvData (* Variable to control receive function *)
STRING Message (* Variable to store received message *)
BOOL P_EndRecvSCBPort1 (* Reception Completed Flag *) AT A356.06
Use serial port 1
(* Use serial port number 1 *)
(* Receive data when P_DoRecvData is ON and reception has been completed*)
IF (P_DoRecvData = TRUE) AND (P_EndRecvSCBPort1 = TRUE) THEN
(* Get 16 characters *)
RXD_SCB(Message, 16, 1);
P_DoRecvData := FALSE;
END_IF;
Barcode reader
CPU Unit
Serial
Commu-
nications
Board
(SCB)
Serial
port 1
Message Value to read

Table of Contents

Related product manuals