Basic Principles of Serial Data Transmission
2.6 Data transmission with the printer driver
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
59
Outputting a message text
The figure below illustrates the sequence of operations for a printout.
7KHPHVVDJHWH[W
WREHRXWSXW
LVVSHFLILHGE\WKHSRLQWHUV
LQWKHSRLQWHU'%
:DLWIRUD
SULQWMRE
3ULQWHGLWLQJ
DQGRXWSXWRIWKH
PHVVDJHWH[W
5HTXHVWSURFHVVHG
3ULQWMREDUULYHG
Figure 2-18 Flow chart of printout
Data flow control/Handshaking
Handshaking controls the data flow between two communication partners. Handshaking
ensures that data is not lost in transmissions between devices that work at different speeds.
You can also send message texts with data flow control during printout. There are essentially
two types of handshaking:
● Software handshaking (e.g., XON/XOFF)
● Hardware handshaking (e.g., RTS/CTS)
Data flow control is implemented as follows on the CP 340 during printout:
● As soon as the CP 340 is switched to the operating mode with flow control by means of
parameterization, it sends the XON character or sets the RTS line to ON.
● CP 340 interrupts the output of characters when it receives the XOFF character, or when
control signal CTS = OFF. If neither an XON character is received nor CTS is set to ON
once a configured time has elapsed, printout is aborted and an appropriate error
message (0708H) is generated at the STATUS output of the PRINT SFB.
Note
When RTS/CTS flow control is parameterized, you must fully wire the interface signals
used in the plug connection (see Appendix RS 232C interface of the CP 340–RS 232C
(Page 165)).