Omron WS02-CXPC1-V9 - V9 Operation Manual page 219

Table of Contents

Advertisement

Function Descriptions
• Example
CPU Unit
Get Scene Number
command: @READ
RS-232C
port
Variables
BOOL
DoSendData
INT
iProcess
STRING Message
BOOL
SendEnableCPUPort
(* Send data when DoSendData is ON and iProcess is 0 *)
IF (DoSendData = TRUE) AND (iProcess = 0) THEN
iProcess := 1;
DoSendData := FALSE;
END_IF;
(* Execute send processing according to process number *)
CASE iProcess OF
1:
(* Create send text data *)
Message := '@READ';
iProcess := 2;
2:
(* Execute send function if sending is enabled *)
IF SendEnableCPUPort = TRUE THEN
END_IF;
3:
(* Sending is finished if Send Ready Flag is ON *)
IF SendEnableCPUPort = TRUE THEN
END_IF;
END_CASE;
Related Auxiliary
Area Flag
RS-232C Port 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_SCB: Send String via Serial Port on Serial Communications Board
• Function
Sends a text string from a serial port on a Serial Communications Board (SCB).
• Application
TXD_SCB (Send_string, Serial_port);
• Conditions
The serial communications mode of the serial port must be set to no-protocol communications.
• Arguments and Return Values
Variable name
Send_string
Serial_port
Barcode Reader
(* Variable to control send function *)
(* Process number *)
(* Send message *)
(* Send Ready Flag *)
TXD_CPU(Message);
iProcess := 3;
iProcess := 0;
Address
A392.05
Data type
STRING
INT, UINT, WORD
AT A392.05
Description
ON when sending is enabled in no-protocol mode.
Description
Specifies the text string to send.
Specifies the number of the serial port.
1: Serial port 1
2: Serial port 2
Appendix C
193

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents