Terminating Data Transmissions
GPIB data transfers are terminated either when the GPIB EOI line is asserted with the last byte of a transfer or when a preconfigured end-of-string (EOS) character is transmitted. By default, the NI-488.2 driver asserts EOI with the last byte of writes, and the EOS modes are disabled.
If EOT mode is enabled, the NI-488.2 driver asserts the GPIB EOI line when the last byte of a write is sent out on the GPIB. If it is disabled, the EOI line is not asserted with the last byte of a write.
EOS mode configuration includes the following information:
- A 7-bit or 8-bit EOS byte.
- EOS comparison method. This method indicates whether the EOS byte has seven or eight significant bits. For a 7-bit EOS byte, the eighth bit of the EOS byte is ignored.
- EOS write method. If this method is enabled, the NI-488.2 driver automatically asserts the GPIB EOI line when the EOS byte is written to the GPIB. If the buffer passed into an ibwrt call contains five occurrences of the EOS byte, the EOI line is asserted as each of the five EOS bytes are written to the GPIB. If an ibwrt buffer does not contain an occurrence of the EOS byte, the EOI line is not asserted (unless the EOT mode is enabled, in which case the EOI line is asserted with the last byte of the write).
- EOS read method. If this method is enabled, the NI-488.2 driver terminates ibrd, ibrda, and ibrdf calls when the EOS byte is detected on the GPIB, when the GPIB EOI line is asserted, or when the specified count is reached. If the EOS read method is disabled, ibrd, ibrda, and ibrdf calls terminate only when the GPIB EOI line is asserted or the specified count has been read.
You can use the ibconfig function to configure the software to inform you whether the GPIB EOI line was asserted when the EOS byte was read. Use the IbcEndBitIsNormal option to configure the software to report only the END bit in ibsta when the GPIB EOI line is asserted. By default, the NI-488.2 driver reports END in ibsta when either the EOS byte is read in or the EOI line is asserted during a read.