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
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: ......