Commit message

This commit is contained in:
support.sampyo 2024-05-23 01:32:45 +00:00
parent 237ec66789
commit 0a996b5b66
4 changed files with 412 additions and 384 deletions

View File

@ -9,15 +9,17 @@
},
"mixed": {
"action": "Off",
"duration": 15
"duration": 7
},
"pure": {
"action": "Off",
"duration": 15
"duration": 10,
"holding": 5
},
"vent": {
"action": "Off",
"duration": 30
"duration": 30,
"holding": 2
},
"motor": {
"action": "Off"

View File

@ -7,5 +7,5 @@ spec:
virtualEnv: base # 사용할 가상환경 이름입니다.
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
stackbase:
tagName: v0.0.14 # Stackbase(gitea)에 릴리즈 태그명 입니다.
tagName: v0.0.15 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.

56
main.py
View File

@ -81,10 +81,12 @@ def Command_Read():
mixed_duration = int(cmd['device']['mixed']['duration'])
pure_duration = int(cmd['device']['pure']['duration'])
pure_holding = int(cmd['device']['pure']['holding'])
vent_duration = int(cmd['device']['vent']['duration'])
measure_duration = int(cmd['device']['vent']['duration'])
vent_holding = int(cmd['device']['vent']['holding'])
measure_duration = int(cmd['device']['measure']['duration'])
time.sleep(5)
time.sleep(7)
start = Measure_Weight(client=client)
time.sleep(5)
@ -100,31 +102,55 @@ def Command_Read():
Calculate_Concentration(weight=(float(end)-float(start)))
# vent mixed water
# # vent mixed water
# Valve_Vent(chip=output_lines, status=status, action='On')
# time.sleep(0.5)
# Motor(chip=output_lines, status=status, action='On')
# time.sleep(vent_duration)
# Motor(chip=output_lines, status=status, action='Off')
# time.sleep(0.5)
# Valve_Vent(chip=output_lines, status=status, action='Off')
# time.sleep(0.5)
# # input pure water
# Valve_PureWater(chip=output_lines, status=status, action='On')
# time.sleep(pure_duration)
# Valve_PureWater(chip=output_lines, status=status, action='Off')
# time.sleep(0.5)
# # vent pure water
# Valve_Vent(chip=output_lines, status=status, action='On')
# time.sleep(0.5)
# Motor(chip=output_lines, status=status, action='On')
# time.sleep(vent_duration)
# Motor(chip=output_lines, status=status, action='Off')
# time.sleep(0.5)
# Valve_Vent(chip=output_lines, status=status, action='Off')
# time.sleep(1)
# Vent and Clear sequence
# 1) Open Vent and wait for 2 sec
Valve_Vent(chip=output_lines, status=status, action='On')
time.sleep(0.5)
time.sleep(vent_holding)
# 2) Motor On
Motor(chip=output_lines, status=status, action='On')
time.sleep(vent_duration)
Motor(chip=output_lines, status=status, action='Off')
time.sleep(0.5)
Valve_Vent(chip=output_lines, status=status, action='Off')
time.sleep(0.5)
# input pure water
# 3) Input Pure Water
Valve_PureWater(chip=output_lines, status=status, action='On')
time.sleep(pure_duration)
time.sleep(pure_duration + pure_holding)
Valve_PureWater(chip=output_lines, status=status, action='Off')
time.sleep(0.5)
# vent pure water
Valve_Vent(chip=output_lines, status=status, action='On')
time.sleep(0.5)
Motor(chip=output_lines, status=status, action='On')
# 4) Wait until empty
time.sleep(vent_duration)
# 5) Motor Off and Vent close
Motor(chip=output_lines, status=status, action='Off')
time.sleep(0.5)
Valve_Vent(chip=output_lines, status=status, action='Off')
time.sleep(1)
time.sleep(0.5)
return 1