LabVIEW™ VIs

The TwinCAT 3 Interface for LabVIEW™ provides controls and VIs for use in LabVIEW™.

The VIs are located in the block diagram in the functions palette: Functions > User Libraries > Beckhoff-LabVIEW-Interface.

LabVIEW™ VIs 1:

The main folder contains the basic VIs that can be used to build a program for reading via ADS, writing via ADS, TypeResolving and releasing the ADS client. In addition, the main folder contains the subfolders: Low-Level, With TypeResolving and Utilities.

Low-Level

The Low-Level subfolder contains Low-Level-VIs. The low-level VIs operate based the same principle as the basic VIs. The low-level VIs involve a little more programming effort but offer higher performance (in terms of data throughput) than the basic VIs and more flexibility for realizing complex programs. Reading data continuously is an example that uses the Low-Level-VIs for fast reading via ADS. Writing data continuously is a similar example. Not only reading and writing can be accelerated in this way, but also TypeResolving, see Continous Read, for example.

The table describes the subfolders and their contents and function:

Subfolder

VIs

Function

Init

Base Init

Initializes the ADS client.

Get List of ReadWrite Symbols

Creates a list of ADS read and write symbols.

Get List of Registered Targets

Creates a list of registered ADS target systems.

Read

Init Reader

Initializes the ADS Reader.

Send Reader-Request

Sends a request to the ADS server.

Register Notification

Registers the notification on the ADS server.

TryReadData

Checks the response from the server and reads the data stream.

Release Reader

Releases the reader from memory.

Write

Init Writer

Initializes the ADS Writer.

Send Writer Request

Sends a request to the ADS server.

CheckWriteStatus

Checks for the response from the ADS server to ascertain whether the data packet was received.

Release Writer

Releases the writer from memory.

TypeResolver

Init Type

Initializes the TypeResolver.

Resolve From TC Type

Converts the TC3 data type to a LabVIEW™ data type variant.

Resolve To TC Type

Converts the LabVIEW™ data type variant to TC3 data type.

Release Type

Releases the TypeResolver from memory.

LabVIEW™ VIs 2:

With TypeResolving

The With TypeResolving subfolder contains two VIs for reading and writing via ADS with integrated TypeResolver block.

LabVIEW™ VIs 3:

Utilities

The Utilities subfolder contains additional VIs for the following purposes:

Subfolder

VIs

Function

Notification

ADS To LabVIEW Timestamp

Converts ADS timestamps to LabVIEW™ timestamps.

Notification Data To Variant Array

Builds an array of LabVIEW™Variant from the notification data stream.

Stop Notification

Stops the ADS notifications.

Start Notification

Starts the ADS notifications.

Unregister Notification

Unregisters the notification on the server.

 

Check License

Checks the license state on a given target system.

Set Device State,
Get Device State

Reads or changes the state of an ADS device.

Get Version Info

Provides information regarding the product version.

LabVIEW™ VIs 4:

Operating elements

The controls are located in the front panel in the controls palette under: User Controls > Beckhoff-LabVIEW-Interface.

LabVIEW™ VIs 5:

The Notification subfolder contains controls that are required when initializing the LabVIEW™ event for ADS notifications.

Furthermore, the subfolder "TypeGenerator" contains TypeGenerator class objects to convert TwinCAT types into LabVIEW™ types (see Basic examples).

The following table describes the function of the controls:

Subfolder

Controls

Function

Notification

Single User-Event Data

Control for initializing a LabVIEW™ event for Single ADS notifications.

Buffered User-Event Data

Control for initializing a LabVIEW™ event for Buffered ADS notifications.

TypeGenerator

CBase

Class object; base class of the TypeGenerator

 

CBool

Class object; Boolean class of the TypeGenerator.

 

CNumeric

Class object; numeric class of the TypeGenerator.

 

CString

Class object; LabVIEW™ string class of the TypeGenerator.

 

CArray

Class object; array class of the TypeGenerator.

 

CTimestamp

Class object; LabVIEW™ timestamp class of the TypeGenerator.

 

CCluster

Class object; LabVIEW™ cluster class of the TypeGenerator.