One-time reading
This communication mode is ideal, for reading a TwinCAT configuration or a completely filled data buffer in the PLC once, for example. In contrast to continuous reading, one-time reading requires no additional programming in LabVIEW™.
The TF3710 TwinCAT 3 Interface for LabVIEW™ product categorizes one-time reading into four cases:
- Synchronous reading
- Asynchronous reading
- Notification Single
- Notification Buffered
Synchronous reading
With synchronous reading, after a request has been sent by the client, a response from the ADS server is awaited before the program code is executed further. The reader is released immediately after successful confirmation from the server. This type of reading is therefore suitable for calculating or displaying the data directly after it has been received from TwinCAT.
The polymorphic "Sync Single" block is composed of several low-level VIs and thus combines the creation of a handle, reading and releasing.
![One-time reading 1:](Images/png/9007209232899851__Web.png)
Examples in LabVIEW™: Basic examples
Asynchronous reading
With asynchronous reading, the client does not wait for a response from the ADS server. In this mode, there is no guarantee that the reader has already received the data packet or not. As a result, the reader cannot be released.
The polymorphic VI "Async Single" therefore initializes the reader and sends the request to TwinCAT. The release is not part of the VI.
![One-time reading 2:](Images/png/9007209241990411__Web.png)
Examples in LabVIEW™: Basic examples
Notification Single
![]() | Notification Single is only supported for Transmode "on change". |
The block "Noti. Single" , in contrast to Notification E-Single, does not require a user-programmed event structure. The notification is only intended for one-time use, i.e. to catch a one-time event. The notification is registered in the background, received and then removed.
This block returns an array of two values, the last state before the value change and the new state after the value change, e.g. [FALSE, TRUE], if a variable has changed its value from FALSE to TRUE.
![One-time reading 4:](Images/png/9007209241994763__Web.png)
Examples in LabVIEW™: Basic examples
Notification Buffered
The block "Noti. Buffered", in contrast to Event driven reading, does not require a user-programmed event structure. The block uses a buffer of size LVBufferSize
to save the data received from TwinCAT in an intermediate layer. The notification is not removed until the buffer is full. The saved data are then passed to LabVIEW™.
Accordingly, reception of a time series with predefined length (LVBufferSize samples) can easily be realized with this communication mode.
Notice | |
LVBufferSize The buffer size is determined by the parameter |
![One-time reading 5:](Images/png/9007209242434827__Web.png)
Examples in LabVIEW™: Basic examples