ADS-Read
The ADS-Read- block is a polymorphic VI and supports the following ADS communication modes to read data from TwinCAT:
- Sync Single
- Async Single
- Noti. Single
- Noti. Buffered
- E-Noti. Sinlge
- E-Noti Buffered
- E-Noti. Multiple Symbols
- LVB-Noti. Single Symbol
- LVB-Noti. Multiple Symbols
All modes use the low-level Read blocks in the background to:
- 1. Initialize the ADS Reader.
- 2. To send the ADS request.
- 3. To wait for answer and
- 4. finally release the reader from the memory.
The section Communication modes provides further information as well as practical application recommendations. In the chapter Examples you will find exemplary implementations in LabVIEW™.
Depending on the selected communication mode, the parameters configured in Symbol Interface are used or remain unused. The relevant parameters are named below.
Sync Single
In this operation mode, the ADS client (LabVIEW™) sends a request to the ADS server (TwinCAT) and waits for a response from the server in the program sequence.
Relevant parameter: Timeout
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[8] Read status? | Read status |
[10] Ads Read Data | ADS raw data |
Async Single
In this operation mode, the ADS client (LabVIEW™) sends a request to the ADS server (TwinCAT) and does not wait for a response from the server in the program sequence.
Relevant parameter: Timeout
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[8] Read Status | Read status |
[10] ReadHdl | Handle to the ADS reader |
Noti. Single
In this operation mode ADS notifications are registered to the relevant ADS symbols in TwinCAT. Only "on change" registration is possible. The ADS notification is unregistered again from the ADS server when the first "on change" notification is received in LabVIEW™.
Relevant parameters: Timeout, Transmode (= on change)
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[7] Send | Send flag, TRUE registers the ADS notification |
[8] Read Status | Read status |
[10] Ads Read Data | ADS raw data (array of two entries, previous value and current value) |
Noti. Buffered
In this communication mode ADS notifications are registered on the respective ADS symbols in TwinCAT. The ADS client in LabVIEW™ also uses a buffer memory, which is first filled with feedback messages from TwinCAT before the entire buffer memory is transferred to LabVIEW™. After passing the buffered data to LabVIEW™, the ADS notification is unregistered from the server. Both ADS notification types, "on change" and "cyclic", are supported.
Relevant parameters: Timeout, Transmode, SampleTime, LVBufferSize, TCBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[7] Send | Send flag, TRUE registers the ADS notification |
[8] Read Status | Read status |
[10] Ads Read Data | Buffered ADS raw data |
E-Noti. Single
In this operation mode, ADS notifications are registered on the relevant ADS symbols in TwinCAT and then continuously transmitted to LabVIEW™ as a LabVIEW™ event. The ADS notification reports after a defined time if ElapseTimeMs is greater than zero, or remains until it is actively unregistered. For the use of user events in LabVIEW™, see LabVIEW™ documentation. In contrast to E-Noti. Buffered (see below), no LabVIEW™-side buffer memory is used in this case.
Relevant parameters: Timeout, Transmode, SampleTime, TCBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[1] ElapseTimeMs | Measurement duration in milliseconds:
|
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[7] Send | Send Flag, TRUE starts the ADS notification |
[9] user event | Reference to user event |
E-Noti Buffered
In this operation mode, ADS notifications are registered on the relevant ADS symbols in TwinCAT and then continuously transmitted to LabVIEW™ as a LabVIEW™ event. The ADS notification reports after a defined time if ElapseTimeMs is greater than zero, or remains until it is actively unregistered. For the use of user events in LabVIEW™, see LabVIEW™ documentation. In contrast to E-Noti. Single (see above), a LabVIEW™-side buffer memory of size LVBufferSize is used in this case. When the buffer is filled the collected data are passed to LabVIEW™ via an event.
Relevant parameters: Timeout, Transmode, SampleTime, TCBufferSize, LVBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[1] ElapseTimeMs | Measurement duration in milliseconds:
|
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[7] Send | Send Flag, TRUE starts the ADS notification |
[9] user event | Reference to user event |
E-Noti. Multiple Symbols
This operation mode works like E-Noti. Buffered, except that this VI can be used for several ADS symbols at the same time.
Relevant parameters: Timeout, Transmode, SampleTime, TCBufferSize, LVBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[1] ElapseTimeMs | An array of U32 consisting of measurement duration in milliseconds:
|
[5] [6] Symbols | An array of LabVIEW™ strings that specifies the ADS symbols. A symbol is named by the following elements:
Examples of the symbol name:
|
[9] Noti. E-Buffered Event Refs | An array of references to user event |
LVB-Noti. Single Symbol
This operation mode works like E-Noti. Buffered, except that this VI provides direct access to LVBuffer instead of using LabVIEW™ events. As a result, no LabVIEW™ events are required to read the notifications.
Relevant parameters: Timeout, Transmode, SampleTime, LVBufferSize, TCBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[1] ElapseTimeMs | Measurement duration in milliseconds:
|
[5] [6] SymbolName | Describes an ADS symbol consisting of AMS address and symbol designation:
Examples of the symbol name:
|
[9] LVBuffer Handle | Handle to the LVBuffer |
LVB-Noti. Multiple Symbols
This operation mode works exactly like LVB-Noti. Single Symbol, with the difference that this VI can be used for several ADS symbols at the same time.
Relevant parameters: Timeout, Transmode, SampleTime, LVBufferSize, TCBufferSize
With Transmode = "on change" the SampleTime and the TCBufferSize are not relevant.
Input/output | Meaning |
---|---|
[0] [4] Handle | Handle to the ADS client |
[1] ElapseTimeMs | An array of U32 consisting of measurement duration in milliseconds:
|
[5] [6] Symbols | An array of LabVIEW™ strings that specifies the ADS symbols. A symbol is named by the following elements:
Examples of the symbol name:
|
[9] LVBuffer Handle | An array of U32 consisting of handle on LVBuffer |