Library.GetDCSystemTime Method

Gets the timestamp of the selected Sync0’s signal of the distributed clock (DC).

Namespace:  IntervalZero.MaxRT.Ecat.Api.NetApi
Assembly:  IntervalZero.MaxRT.Ecat (in IntervalZero.MaxRT.Ecat.dll) Version: 1.0.0.0 (File version: 1.1.0)

Syntax

Copy
public EcatErrorCode GetDCSystemTime(
    EcatHandle mainDevice,
    DcCycle cycle,
    ref ulong time
)

Parameters

mainDevice

Type: EcatHandle
A handle to a MainDevice. To retrieve the corresponding handle, use CreateMainDevice or OpenMainDevice.

cycle

Type: DcCycle
The DC system time to acquire.

time

Type: UInt64
A reference to a variable that stores the DC system time.

Return Value

EcatErrorCode is thrown when any of these errors occur:

Error code Meaning

ecatErrNoError

The function succeeded.

ecatErrWrongParameter

One of the following conditions occurred:

  • Parameter mainDevice is invalid.
  • Parameter cycle is invalid.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

ecatErrWrongEnvironment

The MainDevice has not started.

See Also: