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

ADS · 0 次阅读

IAdsSymbolicAccess Interface

Interface for symbolic ADS access (Read or Write)


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

Syntax

C#

public interface IAdsSymbolicAccess

The IAdsSymbolicAccess type exposes the following members.

Methods

 

Name

Description

IAdsSymbolicAccess Interface 1:

CleanupSymbolTable

Clears the internal symbol / DataTypes cache.

IAdsSymbolicAccess Interface 2:

ReadDataType

Reads/Determines the DataType Inforrmation with the specifed name.

IAdsSymbolicAccess Interface 3:

ReadDataTypeAsync

Reads/Determines the DataType of the specified type as an asynchronous operation.

IAdsSymbolicAccess Interface 4:

ReadSymbol

Reads the symbol information about an individual variable in ADS devices.

IAdsSymbolicAccess Interface 5:

ReadSymbolAsync

Reads the symbol information object specified by the instance path as an asynchronous operation.

IAdsSymbolicAccess Interface 6:

ReadValue(ISymbol)

Reads the value of a symbol and returns the value as (boxed) object.

IAdsSymbolicAccess Interface 7:

ReadValue(String)

Reads the value of a symbol specified with its instance path and returns the value as boxed object.

IAdsSymbolicAccess Interface 8:

ReadValue(String, Type)

Reads the value of a symbol specified with its instance path and returns the value as object of the specified type.

IAdsSymbolicAccess Interface 9:

ReadValue<T>(ISymbol)

Reads the value of a symbol and returns it as an typed object.

IAdsSymbolicAccess Interface 10:

ReadValue<T>(String)

Reads the value of a symbol and returns the value as specified type.

IAdsSymbolicAccess Interface 11:

ReadValueAsync(ISymbol, CancellationToken)

Reads the value of a symbol as an asynchronous operation and returns the value as an (boxed) object.

IAdsSymbolicAccess Interface 12:

ReadValueAsync(String, Type, CancellationToken)

Reads the typed value of a symbol as an asynchronous operation.

IAdsSymbolicAccess Interface 13:

ReadValueAsync<T>(ISymbol, CancellationToken)

Reads the value of a symbol as an asynchornous operation and returns the value of the specified type.

IAdsSymbolicAccess Interface 14:

ReadValueAsync<T>(String, CancellationToken)

Reads the typed value of a symbol specified by the instance path as an asynchronous operation.

IAdsSymbolicAccess Interface 15:

TryReadDataType

Tries to Read/Determine the DataType of the specified type.

IAdsSymbolicAccess Interface 16:

TryReadSymbol

Tries to read the symbol information object specified by the instance path.

IAdsSymbolicAccess Interface 17:

TryReadValue(ISymbol, Object)

Tries to read the value of a symbol and returns the value as boxed object.

IAdsSymbolicAccess Interface 18:

TryReadValue(String, Type, Object)

Tries to the value of a symbol specified as instance path and returns the value as (boxed) object.

IAdsSymbolicAccess Interface 19:

TryReadValue<T>(ISymbol, T)

Reads the value of a symbol and returns the value as typed value.

IAdsSymbolicAccess Interface 20:

TryReadValue<T>(String, T)

Tries to reads the value of a symbol specified with instance path and returns the typed value.

IAdsSymbolicAccess Interface 21:

TryWriteValue(ISymbol, Object)

Tries to write a (boxed) value to the symbol

IAdsSymbolicAccess Interface 22:

TryWriteValue(String, Object)

Tries to write a (boxed) value to the symbol instance specified by its instance/symbol path.

IAdsSymbolicAccess Interface 23:

TryWriteValue<T>(ISymbol, T)

Tries to write a value to the symbol.

IAdsSymbolicAccess Interface 24:

TryWriteValue<T>(String, T)

Tries to Write a (typed) value to the symbol instance specified by its instance/symbol path.

IAdsSymbolicAccess Interface 25:

WriteValue(ISymbol, Object)

Writes a (boxed) value to the symbol.

IAdsSymbolicAccess Interface 26:

WriteValue(String, Object)

Writes a (boxed value) to the symbol instance specified by its instance/symbol path.

IAdsSymbolicAccess Interface 27:

WriteValue<T>(ISymbol, T)

Writes a (typed) value to the symbol.

IAdsSymbolicAccess Interface 28:

WriteValue<T>(String, T)

Writes a typed value to the symbol instance specified by its instance/symbol path.

IAdsSymbolicAccess Interface 29:

WriteValueAsync(ISymbol, Object, CancellationToken)

Writes a (boxed) value to the symbol as an asynchronous operation.

IAdsSymbolicAccess Interface 30:

WriteValueAsync<T>(ISymbol, T, CancellationToken)

Writes a (typed) value to the symbol as an asynchronous operation.

IAdsSymbolicAccess Interface 31:

WriteValueAsync<T>(String, T, CancellationToken)

Writes a (typed) value to the symbol instance specified by its instance/symbol path as an asynchronous operation.

Remarks

To convert the read ADS value to its appropriate .NET type or writing to ADS, the following rules take place:

  • For primitive types including strings or arrays of primitives, no type parameter is necessary. A default marshalling to the most appropriate type will be done.
  • If a primitive type (including primitive array or string) is given as type, the result value will be converted if possible to that type. If the value is not convertible, this method fails.
  • If the type is complex (e.g. structs), the ADS value must be blittable to the specified type (same size, same binary layout), must be convertible by reflection (each field can be recognized via its name and their types are compatible/convertable) or a custom marshalling must be available.

For writing values:

  • The used type is given by the .NET value type
  • for Primitive types including strings or arrays of primitives, a default marshalling takes place.
  • If a type parameter is part of the Write interface method, the given value will be converted to that type if possible. If the value is not convertible, this method fails.
  • If the type is complex (e.g. structs), the ADS value must be blittable to the specified type (same size, same binary layout), must be convertible by reflection (each field can be recognized via its name and their types are compatible/convertable) or a custom marshalling must be implemented.
  • If a string is passed as parameter, the method attempts to parse the string according to the ADS data type of the symbol.

See Also

Reference

TwinCAT.Ads Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026

Further Information
See also