HP 9000 Series 300 Tutorials Manual page 49

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

When flag is zero, termination pattern recognition is disabled and only EOI
or a satisfied byte count can terminate a normal transfer. If flag is non-zero,
match defines the new termination pattern. When using flag
=
a
to disable eol
pattern recognition, the third parameter (match) in the subroutine call is not
used. However, it is recommended that a value (such as zero) be provided as
good programming practice.
When flag is non-zero to enable end-of-line recognition (for example, flag
=
1) and the interface data path width is set to 8 bits, the least-significant byte
of the 4-byte integer value of match defines the termination pattern used to
identify an end-of-line condition.
On the other hand, if the interface data path width is set to 16 bits (such as
with a GPIO interface), then, for most systems, the termination pattern is also
16 bits, defined by the two lower (least-significant) bytes of the 4-byte integer
value defined by match.
Remember: If any other read termination conditions defined for the interface
are in effect (such as EOI for an HP-IB interface),
any
event that matches
a currently active termination condition can cause a read operation to halt;
independent of whether the defined eol condition has been met. Also note
that the read termination pattern defined by
iO_901_ctl
is accepted as part
of the valid incoming data, meaning that it is transferred to the data storage
area along with the rest of the transferred data. In other words, when the
interface encounters transferred data matching the match value, it treats the
data as part of the data message but does not attempt any further data input
after the matching data pattern is found. This means that if data within an
incoming data stream happens to match the pattern defined by match, the read
is terminated whether the data message is complete or not. For this reason,
care must be exercised when defining eol character sequences for data transfer.
To illustrate how to use
iO_901_ctl,
suppose an HP-IB interface is being
configured to recognize a backslash-n (\n) as a read termination pattern. First,
open the HP-IB interface file and obtain the entity identifier eid. Second, make
the call to
iO_901_ctl
using eid as the entity identifier,
ENABLE
as the flag,
and \n as the match (\n is a one-byte value, and the data path width for all
HP-IB devices is 8 bits):
General-Purpose Routines
2-21

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents