![background image](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241224.webp)
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
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......