Library.PulseHeartbeat Method

Sends a signal to notify E-CAT Fieldbus that the user application is running properly.

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

Syntax

Copy
public EcatErrorCode PulseHeartbeat(
    EcatHandle mainDevice
)

Parameters

mainDevice

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

Return Value

EcatErrorCode is thrown when any of these errors occur:

Error code Meaning

ecatErrNoError

The function succeeded.

ecatErrWrongParameter

Parameter mainDevice is invalid.

ecatErrMainDeviceNotReady

The MainDevice instance does not exist.

Remarks

The E-CAT Fieldbus uses a heartbeat mechanism to detect if the connection between the MainDevice instance and user applications is lost. When heartbeat is enabled (through SetHeartbeat), users must use PulseHeartbeat to periodically notify the corresponding MainDevice within the specified time. Otherwise, the MainDevice will assume the connection is lost and close the EtherCAT link, which works like Stop.

See Also: