SYSTEMTIME_TO_ISO8601

SYSTEMTIME_TO_ISO8601 1:

Die Funktion konvertiert die Windows Systemzeit-Struktur in einen String mit dem Format der Norm ISO 8601.

Das Resultat entspricht folgendem Schema: YYYY-MM-DDThh:mm:ss.xxxTZD

FUNCTION SYSTEMTIME_TO_ISO8601 : STRING(39)

SYSTEMTIME_TO_ISO8601 2: Eingänge

VAR_INPUT
    systemTime  : TIMESTRUCT;  (* Input time in system time format (struct) *)
    nBias       : INT;         (* Specifies the current bias, in minutes, for local time translation on this computer.
                                The bias is the difference between Coordinated Universal Time (UTC) and local time.
                                UTC = local time + bias *)    
    bUTC        : BOOL;        (* Specifies whether the systemTime is UTC or local time. *)
    nPrecision  : USINT(0..9); (* Precision. Number of decimal places of seconds. (0..9) *)
END_VAR

Name

Typ

Beschreibung

systemTime

TIMESTRUCT

Struktur mit der zu konvertierenden Windows-Systemzeit

nBias

INT

Gibt den aktuellen Zeitversatz in Minuten an, zwischen der Coordinated Universal Time (UTC) und der lokalen Zeit. Es gilt: UTC = lokale Zeit + Zeitversatz.

bUTC

BOOL

Gibt an, ob die am Eingang angegebene Zeit der UTC oder der lokalen Zeit entspricht.

nPrecision

USINT(0..9)

Gibt die Genauigkeit der Sekundendarstellung an als Anzahl der Nachkommastellen.

Voraussetzungen

Entwicklungsumgebung

Zielplattform

Einzubindende SPS-Bibliotheken (Kategoriegruppe)

TwinCAT v3.1.4024

PC oder CX (x86, x64, Arm®)

Tc2_Utilities (System) >= 3.3.46.0