Setting Communication Parameters - IDEC FC6A-C16K1CE Communications Manual

Fc6a series microsmart all-in-one type
Hide thumbs Also See for FC6A-C16K1CE:
Table of Contents

Advertisement

5: U
C
SER
OMMUNICATION
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:
Communication Parameters:
Baud rate:
9,600 bps
Data bits:
8
Parity check:
None
Stop bits:
1
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.
M8120
CMP=(W)
M8125
M0
SOTU
M0
Details of S1 Settings in the Transmit Instruction
SP
SP
SP
20h
20h
20h
2Dh
2Dh
E
S
T
SP
45h
53h
54h
20h
2Dh
D20 Conversion: BCD→ASCII Digits: 2 REP: 01
H
SP
48h
20h
D21 Conversion: BCD→ASCII Digits: 2 REP: 01
M
CR
LF
CR
LF
4Dh
0Dh
0Ah
0Dh
0Ah
SP
SP
SP
C
N
20h
20h
20h
43h
4Eh
D31 Conversion: BCD→ASCII Digits: 4 REP: 01
CR
LF
SP
SP
SP
0Dh
0Ah
20h
20h
20h
D30 Conversion: BCD→ASCII Digits: 4 REP: 01
CR
LF
CR
LF
0Dh
0Ah
0Dh
0Ah
5-46
I
NSTRUCTIONS
MOV(W)
S1 –
D1 –
3
D8105
S1 –
S2 –
D1 –
D8014
0
M0
MOV(W)
S1 –
D1 –
C2
D31
MOV(W)
S1 –
D1 –
D8012
D20
MOV(W)
S1 –
D1 –
D8013
D21
TXD
S1
D1
1
73
M1
SP
P
R
I
N
2Dh
20h
50h
52h
49h
4Eh
CR
LF
CR
LF
2Dh
2Dh
0Dh
0Ah
0Dh
0Ah
T
2
.
.
.
54h
32h
2Eh
2Eh
2Eh
D
0
3
0
.
.
44h
30h
33h
30h
2Eh
2Eh
FC6A S
M
S
A
ERIES
ICRO
MART
M8120 is the initialize pulse special internal relay.
REP
3 → D8105 to enable the DSR option for busy control.
M8125 is the in-operation output special internal relay.
REP
CMP=(W) compares the D8014 second data with 0.
When the D8014 data equals 0 second, M0 is turned on.
REP
Counter C2 current value is moved to D31.
REP
D8012 hour data is moved to D20.
D8013 minute data is moved to D21.
REP
TXD1 is executed to send 73-byte data through the Serial Port 1
D2
D0
(RS232C) to the printer.
END
T
SP
T
54h
20h
54h
SP
SP
SP
D20 hour data is converted from BCD to ASCII, and 2 digits are sent.
20h
20h
20h
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.
.
2Eh
-
-O
T
C
LL
IN
NE
YPE
OMMUNICATION
M
FC9Y-B1730
ANUAL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents