EasyManua.ls Logo

R&S ZNB - Page 146

R&S ZNB
1496 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Concepts and Features
R&S
®
ZNB/ZNBT
146User Manual 1173.9163.02 ─ 55
Set up a shared memory buffer
The setup of a shared memory buffer and the allocation of trace data is performed by a
sequence of SYSTem:DATA:MEMory... commands, starting with an INITialize and
finished by a COMMit.
1. Initialize the shared memory buffer:
SYSTem:DATA:MEMory:INITalize
2. Add traces:
a) SYSTem:DATA:MEMory:ADD '<TrName1>', FDATA|SDATa, #Values1
Select an existing trace name, choose whether to use formatted trace data
(FDATa) or unformatted trace data (SDATa), and define how many trace values
the firmware writes to the buffer per sweep.
The data block of the first trace has an offset of 0 bytes relative to the start of
the shared memory buffer.
b)
SYSTem:DATA:MEMory:ADD '<TrName2>', FDATA|SDATa, #Values2
Use SYSTem:DATA:MEMory:OFFSet? to query the offset in bytes of the sec-
ond trace data block. Processes that want to read the trace data from the buffer
need to know this offset. Its size depends on whether the first trace data block
contains formatted (real) or unformatted (complex) values.
c) ...
Use SYSTem:DATA:MEMory:OFFSet? to query the offset of the last added trace.
3. Create the named shared memory buffer:
SYSTem:DATA:MEMory:COMMit '<ShMemName>'
The name must be unique. Before the COMMit you can use SYSTem:DATA:
MEMory:CATalog? to query the names of existing shared memory buffers.
The size of the last created shared memory buffer can be queried using SYSTem:
DATA:MEMory:SIZE?.
Use a shared memory buffer
After you have created a named shared memory buffer, you can access it – from the
instrument – using your favorite programming language and API. With Python, for
instance, you can use the mmap module for this purpose.
Delete a shared memory buffer
To delete a shared memory buffer and free the occupied memory, you can use one of
the following commands.
1. SYSTem:DATA:MEMory:DELete '<ShMemName>'
deletes a single shared memory buffer by name.
2. SYSTem:DATA:MEMory:RESet
deletes all shared memory buffers created using
SYSTem:DATA:MEMory:COMMit.
Operations on Traces

Table of Contents

Related product manuals