
HDF5 Waveform File VIs
HDF5 is a general purpose file system which allows the user to treat the file
as a mini file system. As such, an HDF5 file may contain virtually any object.
For full documentation on HDF5, go to the NCSA
website. There are two basic objects in an HDF5 file - groups and data.
Groups are similar to file folders in a file system. Data is similar to the
files. Data is further subdivided into attributes and datasets. Attributes are
usually scalar values or strings associated with a group or dataset. Datasets
are of arbitrary data type.
Waveforms are stored in groups. Each waveform group may contain one or more
traces (waveforms). A single file may contain several waveform groups with one
or more traces per group. A trace is a data structure containing all the data
necessary to reproduce a single waveform. Generally, a waveform group contains
traces which
are logically related. For example, a waveform group could contain two
traces that were taken at the same time with a dual channel digitizer.
A single file can contain waveform groups and other data as well. The
National Instruments Scope-SFP digitizer soft front panel has the ability to
save waveforms and the configuration under which the waveforms were taken into
the same file. Due to the flexible nature of HDF5, virtually any
combination of data can be placed in a single file.
Within a waveform group, the data is stored in four groups - ID, traces,
axes, and vectors. The ID group contains information identifying the
particular set of waveforms. The ID block may be empty. The trace
group contains references to the axes group. Every trace has an X and Y
axis, referenced to the axes group. Axes can be shared between traces to
save space. A common use case is storage of the output of a multi-channel
digitizer as one X axis and several Y axes. The axes are either implicit
(start, increment) or explicit (a data vector). Explicit axes point to the
vectors group for their data. Each of these groups and the data within
them has several attributes, such as name, notes, etc. All these fields
can be accessed using the VIs in this set.
[go to top]
Function Definition Convention
Function names are listed as a heading to a section. Inputs and outputs
are listed separately with bulleted lists. They are listed as:
- name [format] : default value, if any - description
Default Read and Write Values
The functions in this help file have the following default behavior for
variable type
- STR - if the string is empty, no variable will be written to disk.
If the variable is missing on disk, it will return as an empty string
- DBL - if the DBL equals NaN, no variable will be written to disk. If
the variable is missing on disk, it will return as NaN.
- Ixx - if the integer is not present on disk, it will return a 0.
There is no NaN equivalent for integers, so they are always written to disk.
2U32 Data Format
Since HDF5 is a 64-bit file system and LabVIEW is a 32-bit program, some accommodation
is necessary to realize the full power of HDF5. When 64-bit integers are
needed for file pointers, they are represented by a cluster containing two
U32s. This data type is called a 2U32.
[go to top]
The following DLLs must be installed in your system directory.
Installing one of the National Instruments Soft Front Panels which use HDF5
files will do this for you automatically
- hdf5dll.dll, version 1.4.0 or better
- zlib.dll
- HDF5_2_LV.dll, version 1.0 or better
[go to top]
Copyright © 2001 National Instruments
All rights reserved.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright © 1998, 1999, 2000, 2001 by
the Board of Trustees of the University of Illinois
All rights reserved.
See the end of this file for the full HDF5 copyright
notice.
[go to top]
This example demonstrates how to extract portions of a waveform trace from a
file. This is very useful for large data files that do not easily fit in
memory.
To run the example, click on the folder icon in the upper right of the File
Path control. Browse to the file you wish to open and select it.
Now click on the run button to run the VI. The VI will query the file for
the traces available and fill in the Traces Available control with the
results. It will automatically display the first trace. You can
select a different trace while the VI is running and it will change the display.
The Location (%) and Width (%) slider controls allow you to
control what portion of the waveform is displayed on the screen. Use the Location
(%) control to set the start point of the data you extract from the
file. This is in percent. Use the Width (%) control to set how many
data points are extracted from the file. Note that the units of this
control are also percent of the total waveform length. Internally, the data width is
limited to the range 10 to 1 million data points. The location is
internally coerced to a maximum of 100 - data width in %. The Width (%) control is
logarithmic to allow its easy use with huge data files. If you prefer a linear scale, while the VI is not running, pop up on the control and
select Scale>Mapping>Linear. Then reset the minimum value to
whatever you wish.
The graph axes and label will be changed to match the input trace
parameters. The data is scaled and offset before being displayed.
If you wish to browse a different file with a different data type than I8,
change the data type input to the H5D Open-Read.vi to the appropriate
type.
[go to top]
This example demonstrates how to determine the data type of a trace, then
read the entire trace into memory.
To use the VI, click on the file folder icon on the upper right corner of the
File Path control. Select the file you wish to query for
waveforms. Now run the VI. A list of available traces will appear in
the Traces Available control. The first will be automatically
selected. Select the trace you wish to view and it will be
displayed. The graph label and axes labels will be updated for each trace.
[go to top]
This example is a simpler version of sfpFileEX Query-Read Single Trace.vi.
It demonstrates how to read an entire trace into memory. The trace must have
data of type I8. You can easily change the data type by popping up on the sfpFile Read Simple Single Trace.vi
and selecting Select Type>xxx, where xxx is the VI for the particular data
type you wish to read.
To use the VI, click on the file folder icon on the upper right corner of the
File Path control. Select the file you wish to query for
waveforms. Now run the VI. A list of available traces will appear in
the Traces Available control. The first will be automatically
selected. Select the trace you wish to view and it will be
displayed. The graph label and axes labels will be updated for each trace.
[go to top]
This example demonstrates how to write a single trace waveform group into an
HDF5 file. The trace must have data of type I8. You can easily
change the data type by popping up on the sfpFile Read Simple Single Trace.vi
and selecting Select Type>xxx, where xxx is the VI for the particular data
type you wish to read.
To use the VI, click the run button. A signal will be generated based
on the values of signal type, frequency, amplitude, sample
frequency, nPoints, and Power Spectrum. When you have
the signal you want, fill in the waveform name. Then, click on the
file folder icon on the upper right corner of the File Path
control. Select the file you wish to write to. This can be a new or
existing file. The data will be written to the file.
If you wish to view your data, use sfpFileEX Query-Read Single I8 Trace.vi
or one of the HDF5 file viewers listed on the HDF5
software page.
[go to top]
These functions perform basic operations used by most of the following
VIs. The first three letters of the function identify it as an HDF5
primitive and give a use identifier. For example, H5F means the function
performs file operations. H5G means the function performs group
operations.
This VI closes the file specified by file_id.
Inputs
- file_id [I32] : 0 - File ID of the file to close.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI opens HDF5 files. It is analogous to the LabVIEW VI of the same
name. The file must be closed with H5Fclose.vi or resource leaks
will occur.
Inputs
- file path [path] : empty path - Path to the HDF5 file to open.
If this is empty or <Not A Path>, a prompt is generated to allow the
user to browse to the file of choice.
- start path (Not A Path) [path] : <Not A Path> - Start path
for the browser to open in
- function (open:0) [U16 enum] : 0 - Operation mode for the VI.
The options are:
- open:0 - open an existing file
- open or create:1 - open an existing file or create a new one if it
does not exist
- create or replace:2 - create a new file, replacing an existing one, if
necessary
- create:3 - create a new file
- open (read only):4 - open an existing file for reading only
- prompt [STR] : empty string - Name on the pop-up browse dialog
title bar
- pattern [STR] : empty string - Filter for the pop-up browse
dialog. Windows wildcards can be used. Separate multiple
patterns with semicolons. For example, "*.h5;*.bin" will
only display binary and HDF5 files.
- default name [STR] : empty string - Initial file name for the
pop-up browse dialog
- access_id [I32] : 0 - Access ID created by HDF5 functions to
specify non-default access options. The default, 0, is sufficient for
most purposes. See the HDF5 documentation for details.
- create_id [I32] : 0 - Create ID created by HDF5 functions to
specify non-default creation options. The default, 0, is sufficient
for most purposes. See the HDF5 documentation for details.
- advisory dialog? (display:T) [BOOL] : T - If TRUE, a dialog will be
displayed if the file is not found. If FALSE, no dialog is generated.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- file id {I32] - HDF5 file ID. Used to access the file with
other HDF5 functions. Returns -1 in the event of an error.
- new file path [path] - Path of the newly created file.
Returns <Not A Path> in the event of an error.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI closes the group specified by group_id.
Inputs
- group_id [I32] : 0 - Group ID of the group to close.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
These functions allow you to rapidly get started with the HDF5 waveform
format.
This VI is used to determine the number of traces in an HDF5 file.
It returns identifiers so that the traces can be easily accessed. If
there are no traces in the file, it returns empty arrays.
Inputs
- file path [path] : empty path - Path to the HDF5 file containing waveforms.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup file path [path] - Duplicate of file path
- trace info [cluster array] - Name and index information for the
traces. The elements are:
- wfm_group name [string] - Name field from the waveform group ID
block
- wfm_group_idx [U32] - Index of the waveform group in the file
- trace name [string] - Name field from the particular trace
- trace_idx [U32] - Index of the trace in the waveform group
- trace labels [STR array] - Labels which can be used to populate UI
controls.
- # of traces [I32] - Number of traces found in the file
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI is used to read the commonly used data from a trace.
Inputs
- file_id [I32] : 0 - Path to the HDF5 file containing waveforms.
- trace info [cluster] - Name and index information for the trace you
wish to read. This information can be acquired using the sfpFile
Query for Number of Traces.vi. Only the indices are used in this
particular VI. The elements are:
- wfm_group name [string] : empty string- Name field from the
waveform group ID block
- wfm_group_idx [U32] : 0 - Index of the waveform group in the
file
- trace name [string] : empty string - Name field from the
particular trace
- trace_idx [U32] : 0 - Index of the trace in the waveform group
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
[go to top]
This VI is used to write commonly used data into a waveform file. It
does not support all the fields that a waveform file is capable of. It is
easily modified to do so, however.
Inputs
Outputs
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The waveform group is the highest level structure in a waveform file.
It may contain one or many waveforms and any measurements associated with them.
This VI creates a new waveform group in an HDF5 file.
Inputs
- file_id [I32] : 0 - File ID of the file to write to. This
file must not be read-only.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup file_id [I32] - Duplicate of file_id
- wfm_group id [I32] - HDF5 group ID of the waveform group.
This must be closed with H5Gclose.vi or resource leaks will occur.
- wfm_group_idx [U32] - Index of the waveform group in the
file. The first index is zero, so add one to find the number of
waveform groups in the file.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI opens a waveform group. Use sfpFile Query for Wfm_Groups.vi
to determine how many waveform groups are in a file and some identifying
information about them.
Inputs
- file_id [I32] : 0 - File ID of the file containing the waveform
group
- wfm_group_idx [U32] : 0 - Index of which waveform to open.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup file_id [I32] - Duplicate of file_id
- wfm_group id [I32] - HDF5 group ID of the waveform group.
This must be closed with H5Gclose.vi or resource leaks will occur.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI finds all consecutively numbered waveform groups in the file
specified by file_id.
Inputs
- file_id [I32] : 0 - File ID of the file to query.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup file_id [I32] - Duplicate of file_id
- wfm_group names [STR array] - Names of all the waveform groups
found
- wfm_group info [cluster array] - Information on the version number
of this waveform group syntax. The elements are:
- major version [U32] - Major release version. If not
present, returns 1.
- minor version [U32] - Minor release version. If not
present or if major version is not present, returns 0.
- release version [U32] - Bug fix release version. If not
present or if major version or minor version is not
present, returns 0.
- writer [STR] - Identifying string of the software which wrote
the waveform group. If not present, returns "an unknown
application."
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The ID block contains identification data for the data in the waveform group.
This VI reads all the information from the ID block of the waveform group
specified by wfm_group_id.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose ID
will be read. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to generate a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- name [STR] - Name of all the waveform group
- note [STR] - Arbitrary text string associated with the waveform
group
- technician [STR] - Person who took and/or stored the waveform group
- project [STR] - Project this waveform group is associated with
- I128 timestamp [cluster] - Time the waveforms were generated in
seconds since midnight, January 1, 1904. This is a binary image of a
fixed point number with 64 bits before and after the decimal point.
Use I128 Convert I128 to DBL.vi to convert to DBL format. You
will lose some resolution doing this.
- unit_under_test [cluster] - Information about the unit
tested. The elements are:
- name [STR] - name of the unit
- id [STR] - identification of the unit, typically the serial
number
- design - design of the unit, typically the model number
- test [cluster] - Information on the test performed. The
elements are:
- name [STR] - name of the test
- series [STR] - series of the test
- number [STR array] - elements of the test series represented in
this set of waveforms
- version info [cluster] - Information on the file format version
- major revision [U32] - major release number of the file format
- minor revision [U32] - minor release number of the file format
- release number [U32] - bug release number of the file format
- writer [STR] - software which wrote this waveform group
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI writes all the information to the ID block of the waveform group
specified by wfm_group_id. This function will fail if used with a
waveform group with an existing ID block. Empty strings are not
written. The timestamp is always written and defaults to midnight, January
1, 1904.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose ID
will be written. This is typically generated by using sfpFile
Create Waveform Group.vi.
- name [STR] : empty string - Name of the waveform group
- note [STR] : empty string - Arbitrary text string associated with
the waveform group.
- technician [STR] : empty string - Person who took and/or stored the
waveform group
- project [STR] : empty string - Project this waveform group is
associated with
- I128 timestamp [cluster] : midnight 1 Jan 1904 - Time the waveforms
were generated in seconds since midnight, January 1, 1904. This is a
binary image of a fixed point number with 64 bits before and after the
decimal point. Use I128 Convert DBL to I128.vi to convert from
DBL format.
- unit_under_test [cluster] - Information about the unit
tested. The elements are:
- name [STR] : empty string - name of the unit
- id [STR] : empty string - identification of the unit, typically
the serial number
- design : empty string - design of the unit, typically the model
number
- test [cluster] - Information on the test performed. The
elements are:
- name [STR] : empty string - name of the test
- series [STR] : empty string - series of the test
- number [STR array] : empty array - elements of the test series
represented in this set of waveforms
- writer [STR] - software which is writing this waveform group
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The axes group contains the axis information for all the traces in the
waveform group. Axes can be shared between traces. For example, two
traces taken from a single digitizer will usually share an X-axis..
This VI reads the axis information from a single axis. The DBL refers
to the format of the information, not the data associated with the axis.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose axis will be read. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to generate a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- axis_idx [U32] : 0 - Index of the axis in the axes group. This
information is usually an output of sfpFile Read Wfm Trace.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- name [STR] - Name of the axis. This is usually the label for
the axis.
- note [STR] - Arbitrary text string associated with the axis.
- units [STR] - Units for the axis
- explicit vector [U32] - Vector index for the data of an explicit
vector
- implicit [BOOL] - If TRUE, the vector is implicit; it contains only
a start and increment value. If FALSE, the vector is explicit; the
data is contained in one of the datasets in the vectors group. The explicit
vector output gives the index of which vector this is.
- scaling [cluster] - Cluster of information to scale the axis data,
if necessary. This is usually only used for explicit axes. The
formula for use is scaled data = scale * unscaled
data + offset
- scale [DBL] - Scale to rescale the data
- offset [DBL] - Offset to rescale the data
- implicit info [cluster] - Information needed to calculate the value
for an implicit axis. The values are only valid for an implicit
axis. The elements are:
- start [DBL] - Start value for the axis values
- increment [DBL] - Increment between the axis values
- time [cluster] - Timing information for the axis relative to the I128
timestamp in the ID block. This element is only valid if the axis
has units of time. The elements are:
- ref position [DBL] - Relative position of the time given in I1128
ref time in the data. This is given as a percentage of the
total number of data points.
- I128 ref time [cluster] - Time the data was generated relative
to I128 timestamp in the ID block This is a binary image of a
fixed point number with 64 bits before and after the decimal point.
Use I128 Convert I128 to DBL.vi to convert to DBL format. You
will lose some resolution doing this.
- render info [cluster] - Rendering information for plotting the
axis. The elements are:
- label [STR] - Label for the axis
- max plotted [DBL] - maximum number on the axis
- min plotted [DBL] - minimum number on the axis
- maj axis inc [DBL] - increment between major tick marks on the
axis
- min axis inc [DBL] - increment between minor tick marks on the
axis
- tick label format [STR] - format of the labels in a LabVIEW
text format string
- tick color [U32] - LabVIEW color specifier for the tick marks
- tick label color [U32] - LabVIEW color specifier for the labels
on the tick marks
- axis label color [U32] - LabVIEW color specifier for the label
on the axis
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI writes the axis information for a single axis. The DBL refers
to the format of the information, not the data associated with the axis.
Empty strings and NaN DBLs are not written to the file.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose ID
will be written. This is typically generated by using sfpFile
Create Waveform Group.vi.
- name [STR] : empty string - Name of the axis. This is usually
the label for the axis.
- note [STR] : empty string - Arbitrary text string associated with
the axis.
- units [STR] : empty string - Units for the axis
- explicit vector [U32] : 0 - Vector index for the data of an
explicit vector
- implicit [BOOL] : FALSE - If TRUE, the vector is implicit; it
contains only a start and increment value. If FALSE, the vector is
explicit; the data is contained in one of the datasets in the vectors
group. The explicit vector input sets the index of which vector
this is.
- scaling [cluster] - Cluster of information to scale the axis data,
if necessary. This is usually only used for explicit axes. The
formula for use is scaled data = scale * unscaled
data + offset
- scale [DBL] : NaN - Scale to rescale the data
- offset [DBL] : NaN - Offset to rescale the data
- implicit info [cluster] - Information needed to calculate the value
for an implicit axis. The values are only valid for an implicit
axis. The elements are:
- start [DBL] : NaN - Start value for the axis values
- increment [DBL] : NaN - Increment between the axis values
- time [cluster] - Timing information for the axis relative to the I128
timestamp in the ID block. This element is only valid if the axis
has units of time. The elements are:
- ref position [DBL] : 0 - Relative position of the time given in
I1128 ref time in the data. This is given as a percentage
of the total number of data points.
- I128 ref time [cluster] : 0 - Time the data was generated
relative to I128 timestamp in the ID block This is a binary image of a
fixed point number with 64 bits before and after the decimal point. Use I128 Convert DBL to I128.vi to convert from
DBL format.
- render info [cluster] - Rendering information for plotting the
axis. The elements are:
- label [STR] : empty string - Label for the axis
- max plotted [DBL] : NaN - maximum number on the axis
- min plotted [DBL] : NaN - minimum number on the axis
- maj axis inc [DBL] : NaN - increment between major tick marks
on the axis
- min axis inc [DBL] : NaN - increment between minor tick marks
on the axis
- tick label format [STR] empty string - format of the labels in
a LabVIEW text format string
- tick color [U32] : black (0) - LabVIEW color specifier for the
tick marks
- tick label color [U32] : black (0) - LabVIEW color specifier
for the labels on the tick marks
- axis label color [U32] : black (0) - LabVIEW color specifier
for the label on the axis
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- axis_idx [U32] - Index of the new axis in the axes group.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The traces block contains the top level information for each trace in the
waveform group. It contains references to the axes and vectors groups,
linking these groups together.
This retrieves information about particular waveform measurements. To
add a measurement to the list, add your measurement to the end of the measurement
enum input. Go to the block diagram and duplicate the "Voltage RMS"
case. Rename it to your measurement. Change the text constant and
the level use variables. Save the VI. Copy the front panel measurement
control and replace the control of the same name on sfpFile Read DBL Wfm
Measurement.vi and sfpFile Write DBL Wfm Measurement.vi.
Inputs
- measurement [U16 enum] : 43 (X Standard Deviation) - Selector for
the specific measurement to query for infomation.
Outputs
- name [STR] - Name of the measurement
- level use [BOOL cluster] - Flags for what reference levels are used
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI opens a trace and returns the HDF5 group ID for it. This is
normally used to access the measurement data within a trace. The trace
must be closed with H5Gclose.vi or resource leaks will occur.
Inputs
- file_id [I32] : 0 - HDF5 File ID of the file containing the trace
- trace info [cluster array] - Name and index information for the
traces. This information can be generated by using sfpFile Query
for Number of Traces.vi on the HDF5 file. Only the index values
are used by this function. The elements are:
- wfm_group name [string] : empty string - Name field from the
waveform group ID block
- wfm_group_idx [U32] : 0 - Index of the waveform group in the
file
- trace name [string] : empty string - Name field from the
particular trace
- trace_idx [U32] : 0 - Index of the trace in the waveform group
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup file_id [I32] - Duplicate of file_id
- trace_id [I32] - HDF5 group ID of the newly opened trace.
This group must be closed with H5Gclose.vi or resource leaks will
occur.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI queries the trace to determine the datatype of the data in it.
This is used to select the correct reading VI. For an example of use, see sfpFileEX
Query-Read Single Trace.vi
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose trace
datatype will be read. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to create a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- trace_idx [U32] : 0 - Index of the trace to query. Possible
values of the index can be found by querying the waveform group with sfpFile
Query for Number of Traces.vi.
- axis [I32 ring] : 0 (X) - Selector for which axis to query for
type. The mapping is 0:X, 1:Y.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- type [I32 ring] - Type specifier for the data in the trace
axis. This is not the HDF5 type specifier, although full documentation
for the types listed may found in the HDF5 user manual.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI queries the trace to determine what measurements are available.
The result is used to create an input for sfpFile Read DBL Wfm
Measurement.vi.
Inputs
- trace_id [I32] : 0 - HDF5 Group ID of the trace group whose
measurement information
will be read. This is typically generated by using sfpFile Open
Trace.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup trace_id [I32] - Duplicate of trace_id
- measurements [U16 enum array] - Array of specifiers for all the
measurements available for this trace. Index this array to the
appropriate element and use sfpFile Read DBL Wfm Measurement.vi to
read a specific measurement.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI reads information from a single DBL format scalar measurement
associated with a trace.
Inputs
- trace_id [I32] : 0 - HDF5 Group ID of the trace group whose
measurement information
will be read. This is typically generated by using sfpFile Open
Trace.vi.
- measurement [U16 enum] : 43 (X Standard Deviation) - Selector for
the specific measurement to read. This is usually generated by sfpFile
Query for Wfm Measurements.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup trace_id [I32] - Duplicate of trace_id
- value [DBL] - Value of the measurement
- units [STR] - Units of the measurement
- levels [cluster] - Reference levels used in the calculation of the
measurements. The number of these used will depend upon the
measurement. The fields are:
- high [DBL] - High reference level
- mid [DBL] - Mid reference level
- low [DBL] - Low reference level
- units [U8 ring] - Specification for the units used in the
levels. Mapping is 0:Volts, 1:Percentage
- % method [U8 ring] - Method used to calculate the levels if the
units are percentage. Mapping is 0:Low/High, 1:Min/Max,
2:Base/Top.
- window [cluster] - Indices of where in the data the measurement was
taken. The indices are binary images of 64 bit unsigned
integers. The fields are:
- 2U32 begin [2U32] - Index of beginning point used in the
measurement
- 2U32 end [2U32] - Index of last point used in the measurement
- other trace [U32] - Index of the other trace used to make the
measurement. This is only valid for measurements which use two traces
(e.g. phase delay).
- statistics [cluster] - Statistics for the measurement. The
fields are:
- # of points [DBL] - Number of points used to calculate the
statistics
- mean [DBL] - Mean
- st dev [DBL] - Standard deviation
- skew [DBL] - Skew
- kurtosis [DBL] - Kurtosis
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI reads information in a single waveform trace. A waveform group
may contain an arbitrary number of traces.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose trace
information will be read. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to create a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- trace_idx [U32] : 0 - Index of the trace to read. Possible
values of the index can be found by querying the waveform group with sfpFile
Query for Number of Traces.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- name [STR] - Name of the trace
- x-axis [U32] - Axis index of the X-axis associated with this trace
- y-axis [U32] - Axis index of the Y-axis associated with this trace
- note [STR] - Arbitrary text string for the trace
- render info [cluster] - Rendering information for the trace. The
fields are:
- line color [U32 color] - LabVIEW color for the trace
- line type [U32 ring] - Line type for the plotted line.
The mapping is - 0:solid, 1:long dash, 2:short dash, 3:dot dash, 4:dot
dot dash.
- line width (%) [DBL] - Line width as a percentage of the plot
width
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI writes a single DBL format scalar measurement to a trace. An
arbitrary number of measurements can be stored with a single trace.
Inputs
- trace_id [I32] : 0 - HDF5 Group ID of the trace group whose
measurement information
will be read. This is typically generated by using sfpFile Open
Trace.vi.
- measurement [U16 enum] : 43 (X Standard Deviation) - Selector for
the specific measurement to write.
- value [DBL] : NaN - Value of the measurement
- units [STR] : empty string - Units of the measurement
- levels [cluster] - Reference levels used in the calculation of the
measurements. The number of these used will depend upon the
measurement. The fields are:
- high [DBL] : NaN - High reference level
- mid [DBL] : NaN - Mid reference level
- low [DBL] : NaN - Low reference level
- units [U8 ring] : 1 (Percentage) - Specification for the units
used in the levels. Mapping is 0:Volts, 1:Percentage
- % method [U8 ring] : 2 (Base/Top) - Method used to calculate
the levels if the units are percentage. Mapping is 0:Low/High,
1:Min/Max, 2:Base/Top.
- window [cluster] - Indices of where in the data the measurement was
taken. The indices are binary images of 64 bit unsigned
integers. The fields are:
- 2U32 begin [2U32] : 0 - Index of beginning point used in the
measurement
- 2U32 end [2U32] : 0 - Index of last point used in the
measurement
- other trace [U32] : 0 - Index of the other trace used to make the
measurement. This is only valid for measurements which use two traces
(e.g. phase delay).
- statistics [cluster] - Statistics for the measurement. The
fields are:
- # of points [DBL] : NaN - Number of points used to calculate
the statistics
- mean [DBL] : NaN - Mean
- st dev [DBL] : NaN - Standard deviation
- skew [DBL] : NaN - Skew
- kurtosis [DBL] : NaN - Kurtosis
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup trace_id [I32] - Duplicate of trace_id
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI writes all the information in a single waveform trace. You may
add as many traces as you wish to a single waveform group. Make sure you
properly add axes and vectors for any trace added with this function. See sfpFile
Write Simple Waveform File.vi for an example.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group to add a
trace to. This is typically generated by using sfpFile
Create Waveform Group.vi.
- name [STR] : empty string- Name of the trace
- wfm_group idx [U32] : 0 - Index of the waveform group the trace is
being written in. This is only used if the config names input
contains data.
- x-axis [U32] : 0 - Axis index of the X-axis associated with this
trace
- y-axis [U32] : 1 - Axis index of the Y-axis associated with this
trace
- note [STR] - Arbitrary text string for the trace
- render info [cluster] - Rendering information for the trace. The
fields are:
- line color [U32 color] - LabVIEW color for the trace
- line type [U32 ring] - Line type for the plotted line.
The mapping is - 0:solid, 1:long dash, 2:short dash, 3:dot dash, 4:dot
dot dash.
- line width (%) [DBL] - Line width as a percentage of the plot
width
- write render info? [BOOL] : FALSE - Flag to determine whether or
not to write the render info to disk.
- config names [STR array] : empty array - Array of full path names
to configurations associated with this trace. The path names are
relative to the root of the HDF5 file. Hard links are formed with the
configuration groups listed.
- file_id [I32] : 0 - HDF5 file ID of the file the trace is being
written in. This is only used if the config names input
contains data.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- trace name [STR] - Group name of the trace
- trace idx [U32] - Index of the newly created trace
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The vectors block contains the raw data for the traces.
This VI is a lower level version of sfpFile Read Wfm Vector.vi which
only reads the data in the vector. It allows lower overhead for streaming
data from disk. See sfpFileEX Browse I8 Trace.vi for an example of
use.
Inputs
- loc_id [I32] : 0 - HDF5 file or group ID where the dataset is
located. This will typically be the vector group ID generated by sfpFile Open Wfm Vector.vi.
- name [STR] : empty string - Name of the HDF5 dataset in the file or
group. For a vector dataset, this will be "data".
- data type [POLY] : poly - Automatic data type selector for the
polymorphic VI. You can wire a valid data type to this input or pop-up
on the VI and manually select a data type. Data types supported are
I8, I16, I32, U8, U16, U32, SGL, and DBL arrays.
- 2U32 start [2U32] : 0 - Index at which to start reading data..
- 2U32 count [2U32] : 0 - Number of data blocks of size 2U32 block
to read. If this input is 0, all the data is read.
- 2U32 stride [2U32] : 1 - Number of data points between the start of
each block. For example, to read every third point in the file, set to
3 with a block size of 1.
- 2U32 block [2U32] : 1 - Number of points in each block of data
read.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup loc_id [I32] - Duplicate of loc_id
- value [POLY] - The data. Data types supported are I8, I16,
I32, U8, U16, U32, SGL, and DBL arrays.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI adds new data to the end of an existing vector. It is useful
for streaming data to disk. It is also used to close datasets, when called
with close? equal TRUE and an empty input dataset.
Inputs
- dataset_id [I32] : 0 - HDF5 dataset ID of the dataset you wish to
extend. This is generated with either sfpFile Open Wfm Vector.vi
or sfpFile Write Wfm Vector.vi.
- new data [POLY array] : empty array - New data to write to the end
of the vector data. The data type must be the same as the existing
data. The data types supported are I8, I16, I32, SGL,. and DBL arrays.
- close? [BOOL] - FALSE - If TRUE, close the dataset when done.
If FALSE, leave the dataset open.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup dataset_id [I32] - Duplicate of dataset_id if the close?
input is FALSE. Otherwise returns a -1.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI returns the number of points in a vector.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose
vector will be checked. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to create a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- vector_idx [U32] : 0 - Index of the vector to check. This
value is usually generated from the explicit vector output of sfpFile
Read Wfm Axis.vi.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- nPoints [2U32] - Number of points in the vector.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI opens a vector group, and, optionally, the dataset associated with
it.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose
vector
will be opened. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to create a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- vector_idx [U32] : 0 - Index of the vector to check. This
value is usually generated from the explicit vector output of sfpFile
Read Wfm Axis.vi.
- open dataset? [BOOL] : FALSE - If TRUE, the dataset associated with
the vector group is opened. If FALSE, the dataset is not opened.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- group_id [I32] - HDF5 group ID of the vector group. This must
be closed by H5Gclose.vi or resource leaks will occur.
- dataset_id [I32] - HDF5 dataset ID of the data associated with the
vector group. This will be invalid and return -1 if the open
dataset? input is FALSE. If valid, it must be closed with sfpFile
Extend Vector.vi to avoid resource leaks.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI reads data and attributes from a single vector. By default, the
VI reads all the data. Using the 2U32 start, 2U32 count, 2U32
stride, and 2U32 block inputs, you can select a subset of the data to
read. The four variable method allows easy partial extraction and
decimation.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group whose trace
datatype
will be read. This is typically generated by using sfpFile Query
for Wfm_Groups.vi to create a list of available waveform groups, then
selecting one of the groups and opening it with sfpFile Open Waveform.vi.
- vector_idx [U32] : 0 - Index of the vector to read. This
value is usually generated from the explicit vector output of sfpFile
Read Wfm Axis.vi.
- 2U32 start [2U32] : 0 - Index at which to start reading data..
- 2U32 count [2U32] : 0 - Number of data blocks of size 2U32 block
to read. If this input is 0, all the data is read.
- 2U32 stride [2U32] : 1 - Number of data points between the start of
each block. For example, to read every third point in the file, set to
3 with a block size of 1.
- 2U32 block [2U32] : 1 - Number of points in each block of data
read.
- type [POLY array] : empty array - Automatic data type selector for
the polymorphic VI. You can wire a valid data type to this input or
pop-up on the VI and manually select a data type. Data types supported
are I8, I16, I32, SGL, and DBL arrays.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- name [STR] - Name of the vector
- note [STR] - Arbitrary text string
- data [POLY array] - The vector data. Data types supported are
I8, I16, I32, SGL, and DBL arrays.
- compress? [BOOL] - Whether or not the data set is compressed.
- ranges [cluster] - Range limits for this set of data. These
ranges are typically determined by the experimental setup and depend upon
calibration and hardware limitations. The fields are:
- overrange [DBL] - Values at or over this value are invalid
- underrange [DBL] - Values at or under this value are invalid
- high [DBL] - Maximum valid value
- low [DBL] - Minimum valid value
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
This VI creates a vector group and populates it.
Inputs
- wfm_group_id [I32] : 0 - Group ID of the waveform group to add a
vector to. This is typically generated by using sfpFile
Create Waveform Group.vi.
- name [STR] : empty string - Name of the vector
- note [STR] : empty string - Arbitrary text string
- data [POLY array] - The vector data. Data types supported are
I8, I16, I32, SGL, and DBL arrays.
- compression [cluster] - Compression support parameters. The
compression algorithm is Lempel-Ziv. The fields are:
- compress? [BOOL] : TRUE - Whether or not the data set is
compressed.
- compress level [I32 ring] : 9 - Level of compression.
Valid values are 0 - 9. Zero is the fastest with least
compression. Nine is the slowest with most compression.
- ranges [cluster] - Range limits for this set of data. These
ranges are typically determined by the experimental setup and depend upon
calibration and hardware limitations. The fields are:
- overrange [DBL] : NaN - Values at or over this value are
invalid
- underrange [DBL] : NaN - Values at or under this value are
invalid
- high [DBL] : NaN - Maximum valid value
- low [DBL] : NaN - Minimum valid value
- close data? [BOOL] : TRUE - If TRUE, the dataset is closed when the
VI exits. If FALSE, the dataset is left open. This is useful if
you want to stream data to disk using sfpFile Extend Vector.vi.
Make sure the dataset is closed, using sfpFile Extend Vector.vi, or
resource leaks will occur.
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- dup wfm_group_id [I32] - Duplicate of wfm_group_id
- dataset_id [I32] - HDF5 dataset ID of the dataset created.
This will be invalid and return -1 if the close data? input is
FALSE. If valid, it must be closed with sfpFile Extend Vector.vi
to avoid resource leaks.
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
These VIs are general purpose utilities.
Flush all buffers and close the HDF5 system. This VI is very useful
during development when you have forgotten to close a resource or two. Run
it standalone to clear all HDF5 related errors and problems. The HDF5
system is automatically opened at the first call to and HDF5 utility.
Inputs
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
Flush the HDF5 buffers.
Inputs
- object_id [I32] : 0 - An ID to any HDF5 object in the file you wish
to flush.
- scope [I32 ring] : 0 (local) - Scope of the flush. Valid
values are 0:local (current file only) and 1:global (all HDF5 objects being
used).
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
Get the current version of the HDF5 DLL being used.
Inputs
- error in (no error) [error cluster] : no error - Standard LabVIEW
error cluster
Outputs
- majnum [U32] - Major release number
- minnum [U32] - Minor release number
- relnum [U32] - Bug-fix release number
- error out [error cluster] - Standard LabVIEW error cluster
[go to top]
The following VIs are used to aid in data conversion from LabVIEW to
HDF5. The DU64 VIs address the 32-bit to 64-bit LabVIEW to HDF5
problem. The I128 VIs give support for the 128-bit timestamp.
Convert a 2U32 number to a DBL. Some resolution is lost in this
process, since the DBL only has 53 bits of resolution and the 2U32 has 64.
Inputs
- 2U32 [2U32] : 0 - Input data
Outputs
[go to top]
Convert a DBL number to a 2U32. The DBL is truncated in the process.
Inputs
- DBL [DBL] : 0.0 - Input data
Outputs
- 2U32 [2U32] - Output data
[go to top]
Convert a DBL number to a fixed point I128. Be aware that the fixed
point number has a maximum value of about 1.8 × 1019 and a
resolution of about 5.4 × 10-20. Numbers which are too large
will generate a maximum value. Numbers which are too small will generate a
zero.
Inputs
- double in [DBL] : 0.0 - Input data
Outputs
- I128 out [I128] - Output data. This is the binary image of a
128 bit fixed point number with the decimal point in the center of the bit
field.
[go to top]
Convert an I128 fixed point number to a DBL. Some resolution is lost,
since the I128 has 128 bits of resolution and the DBL has 53.
Inputs
- I128 in [I128] : 0 - Input data. This is the binary image of
a 128 bit fixed point number with the decimal point in the center of the bit
field.
Outputs
- double out [DBL] - Output data
[go to top]
Copyright Notice and Statement for
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998, 1999, 2000, 2001 by
the Board of Trustees of the University of Illinois
All rights reserved.
Contributors: National Center for Supercomputing Applications (NCSA) at
the University of Illinois at Urbana-Champaign (UIUC), Lawrence Livermore
National Laboratory (LLNL), Sandia National Laboratories (SNL), Los Alamos
National Laboratory (LANL), Jean-loup Gailly and Mark Adler (gzip library).
Redistribution and use in source and binary forms, with or without
modification, are permitted for any purpose (including commercial purposes)
provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or materials provided with the distribution.
- In addition, redistributions of modified forms of the source or binary
code must carry prominent notices stating that the original code was
changed and the date of the change.
- All publications or advertising materials mentioning features or use of
this software are asked, but not required, to acknowledge that it was
developed by the National Center for Supercomputing Applications at the
University of Illinois at Urbana-Champaign and to credit the contributors.
- Neither the name of the University nor the names of the Contributors may
be used to endorse or promote products derived from this software without
specific prior written permission from the University or the Contributors.
- THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE CONTRIBUTORS "AS IS"
WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event
shall the University or the Contributors be liable for any damages suffered
by the users arising out of the use of this software, even if advised of
the possibility of such damage.
Portions of HDF5 were developed with support from the University of
California, Lawrence Livermore National Laboratory (UC LLNL).
The following statement applies to those portions of the product
and must be retained in any redistribution of source code, binaries,
documentation, and/or accompanying materials:
This work was partially produced at the University of California,
Lawrence Livermore National Laboratory (UC LLNL) under contract no.
W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy
(DOE) and The Regents of the University of California (University)
for the operation of UC LLNL.
DISCLAIMER:
This work was prepared as an account of work sponsored by an agency
of the United States Government. Neither the United States
Government nor the University of California nor any of their
employees, makes any warranty, express or implied, or assumes any
liability or responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product, or process
disclosed, or represents that its use would not infringe privately-
owned rights. Reference herein to any specific commercial products,
process, or service by trade name, trademark, manufacturer, or
otherwise, does not necessarily constitute or imply its endorsement,
recommendation, or favoring by the United States Government or the
University of California. The views and opinions of authors
expressed herein do not necessarily state or reflect those of the
United States Government or the University of California, and shall
not be used for advertising or product endorsement purposes.
Last modified: 9 February 2001
Describes HDF5 Release 1.4.2, July 2001
[go to top]