how do you manually enter a time stamp or date into a PI tag
Could you clarify a bit more? Do you want to know how to enter a timestamp as the Value property of a PI or AFValue? Or do you want to know how specify the timestamp to the Timestamp property to an AFValue?
If you are trying to use a timestamp for the Value property, the PIPoint needs to be have a PointType of Timestamp. If that point is mapped into an AFAttribute, the attribute's ValueType should be DateTime.
Also, the title says "manually" which makes me think of PI-SMT or PSE. Yet the post is assigned to General Programming Languages, which makes me think of code (C# or VB.NET or other).
Are you trying to assign the value via code or via PI-SMT or PSE? If using program code, are you using PISDK or AFSDK?
My intention is to ultimately try and use a performance equation in PI that samples a particular PI Tag which is continually reading from an accumulator in the control system integrating runtime hours on a piece of equipment; that is to say, obtain the runtime valve from the PI Tag (Runtime) at the current date/time then subtract that from obtaining the runtime value of that same PI Tag (Runtime) but referencing its historical value using a historical date/time that's been entered into a PI Tag (Date). Example, a repair date for a piece of equipment is entered into a PI Tag called (Date); performance equation to calculate runtime from an accumulator that is always integrating might look like the equation below
"Runtime" is in Hours and is integrating in the control system (always increasing)
TagVal('Runtime','*') would provide the current Runtime Value
TagVal('Runtime','Date') would provide the historical Runtime Value at an entered date and time in a PI Tag named "Date"
Runtime Hours = TagVal('Runtgime','*') - TagVal('Runtime','Date')
Then my question, we have the PI application "Manual Logger" and I understand that you can enter a value or timestamp ("manually") into a PI Tag by using the PI App "Manual Logger" I believe I have my PI Tag I've called "Date" configured wrong as I tried a Tag Type of both Timestamp and String yet the Calculation Fails. Anyway open to suggestions or your recommendations on another method or solution... I have created an excel spreadsheet that does this calculation (all too easy) however we're trying to find a way other than having to open up an excel spreadsheet to enter in equipment repair dates, but would rather prefer placing these repair dates into PI directly therefore so in this way using the performance equation(s) in PI can trigger an alert/notification when the runtime exceeds some high set limit more importantly the repair dates are recorded/saved in PI for reference plus be entered in at any time thus removes the need of resetting runtime accumulators etc…
If the PIPoint has a PointType of Timestamp, a manually entered value follows a very specific format of:
Where hours (HH) are entered as a 24-hour time, i.e. 15:30:30 instead of 3:30:00 PM. Here are some acceptable examples:
Here are some screen captures I took when using PI-SMT:
Entering a Value of Type Timestamp:
Image below is BEFORE I save the new value in PI-SMT. Could be confusing? The Value has a specific format, but the Event Time has a different format, even though reference the same instance in time.
Here's what it looks like after clicking the SAVE icon and as I attempt to manually enter another value. Note that my value for April was accepted but it's format changed in the left box. In addition, the new value I am entering for June occurs in the afternoon.
After saving all values, here's what I am left with:
Retrieving data ...