![background image](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241220.webp)
194
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_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.
Related Auxiliary
Area Flag
Address
Description
Port 1 Send Ready
Flag
A356.05
ON when sending is enabled in no-protocol mode.
Port 2 Send Ready
Flag
A356.13
ON when sending is enabled in no-protocol mode.
Variables
BOOL
P_DoSendData
(* Variable to control send function *)
INT
iProcess
(* Process number *)
STRING Message
(* Send message *)
BOOL
P_SendEnableSCBPort1 (* Send Ready Flag *) AT A356.05
Serial port 1 used.
(* Use serial port number 1 *)
(*Send data when P_DoSendData is ON and iProcess is 0 *)
IF (P_DoSendData = TRUE) AND (iProcess = 0) THEN
iProcess := 1;
P_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
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;
END_CASE;
CPU Unit
Barcode Reader
Serial
Communi-
cations
Board
(SCB)
Get Scene Number
command: @READ
Serial
port 1
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: ......