9-3. STX-ETX Mode

The start of the STX-ETX mode should occur with a totally empty print buffer. This can be achieved by sending an ENQ code to the printer and checking the status until the status code indicates an empty buffer. At that point, the STX code is sent by the host computer followed by a data block. While receiving the data block, the printer generates a horizontal parity check character. After the data block is sent, the host computer sends an ENQ which causes the printer to return 2 characters, one would be the normal status character, and the second would be the horizontal parity check character that was generated by the printer while the data block was received.

The host computer checks the status character to determine if any vertical parity errors or other errors occurred during block transmission, and checks the horizontal parity character against a character generated in the host computer while the data was transmitted. If there are no errors, ETX causes the buffer to be printed, but if an error is detected, CAN code clears the buffer and the data is transmitted again. Any control codes transmitted to the printer during the STX- ETX mode will be ignored as control codes, but will be included in the check character. This is done to prevent a control code received in error from causing printing of erroneous data.

STATUS

Parity

Vertical and horizontal parity check is executed in STX-ETX mode.

Framing Error

Framing Error occurs when SPACE signal is detected at STOP Bit time. Framing error or even vertical parity error will be indicated by printing “?”.

– 41 –

Page 45
Image 45
Star Micronics DP8340R user manual STX-ETX Mode