TypeResolver

The subfolder TypeResolver contains low-level blocks necessary for converting and comparing between the LabVIEW™ data type and the TwinCAT 3 data type.

Init Type

The Init Type block initializes the TypeResolver based on SymbolName and Handle. Upon successful initialization, the block passes the handle to the TypeResolver and the TwinCAT 3 data type of the ADS symbol as a LabVIEW™ string in XML description to the LabVIEW™ process.

TypeResolver 1:

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:

  • AMS address: A compilation of AMS NetId and AMS port.
  • Symbol designation: Symbol name or index group/offset

Examples of the symbol name:

  • AMS address and symbol name: 127.0.0.0.1.1:851::MAIN.Var
  • AMS address and index group/offset: 127.0.0.0.1.1:851::0x1234/0x12345

[8] TypeHdl

Handle to the TypeResolver

[10] Type Size

Data type size in bytes

[14] TypeInfo

Type Description in XML as LabVIEW™ string

Resolve From TC Type

The Resolve From TC Type block compares and converts the raw data from the ADS read to the corresponding LabVIEW™ data type "Variant". The conversion only takes place if the comparison between the two data types was successful.

TypeResolver 2:

Input/output

Meaning

[0] [4] Handle

Handle to the ADS client

[6] [7] TypeHdl

Handle to the TypeResolver

[9] ADSRData

ADS data packet as raw data

[8] RDataArray

TypeResolved ADS raw data as Variant array

[10] RData

TypeResolved ADS raw data as Variant

Resolve To TC Type

The block Resolve To TC Type converts the raw data for ADS-Read from a LabVIEW™ data type "Variant" to the appropriate TwinCAT 3 data type. The conversion only takes place if the comparison between the two data types was successful.

TypeResolver 3:

Input/output

Meaning

[0] [4] Handle

Handle to the ADS client

[6] [7] TypeHdl

Handle to the TypeResolver

[9] WData

ADS data packet as raw data

[8] bHasMatched

Flag (True if TwinCAT 3 and LabVIEW™ data type are identical, otherwise False)

[10] ADSWData

TypeResolved ADS raw data as Variant

Release Type

The Release Type releases the handle to the TypeResolver from memory.

TypeResolver 4:

Input/output

Meaning

[0] [4] Handle

Handle to the ADS client

[5] TypeHandle

Handle to the TypeResolver