YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

TagVal Absolute Time in Performance Equation Options · View
JamieMcc
#1 Posted : Tuesday, September 21, 2010 11:58:03 PM
Rank: Newbie
Groups: Member

Joined: 9/21/2010
Posts: 3
Location: Vancouver
Hi there,

Here is what I have:
1 - A PI Tag called myDT, which is a string that is saved to PI via a PLC.
2 - A PI Tag called LiveValue which is a float that monitors a value changing in the PLC
3 - A PI Tag called HistoricalValue which is a float that is an output tag, that pushes a value back to the PLC
4 - A PerformanceEquation called PE thatis used as the source tag for #3, and has an equation of TagVal('LiveValue','*')


What happens is that the LiveValue is saved from the PLC, the performance equation is triggered to map its value in to HistoricalValue and that is pushed back to the PLC. All of this works fine.

I want to change it so that the expression TagVal('LiveValue','*') in the performanceEquation so that the * actually resolves to the value in the tag myDT. So when myDT = 'Sept 21, 2010 6:45:00' the expression would be TagVal('LiveValue','21-Sep-10 6:45:00'). I am having no luck using anything other than things like '*' or '*-2m' as the second parameter. Can I not use timestamps in this field? IF not are there any other options? I could also use something like '*-8s' if I caould make the -8 dynamic based on a tag.

Please help,

Jamie
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
RJK Solutions
#2 Posted : Wednesday, September 22, 2010 1:29:12 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Try the following:

TagVal('LiveValue',ParseTime(Text('myDT')))

I suspect that you may get a parse error based on the format of your date/time string in myDT, it will need to conform to the allowable PI string formats e.g. your tag needs to be myDT = "21-Sep-10 06:45:00".
Principal Consultant
Real-Time Data Management @ Wipro Technologies
JamieMcc
#3 Posted : Thursday, September 23, 2010 4:57:09 PM
Rank: Newbie
Groups: Member

Joined: 9/21/2010
Posts: 3
Location: Vancouver
Smile NICE, thanks for your quick and accuate help. It worked perfectly!

Jamie
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.