DLSYS.WriteAsync won't write to controller tag (DeltaV Live v14.3.1)

After a frustrating day of troubleshooting another company's work, I'm down to one thing that doesn't seem to work. Scripting in Graphics Studio isn't my strongest area.

The ProPlus and the Operator stations each have their own Layout defined. Within the first two Operator Stations' Layouts, there's an Interaction Timer defined with the following script:

if (DLSYS.CondRead("THISUSER/UNACKCNT.CV",0) > 0)
{
DLSYS.WriteAsync("DLSYS_TEST/ALARM_ACTIVE.CV",true);
}

(There's also another timer to do the opposite. When UNACKCNT == 0, write false.)

DLSYS_TEST/ALARM_ACTIVE.CV never changes in the controller's module even though I've created a test display to verify that the first tag is updating when the unacknowledged alarms count goes up and down. I can write to the controller tag with a datalink object (numeric and checkbox), but the script in the Interaction Timer won't write to it.

I considered that maybe the two workstations were interfering with each other (one is 200 ms update, the other is 1000 ms), so I changed the first one to FALSE for the Timer, but no difference.

Any feedback/suggestions on scripts writing to a control module tag from a Layout Interaction Timer would be appreciated. (Online Help and BOL were thin on the knowledge I needed.)

  • In reply to Matt Stoner:

    The other thing to look at is the write privileges for this destination parameter and the currently logged on user. The script Write commands are governed by the currently logged on User. The Operator must have write privilege for the "ALARM_ACTIVE" parameter the script is writing to, and the Plant Area hosting the module must be assigned to the Workstation and to the Operator.

    Review the Parameter security settings in DeltaV Explorer/Setup and confirm if this parameter has an explicit lock or has the default lock. Then confirm that the Operator(s) all have the associated Key for the plant area hosting this module. If the parameter security and plant Area assignments are not set correctly, the script might be syntactically correct, but fails to write successfully.

    I'm wondering if a Write Error due to parameter privilege will show up in the "Broken Heart" error list. If the write is successful, there will be an Ejournal entry as a User Change for the User and Operator station, provided the module's plant area is assigned to the Event Chronicle.

    This looks to be a means to set an external Alarm Horn or Beacon to alert the Operator when a new alarm occurs and no one is in the control Room to acknowledge it. The logic is looking at the currently logged on user's unacknowledged alarm count.

    By using the script there are two things to be aware of. First the user privilege must allow the write to occur. This means a change to User manager could change/disable this behavior. Or a user that does not have write privilege might log on and cause this script to fail. Also, each time the script fires, it will record an entry in the Event Chronical. If this is firing on multiple consoles, each will record separate write messages.

    If this is to trigger an external horn or beacon, consider using the Workstation/HORN parameter via an External reference in the Module. This will eliminate any User Write keys or parameter security issues and will not register Change events in the journal. When you read the HORN parameter it will return a value according to the Priority of the alarm that sounded the Horn. It will go to zero (0) when the horn is silenced. The control module can evaluate the value of HORN.CV and can determine the priority of the initiating Alarm. The value returned may also reflect Inactive/Unacknowledged, but generally alarms are Active/Unacknowledged when the come in initially and the Horn will reflect a value from 4 to 15. The module should monitor multiple consoles so that if a console goes off line, the external horn will still be active. Be sure to have these console participate in global horn acknowledge so that all consoles silence their Horn when an operator silences at one station.

    The Workstation/HORN parameter was added to DeltaV consoles specifically to allow for an external horn to be activated along with the Console Horn. Using the HORN parameter puts all the logic/configuration in one place. Note that a User must still be logged on in order for alarms to be processed and the HORN value to follow. But at least one does not have to worry about parameter security and assigned plant Areas to make it work.

    Andre Dicaire