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

Help needed with a calculation Options · View
MNoble
#1 Posted : Wednesday, April 14, 2010 6:11:18 PM
Rank: Newbie
Groups: Member

Joined: 8/11/2009
Posts: 1
Hi All,

Please excuse my ignorance as im a PI newby essentially. I have been pulling my hair out on this one. Im hoping someone can give me some guidance or atleast point me in the right direction.

I have a furnace with a conveyor that travels its entire length. this furnace has an electric eye at the entry door.

With PI i capture both the electric eye status ( 0 - no metal present - 1 - metal present ) and the conveyor speed.

So essentially, as the metal enters the furnace it breaks the electric eye and updates PI with a value of 1, when there is no metal entering the furnace the eye reports a 0.

Based on these 2 tags I should be able to calculate piece lentgh and distance between pieces.

My problem is How can I trap the timestamp of when the electric eye value changes state from 1 to 0 or vice versa.

I essentially would like to have 2 tags updated in relative realtime. One with the current piece spacing (time between "1's" * Conveyor speed IPM) and Current Piece length (time between "0's" * Conveyor speed IPM)

I appreciate any help you can give.

Thanks,
Mike
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 : Thursday, April 15, 2010 1:51:34 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hi Mike,

How are you looking to perform the calculation? Performance Equations, PISDK...or are you open to the solution?

Take PE (Performance Equations) as a start, there is a great help file installed in "..\PIPC\Help\PEReference.chm" that lists all the functions that you can use. There are functions for returning events (PITime) when something first occurs within a time range, avergage values etc.

You could create a PE tag that is scheduled based on events from your digital tag (electric eye status) that checks if the value = "metal present" then get the time when the value was "no metal present"....etc

Let me know if you want an example and when I get a moment I will take a look....

Cheers,

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
Michael
#3 Posted : Friday, April 16, 2010 1:22:36 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania
Mike,

Just a hint, you can use the pipetest utility to verify your PE but also Datalink or ProcBook.

Start teaching yourself using a very basic example, the syntax of PE is not so easy. In the beginning it is maybe a little frustrating, but PI-PE is a real powerful tool.

Michael
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.