Issue
Is there a way in a Niagara R2 UNC station to display the current date and time on a graphic?
Environment
Niagara R2 UNC station
Cause
There is a standard program object that can be used to expose the elements of the UNC time and date.
Resolution
The program object is found in the remote library under tridiumx in the "LIB" jar file. The program object is "DateTimeDiscreteComponents.sns" found under the muxDemux folder in the "programObjects" folder.
To use this object, copy it to the desired container in the station database then create links to the desired date or time elements.
The following elements are exposed as values that can be linked to other similar type objects or to GxText objects:
- dateTime (as DateTimeType)
- date (as DateType)
- time (as TimeType)
- timeAmPmString (as String)
- weekday (as WeekdayEnum)
- month (as MonthEnum)
- SecsToday (as FlowtStatusType)
The following elements are exposed as integers that can be linked to other objects that accept integer value links or to GxText objects:
- year
- day
- hour
- minute
- second
When considering the use of this program object, remember that for best performance there should be no more than 100 custom program objects used in a UNC station database.