# PlotPackedDigitalLinesMultiBus

int PlotPackedDigitalLinesMultiBus (int panelHandle, int controlID, void *dataArray, int numElements, int numBuses, int dataType, int dataSequence, void *maskArray);

## Purpose

Plots packed data from multiple buses to a digital graph.

The data you send to PlotPackedDigitalLinesMultiBus 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 for a bus. The individual bits in each dataArray element correspond to individual lines within the bus. Use the maskArray parameter to specify which bits in the dataArray refer to valid lines.

If you use NI-DAQmx to acquire the data you plot with PlotPackedDigitalLinesMultiBus, you must call DAQmxReadDigU8 as the read function. You also must group the lines from each bus into a channel to ensure that PlotPackedDigitalLinesMultiBus can plot the data correctly.

## 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 for a bus. Each bit within the dataArray element corresponds to a data value for a line within the bus. Use maskArray to specify which lines to plot on the digital graph. You can group the data into multiple buses, as specified in numBuses. If you plot data for more than one bus, all of the buses must have the same number of samples. Otherwise, the displayed data will be incorrect.
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.
numBuses | integer | The number of data buses to plot. maskArray specifies the valid lines in each bus to plot.
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
dataSequence | integer | Determines the order in which LabWindows/CVI plots the dataArray values. VAL_INTERLEAVED—LabWindows/CVI plots the data values for the first data sample of the first bus, then the data values for the first data sample of the second bus, and so on. VAL_NON_INTERLEAVED—LabWindows/CVI plots all of the data values for the first bus, then all of the data values for the second bus, and so on. If you use NI-DAQmx to acquire the data array, you must use the appropriate dataSequence.
maskArray | void * | Array that specifies which bits in each data element correspond to valid lines. The digital graph displays the result of a bitwise AND on maskArray and dataArray. For example, the dataArray you pass to PlotPackedDigitalLinesMultiBus has three buses of type VAL_SHORT_INTEGER. A maskArray that contains the values {0x00FF, 0x0001, 0x0001} indicates that the first bus has eight valid lines, and the second and third buses have one valid line each. If you pass in VAL_SINGLE_LINE for the maskArray, then PlotPackedDigitalLinesMultiBus plots only one line per bus. LabWindows/CVI plots the data in the least significant bit of each element. If there are multiple buses, VAL_SINGLE_LINE applies to all of them. The data type of maskArray 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