
5: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
5-46
FC6A S
ERIES
M
ICRO
S
MART
A
LL
-
IN
-O
NE
T
YPE
C
OMMUNICATION
M
ANUAL
FC9Y-B1730
Setting User Communication Mode in WindLDR Function Area Settings
Since this example uses the Serial Port 1 (RS232C), select User Protocol for Port 1 in the
Function Area Settings
using
WindLDR. See "Programming WindLDR" on page 5-25.
Setting Communication Parameters
Set the communication parameters to match those of the printer. See "Programming WindLDR" on page 5-25. For details of the
communication parameters of the printer, see the user’s manual for the printer. An example is shown below:
Note:
The receive timeout value is used for the RXD instruction in the user communication mode. Since this example uses only the TXD instruction,
the receive timeout value has no effect.
Ladder Diagram
The second data stored in special data register D8014 is compared with 0 using the CMP= (compare equal to) instruction. Each
time the condition is met, the TXD1 instruction is executed to send the C2 and D30 data to the printer. A counting circuit for
counter C2 is omitted from this sample program.
Details of S1 Settings in the Transmit Instruction
Communication Parameters:
Baud rate:
9,600 bps
Data bits:
8
Parity check:
None
Stop bits:
1
S1 –
3
M8120
REP
D1 –
D8105
S2 –
0
REP
D1 –
M0
END
SOTU
S1
73
D2
D0
D1
M1
M0
M0
MOV(W)
TXD
1
CMP=(W)
S1 –
D8014
M8125
S1 –
C2
REP
D1 –
D31
MOV(W)
S1 –
D8012
REP
D1 –
D20
MOV(W)
S1 –
D8013
REP
D1 –
D21
MOV(W)
M8120 is the initialize pulse special internal relay.
3
→
D8105 to enable the DSR option for busy control.
M8125 is the in-operation output special internal relay.
CMP=(W) compares the D8014 second data with 0.
When the D8014 data equals 0 second, M0 is turned on.
Counter C2 current value is moved to D31.
D8012 hour data is moved to D20.
D8013 minute data is moved to D21.
TXD1 is executed to send 73-byte data through the Serial Port 1
(RS232C) to the printer.
D20 hour data is converted from BCD to ASCII, and 2 digits are sent.
D21 minute data is converted from BCD to ASCII, and 2 digits are sent
D31 counter C2 data is converted from BCD to ASCII, and 4 digits are
sent.
D30 data is converted from BCD to ASCII, and 4 digits are sent.
SP
20h
SP
20h
SP
20h
–
2Dh
–
2Dh
–
2Dh
SP
20h
P
50h
R
52h
I
49h
N
4Eh
T
54h
SP
20h
T
54h
E
45h
S
53h
T
54h
SP
20h
–
2Dh
–
2Dh
–
2Dh
CR
0Dh
LF
0Ah
CR
0Dh
LF
0Ah
SP
20h
SP
20h
SP
20h
H
48h
SP
20h
M
4Dh
CR
0Dh
LF
0Ah
CR
0Dh
LF
0Ah
SP
20h
SP
20h
SP
20h
C
43h
N
4Eh
T
54h
2
32h
.
2Eh
.
2Eh
.
2Eh
CR
0Dh
LF
0Ah
SP
20h
SP
20h
SP
20h
D
44h
0
30h
3
33h
0
30h
.
2Eh
.
2Eh
.
2Eh
CR
0Dh
LF
0Ah
CR
0Dh
LF
0Ah
D20 Conversion: BCD
→
ASCII Digits: 2 REP: 01
D21 Conversion: BCD
→
ASCII Digits: 2 REP: 01
D31 Conversion: BCD
→
ASCII Digits: 4 REP: 01
D30 Conversion: BCD
→
ASCII Digits: 4 REP: 01
Содержание MICROSmart FC6A-C16K1CE
Страница 1: ...B 1730 2 FC6A SERIES All in One Type Communication Manual...
Страница 60: ...3 COMMUNICATION SETTINGS 3 22 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 76: ...4 MAINTENANCE COMMUNICATION 4 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 126: ...5 USER COMMUNICATION INSTRUCTIONS 5 50 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 158: ...6 MODBUS COMMUNICATION 6 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 200: ...8 J1939 COMMUNICATION 8 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 218: ...10 SEND E MAIL FUNCTION 10 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 252: ...INDEX 4 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730 INDEX...