193
Function Descriptions
Appendix C
• Example
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
Related Auxiliary
Area Flag
Address
Description
RS-232C Port Send
Ready Flag
A392.05
ON when sending is enabled in no-protocol mode.
Variable name
Data type
Description
Send_string
STRING
Specifies the text string to send.
Serial_port
INT, UINT, WORD
Specifies the number of the serial port.
1: Serial port 1
2: Serial port 2
Variables
BOOL
DoSendData
(* Variable to control send function *)
INT
iProcess
(* Process number *)
STRING Message
(* Send message *)
BOOL
SendEnableCPUPort
(* Send Ready Flag *)
AT A392.05
2:
(* Execute send function if sending is enabled *)
IF SendEnableCPUPort = TRUE THEN
TXD_CPU(Message);
iProcess := 3;
END_IF;
(* Send data when DoSendData is ON and iProcess is 0 *)
IF (DoSendData = TRUE) AND (iProcess = 0) THEN
END_IF;
(* Execute send processing according to process number *)
CASE iProcess OF
iProcess := 1;
DoSendData := FALSE;
1:
(* Create send text data *)
Message := '@READ';
iProcess := 2;
CPU Unit
Barcode Reader
3:
(* Sending is finished if Send Ready Flag is ON *)
IF SendEnableCPUPort = TRUE THEN
iProcess := 0;
END_IF;
END_CASE;
Get Scene Number
command: @READ
RS-232C
port
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......