Function Descriptions
• Example
Serial
Commu-
nications
Board
CPU Unit
(SCB)
Serial
port 1
Variables
BOOL
P_DoRecvData
STRING Message
BOOL
P_EndRecvSCBPort1
(* 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;
Related Auxiliary
Area Flag
Port 1 Reception
Completed Flag
Port 1 Reception
Overflow Flag
Port 1 Reception
Counter
Port 2 Reception
Completed Flag
Port 2 Reception
Overflow Flag
Port 2 Reception
Counter
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.
198
Message → Value to read
Barcode reader
(* Variable to control receive function *)
(* Variable to store received message *)
(* Reception Completed Flag *) AT A356.06
Use serial port 1
Address
A356.06
A356.07
A357
A356.14
A356.15
A358
Description
ON when reception has been completed in no-protocol mode.
ON when a data overflow occurred during reception in no-pro-
tocol mode.
Contains the number of characters received in no-protocol
mode.
ON when reception has been completed in no-protocol mode.
ON when a data overflow occurred during reception in no-pro-
tocol mode.
Contains the number of characters received in no-protocol
mode.
Appendix C
Need help?
Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?
Questions and answers