====== DateTime Indicator and Setter ====== The **DateTime Indicator** and **DateTime Setter** gadgets allow you to display and modify time and date values on your HMI. The Indicator displays either the PLC time or any time value of a DT-type variable, while the Setter also allows these values to be modified. It has the following properties: {{:en:mervis-ide:35-help:hmi_new_graphic_20.png}} * **Variable** - Path to the attached variable. To set PLC system date and time (RTC) using the Setter, proceed as follows: - for a terminal.graph type template select "the complete PLC" (the root item of the variables tree) {{:en:mervis-ide:35-help:hmi_new_graphic_dts_terminal.png}} - for a web.graph type template select "Use Target Device RTC". {{:en:mervis-ide:35-help:hmi_new_graphic_dts_web.png}} * **Text** - Fixed text to be displayed, followed by the date value * **Format** - Definition of the format of date, time, or duration (see **Format Possibilities** below) * **Unit** - Physical unit appended to the displayed value (e.g., "min", "days") * **Automated Spaces** - When set to ''true'', automatically inserts spaces between the base text, the formatted value, and the unit. **Format Possibilities** Similar to the Digital Indicator, the DateTime gadgets use specific tokens in the **Format** property to define how the time, date, or duration is displayed. **Note:** Only one token is allowed per format definition. For tokens containing `.n`, replace `n` with the desired number of decimal places (e.g., use `M.2` for minutes with two decimal places). ^ IDE Token ^ Component ^ Description ^ Compatible Variable Types ^ | **d** | Day | Day component (00 - 31) //(*When used with a TIME variable, 'd' displays the total number of days with zero-padding to 2 places)// | DATE, DT, TIME | | **m** | Month | Month component (01 - 12) | DATE, DT | | **Y** | Year | Year component (e.g., 1982) | DATE, DT | | **H** | Hour | Hour component (00 - 23) | DT, TOD, TIME | | **M** | Minute | Minute component (00 - 59) | DT, TOD, TIME | | **S** | Second | Second component (00 - 59) | DT, TOD, TIME | | **f** | Millisecond | Millisecond component (0 - 999) | DT, TOD, TIME | | **d.n** | Day (Decimal) | Day component with decimal places (no zero padding) | TIME | | **H.n** | Hour (Decimal) | Hour component with decimal places (no zero padding) | TIME | | **M.n** | Minute (Decimal) | Minute component with decimal places (no zero padding) | TIME | | **S.n** | Second (Decimal) | Second component with decimal places (no zero padding) | TIME | | **dd** | Total Days | Total overall days count (no zero padding) | TIME | | **HH** | Total Hours | Total overall hours count (no zero padding) | TIME | | **MM** | Total Minutes | Total overall minutes count (no zero padding) | TIME | | **SS** | Total Seconds | Total overall seconds count (no zero padding) | TIME | | **dd.n** | Total Days (Decimal) | Total overall days count with decimal places (no zero padding) | TIME | | **HH.n** | Total Hours (Decimal) | Total overall hours count with decimal places (no zero padding) | TIME | | **MM.n** | Total Minutes (Decimal)| Total overall minutes count with decimal places (no zero padding) | TIME | | **SS.n** | Total Seconds (Decimal)| Total overall seconds count with decimal places (no zero padding) | TIME | **Using Units and Spacing Example:** If you want to display the string **"Time Duration 2.5 min"**, you would set the gadget properties as follows: * **Text:** ''Time Duration'' * **Format:** ''MM.1'' * **Unit:** ''min'' * **Automated Spaces:** ''true'' *(With automated spaces enabled, the system automatically converts "Time Duration2.5min" into "Time Duration 2.5 min" without requiring manual spacing).* **Examples of DateTime Formatting on an HMI Panel:** {{:en:mervis-ide:35-help:datetime_indicator_setter_test.png}}