ADS FlexDAQ

The ADS FlexDAQ (Flexible Data Acquisition) VI is a further development of the ADS DAQ VI. As with the ADS DAQ, this is a LabVIEW™ Express VI that simplifies the configuration of measuring tasks with TwinCAT 3 and provides read access to the TwinCAT runtime.

The ADS FlexDAQ VI also offers the following additional options:

The user interface guides you step by step through the configuration of your measuring task:

The configuration window opens after placing the ADS FlexDAQ instance in the LabVIEW™ block diagram or by double-clicking. The configurations can be made with the help of the selection windows described below. After the configuration is complete, the instance creates all the necessary resources for reading the data.

ADS FlexDAQ 1:

Save VI before using the ADS FlexDAQ VI

The ADS FlexDAQ VI stores the configuration of an instance in the path of the current project. Therefore, it is necessary to save the project beforehand.

Open ADS FlexDAQ VI in an accelerated way

The library must be precompiled.
1. Open the settings for "Mass Compile" in the LabVIEW™ settings at Tools > Advanced.
2. Select the folder of the TwinCAT 3 Interfaces for LabVIEW™ library, e.g. C:\Program Files\ National Instruments\LabVIEW 2023\user.lib\Beckhoff-LabVIEW-Interface .
3. Start "Mass Compile".
ADS FlexDAQ 2:

Input/output

Meaning

[1] Reader handles

Handles on the reading symbols

[20] Handle

Handle to the ADS client

[26] Selection

LabVIEW™ cluster consisting of two elements:

  • SymbolName: The name of the ADS symbol
  • Notification Mode: LabVIEW™ Enum
    • Single TypeResolved Queue: Reads only one sample as notification and adds the sample to the LabVIEW™ queue (only in LabVIEW™ 32-bit).
    • Single TypeResolved Control: Reads only one sample as notification and writes the sample to the LabVIEW™ display element (only in LabVIEW™ 32-bit).
    • Buffered TypeResolved Queue: Reads a number of samples as described by LVBufferSize, and adds the samples to the LabVIEW™ queue.
    • Buffered TypeResolved Control: Reads a number of samples as described by LVBufferSize, and writes the samples to the LabVIEW™ display element.
ADS FlexDAQ 3:

TwinCAT 3 data type generation

To support all notification modes, all generated types are converted to arrays. Notifications Buffered as well as Notifications Single are supported in the same way.

Symbol selection window

Just as with ADS DAQ, the Symbol selection window is used to select the ADS symbols to be read with the ADS Flex DAQ instance. In addition, there is an option Import Configuration, which can be used to import a saved configuration. For this purpose, a LabVIEW™ file dialog box opens, in which a path to an exported configuration can be selected.

ADS FlexDAQ 4:

Notification and Loop-ID selection window

In this window the Notification Mode and the Loop-ID are selected. The possible notification modes can be found in the section ADS DAQ. The Loop-ID is used to distribute the reading of the symbols to while loops. With the ADS Flex DAQ it is possible to assign the same Loop-ID to several symbols. These are then processed in the same while loop. This reduces the number of loops.

ADS FlexDAQ 5:
ADS FlexDAQ 6:

Maximum Loop-IDs

The number of inputs is limited to 23 for the ADS Flex DAQ instance. Consequently, a maximum of 23 different Loop-IDs can also be assigned.

Save measured data

For each symbol there is the option "Save To TDMS", which saves the respective symbol in a TDMS file when reading from TwinCAT. The block "To TDMS" like in the ADS DAQ is used for this purpose.

ADS FlexDAQ 7:

Automatically generated code in the block diagram

In the following, two variants of the automatically generated code are explained as examples.

In the first example, the ADS FlexDAQ VI is generated with default settings, i.e. Buffered Type Resolved Queue, no storage of measured data, Start with LabVIEW™ Run, Stop with LabVIEW™ Stop. An ADS symbol MAIN.aAM is read.

ADS FlexDAQ 8:

In the second example, the start condition is changed from LabVIEW™-Run to "Trigger on LabVIEW™ Event" and the data storage to a TDMS file is enabled. Two symbols are read: MAIN.aAM and MAIN.aSine. These are assigned the same Loop-ID. Thus, both symbols are read in the same while loop.

ADS FlexDAQ 9:

The blocks 1a, 2, 3b, 3b.2, 3b.4, 3c and 3d already described in the first example remain identical in their function.