Sending a Data Set to the First Process in the Dataflow Script

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Allowing Data to Flow between Processes in a Specific Order

For the processes in the Dataflow Script to operate on data, each process that produces data must send it to the first process in the Dataflow Script. The data-producing process must also divide it into data sets according to the data group whose channels acquired the data.

What to Use

  • Bundle by Name function
  • Data.ctl type definition
  • Get First Dataflow Process VI

What to Do

In the process VI case that produces data, create the following code to send the data to the first process in the Dataflow Script. Customize the gray sections for your unique programming goals.

Make a copy of the point value map associated with the data group. This map is created for each data group in the reference code initialization subVI, so you can duplicate the existing map. Copying the map preserves the values from the time when the data enters the Dataflow Script, while the original map continues to receive updates from other processes.
Write a map point named AcqBlockNumber whose value is a running numeric count that specifies the order of each data set relative to other data sets from the same data group. This means you must maintain this count separately for each data group for which the process produces data.
When the process has finished operating on the data, bundle the elements into a cluster with the following elements:
  • DataGroup—A scalar string that specifies the name of the data group whose channels produced the data. This name is part of the device configuration.
  • Waveforms—An array of the waveforms acquired from channels in the data group. Note that the waveforms are stored as data value references, meaning you must use an In Place Element Structure to access the waveform data. For more information, refer to Reading and Writing Waveforms in Dataflow Script.
  • Map—A point value map whose name is the data group name and that contains various properties related to the acquisition, as well as any single-point measurements. The map contains values from the time when a process sent the original data set to the first process in the Dataflow Script.

In this example, the data set cluster consists only of single-point values and properties in the point value map element of the cluster, so the process leaves the waveform element empty.
Use the following type definition to specify the correct format for the data cluster: labview\vi.lib\addons\InsightCM\Devices\Shared\DataFlow\controls\Data.ctl
Call the GetFirstProcessModule VI to send the data cluster to the first process in the Dataflow Script via a ProcessDataFlowBlock Qbus message. The first process will operate on the data and then transfer it to the next process. Each subsequent Dataflow Script process repeats this action.

Tips and Troubleshooting

  • A process that produces data for the first process is not itself a part of the Dataflow Script because it does not need to handle ProcessDataFlowBlock messages.
  • Multiple processes can send data sets to the first process in the Dataflow Script. However, only a single process can send data sets for a particular data group to the first process. For example, the FPGA Acquisition and Single-Point Clock modules in the device reference code send data sets to the first process because they never produce data sets for the same data group.

Related Information

Setting the Processes in the Dataflow Script

Handling a Data Set and Transferring Data to the Next Process


Not Helpful