# PlotPackedDigitalLines

int PlotPackedDigitalLines (int panelHandle, int controlID, void *dataArray, int numElements, int dataType, void *mask);

## Purpose

Plots packed data from a single bus to a digital graph. To plot packed data from multiple buses, call PlotPackedDigitalLinesMultiBus.

The data you send to PlotPackedDigitalLines is packed, which means you can send data samples for more than one digital line per dataArray element. Each dataArray element corresponds to one data sample. The individual bits in each dataArray element correspond to data samples for individual lines. Use the mask parameter to specify which bits in the dataArray element refer to valid lines.

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

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | 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 NewCtrl or 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. Each element in the dataArray corresponds to one sample. Each bit within the dataArray element corresponds to a data value for a line within the bus. Use the mask parameter to specify which lines to plot on the digital graph.
numElements | integer | Number of dataArray elements to plot. This value controls the number of elements to plot even if the total number of elements in dataArray is greater than numElements. numElements must be greater than zero.
dataType | integer | 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
mask | void * | Specifies which bits in each data element are valid lines. The digital graph displays the result of a bitwise AND on mask and dataArray. For example, the dataArray you pass in to PlotPackedDigitalLines is of type VAL_SHORT_INTEGER. A mask of 0x00F8 specifies that only lines three through seven are valid for the bus. If you pass in VAL_SINGLE_LINE for the mask, then PlotPackedDigitalLines plots only one line. LabWindows/CVI plots the data in the least significant bit of the dataArray element. This is equivalent to passing in 0x0001 for the mask. The data type of the mask must be the type specified in dataType.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success