RtecatPulseHeartbeat
RtecatPulseHeartbeat sends a signal to notify E-CAT Fieldbus that the user application is running properly.
Syntax
RTECAT_ERROR RtecatPulseHeartbeat(
[in] RTECAT_HANDLE MainDevice
);
Parameters
[in] MainDevice
A handle to a MainDevice. To retrieve the corresponding handle, use RtecatOpenMainDevice.
Return Values
The function returns an RTECAT_ERROR value. If the function succeeds, it returns ecatErrNoError. If the function fails, it returns a different value.
Possible return values:
| Return value | Meaning |
|---|---|
|
ecatErrNoError |
The function succeeded. |
|
ecatErrWrongParameter |
Parameter MainDevice is invalid. |
|
ecatErrMainDeviceNotReady |
The MainDevice instance does not exist. |
Remarks
RtecatPulseHeartbeat is a synchronous function that executes immediately and returns a result upon completion.
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 RtecatSetHeartbeat), users must use RtecatPulseHeartbeat to periodically notify the corresponding MainDevice within the specified time period. Otherwise, the MainDevice will assume the connection is lost and then close the EtherCAT link, which works like an RtecatStop.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtecatApi.h |
RtecatApi_W64.lib (Windows), RtecatApi.lib (RTSS) |
See Also: