Please enable JavaScript to view this site.

 Network Analyzers using S4VNA software

The binary transfer format reduces the number of bytes transmitted and therefore reduces the transmission time. The binary transfer format is supported by HiSLIP protocol only. To enable the binary transfer format, use the FORM:DATA command. Use the FORM:BORD command to determine the byte order in the 32-bit word or in the 64-bit word. The x86 architecture uses the little endian byte order. When using the x86 architecture, setting the little endian byte order with the command FORM:BORD SWAP further improves throughput. The list of commands that support the binary transfer format is given in the description of the FORM:DATA command.

Binary data is transmitted as a block having a header followed by data. Block format:

#

8

<Data Size>

<Binary Data>

where # — the character '#',

8 — the character '8',

<Data Size> — 8 bytes, the symbolic representation of the number of bytes in binary data.

For example:

#800003216<Binary Data>

The VISA library has built-in tools for receiving binary data from the analyzer. The example assumes that the size of the array is sufficient to receive a number of elements equal to twice the number of points.

Example. Receiving array of doubles (x86 architecture):

double data[NOP * 2];

ViUInt32 retCount;

...

viPrintf(instr, "FORM:DATA REAL\n");

viPrintf(instr, "FORM:BORD SWAP\n");

retCount = sizeof(data);

viQueryf(instr, "SENS:DATA:CORR? S11\n", "%#b", &retCount, data);

// retCount now contains the actual number of bytes

Example. Receiving array of doubles (architecture independent):

double data[NOP * 2];

ViUInt32 retCount;

...

viPrintf(instr, "FORM:DATA REAL\n");

viPrintf(instr, "FORM:BORD NORM\n");

retCount = sizeof(data)/sizeof(double);

viQueryf(instr, "SENS:DATA:CORR? S11\n", "%#Zb", &retCount, data);

// retCount now contains the actual number of elements

 

Rev.:  22.4