Back

Topic

[KB674]User-editable hysteresis values for each threshold

Tags: Scada Basic

11 years ago
By RM
Options
Print
Applies to:

PcVue version 10.0 onwards


Summary:

This program shows a workaround to make hysteresis values that can be edited by the user at runtime, plus user-editable delays on alarms.


Details:

This program first collects names and branches of register variables to treat from a text file in the TP folder. The script will then create events on the thresholds of those register variables, activating an alarm using a timer every time the threshold is crossed for a specified amount of time. The alarm will not be triggered if the register variable returns below the user-set hysteresis of that variable before the delay period expires.

This system is intended to be used with projects that often encounter short spikes in the equipment readings as well as readings that may hover around a threshold value; the goal being to avoid alarms being recorded as being turned on and off too frequently.

The workaround here allows each threshold to have its own hysteresis value that can be set by the user in real time, provided the necessary variables have been created according to a particular naming scheme, which is visible inside the program files.

When running the sample project, click the “Load Config” button on the mimic before running any tests with the mimic’s controls. This will call the program to create the functional events on the thresholds.

See the comments of the program files for exact explanations on its function.


Sample project:

testbed 02 mimic mini

[AlarmDelay_Sample.zip]

Download attachments: ThresholdHysteresis_Sample.zip


Created on: 25 Nov 2013 Last update: 13 May 2024