EnableSyncService (FUN)

FUNCTION EnableSyncService : ERROR

Enables the SYNC service for a given network. The CANopen Stack uses this function for better SYNC accuracy. If service is enabled SYNC message will be sent by the CAN driver implementation.

Note

Sync Service is not supported by all CAN drivers.

InOut:

Scope

Name

Type

Comment

Return

EnableSyncService

ERROR

ERROR.NO_ERROR or appropriate error code

Input

hDriver

CAA.HANDLE

handle of CAN interface

cobID

CL2I.COBID

id of SYNC message

xSyncProducer

BOOL

TRUE: sync producer; FALSE: consumer

xEnableSyncEvent

BOOL

TRUE: fire event

udiSyncCycle

UDINT

SYNC cycle

udiSyncWindowLength

UDINT

SYNC window

udiSyncForewarnTime

UDINT

SYNC forewarn time in µs