14
Keysight N778xC Series Polarization Instruments Programming Guide
1
Introduction to Programming
Data Types
With the commands you give parameters to the instrument and receive
response values from the instrument. Unless explicitly specified these data
are given in ASCII format. The following types of data are used:
•
Boolean
data may only have the values 0 or 1.
•
Integer
range is given for each individual command.
•
Float
variables may be given in decimal or exponential writing (0.123 or
123E-3).
All
Float
values conform to the 32 bit IEEE Standard, that is, all
Float
values are returned as 32-bit real values.
• A
string
is contained between double quotes (
"
...
"
) or single quotes
(
‘
...
’
). When the instrument returns a string, it is always included in " ".
• When a
register
value is given or returned (for example *ESE), the
decimal
values for the single bits are added. For example, a value of
nine means that bit 0 and bit 3 are set.
• Larger blocks of data are given as
Binary Blocks
, preceded by
“#
<H><Len><Block>
”, <
H
> represents the number of digits, <
Len>
represents the number of bytes, and <
Block>
is the data block. For
example, for a
Binary Block
with 1 digit and 6 bytes this is:
#16TRACES
.
The block represents an array of numbers. Each number has the byte
ordering least significant byte first, also called LSBfirst, little-endian or
Intel byte ordering.
NOTE
Note that within your program, calculations with wavelengths may require
double-precision 64-bit floats to provide the desired resolution.