From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

Content Type
Programming Language
Current manual

WaveformGraphPopup

WaveformGraphPopup

int WaveformGraphPopup (char title[], void *yArray, size_t numberOfPoints, int yDataType, double yGain, double yOffset, double initialX, double xIncrement);

Purpose

Plots a waveform on a graph control in a dialog box.

WaveformGraphPopup scales the values in yArray according to yGain and yOffset. The function scales the x-axis timebase according to initialX and xIncrement. WaveformGraphPopup computes each point in the plot as follows:

xi = (i × xIncrement) + initialX

yi = (wfmi x yGain) + yOffset

where i is the index of the point in the waveform array.

Parameters

Input
Name Type Description
title char [] Title of the dialog box.
yArray void * Array that contains the values to plot along the y-axis. The data type must be of the type specified by yDataType.
numberOfPoints size_t Number of points to plot. This value controls the number of points to plot even if the number of elements in xArray is greater than the numberOfPoints.

numberOfPoints must be greater than zero and not greater than INT_MAX.
yDataType int The data type of the y array. The following table lists the valid data types.

VAL_CHAR A single byte character.
VAL_SHORT_INTEGER A 2 byte integer.
VAL_INTEGER A 4 byte integer.
VAL_FLOAT A 4 byte floating point value.
VAL_DOUBLE An 8 byte floating point value.
VAL_64BIT_INTEGER An 8 byte integer.
VAL_UNSIGNED_SHORT_INTEGER An unsigned 2 byte integer.
VAL_UNSIGNED_INTEGER An unsigned 4 byte integer.
VAL_UNSIGNED_CHAR An unsigned single byte character.
VAL_UNSIGNED_64BIT_INTEGER An unsigned 8 byte integer.
VAL_SIZE_T An unsigned 4 byte integer (32-bit applications).
An unsigned 8 byte integer (64-bit applications).
VAL_SSIZE_T A 4 byte integer (32-bit applications).
An 8 byte integer (64-bit applications).
VAL_PTRDIFF_T A 4 byte integer (32-bit applications).
An 8 byte integer (64-bit applications).
VAL_UINTPTR_T An unsigned 4 byte integer (32-bit applications).
An unsigned 8 byte integer (64-bit applications).
VAL_INTPTR_T A 4 byte integer (32-bit applications).
An 8 byte integer (64-bit applications).
yGain double The gain to apply to the waveform (yArray) data.

The default value is 1.0.
yOffset double A constant offset to add to the waveform (yArray) data.

The default value is 0.0.
initialX double The initial value for the x-axis.

The default value is 0.0.
xIncrement double The increment along the x-axis for each new point.

The default value is 1.0.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Was this information helpful?

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit