Infosys在阅读器中打开 / AI 翻译

ADS · 0 次阅读

ITcAdsRawAny Interface

Interface defining ADS read/writes addressed by IndexGroup/IndexOffset or handle.


Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public interface ITcAdsRawAny

The ITcAdsRawAny type exposes the following members.

Methods

 

Name

Description

ReadAnyAsync(UInt32, Type, Int32[], CancellationToken)

Reads the value of an Anytype (Primitive type) asynchronously.

ReadAnyAsync(UInt32, UInt32, Type, Int32[], CancellationToken)

Reads the value of an AnyType (Primitive type) asynchronously.

TryReadAny(UInt32, Type, Object)

Reads a value.

TryReadAny(UInt32, Type, Int32[], Object)

Read the value of an AnyType (Primitive type)

TryReadAny(UInt32, UInt32, Type, Object)

Reads the value as specified type.

TryWrite(UInt32, UInt32, Object)

Writes an AnyType value (struct)

TryWrite<T>(UInt32, UInt32, T)

Writes an AnyType value.

TryWriteAny(UInt32, Object)

Writes an AnyType value.

TryWriteAny(UInt32, Object, Int32[])

Writes an AnyType value.

TryWriteAny(UInt32, UInt32, Object)

Writes an AnyType value.

TryWriteAny(UInt32, UInt32, Object, Int32[])

Writes an AnyType value.

WriteAnyAsync

Write the value of an Anytype (Primitive type) asynchronously.

Remarks

Because no symbolic information is available here (in opposite to IAdsSymbolicAccess), these read/write methods rely on type information that is given by the value itself or by method parameter. Therefore the marshalling of the values is limited to

  • Primitive types
  • Arrays of primitive types
  • Types that are specified by ADS AnyTypes.
  • Blittable complex .NET Types (StructLayout of .NET Types is equal the ADS Device symbol datatype.)

Type of value Parameter

Necessary Arguments (args)

string

args[0]: Number of characters in the string typed as FixedLengthZeroTerminated.

string[]

args[0]: Number of characters in each string typed as FixedLengthZeroTerminated.

Array

args: Dimensions of Array as int[]

See Also

Reference

TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026

Further Information