Table of Contents

Namespace TwinSharp

Classes

AmsRoute

Represents a route to a TwinCAT target system, including its name, address, AmsNetId, protocol, and flags. Provides functionality to retrieve the state information of the route.

Constants

TwinCAT constants made available to the entire project.

EtherCatDevice

Describes an EtherCAT device, using all standard objects as defined from the EtherCAT standard. This class can be derived and extended to create a specific EtherCAT device.

EtherCatMaster

The EtherCatMaster class provides methods to interact with an EtherCAT master device. It allows for reading the current state, device type, and name of the master, as well as retrieving information about connected slaves, such as their configuration, state, and topology. Additionally, it can read unexpected state changes and convert device status to a string representation.

Extensions

Contains extension methods for various classes.

FileFinder

This class can search for files and enumerate them on a remote TwinCAT target.

FileSystem

The FileSystem class provides methods for interacting with the file system on a target device using the TwinCAT ADS protocol. It allows opening, closing, reading, writing, seeking, deleting files, as well as creating and deleting directories.

License

Represents a license manager for a TwinCAT system.

Realtime

The Realtime class provides methods to interact with the TwinCAT systems real-time settings. It allows setting shared cores configuration, reading CPU settings, reading CPU latency, and getting the current CPU usage. It uses the AdsClient to communicate with the TwinCAT system.

Scope

Class to interact with a TwinCAT 2 scope. Note: not compatible with TwinCAT 3.

SumReader

Using the ADS Sum Command it is possible to read or write several variables in one command.

TcSystem

The TcSystem class represents a TwinCAT system and provides methods to interact with it. It allows switching the system to different modes (Config, Restart, Stop), listing EtherCAT masters, and listing local static routes. It also provides access to the system's real-time properties, license information, and file system through the Realtime, License, and FileSystem properties respectively.

Structs

RTimeCpuLatency

Struct that describes the realtime latency of the CPU.

RTimeCpuSettings

Struct that describes the amount of Windows (shared) cores and isolated cores for TwinCAT.

ST_CheckLicense

Structure with license information.

ST_EcSlaveConfigData

The structure ST_EcSlaveConfigData contains the EtherCAT configuration data for an EtherCAT slave device.

ST_EcSlaveIdentity

The structure ST_EcSlaveIdentity contains the EtherCAT identity data for an EtherCAT slave device.

ST_EcSlaveState

The structure ST_EcSlaveState contains the EtherCAT state and the link state of an EtherCAT slave device.

ST_FileAttributes

Describes the different attributes that a file can have. Such as readonly, hidden, system etc.

ST_FindFileEntry

The structure ST_FindFileEntry contains information about a file or directory found by the FindFirstFile and FindNextFile functions.

ST_PortAddr

The structure ST_PortAddr contains EtherCAT topology information for EtherCAT slave device. EtherCAT slave devices typically have 2 to 4 ports.

ST_TopologyDataEx

The structure ST_TopologyDataEx contains information on EtherCAT topology and hot-connect groups.

Enums

E_EnumCmdType

Control parameter for enumeration blocks. Not all parameters are used by each enumeration block!

E_LicenseHResult

The E_LicenseHResult enumeration contains the possible results of the license check.

ExtendedAdsErrorCodes

Beckhoff does not describe all of its existing error codes in its enum in ADS Abstractions. So we "extend" it here. Mostly error codes recieved from MDP/IPC is missing. More info: https://infosys.beckhoff.com/english.php?content=../content/1033/tcplclib_tc2_mdp/178768395.html

FileOpenModeFlags

The FileOpenModeFlags enum defines various modes for opening files, each represented by a unique flag. These flags can be combined using bitwise operations to specify multiple modes simultaneously.