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
Display codes to keep the user informed about the production and processing step.
This is useful as the user doesn't need to connect the device to a PC, he can
immediately inspect the status of the device.
Status not set
Error state
Picking in progress
Picking succeeded, next step can be initiated
Picking failed
Pressure testing succeeded, next step can be initiated
Pressure test failed
Pressure test failed
Connection between PCBID, Serial Number and Order number done
Zero flow test succeeded, next step can be initiated
Zero flow test failed
Flow calibration succeeded, next step can be initiated
Flow calibration failed
Flow test succeeded, next step can be initiated
Flow test failed
Final test failed, else the display will be switched to operational mode,
showing the actual accumulated volume
FW update is ongoing
FW update failed
FW update succeeded
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
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)
Skip the test bench preparation process
Set the current action test
Read the PcbId from IMeter, if device has no readable PcbId simulate one
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 without password service and a fixed password
password for login
execute immediately
skip app readout and register generation to speed up
the initial connection process
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
Request for intermediate measurement state.
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 an active Stop Record for calibration
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
Dispose the entire test bench
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
Flowrate for setting up the Pumps on bench
how long the flow should last
Corrected measurement of flowrate from Refrence meter
how long the mesurement was running
Measurement of flowrate from DUT
how long the mesurement was running for DUT