DataTime

graphics/plugins_datatime-icon.png

DataTime plugin translates the value of the incoming data into date/time elements and stores these values to a set of predefined DataPool variables.

Predefined Variables

The predefined variables are:

  • _DAY: the day of the month (1-31)

  • _DAYNAME: name of the day in the week. Names are defined in the Day Names parameter.

  • _FHOUR: hours/min/sec described in floating point number (decimal) i.e. 6:30 will be converted to 6.5

  • _HOUR: the hour of the day (0-23)

  • _HOURNAME: a set of name description for the hours of the day. Names are defined in the Hour Names parameter.

  • _MIN: the minute of the hour

  • _MONTH: the month number in the year (1-12)

  • _MONTHNAME: the name of the month. Names are defined in the Month Names parameter.

  • _MSEC: the one thousandth of a second in the second (0-999). This variable will be used only when the Resolution parameter is set to Milliseconds.

  • _SEC: the second number in a minute (0-59)

  • _WEEKDAY: the number of the day in the week (1-7)

  • _YEAR: number of the year using four digits

  • _RELDAY: Relative day number, where 0 (zero) is today. This variable returns an integer value only (i.e. the difference between the received data and the current system time).

  • _RELDAYNAME: Relative day name, where Yesterday, Today and Tomorrow are used for -1, 0, 1 values received in the RELDAY variable. All other days will be displayed by name (Sunday, etc.).

  • _HOURS_SHORT: show 12 hour clock time.

  • _AMPM: display AM or PM (used with HOURS_SHORT)

graphics/plugins_datatime.png
Unique Parameters
  • DP variables Prefix: Defines a prefix that will be added to the DataTime variables. The prefix is used to distinguish one set of time parameters from the other, enabling the usage of multiple time values. Default is T1.

    If Prefix is set to T1, the corresponding variables will be

    • T1_DAY

    • T1_DAYNAME

    • T1_FHOUR

    • T1_HOUR

    • T1_HOURNAME

    • T1_MIN

    • T1_MONTH

    • T1_MONTHNAME

    • T1_MSEC

    • T1_SEC

    • T1_WEEKDAY

    • T1_YEAR

  • DP variables Scope: When set to Local the data variables will be used as part of a structure the variables were defined in. When set to Global the time data variables will be used as global DataPool variables.

  • Input is Machine Time: Defines if the time will be read from the machine’s clock or from the data field. If Set ON, the Field Name parameter will be disabled and additional parameters will be enabled:

  • Input Field Resolution: Select the input field units.

  • Offset Field: defines the offset units.

  • Offset: defines the number of offset units from the current machine time.

  • Leading Zero: Defines if the zero character will be added to the single digit values (0-9). This option is useful when formatting the time display.

  • Day Names: Defines a set of names for the days of the week, to be used by the _DAYNAME variable. The parameter should contain seven names, comma separated. If the parameter is left blank, DataTime will use the default of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.

  • Month Names: Defines a set of names for the months of the year, to be used by the _MONTHNAME variable. The parameter should contain twelve names, comma separated. If the parameter is left blank, DataTime will use the default of January, February, etc.

  • Hour Names: Defines a set of names for the hours of the day, to be used by the _HOURNAME variable. The parameter should contain twenty four names, comma separated. If the parameter is left blank, DataTime will use the default of Midnight, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, Noon, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23.

  • Replace Yesterday By: Allows the replacement of the term "yesterday" for another one. This feature is useful when working on a language other than English.

  • Replace Today By: Allows the replacement of the term "today" for another one. This feature is useful when working on a language other than English.

  • Replace Tomorrow By: Allows the replacement of the term "tomorrow" for another one. This feature is useful when working on a language other than English.

  • Initialize: calculate variable values now.

  • Reset: re-calculate variable values now.