currentDT := SysRtcGetTime(dummy);
IF hmi_set_clock THEN
sYear := INT_TO_STRING(iYear);
sMonth := INT_TO_STRING(iMonth);
sDay := INT_TO_STRING(iDay);
sHour := INT_TO_STRING(iHour);
sMinute := INT_TO_STRING(iMinute);
sSecond := INT_TO_STRING(iSecond);
sNewTime := CONCAT('DT#',sYear);
sNewTime := CONCAT(sNewTime,'-' );
sNewTime := CONCAT(sNewTime,sMonth);
sNewTime := CONCAT(sNewTime,'-' );
sNewTime := CONCAT(sNewTime,sDay);
sNewTime := CONCAT(sNewTime,'-' );
sNewTime := CONCAT(sNewTime,sHour);
sNewTime := CONCAT(sNewTime,':' );
sNewTime := CONCAT(sNewTime,sMinute);
sNewTime := CONCAT(sNewTime,':' );
sNewTime := CONCAT(sNewTime,sSecond);
dtSetTime := STRING_TO_DT(sNewTime);
SysRtcSetTime(dtSetTime);
hmi_set_clock := FALSE;
MikeCount:= MikeCount + 1;
END_IF
tPlcTimeRun:= TIME();
iPlcTimeRun:= TIME_TO_INT(tPlcTimeRun);