OSCAT Forum
Open Source Community for Automation Technology
Willkommen
Gast
. Bitte
einloggen
oder
registrieren
. Haben Sie Ihre
Aktivierungs E-Mail
übersehen?
1 Stunde
1 Tag
1 Woche
1 Monat
Immer
Einloggen mit Benutzername, Passwort und Sitzungslänge
Übersicht
Hilfe
Suche
Kalender
Einloggen
Registrieren
OSCAT Forum
»
oscat.lib
»
Bestehende Module / Existing Modules
(Moderator:
peewit
) »
Minor bug in RTC_2 FB
« vorheriges
nächstes »
Drucken
Seiten: [
1
]
Nach unten
Autor
Thema: Minor bug in RTC_2 FB (Gelesen 4982 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
Strucc
Gast
Minor bug in RTC_2 FB
«
am:
19. Mai 2011, 07:51:07 »
Hi,
While implementing SNTB based time synchronization I found a minor bug with the DST offset calculation:
Line 9-10:
(* calculate time offset and set ldt output *)
LDT := DWORD_TO_DT(DT_TO_DWORD(UDT) + INT_TO_DWORD(ofs + BOOL_TO_INT(DSO)) * 60);
Should be:
(* calculate time offset and set ldt output *)
LDT := DWORD_TO_DT(DT_TO_DWORD(UDT) + INT_TO_DWORD(ofs +
(BOOL_TO_INT(DSO) *60)
) * 60);
This was within library for CoDeSys 2.
By the way thanks for all the ideas and work within these libraries: really great and useful stuff. I'm looking forward to contribute.
P.Peter
Gespeichert
Strucc
Gast
Re:Minor bug in RTC_2 FB
«
Antwort #1 am:
19. Mai 2011, 08:20:11 »
By the way, it could be more correct to reuse the UTC_TO_LTIME function:
(* calculate time offset and set ldt output *)
LDT := UTC_TO_LTIME(UDT, DSO, OFS);
«
Letzte Änderung: 19. Mai 2011, 08:40:01 von Strucc
»
Gespeichert
Drucken
Seiten: [
1
]
Nach oben
« vorheriges
nächstes »
OSCAT Forum
»
oscat.lib
»
Bestehende Module / Existing Modules
(Moderator:
peewit
) »
Minor bug in RTC_2 FB