Omron CX-PROGRAMMER V8.1 Operation Manual page 219

Function blocks/ structured text
Table of Contents

Advertisement

Function Descriptions
• Example
Serial
Communi-
cations
Board
(SCB)
CPU Unit
Serial
port 1
Variables
BOOL
INT
STRING
BOOL
(* Use serial port number 1 *)
(*Send data when P_DoSendData is ON and iProcess is 0 *)
IF (P_DoSendData = TRUE) AND (iProcess = 0) THEN
END_IF;
(* Execute send processing according to process number *)
CASE iProcess OF
END_CASE;
Related Auxiliary
Area Flag
Port 1 Send Ready
Flag
Port 2 Send Ready
Flag
For further information and precautions on related Auxiliary Area flags, refer to the section on TXD Serial Com-
munications Instruction in the CS/CJ-series Instruction Reference Manual.
TXD_SCU: Send String via Serial Port on Serial Communications Unit
• Function
Sends a text string from a serial port on a Serial Communications Unit (SCU).
• Application
TXD_SCU (Send_string, SCU_unit_number, Serial_port, Internal_logic_port);
• Conditions
The serial communications mode of the serial port must be set to no-protocol communications.
194
Get Scene Number
command: @READ
Barcode Reader
P_DoSendData
(* Variable to control send function *)
iProcess
(* Process number *)
Message
(* Send message *)
P_SendEnableSCBPort1 (* Send Ready Flag *) AT A356.05
Serial port 1 used.
iProcess := 1;
P_DoSendData := FALSE;
1: (* Create send text data *)
Message := '@READ';
iProcess := 2;
2: (* Execute send function if sending is enabled *)
IF P_SendEnableSCBPort1 = TRUE THEN
TXD_SCB(Message, 1);
iProcess := 3;
END_IF;
3: (* Sending is finished if Send Ready Flag is ON *)
IF P_SendEnableSCBPort1 = TRUE THEN
iProcess := 0;
END_IF;
Address
A356.05
A356.13
Description
ON when sending is enabled in no-protocol mode.
ON when sending is enabled in no-protocol mode.
Appendix C

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents

Save PDF