Working with DTE_FB and Epoch time values for the purposes of managing an alert

Hi All,

New to DeltaV so excuse me for asking this.

Objective is to set an everyday Alert at 10:00 AM to alert the operator to perform his daily data entry task.

I am using the DTE to enable out_d at 10 I am then converting times to epoch values.

Reason is, I have to use the values to determine if any action has to done.

i.e. I need to determine whether it is necessary for an alarm to be generated.

  • Last write time = last time operator entered data
  • Current time = local time 
  • Trigger time = time of event 10:00 am

If the difference between current or trigger time and the last time op entered data is greater than six hours (i.e. hours past since start of shift) generate alarm.

Alarm repeats every 30 minutes until data has been updated.

Epoch time is good because it gives a value for time that I can work with but am kind of stuck as the time is in seconds past midnight 1972 i.e 2 years behind. 

Any help will be highly appreciated. 

CHUZA LONGWE

Control Systems Engineer (Nickel Mine)

DeltaV 12.3.1

longwechuza@gmail.com

  • Since you already have a ACT block (just default the IN_D to 1 with good status) you can just use the following code to build a local time system clock that you can reference and not use the DTE block:

    (*
    =====================================================================================
    System Clock Logic
    =====================================================================================
    *)
    '^/HR.CV' := TIME_TO_STR("%h", TIME('$time_format:Local'));
    '^/MIN.CV' := TIME_TO_STR("%i", TIME('$time_format:Local'));
    '^/SEC.CV' := TIME_TO_STR("%s", TIME('$time_format:Local'));

    As stated by knucklhead90, you can review BOL to see other options that can be used such as 24 hr format, Month, Date, etc.