Programming
CX8190
53
Version: 1.5
VAR_INPUT
VAR_INPUT
iCX_Typ : INT; (* Use product code without ‘CX’ e.g.: CX8180 -> 8180 *)
END_VAR
VAR_OUTPUT
F_CX80xx_ADDRESS : INT;
F_CX80xx_ADDRESS
: -1, non-implemented CX, address of the switch
Requirements
Development environ-
ment
Target platform
Hardware
PLC libraries to include
TwinCAT v3.1 Build
4022.30
ARM
CX8190
Tc2_SystemCX
7.4
Real Time Clock (RTC)
The real-time clock (RTC) is read out via the function blocks FB_LocalSystemTime and can be set with the
function block NT_SetLocalTime (see TcUtilities.lib). The RTC is supplied by the battery and can thus
continue to run in the power-off state.
Real-time clock (RTC) running too slow
TwinCAT uses its own real-time driver. This has the advantage that the quality of the real-time has been
much improved, and the jitter of the task has been reduced to a minimum. This calls the operating system
from TwinCAT. The RTC on the operating system is controlled via TwinCAT and must be called at certain
times.
If the task cycle time on the TwinCAT side is very long and the CPU load is high, the operating system is no
longer called with sufficient frequency. As a result, the RTC on the operating system is slow. If you have
noticed that the RTC is slow and the time on the CX8190 is also slow, you can apply the following
troubleshooting procedure.
Remedy
The call of the RTC is always linked to a reading of the hardware RTC. This has the disadvantage of a
slightly higher CPU load, but since the CPU load is already high due to your application, the additional CPU
load is negligible. Adjust the settings in the registry:
[HKEY_LOCAL_MACHINE\Platform]
“SoftRTC"=dword:0
Table 13: Description of the SoftRTC registry key
Value
Description
0
The hardware RTC is always read out when the Windows time is
requested.
1
The hardware RTC is read out once at startup. From then on, the
Windows clock continues to run via the internal system tick.
Standard setting: "SoftRTC"=dword:1
Summary of Contents for CX8190
Page 1: ...Manual EN CX8190 Embedded PC with Ethernet 11 8 2021 Version 1 5...
Page 2: ......
Page 71: ......