Determination of the current Distributed Clock time
If an up-to-date statement of the Distributed Clock time is needed in a PLC cycle, this can be linked via the input variable of the EtherCAT master.
Functions for data types with 64-bit width A selection of functions for handling 64-bit numbers is available under Beckhoff TwinCAT in the TcUtilities.lib library. Longer execution times are required here than is the case with standard, 32-bit data types. A data type with a width of 64-bit is defined in TcEthercat.lib as T_DCTIME or in TcUtilities.lib as T_LARGE_INTEGER. |
The EtherCAT master can display a copy of the current master distributed clock. To this end activate the setting "Show DC System Time (64-bit)" in the EtherCAT device --> EtherCAT tab --> Advanced Settings --> Distributed Clocks (Fig. Activation of the master distributed clock display).
The process image of the EtherCAT master now looks as shown in Fig. Extended process image of the EtherCAT master:
SYSTIME The EtherCAT master value DcSysTime is to be used with care and should serve only as a coarse indication as to which time range (order of magnitude: 1-2 task cycles) the Distributed Clocks system is currently in. |