TomRodgers

Processbook: Number of Units at a location from external relational database.

Discussion created by TomRodgers on Oct 24, 2014

The current Processbook display i'm building requires me to display the number of units at a particular location at a given point in time throughout the day.

 

Basically, we have an SQL Relational Database outside of the PI system which records the time stamp when a unit arrives at a location and again records the time stamp when the unit leaves.

 

At the moment I dump all the cycles of arrival and departure for the previous day into an excel spreadsheet and at 1 minute intervals, evaluate how for how many cycles, the timestamp falls between the arrival and departure time

(Eg. T arrive <=T x <= T depart - see attached excel), however i would like to be able to do this in process book in near real time.

 

I was planning on importing the data via an SQL query, then assigning a value of 1 to times after the arrival timestamp and before the departure and 0's at other times, however i haven't been able to figure out to do it as yet or whether it is even possible.

 

Any help i could get would be greatly appreciated.

 

Cheers,

 

Attachments

Outcomes