What
is
a
le
header?
When
using
the
binary
data
transfer
format,
the
transferred
data
must
be
accompanied
by
the
le
header
that
represents
the
data
length.
In
this
example
,
the
data
transfer
format
is
FORM3
and
the
transferred
data
is
congured
as
follows:
FORM3
Data
Transfer
F
ormat
If
you
are
not
reading
the
header
,
you
can
create
it
using
the
number
of
data
points
.
Change
the
program
lines
440
to
460
as
follows:
440
OUTPUT
@Hp4396;"POIN?"
441
ENTER
@Hp4396;Nop
442
V$=VAL$(Nop*2*8)
443
Numv=LEN(V$)
444
Head$="000000"
445
FOR
I=1
TO
Numv
446
Head$[7-I,7-I]=V$[Numv-I+1,Numv-I+1]
447
NEXT
I
448
!
449
OUTPUT
@Hp4396;"INPUCALC1
";
450
OUTPUT
@Dt
USING
"#,8A";"#6"&Head$
460
OUTPUT
@Dt;Dat(*),END
Lines
440
to
442
calculate
the
number
of
bytes
transferred
(8
byte
for
real
part,
8
byte
for
imaginary
part),
and
represents
it
in
the
string
format.
Line
443
counts
the
number
of
characters
in
the
string
that
contains
the
number
of
bytes
transferred.
Line
444
enters
0
as
the
initial
value
in
all
header
arrays
.
Lines
445
to
447
place
the
number
of
bytes
transferred
to
the
header
array
digit
by
digit
from
the
sixth
array
to
the
rst
array
of
the
header
.
F
or
example
,
if
the
number
of
points
is
201,
the
value
of
Head$
is
003216 .
5-4
Writing
Data
Arrays
to
the
Analyzer