ADS Write Assistant
Like the ADS FlexDAQ, the ADS Write Assistant VI is a LabVIEW™ Express VI that simplifies the configuration of transfer tasks. The ADS Write Assistant VI can be used to write data from LabVIEW™ to TwinCAT 3.
The user interface of the ADS Write Assistant VI guides you step by step through the configuration of your transfer task:
- Selection of the data points to be written (ADS symbols)
- Configuration of the Loop-IDs
- Configuration of start and end condition of the write operation using the transfer job selection window
The configuration window opens after placing the ADS Write Assistant 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 writing the data.
![]() | Save VI before using the ADS Write Assistant VI The ADS Write Assistant VI saves the instance configuration in the path of the current project. Therefore it is necessary that the project has been saved before. |
Open ADS Write Assistant 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 2024\user.lib\Beckhoff-LabVIEW-Interface.
- 3. Start "Mass Compile".

Input/output | Meaning |
---|---|
[1] SumUp handle | Handle to the SumUp Writer |
[20] Handle | Handle to the ADS client |
Symbol selection window
The symbol selection window at the ADS Write Assistant offers the same functionality as at ADS FlexDAQ. Here one of the options can be selected to start a new configuration or to apply the settings of an existing configuration. If you start a new configuration via Symbol Interface, you will automatically move on to the next window.

Loop-ID window
In this window, the symbols are assigned a unique Loop-ID. This distributes the writing of the symbols to different while loops. If two symbols have the same Loop-ID, both symbols have used the same loop. The number of Loop-IDs determines the number of generated while loops in the LabVIEW™ block diagram.

Write operation configurator (selection window)
In this window the start/stop condition for the data transport from LabVIEW™ to TwinCAT 3 can be configured. The configurator behaves identically to ADS DAQ except for the stop condition.

With the control Stop Job you configure the stopping of the writing process. The parameter Stop Condition describes the stop condition.
- The options LabVIEW™ Abort and On Signal are described in ADS DAQ.
- Duration: If Duration is selected as a stop condition, then the write operation is determined after a time. With this condition, the "Transition Condition" option is also available. This allows the write duration to be influenced by a trigger. The image below shows the different "Transition Condition" triggers.
- Single Trigger: Starts a new write duration only if no other write operation is present.
- New Trigger: Always starts a new write operation.
- Start-Stop Trigger: Starts a write operation if no other is present or, on the contrary, stops an existing write operation.

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 Write Assistant VI is generated with default settings, i.e. Start with LabVIEW™ Run, Stop with LabVIEW™ Stop. An ADS symbol MAIN.aSine is written. A sine signal generated by LabVIEW™ and transferred to the TwinCAT 3 Runtime.

- 1: The ADS Writer SumUp handle is initialized and the flag bAutosend? is set to True. Thus, each new packet is automatically transported from LabVIEW™ to the TwinCAT 3 Runtime.
- 2: A handle goes from the ADS Write Assistant to the underlying queue blocks. The queue forwards each new data packet to the ADS Write Assistant. Until then, the data packet only contains raw data, which is then automatically converted into a TwinCAT 3 data type by the ADS Write Assistant using the TypeResolver and then transferred to TwinCAT using the ADS SumUp.
- 3a: The queue is initialized with a LabVIEW™ variant as data type.
- 3b: While loop with start condition "LabVIEW™ Run" without end condition.
- 3b.1: The ADS Write Assistant generates an event case with the property "value change" for each selected symbol. Only value changes are made available to the SumUp handle. The image below shows an example of how the new data can be generated. This is about the so-called LabVIEW™ block diagram events.
- 4: The ADS symbol MAIN.aSine is in this case a LREAL array of 20 elements. The generated sine signal therefore also contains only 20 data points.
- 3b.2: Enqueue element: Waits for new data packets and inserts each new data packet into the queue.
- 3c and 3d: Releases the queue memory. After that the queue is released from the LabVIEW™ memory. Optionally, after these steps, the user can release the ADS client handle from memory.

In the second example, the start/stop conditions are set to Trigger on LabVIEW™ Event. In addition, two symbols are written here with the SumUp handle: MAIN.aSquare and MAIN.aSine. The two symbols are assigned the same Loop-ID. Thus, both symbols use a while loop and the same event structure.

- The blocks 2, 3b, 3b.1, 3b.2, 3c and 3d already described in the first example remain identical in their function.
- 1a: The ADS Writer SumUp handle is initialized and the flag bAutosend? is set to False . The new packet must be sent explicitly to TwinCAT 3. In the example this is done by the separate event "Send SumUp".
- 1b: Logic is created that generates a trigger-event when a Boolean value change occurs. The value change starts the write process.
- 1b.2: A write operation is started using a SumUp handle.
- 3a: The queue is initialized with a LabVIEW™ cluster as data type with the following member variables:
- SymbolName: Identifies the data packet to be written.
- Write Package: Contains the data packet to be transferred.