17: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
17-32
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
Sample Program – User Communication TXD
This example demonstrates a program to send data to a printer using the user communication TXD2 (transmit) instruction,
with the optional RS232C communication adapter installed on the port 2 connector of the 24-I/O type CPU module.
System Setup
The name of BUSY terminal differs depending on printers, such as DTR. The function of this terminal is to send a signal
to remote equipment whether the printer is ready to print data or not. Since the operation of this signal may differ depend-
ing on printers, confirm the operation before connecting the cable.
Description of Operation
The data of counter C2 and data register D30 are printed every minute. A printout
example is shown on the right.
Programming Special Data Register
Special data register D8105 is used to monitor the BUSY signal and to control the
transmission of print data.
The
MicroSmart
monitors the DSR signal to prevent the receive buffer of the printer from overflowing. For the DSR sig-
Special DR
Value
Description
D8105
3
While DSR is on (not busy), the CPU sends data.
While DSR is off (busy), the CPU stops data transmission.
If the off duration exceeds a limit (approx. 5 sec), a trans-
mission busy timeout error will occur, and the remaining
data is not sent. The transmit status data register stores
an error code. See pages 17-11 and 17-27.
To RS232C Por t
D-sub 9-pin Connector Pinouts
Pin
Description
1
NC
No Connection
2
NC
No Connection
3
DATA
Receive Data
4
NC
No Connection
5
GND
Ground
6
NC
No Connection
7
NC
No Connection
8
BUSY Busy Signal
9
NC
No Connection
Printer
Mini DIN Connector Pinouts
Description
Color
Pin
Shield
—
Cover
NC
No Connection
Black
1
NC
No Connection
Yellow
2
TXD
Transmit Data
Blue
3
NC
No Connection
Green
4
DSR
Data Set Ready
Brown
5
NC
No Connection
Gray
6
SG
Signal Ground
Red
7
NC
No Connection
White
8
User Communication Cable 1C
FC2A-KP1C
2.4m (7.87 ft.) long
Attach a proper connector to the open
end of the cable referring to the cable
connector pinouts shown below.
Cable Connection and Pinouts
To Por t 2 (RS232C)
RS232C Communication Adapter
FC4A-PC1
Caution
•
Do not connect any wiring to the NC (no connection) pins; otherwise, the
MicroSmart
and the
printer may not work correctly and may be damaged.
--- PRINT TEST ---
11H 00M
CNT2...0050
D030...3854
--- PRINT TEST ---
11H 01M
CNT2...0110
D030...2124
Printout Example
Summary of Contents for FC4A-C10R2
Page 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Page 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Page 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Page 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Page 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Page 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Page 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Page 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Page 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Page 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Page 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Page 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Page 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...