Infosys在阅读器中打开 / AI 翻译

PLC Libraries for PC based systems · 0 次阅读

STRING_TO_DCTIME

STRING_TO_DCTIME 1:

This function converts a string to a "Distributed Clock System Time" variable.

FUNCTION STRING_TO_DCTIME: T_DCTIME

T_DCTIME

VAR_INPUT
    in : STRING(29);
END_VAR

in: The string format is: 'YYYY-MM-DD-hh:mm:ss.nnnnnnnnn'

  • YYYY: Year;
  • MM: Month;
  • DD: Day;
  • hh: Hour;
  • mm: Minute;
  • ss: Second;
  • nnnnnnnnn: Nanosecond;

Example:

See Description of: F_GetCurDcTickTime.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.10.0 Build > 1310 oder höher

PC or CX (x86, ARM)

TcEtherCAT.Lib
( Standard.Lib; TcBase.Lib; TcSystem.Lib, TcUtilities.Lib are included automatically )