This commit is contained in:
Tyrel Souza 2023-07-21 22:40:25 -04:00
parent cc3ebaa550
commit 4441cb8eab
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
3 changed files with 67 additions and 14 deletions

45
notes.txt Normal file
View File

@ -0,0 +1,45 @@
TRANSDUCER\d - array of TRANSDUCERS
- Instrument Pressure \d # As Found
- Master Value \d # Gauge Reading Set Point
- Note: IP1 = MV1
Once selected, prompt for "As Found", "As Left", or "Both"
- If as left, proppt for as found file. etc etc.
- If both, continue on with logic.
If Transducer Name contains "CUSTOM" - prompt for the name in an input box (change to Type)
Part Number: "CTS A12-221" Value "250CCM"
Data to always enter in
- Instrument
- Customer Name
- Customer Address
- Control Number
- Serial Number
- Accuracy (once, but applies to the full List)
- Barometric Pressure
- Temperature
- Humidity
Auto Data
- Date [Verify Date]
- Part Number "middle number from Part Name/Type variable"
Calculations: etc
- High Limit/ Low Limit eg: (SPAN*1.0005 + column) (SPAN*0.9995 - column)
- Delta = abs(gauge reading) - abs(asleft|asfound)
- PSIA - PRESSURE
- SCCM - FLOW
- TRANSDUCER1 Will ALWAYS be pressure
CONFIG:
- Mensor Numbers etc
- Cal device, cal serial, Cal cal date, cal due date
# HARDWARE CALIBRATION
- "Mass Flow Trans" look at `Instrument Flow` and `Master Reading`
- "Pressure Transducer" `Instrument Pressure` and `Master Value`
- Always take the SECOND `Master Value`

View File

@ -58,20 +58,9 @@ def parse_file(file_path):
instrument_info = parse_instrument_info(info_section)
calibration_data = parse_ports(calibration_section)
return instrument_info, calibration_data
return {"instrument": instrument_info, "calibration": calibration_data}
if __name__ == "__main__":
file_path = "./hardware_calibration.txt" # Replace with the actual file path
instrument_info, calibration_data = parse_file(file_path)
print("Instrument Info:")
print(instrument_info)
print("\nCalibration Data:")
for device_name, device_data in calibration_data.items():
print(f"\nDevice: {device_name}")
for port, transducers in device_data.items():
print(port)
pprint(transducers)
data = parse_file(file_path)
pprint(data)

19
tags Normal file
View File

@ -0,0 +1,19 @@
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION Development //
KEEP parse_hardware.py /^KEEP = {$/;" v
data parse_hardware.py /^ data = parse_file(file_path)$/;" v
file_path parse_hardware.py /^ file_path = ".\/hardware_calibration.txt" # Replace with the actual file path$/;" v
file_path parse_transducer.py /^ file_path = '.\/transducer_verify.txt'$/;" v
parse_calibration_data parse_hardware.py /^def parse_calibration_data(text):$/;" f
parse_file parse_hardware.py /^def parse_file(file_path):$/;" f
parse_instrument_info parse_hardware.py /^def parse_instrument_info(text):$/;" f
parse_ports parse_hardware.py /^def parse_ports(text):$/;" f
parse_transducer parse_transducer.py /^def parse_transducer(file_path):$/;" f
parsed_data parse_transducer.py /^ parsed_data = parse_text_file(file_path)$/;" v
pprint parse_hardware.py /^from pprint import pprint$/;" i
re parse_hardware.py /^import re$/;" i
re parse_transducer.py /^import re$/;" i