Sample programs
Using the sample programs This document contains sample applications of our products for certain areas of application. The application notes provided here are based on typical features of our products and only serve as examples. The notes contained in this document explicitly do not refer to specific applications. The customer is therefore responsible for assessing and deciding whether the product is suitable for a particular application. We accept no responsibility for the completeness and correctness of the source code contained in this document. We reserve the right to modify the content of this document at any time and accept no responsibility for errors and missing information. |
Sample 1: Display and evaluations of the different times in TwinCAT
The sample program determines several independent local times in a TwinCAT system under Windows XPe, calculates current deviations and converts them into different representations. The function Nt_SetTimeToRtcTime can be activated for testing purposes.
Notes:
- Cycle time used: 1 ms
- Determined times:
- Local Windows NT time (shown in the taskbar)
- Local TwinCAT time
- Distributed Clocks time
- The example uses EtherCAT distributed clocks terminals for determining the distributed clocks time (DC).
- The individual conversion, particularly the cyclic string representations, require significant computing time. A CX1000 platform or above is recommended for testing the sample program.
Please follow the general instructions for EtherCAT synchronization.
Starting the sample program
The application samples have been tested with a test configuration and are described accordingly.
Certain deviations when setting up actual applications are possible.
The following hardware and software were used for the test configuration:
- TwinCAT master PC with Windows XP Professional SP 3, TwinCAT version 2.10 (Build 1330) and INTEL PRO/100 VE Ethernet adapter
- Beckhoff EK1100 EtherCAT coupler, EL2202-0100, EL2252 and EL9011 terminals