DOR tblPLC_PLCid specification

Overview

These are the original intentions of the DOR data import process and what each columns is for. Some are and some are not implemented with different versions of data import, OPC, alarms, 3rd party integrations, data highlighting in DOR reports and several other scenarios.

TrackDataOnceDaily

TrackDataOnceDaily==0Realtime
TrackDataOnceDaily==1Daily
TrackDataOnceDaily==2Monthly
TrackDataOnceDaily==3Shift Based

TrackNoChangedData

TrackNoChangedData==FALSE && TrackDataOnceDaily==0

Do not insert a new record if the VALUE is the same as the VALUE of the most recent timestamp before this ones timestamp.
TrackNoChangedData==TRUE && TrackDataOnceDaily==0Insert the record whenever it is pulled. This could be a communication issue / check / validation. Tracking a timestamp when the actual value does not matter.
TrackNoChangedData==TRUE && TrackDataOnceDaily<>0Total value for something. IE: Daily total. We made 50 yesterday and 50 today, even tho it is the same value they represent a total for 2 consecutive days.
TrackNoChangedData==FALSE && TrackDataOnceDaily<>0

Do not save if the value is the same as yesterdays value. DO NOT insert a zero, simply do not save a value for the day/month/shift.

DOR Calculate program will interpret a lack of a value for a daily total as a zero, so the reports generated will be accurate.

You can do a COUNT of daily values to see how many days of data there were over a duration of time. If we inserted zeros that would not be accurate.

PLC_PullInterval

This applies to realtime datapoints. It indicates how often we are looking for data in milliseconds. IE: 30,000 we expect to have a datapoint no more than every 30 seconds.

LastDT

When importing data, if TrackNoChangedData==FALSE we are not saving data that is the same as the prior timestamp. We could go weeks having new data every second but we are not saving it because it has been the same value. IE: run status is a 1. We update this LastDT to be the timestamp of the datasource so that we know when the EXE restarts we only request data from this point forward, not from the last datapoint saved in the raw data table that was weeks ago.

LastValue

Used in conjunction with LastDT, this lets us know what the LastValue was that we pulled from the datasource. By keeping these 2 datapoints updated we have a single source of truth for all datapoints in the entire system without having to reach into other tables.

PLC_IsForAliveOnly

Indicates that we will be sending an alert / email / notification that this device is no longer reachable. This is generally a seconds / heartbeat within the datasource.

AliveOnly_TimeDelay

From the last time we had data, if we still cannot reach the device after this many seconds, send the notification.

AliveEmailSent

True / False has the data been sent. Set this to true when notification has been sent so it does not send repeat notifications.  Reset this to false when it comes back on-line.