day_time_local

Function - Reads the current MS Windows system time or the current date

by COPA-DATA GmbH

Inputs

IN : DINT       Specifies the wished information (see below)

Outputs

Q : STRING       Wished information formatted on a string

Remarks

Possible values of IN input

1           current time - format: 'HH:MM:SS'
2          
day of the week
0 (default)
current date - format: 'YYYY/MM/DD'

Designed for COPA-DATA's Runtime for Windows XP and CE only.

Warning: Must not be used for COPA-DATA's RTK (real-time)!

In LD language, the input rung (EN) enables the selection. The output rung keeps the same state as the input rung.

ST Language

Q := day_time_local (IN);

FBD Language

LD Language

(* The Function is performed when the EN input is TRUE *)

IL Language

Op1: LD           IN
    day_time_local 
      ST                Q