Knowledge (XXG)

Software flow control

Source 📝

341:. Since the computer is faster at sending data than the printer can print it, the printer falls behind and approaches a situation where it would be overwhelmed by the data. The printer reacts to this situation by sending XOFF to the computer, which temporarily stops sending data. When the printer is again ready to receive more data, it sends XON to the computer, which starts sending data again. 47: 486:
Finally, since the XOFF/XON codes are sent in-band, they cannot appear in the data being transmitted without being mistaken for flow control commands. Any data containing the XOFF/XON codes thus must be encoded in some manner for proper transmission, with corresponding overhead. This is frequently
367:
However, software flow control is not without its problems. The most important drawback is that software flow control is less reliable. Sending XOFF requires at least one character time to transmit, and may be queued behind already-transmitted data still in buffers. Hardware signals may be asserted
364:, only two signals are needed, one to send and the other to receive. Hardware flow control requires additional wires between the two devices. It also requires specific hardware implementation, which had more significant costs in earlier days of computing (i.e., 1960s and 70s). 563:
Robust XON is a technique to restart communication, just in case it was stopped by an accidentally received XOFF. The receiving unit sends periodic XON characters when it can receive data, and the line is idle. One common use is by serial printers (like
601: 170:(from "transmit off" and "transmit on", respectively). Thus, "software flow control" is sometimes called "XON/XOFF flow control". This is in contrast to flow control via dedicated 326:
When one end of a data link is unable to accept any more data (or approaching that point), it sends XOFF to the other end. The other end receives the XOFF code, and suspends
652: 523:, employ "padding" (short delays using millisecond granularity) to allow such equipment sufficient time to perform the requested actions without the need to assert XOFF. 472: 610: 64: 568:
II) to indicate they are online and ready to receive data. The XON is sent every 1 to 30 seconds depending on the printer's firmware design.
483:, may suffer from buffer overruns when using software flow control, although this can be somewhat mitigated by disabling the UART's FIFO. 475:, which is able to cease transmission immediately, without the intervention of higher levels. To handle the latency caused by builtin 327: 130: 111: 660: 83: 476: 491:. For printing devices that directly interpret ASCII codes, this is not a large problem, because the XON and XOFF codes use 213:
ASR adopted two of these, DC3 and DC1, for use as XOFF and XON, respectively. This usage was copied by others, and is now a
209:
for use as XON/XOFF specifically. However, it does provide four generic "device control" characters (DC1 through DC4). The
90: 68: 677: 479:, more advanced UARTs, like the 16950, provide "on-chip" software flow control. UARTs that lack such support, like the 97: 635: 526:
XOFF/XON are still sometimes used manually by computer operators, to pause and restart output which otherwise would
511:, to indicate they are temporarily unable to accept more data. Typically, this is due to a combination of limited 79: 57: 549: 609:. Moxa Tech Note (1.0 ed.). Moxa Technical Writing Center (published September 30, 2009). Archived from 330:. Once the first end is ready to accept data again, it sends XON, and the other end resumes transmission. 577: 195: 471:. Hardware flow control, on the other hand, is typically under the direct control of the transmitting 361: 357: 467:), which can cause further delays in XOFF response. These delays can lead to data corruption due to 504: 338: 175: 147: 104: 31: 536:
software generally implements XOFF/XON support as a basic function. This generally includes the
512: 533: 214: 210: 206: 159: 171: 656: 488: 468: 537: 179: 671: 557: 508: 395: 356:
The principal advantage of software flow control is the reduction in the number of
503:
Software flow control is used extensively by low-speed devices, especially older
565: 516: 345: 258: 46: 459:
As the name "software flow control" implies, flow control using this method is
480: 35: 162:, over the primary communications channel. These codes are generally called 527: 151: 390: 464: 334: 520: 253: 653:"HP LaserJet IIP and IIP Plus Printers - Control Panel Keys and Menus" 155: 385: 17: 553: 545: 492: 248: 191: 541: 199: 344:
XOFF/XON can be employed in both directions, for example, two
40: 34:. For the oil company which formerly traded as XON, see 30:"Xon" redirects here. For the Star Trek character, see 194:
character code, XOFF is generally represented using a
519:
being full. Some terminal control packages, such as
603:
The Secrets of Flow Control in Serial Communication
71:. Unsourced material may be challenged and removed. 8: 380: 373: 368:almost instantaneously, and out-of-order. 202:with decimal value 19; XON with value 17. 131:Learn how and when to remove this message 636:"The Termcap Library - Describe Padding" 313: 309: 287: 283: 235: 230: 226: 222: 218: 205:The ASCII standard does not reserve any 589: 595: 593: 360:between sender and receiver. Given a 233:for XON, also derive from this usage. 158:. It uses special codes, transmitted 352:Comparison with hardware flow control 7: 69:adding citations to reliable sources 375:Summary of flow control tradeoffs 237:XOFF/XON representations in ASCII 25: 45: 495:"device control" code numbers. 333:For example, one may imagine a 217:. The keyboard equivalents of 56:needs additional citations for 32:Star Trek: Phase II § Cast 430:Software f.c. (FIFO disabled) 1: 530:off the display too quickly. 444:Software f.c. (FIFO enabled) 463:implemented in software (or 694: 29: 348:connected to each other. 487:done with some kind of 337:sending data to a slow 80:"Software flow control" 416:On-chip software f.c. 402:Hardware flow control 190:For systems using the 600:Yang, Casper (2009). 578:Ethernet flow control 548:machines, as well as 358:electrical conductors 176:hardware flow control 144:Software flow control 297:Resume transmission 65:improve this article 678:Flow control (data) 376: 271:Pause transmission 238: 27:Flow control method 552:emulators such as 374: 236: 207:control characters 534:Terminal emulator 457: 456: 319: 318: 215:de facto standard 211:Teletype Model 33 150:used in computer 141: 140: 133: 115: 16:(Redirected from 685: 664: 659:. Archived from 644: 643: 632: 626: 625: 623: 621: 615: 608: 597: 397: 392: 387: 382: 377: 239: 136: 129: 125: 122: 116: 114: 73: 49: 41: 21: 693: 692: 688: 687: 686: 684: 683: 682: 668: 667: 663:on May 9, 2006. 657:Hewlett-Packard 651: 648: 647: 634: 633: 629: 619: 617: 613: 606: 599: 598: 591: 586: 574: 501: 489:escape sequence 469:buffer overruns 433:Good, but slow 371: 354: 324: 315: 311: 289: 285: 232: 228: 224: 220: 188: 146:is a method of 137: 126: 120: 117: 74: 72: 62: 50: 39: 28: 23: 22: 15: 12: 11: 5: 691: 689: 681: 680: 670: 669: 666: 665: 646: 645: 627: 616:on Aug 4, 2022 588: 587: 585: 582: 581: 580: 573: 570: 538:system console 509:dumb terminals 500: 497: 455: 454: 451: 448: 445: 441: 440: 437: 434: 431: 427: 426: 423: 420: 417: 413: 412: 409: 406: 405:Most reliable 403: 399: 398: 393: 388: 386:Data integrity 383: 353: 350: 323: 320: 317: 316: 307: 304: 301: 298: 295: 291: 290: 281: 278: 275: 272: 269: 265: 264: 261: 256: 251: 246: 243: 225:for XOFF, and 187: 186:Representation 184: 180:RS-232 RTS/CTS 139: 138: 53: 51: 44: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 690: 679: 676: 675: 673: 662: 658: 654: 650: 649: 641: 637: 631: 628: 612: 605: 604: 596: 594: 590: 583: 579: 576: 575: 571: 569: 567: 561: 559: 558:Win32 console 555: 551: 547: 543: 539: 535: 531: 529: 524: 522: 518: 515:rate and any 514: 510: 506: 498: 496: 494: 490: 484: 482: 478: 474: 470: 466: 462: 452: 449: 446: 443: 442: 438: 435: 432: 429: 428: 424: 421: 418: 415: 414: 410: 407: 404: 401: 400: 394: 389: 384: 379: 378: 372: 369: 365: 363: 362:common ground 359: 351: 349: 347: 342: 340: 336: 331: 329: 321: 308: 305: 302: 299: 296: 293: 292: 282: 279: 276: 273: 270: 267: 266: 262: 260: 257: 255: 252: 250: 247: 244: 241: 240: 234: 216: 212: 208: 203: 201: 197: 193: 185: 183: 181: 177: 173: 169: 165: 161: 157: 156:RS-232 serial 154:, especially 153: 149: 145: 135: 132: 124: 113: 110: 106: 103: 99: 96: 92: 89: 85: 82: –  81: 77: 76:Find sources: 70: 66: 60: 59: 54:This article 52: 48: 43: 42: 37: 33: 19: 661:the original 639: 630: 618:. Retrieved 611:the original 602: 562: 532: 525: 502: 499:Applications 485: 460: 458: 370: 366: 355: 346:teleprinters 343: 332: 328:transmission 325: 204: 189: 178:" — such as 167: 163: 148:flow control 143: 142: 127: 118: 108: 101: 94: 87: 75: 63:Please help 58:verification 55: 640:www.gnu.org 566:HP LaserJet 447:Unreliable 396:Out of Band 174:signals — " 172:out-of-band 584:References 540:on modern 152:data links 121:March 2009 91:newspapers 36:ExxonMobil 322:Mechanism 263:Keyboard 196:character 672:Category 572:See also 556:and the 505:printers 465:firmware 391:Low cost 335:computer 245:Meaning 521:termcap 517:buffers 461:usually 339:printer 160:in-band 105:scholar 620:Aug 4, 528:scroll 513:output 107:  100:  93:  86:  78:  614:(PDF) 607:(PDF) 554:xterm 546:Linux 493:ASCII 481:16550 477:FIFOs 422:Some 419:Good 268:XOFF 249:ASCII 242:Code 192:ASCII 112:JSTOR 98:books 622:2022 544:and 542:Unix 507:and 473:UART 450:Yes 436:Yes 411:Yes 381:Type 310:Ctrl 300:DC1 294:XON 284:Ctrl 274:DC3 227:Ctrl 219:Ctrl 200:byte 166:and 164:XOFF 84:news 550:GUI 453:No 439:No 425:No 408:No 306:11 303:17 280:13 277:19 259:Hex 254:Dec 198:or 168:XON 67:by 18:XON 674:: 655:. 638:. 592:^ 560:. 182:. 642:. 624:. 314:Q 312:+ 288:S 286:+ 231:Q 229:+ 223:S 221:+ 134:) 128:( 123:) 119:( 109:· 102:· 95:· 88:· 61:. 38:. 20:)

Index

XON
Star Trek: Phase II § Cast
ExxonMobil

verification
improve this article
adding citations to reliable sources
"Software flow control"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
flow control
data links
RS-232 serial
in-band
out-of-band
hardware flow control
RS-232 RTS/CTS
ASCII
character
byte
control characters
Teletype Model 33
de facto standard
ASCII
Dec
Hex

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.