Commit message
This commit is contained in:
parent
237ec66789
commit
0a996b5b66
|
@ -9,15 +9,17 @@
|
||||||
},
|
},
|
||||||
"mixed": {
|
"mixed": {
|
||||||
"action": "Off",
|
"action": "Off",
|
||||||
"duration": 15
|
"duration": 7
|
||||||
},
|
},
|
||||||
"pure": {
|
"pure": {
|
||||||
"action": "Off",
|
"action": "Off",
|
||||||
"duration": 15
|
"duration": 10,
|
||||||
|
"holding": 5
|
||||||
},
|
},
|
||||||
"vent": {
|
"vent": {
|
||||||
"action": "Off",
|
"action": "Off",
|
||||||
"duration": 30
|
"duration": 30,
|
||||||
|
"holding": 2
|
||||||
},
|
},
|
||||||
"motor": {
|
"motor": {
|
||||||
"action": "Off"
|
"action": "Off"
|
||||||
|
|
|
@ -7,5 +7,5 @@ spec:
|
||||||
virtualEnv: base # 사용할 가상환경 이름입니다.
|
virtualEnv: base # 사용할 가상환경 이름입니다.
|
||||||
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
|
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
|
||||||
stackbase:
|
stackbase:
|
||||||
tagName: v0.0.14 # Stackbase(gitea)에 릴리즈 태그명 입니다.
|
tagName: v0.0.15 # Stackbase(gitea)에 릴리즈 태그명 입니다.
|
||||||
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.
|
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.
|
||||||
|
|
56
main.py
56
main.py
|
@ -81,10 +81,12 @@ def Command_Read():
|
||||||
|
|
||||||
mixed_duration = int(cmd['device']['mixed']['duration'])
|
mixed_duration = int(cmd['device']['mixed']['duration'])
|
||||||
pure_duration = int(cmd['device']['pure']['duration'])
|
pure_duration = int(cmd['device']['pure']['duration'])
|
||||||
|
pure_holding = int(cmd['device']['pure']['holding'])
|
||||||
vent_duration = int(cmd['device']['vent']['duration'])
|
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)
|
start = Measure_Weight(client=client)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
|
@ -100,31 +102,55 @@ def Command_Read():
|
||||||
|
|
||||||
Calculate_Concentration(weight=(float(end)-float(start)))
|
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')
|
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')
|
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)
|
time.sleep(0.5)
|
||||||
|
|
||||||
# input pure water
|
# 3) Input Pure Water
|
||||||
Valve_PureWater(chip=output_lines, status=status, action='On')
|
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')
|
Valve_PureWater(chip=output_lines, status=status, action='Off')
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
# vent pure water
|
# 4) Wait until empty
|
||||||
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)
|
time.sleep(vent_duration)
|
||||||
|
|
||||||
|
# 5) Motor Off and Vent close
|
||||||
Motor(chip=output_lines, status=status, action='Off')
|
Motor(chip=output_lines, status=status, action='Off')
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
Valve_Vent(chip=output_lines, status=status, action='Off')
|
Valve_Vent(chip=output_lines, status=status, action='Off')
|
||||||
time.sleep(1)
|
time.sleep(0.5)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue