Using Binary Data Encoding. Agilent Technologies 8712ES, 8714ET, 8714ES, 8712ET

Add to My manuals
320 Pages

advertisement

Using Binary Data Encoding. Agilent Technologies 8712ES, 8714ET, 8714ES, 8712ET | Manualzz

Table 6-1

Trace Data Transfers

Using Binary Data Encoding

Using Binary Data Encoding

The previous section describes how to query the measurement trace, and transfer it into your program using ASCII encoding. Binary encoding can be used for faster data transfers, as shown in the table below:

Trace Transfer Times (typical)

Number of Trace

Points

51

201

401

1601

Transfer Times (ms)

Binary

Transfer

21

23

30

82

ASCII

Transfer

47

164

314

1200

When using binary data transfers, the entire trace is sent from the analyzer to your program in a block called a definite length block. The details of block data are described in detail in

Chapter 4, “Data Types and Encoding.”

The definite length block contains a header and a data section. The header indicates how many bytes are in the data section.

In order to read the definite length block, your program must first read the header, and then read the data section. Refer to the example program

REALDATA in the Example Programs Guide for an example of how to do this.

In the REALDATA program, you will notice the following lines which read the definite block header:

180

190

ENTER @Hp8711 USING "%,A,D";A$,Digits

ENTER @Hp8711 USING "%,"&VAL$(Digits)&"D";Bytes and these lines which read the data section:

200

210

ASSIGN @Hp8711;FORMAT OFF

ENTER @Hp8711;Data1(*)

6-6 Programmer’s Guide

Trace Data Transfers

Using Binary Data Encoding

Each measurement point in the data section is represented as 4 or 8 bytes (32 or 64 bits), depending on whether single precision or double precision numbers are requested. When using HP BASIC or IBASIC, you must select double precision numbers to match BASIC's "REAL" data type. Do this using the SCPI command "FORM:DATA REAL,64" . If you are using another language that supports single precision data types, you can select single precision using the SCPI command "FORM:DATA

REAL,32" . Languages such as QuickBASIC and C have support for both single and double precision floating point numbers.

When transferring data using binary encoding, you may need to reverse the order of the bytes in each measurement point, since PCs frequently store IEEE floating point numbers with the byte order reversed. To instruct the analyzer to reverse the byte order of the data, send the command "FORMAT:BORDer SWAPped" before querying the trace data.

Programmer’s Guide 6-7

Trace Data Transfers

Using Binary Data Encoding

Table 6-2

Format Type

( FORMat:DATA )

REAL,32

Trace Data Transfer Sizes

The following table shows how many bytes are transmitted during trace data transfers. The left column shows the format of the data, which you can specify using the SCPI command Format:DATA . As you can see, the size of the measurement point data and trace data varies as you change format.

Trace Data Transfer Size Using TRACE:DATA Command

Type of

Data

Size of Single

Measurement Point

(bytes)

Real

4

Size of 201 Point

Complex

8

Real

809

Trace

(bytes)

Complex

1614

REAL,64

ASCII,5

ASCII,3

INT,16

IEEE 32-bit

Floating

Point

IEEE 64-bit

Floating

Point

ASCII numbers

ASCII numbers

Internal

Binary

8

13

11

16

26

22

8

1614

2613

2211

3222

5226

4422

1614

When transmitting data in "REAL" or "INT" format, a header is sent before the data block. The header indicates the size of the data block. The header size varies in length from 3 to 11 bytes. Refer to

Chapter 4, “Data

Types and Encoding,” for details on the header.

Transmitting ASCII data requires no header. The ASCII values are separated by commas, and a linefeed is sent after the last value. The sizes shown in the table include the size of the comma(s) and terminating linefeed. Typical data in ASCII,5 format:

-1.2254E+000,+5.0035E-001,+4.5226E-001,...

6-8 Programmer’s Guide

Trace Data Transfers

Using Binary Data Encoding

The analyzer stores its internal data with approximately 5 significant digits of resolution. Using REAL,32 or ASCII,5 format provides sufficient precision for data transfers. However, REAL,64 may be necessary when using a programming language which does not support IEEE 32-bit floating point.

Programmer’s Guide 6-9

advertisement

Key Features

  • Frequency range: 9 kHz to 1.8 GHz
  • Dynamic range: >120 dB
  • Sweep speed: up to 200 sweeps/s
  • Multiple measurement modes: scalar, vector, and time domain
  • Built-in signal generator and power meter
  • GPIB and LAN interfaces for remote control and data transfer

Related manuals

Frequently Answers and Questions

What is the frequency range of the 8712ES?
The frequency range of the 8712ES is 9 kHz to 1.8 GHz.
What is the dynamic range of the 8712ES?
The dynamic range of the 8712ES is >120 dB.
What is the sweep speed of the 8712ES?
The sweep speed of the 8712ES is up to 200 sweeps/s.
What measurement modes does the 8712ES support?
The 8712ES supports scalar, vector, and time domain measurement modes.
Does the 8712ES have a built-in signal generator?
Yes, the 8712ES has a built-in signal generator.
Does the 8712ES have a built-in power meter?
Yes, the 8712ES has a built-in power meter.
What interfaces does the 8712ES have?
The 8712ES has GPIB and LAN interfaces.
Download PDF

advertisement

Table of contents