:MEASure:JITTer:PATTern?

Meas. mode:
Jitter
Package License:
L-RND
Waveform type:
NRZ
PAM4
Flex Apps:
FlexDCA

Query Syntax

:MEASure:JITTer:PATTern?

Description

Returns a representation of each symbol's logic level in the pattern as determined by FlexDCA. For example, for a 127 pattern length, 127 values are returned expressed as the binary code for ASCII symbols 0, 1, 2, 3, and 4. For example, if the first five symbols in an NRZ pattern are logic levels 10110, then the returned binary values (decimal 49, 48, 49, 49, and 40) define the ASCII symbols 1, 0, 1, 1, and 0. If the first five symbols in a PAM4 pattern are logic levels 13022, then the returned binary values (decimal 49, 51, 48, 50, and 50) define the ASCII symbols 1, 3, 0, 2, and 2.

Use the :MEASure:JITTer:DDJSymbol? query to return the DDJ values. Use the :MEASure:JITTer:ESYMbols? query to return the symbol numbers.

An incomplete description of the pattern is returned if all of the data needed to determine the pattern has not yet been acquired.

Measurement Identification

Avoid subtle programming errors! To ensure that the correct measurement is installed or queried, always explicitly identify a measurement when installing a measurement or querying a measured value, status, or detail. To identify a measurement, specify the measurement's source waveform (:SOURce child command). With some measurements, you may also need to specify other identifying values. Generally, when selecting a measurement using FlexDCA's GUI, if a dialog appears prompting you to select values, you should explicitly specify these values when remotely identifying the measurement. More information.

For example, to return the status of the measurement, :MEASure:JITTer:PATTern?:

flex.write(':MEASure:JITTer:PATTern?:SOURce CHAN1A')
if flex.query(':MEASure:JITTer:PATTern?:STATus?') == 'CORR';
    measurement = flex.query(':MEASure:JITTer:PATTern??')
else:
	details = flex.query(':MEASure:JITTer:PATTern?:STATus:DETails?')
	reason = flex.query(':MEASure:JITTer:PATTern?:STATus:REASon?')

This query produces an error if jitter signal type is set to clock signal (:MEASure:JITTer:DEFine:SIGNal CLOCk).

Returned Data Type

The :MEASure:JITTer:PATTern? query returns character (1 byte) values as binary definite-length block data queries binary definite-length block data queries binary definite-length block data queries. You must specify this data type in your program language's command that you use to query the data. The specifier for this data type in your programming language will likely be "c" and it is identified in this example with red text. Confirm this with your programming language's documentation. The following is an example of the command used in Python using pyvisa.

You must convert the returned data to ASCII. For example, in Python 3 we use the 'c' data type which results in a list of one-character raw strings representing logic levels. For example:

[b'49', b'48', b'48', b'49', b'48', ...]

Then, change each raw string level to a Python Unicode string with .decode('ascii') method. This is shown in the following example. The result is a string of ASCII characters.

Flex.read_termination = ''
Flex.write_termination = ''
endianness = Flex.query(':SYSTem:BORDER?')
Flex.write(':SYSTem:BORDER LENDian')
data = Flex.query_binary_values(':MEASure:JITTer:PATTern?',
	datatype='c',
	container=list,
	is_big_endian=False,
	header_fmt='ieee')
Flex.write(':SYSTem:BORDER ' + endianness)
s = ''
for value in data:
	s += value.decode('ascii')
print('\nString of ASCII values: ', s)

Endianness of Returned Definite-Length Block Data

To correctly interpret definite-length block data, you must know the endianness (byte order) of the returned data (integers or real) from FlexDCA and you will must likely need specify this same endianness in your program language's command that is used to query the data. Endianness can be set to "little endian" order in which the least significant byte is sent first and the most significant byte sent last. Or, the endianness can be set to "big endian" order in which the most significant byte is sent first and the least significant byte sent last.

To specify or query the endianness setting for binary block data, use the :SYSTem:BORDer command. The endiannes setting applies to all binary queries except for :DISK:FILE:READ? query.

If you plan to change FlexDCA's current endian setting, it is a good practice to query FlexDCA's current endian setting and restore the setting when your program completes. This will avoid other programs having errors due to assuming a particular endianness setting.

After a factory preset (:SYSTem:FACTory), sets little endian. A default setup (:SYSTem:DEFault) does not affect endianness.

Be aware that VXI plug-and-play drivers can change the endianness setting. As a result always explicitly set the endianness in your program before transferring any binary data.

The ability to specify endianness requires FlexDCA revision A.04.00 and above. Prior to revision A.04.00, the endianness of returned block data was always LSB (Least Significant Byte) first.

Example Command Sequence

:SYSTem:MODE JITTer
:MEASure:JITTer:DDJ:SOURce CHAN1A
:MEASure:JITTer:PATTern??