A CounterInputPoint is a NumericPoint with NdioCounterInputProxyExt. It configures a UI to count dry-contact pulses up to 20 Hz, as well as calculate a numeric rate. In the ProxyExt, you specify which value is to appear at the proxy point’s Out slot (either Count or Rate) as a status numeric.
The proxy extension contains configuration properties for rate calculation. It also contains a status property for total number of pulses counted (since it was last set or reset).
Previous versions of this document included a note here describing how the I/O processor accumulates the count independently
of the main JACE/NPM processor, stating that count could effectively continue during a station shutdown, or during much of
the JACE boot process—picking up the count at the previous value upon reboot. However, this is inaccurate, as the I/O processor resets the count to 0 whenever communications to the station have been lost longer than 30 seconds
(typically a reboot and subsequent station restart takes much longer than that). Therefore, the count value is maintained
by the running JACE station, and not the I/O processor. This means that pulses received during periods of station shutdown
or station startup are not included in count.
The following sections apply to the CounterInputPoint:
Configuration properties of the CounterInputPoint’s Proxy Ext specify which of three Ndio rate calculators are used, either:
All three have same purpose: to calculate a pulse rate and update the point’s output to reflect the newly calculated value. Each calculator is triggered to perform in a slightly different way.
This rate calculator waits for the interval defined under the Rate Calc slot to elapse, then the recalculates the rate based on that interval.
Fixed window has 2 configurable rate calc values:
Scale
A multiplier to use for adjusting the reported output value. See properties, Rate Calc, Scale.
Interval
The amount of time between rate calculations.
This rate calculator is similar to the fixed window rate calculator. It also calculates based on the specified interval. However, it performs the calculation every interval/window seconds. This allows the rate to be updated more frequently while still maintaining that the calculation is based upon the specified interval. It then the recalculates the rate based on that interval.
Sliding window uses 3 configurable rate calc values:
Scale
A multiplier to use for adjusting the reported output value. See properties, Rate Calc, Scale.
Interval
The amount of time between rate calculations.
Windows
The number of times during the interval that a recalculation is performed.
This rate calculator is the simplest. It simply adds a recalculateRate action to the parent point. Typically, you link the action to the output of a TriggerSchedule configured at a specific interval (e.g. at 0, 15, 30, and 45 minutes every hour). The calculator performs its recalculation based on the interval between now and last trigger.
Trigger type use only one configurable rate calc value:
Scale
A multiplier to use for adjusting the reported output value. See properties, Rate Calc, Scale.
It is recommended to leave the Conversion at “Default” in the NdioCounterInputProxyExt, so as not to interfere with rate calculation.
If a scaled Count output is needed, add a LinearCalibrationExt to the point, and enter the item quantity/pulse as the Scale
value there. See Linear Calibration Ext, including the ending Note about this application.
In addition to common Ndio Proxy Ext properties, the following additional properties are available in the NdioCounterInputProxyExt:
Output Select
Specifies whether count total (Count) or count rate (Rate) is at the Out slot, as a status numeric. Default is Count.
Total
(read only) Total number of pulses counted since the Proxy Ext was last set or reset. Data type is Baja Long.
Rate
(read only) Calculated rate, based upon Rate Calc configuration. Data type is Baja Double.
Rate Calc Type
Selectable to one of three types provided in the ndio module:
FixedWindowRateType (default)
SlidingWindowRateType
TriggerRateType
Future rate calculators may be developed by third-parties. When this occurs, they will be available (if that module is installed),
as pull-down menu options other than ndio.
Rate Calc
Contains from one to three properties used in rate calculation, according to the selected rate calc type (see About Ndio rate calculation):
Scale
Default is value is 1. Appropriate value depends on the item quantity/pulse and desired rate units. Two examples are provided:
Power Meter
Each meter pulse indicates 0.15 kWh, and desired rate units is kW.
Scale = 3600 (sec/hr) * 0.15 kWh/pulse = 54
Liquid Flow Meter
Each meter pulse indicates 0.375 liters, and desired rate units is liters/minute (L/min).
Scale = 60 (sec/min) * 0.375 liters/pulse = 22.5
Interval
(not available if TriggerRateType) Default is value is 1 minute.
Windows
(available only if SlidingWindowRateType) Default is value is 6.
Rate Calc Time
(read only) Reflects timestamp of last rate calculation.
The NdioCounterInputProxyExt has the following available actions:
Reset
Sets the point’s Total (and Out value, if outputSelect is Count) to zero (0).
Set
Sets the point’s Total (and Out value, if outputSelect is Count) to a specified count. Note this is an unscaled (actual number of pulses) value, so if a scaled Count is configured, it will show differently.