Xylem.Common.Hardware.WaterMeter.WaterMeterCore
Applies an action to a list of meters in a separate thread
Starts a new task for a list of meters
Apply a single action to a specific meter
Common definition for Meter handling in production and on test benches
represents any error state a meter can have
if hash code is 0 everything is running
is Flags, so watch out to check with hasFlag!
everything is good
problems on initialization
problems on Measurement
Problem on communication with meter
Problem on optical output on meter
if pulse can not readout
no (or no good) reference flow available
Calibration went wrong
calibration is out of range. Check documentation from meter to find limitation
blue screen like error
Can hold various s and hold connection record to relieve the meter.
Every contact with meter has to go over even if you have just only one.
holds all
Add and delete with
Remove Meter from batch and clear communication
meter to be removed
Get meter from slot number.
null if slot has no genesis
Remove all Meters and comports
Detect all meters
login to all meters
Initialize all meters
Initialize calibration for all meters
Initialize measurement for all meters
Store new calculated calibration to all meters
Start calibration for all meters
Start measurement for all meters
Stop calibration of all meters
Stop measurements of all meters
Can hold various s and hold connection record to relieve the meter.
Every contact with meter has to go over even if you have only one.
ctor
Registered list of meters
IMeter is the highest level interface between a meter with direct communication to a test bench.
has general things like calibration, measurement and set up routines.
no specific meter stuff in here!
it is always disposable
occurs when ProcessState has changed
occurs when ErrorState has changed
occurs when Init is completed
occurs when the initialization for Measurement is completed
occurs when the Measurement is completed
occurs when the initialization for calibration is completed
occurs when the calibration is completed
occurs when meter gets disposed
unique meter identification
read-only to see current Process state
read-only to see current Error state
the current slot in test-bench
Setup of intermediate update time for measurement updates and overflow detections,
has to be calculated depending on flow-rate and nominal diameter (DN)
Open Com ports, try some communication, login
Setup up meter from config file. just a workaround for vb6 calls. please do not use if your working with .net
Slot Number for Test bench
don“t send CRC error or telegrams with error flag to caller
Logout from device
Start Login with password service
Start Login with out password service and a fixed password
password for login
set up measurement parameter and set meter into test-mode
Starting a Measurement
Meter must be initialized
Start to receive record from meter and decode this record into MeasurementRecord
Meter must have a active measurement
Stop receive record from meter and decode record
- simplify the measurement results handling
- getting the main measurement of the entire device (combination of all paths)
- add MeasurementResult
- remove all other methods
After a completed measurement , you can grab
Calculated results
The first measurement is ALWAYS a FlowTestRecord.
get current state of the running measurement
leave empty for an aggregate state for all measurements or pass the channel number to check
set up calibration parameter (calibration factor to default) and set meter into calibration mode
Starting a Calibration
Meter must be initialized
Start to receive record from meter, decode and store this record
no available
To finish calibration process run
Meter must have a active for calibration
Stop receive record from meter, decode and store record
record will not calculate or store
Get current state of the running calibration
Calculate calibration factor for static and flying start / stop
Results kept internal and not being saved to meter.
if you want to store them on meter use
the reference volume is essential for calculation of calibration factor
the reference time is needed for flying start/stop
the required deviation to set the scale apart from 0
override the default max calibration factor tolerance
Save calculated calibration on meter if no calibration results available an exception occurred
To control the LCD from meter for status information etc.
if set to true the meter will show his normal screen, if set to false the next parameter will shown in display
test shown in LCD in byte array as hex value (0x33,0xFF shows 33FF on screen)
Sets Display text and update production database
New ProductionState
web logging required per default true, for offline usage set to false
Get last Process State
Add external text to internal log file handling
text to log
Enable/Disable Raw record Logging
True = Write Raw record into log/ false = Stop write raw record into log
Check if the meter has any errors that can occur on a measurement
the error reason has find out in the log files
false = everything is good, detect at least one error
Clear all object set up on runtime
Interface for Events
you can use without events (so with out )
occurs when ProcessState has changed
occurs when ErrorState has changed
occurs when Init is completed
occurs when the initializations for Measurement is completed
occurs when the Measurement is completed
occurs when the initializations for calibration is completed
occurs when the calibration is completed