STRING_TO_DCTIME

STRING_TO_DCTIME 1:

STRING_TO_DCTIME 2:

Outdated function

This function is outdated. Use the function STRING_TO_DCTIME64 instead.

The function converts a string to a distributed clock system time variable of type T_DCTIME.

FUNCTION STRING_TO_DCTIME: T_DCTIME

STRING_TO_DCTIME 3: Inputs

VAR_INPUT
    in : STRING(29);
END_VAR

Name

Type

Description

in

STRING

The string to be converted

The string must have the following format: 'YYYY-MM-DD-hh:mm:ss:nnnnnnnnn'

  • YYYY: year;
  • MM: month;
  • DD: day;
  • hh: hour;
  • mm: minute;
  • ss: second;
  • nnnnnnnnn: nanoseconds;

See description of the function: F_GetCurDcTickTime.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT