Commit message

This commit is contained in:
support.sampyo 2024-07-04 05:50:25 +00:00
parent f54f9e7fb5
commit 5c41e0664d
2 changed files with 21 additions and 21 deletions

View File

@ -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.43 # Stackbase(gitea)에 릴리즈 태그명 입니다. tagName: v0.0.44 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다. repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.

40
main.py
View File

@ -144,20 +144,20 @@ def Command_Read():
if cmd['type'] == 'auto': if cmd['type'] == 'auto':
main_duration = float(cmd['device']['main']['duration']) main_duration = float(cmd['device']['main']['duration'])
pure_duration = float(cmd['device']['pure']['duration']) pure_duration = float(cmd['device']['pure']['duration'])
setp0_duration = float(cmd['working-time']['setp0']) step0_duration = float(cmd['working-time']['step0'])
setp1_duration = float(cmd['working-time']['setp1']) step1_duration = float(cmd['working-time']['step1'])
setp2_duration = float(cmd['working-time']['setp2']) step2_duration = float(cmd['working-time']['step2'])
setp3_duration = float(cmd['working-time']['setp3']) step3_duration = float(cmd['working-time']['step3'])
setp4_duration = float(cmd['working-time']['setp4']) step4_duration = float(cmd['working-time']['step4'])
setp5_duration = float(cmd['working-time']['setp5']) step5_duration = float(cmd['working-time']['step5'])
setp6_duration = float(cmd['working-time']['setp6']) step6_duration = float(cmd['working-time']['step6'])
setp7_duration = float(cmd['working-time']['setp7']) step7_duration = float(cmd['working-time']['step7'])
setp8_duration = float(cmd['working-time']['setp8']) step8_duration = float(cmd['working-time']['step8'])
setp9_duration = float(cmd['working-time']['setp9']) step9_duration = float(cmd['working-time']['step9'])
# Step 0. Mesure init weight before starting the sequence # Step 0. Mesure init weight before starting the sequence
time.sleep(setp0_duration) time.sleep(step0_duration)
start = Measure_Weight(client=client) start = Measure_Weight(client=client)
# Step 1. Vent pured water before input mixed water # Step 1. Vent pured water before input mixed water
@ -167,19 +167,19 @@ def Command_Read():
Valve_Vent(chip=output_lines, status=status, action='On') Valve_Vent(chip=output_lines, status=status, action='On')
time.sleep(0.5) time.sleep(0.5)
Valve_MainWater(chip=output_lines, status=status, action='On', duration=main_duration) Valve_MainWater(chip=output_lines, status=status, action='On', duration=main_duration)
time.sleep(setp1_duration) time.sleep(step1_duration)
# Step 2. Empty the remaining pure water # Step 2. Empty the remaining pure water
# Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: On] # Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: On]
Valve_EnterWater(chip=output_lines, status=status, action='Off') Valve_EnterWater(chip=output_lines, status=status, action='Off')
time.sleep(setp2_duration) time.sleep(step2_duration)
# Step 3. Input the mixed water # Step 3. Input the mixed water
# Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: On, Main: On] # Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: On, Main: On]
Valve_Vent(chip=output_lines, status=status, action='Off') Valve_Vent(chip=output_lines, status=status, action='Off')
time.sleep(0.5) time.sleep(0.5)
Valve_EnterWater(chip=output_lines, status=status, action='On') Valve_EnterWater(chip=output_lines, status=status, action='On')
time.sleep(setp3_duration) time.sleep(step3_duration)
# Step 4. Mesure the weight # Step 4. Mesure the weight
# Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: Off, Main: Off] # Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: Off, Main: Off]
@ -187,7 +187,7 @@ def Command_Read():
time.sleep(0.5) time.sleep(0.5)
Valve_MainWater(chip=output_lines, status=status, action='Off') Valve_MainWater(chip=output_lines, status=status, action='Off')
time.sleep(setp4_duration) time.sleep(step4_duration)
end = Measure_Weight(client=client) end = Measure_Weight(client=client)
time.sleep(1) time.sleep(1)
@ -200,12 +200,12 @@ def Command_Read():
Valve_Vent(chip=output_lines, status=status, action='On') Valve_Vent(chip=output_lines, status=status, action='On')
time.sleep(0.5) time.sleep(0.5)
Valve_PureWater(chip=output_lines, status=status, action='On', duration=pure_duration) Valve_PureWater(chip=output_lines, status=status, action='On', duration=pure_duration)
time.sleep(setp5_duration) time.sleep(step5_duration)
# Step 6. Drain mixed water # Step 6. Drain mixed water
# Target valve status: [Motor: Off, Vent: On, Pure: On, Enter: Off, Main: Off] # Target valve status: [Motor: Off, Vent: On, Pure: On, Enter: Off, Main: Off]
Valve_EnterWater(chip=output_lines, status=status, action='Off') Valve_EnterWater(chip=output_lines, status=status, action='Off')
time.sleep(setp6_duration) time.sleep(step6_duration)
# Step 7. Input pure water and clean # Step 7. Input pure water and clean
# Target valve status: [Motor: On, Vent: Off, Pure: On, Enter: On, Main: Off] # Target valve status: [Motor: On, Vent: Off, Pure: On, Enter: On, Main: Off]
@ -214,7 +214,7 @@ def Command_Read():
Valve_Vent(chip=output_lines, status=status, action='Off') Valve_Vent(chip=output_lines, status=status, action='Off')
time.sleep(0.5) time.sleep(0.5)
Motor(chip=output_lines, status=status, action='On') Motor(chip=output_lines, status=status, action='On')
time.sleep(setp7_duration) time.sleep(step7_duration)
# Step 8. Drain pure Water # Step 8. Drain pure Water
# Target valve status: [Motor: On, Vent: On, Pure: Off, Enter: Off, Main: Off] # Target valve status: [Motor: On, Vent: On, Pure: Off, Enter: Off, Main: Off]
@ -223,12 +223,12 @@ def Command_Read():
Valve_Vent(chip=output_lines, status=status, action='On') Valve_Vent(chip=output_lines, status=status, action='On')
time.sleep(0.5) time.sleep(0.5)
Valve_PureWater(chip=output_lines, status=status, action='Off') Valve_PureWater(chip=output_lines, status=status, action='Off')
time.sleep(setp8_duration) time.sleep(step8_duration)
# Step 9. Stop moter # Step 9. Stop moter
# Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: Off] # Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: Off]
Motor(chip=output_lines, status=status, action='Off') Motor(chip=output_lines, status=status, action='Off')
time.sleep(setp9_duration) time.sleep(step9_duration)
return 1 return 1