Admin Production ni-theme
Current Publication

PlotDigitalLines

LabWindows/CVI

PlotDigitalLines

int PlotDigitalLines (int panelHandle, int controlID, void *dataArray, size_t numberOfPoints, int dataType, unsigned char numberOfLines);

Purpose

Plots data from a single bus to a digital graph. Use PlotDigitalLinesMultiBus to plot data from multiple buses.

Use PlotDigitalLines to send each data sample from each line as a separate data array value. Call PlotPackedDigitalLines to send packed data in which each data array element contains data values for multiple lines.

If you use NI-DAQmx to acquire the data you plot with PlotDigitalLines, you must call DAQmxReadDigitalLines as the read function.

Supported Controls

You can use PlotDigitalLines with digital graph controls.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
controlID int The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by functions such as NewCtrl and DuplicateCtrl.
dataArray void * Array that contains the values to plot on the digital graph. The data type must be of the type specified by dataType. If the value of a data item is non-zero, then the line is high; if the value is 0, then the line is low. The data in the array must be interleaved. To pass all the data samples for each line sequentially, call the PlotDigitalLinesMultiBus function and assign each line to its own bus.

numberOfPoints size_t The number of points to plot. This value controls the number of points to plot even if the number of elements in the dataArray is greater than the numPoints.

numPoints must be greater than zero and not greater than INT_MAX.
dataType int The data type of dataArray. The data must be one of the following valid integer data types:

VAL_CHAR A single byte character
VAL_INTEGER A 4 byte integer
VAL_SHORT_INTEGER A 2 byte integer
VAL_UNSIGNED_CHAR An unsigned single byte character
VAL_UNSIGNED_INTEGER An unsigned 4 byte integer
VAL_UNSIGNED_SHORT_INTEGER An unsigned 2 byte integer
numberOfLines unsigned char The number of lines to plot. LabWindows/CVI divides the dataArray evenly among the lines. You cannot mask out a particular line to keep LabWindows/CVI from plotting it.

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 7.1 and later

Examples

Refer to the following examples that use the PlotDigitalLines function:

  • userint\ClockDigitalGraph.cws

    Open example
  • userint\plotDigLine.cws

    Open example