123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>{{ title }}</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- <meta http-equiv="refresh" content="5" /> 每 content 秒網頁自動更新-->
- <!-- 新 Bootstrap4 核心 CSS 文件 -->
- <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
- <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
- <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
- <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
- <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
- <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
- <!--可用來建立使用者小圖示-->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <!-- Socket.IO -->
- <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.dev.js"></script>
-
- <script language="JavaScript">
- // 指定 10秒 刷新網頁一次
- var ctn = '{{tid}}';
- var status = '{{status}}';
- console.log('ctn:' + ctn)
- $(function(){
- $("#coffee_title_pc").text('C' + ctn + ' 清洗浮選槽操作介面');
- $("#coffee_title_phone").text('C' + ctn + ' 清洗浮選槽操作介面');
- if (status == 2) {
- $('input').prop('disabled', true);
- $('button').prop('disabled', true);
- } else if ( (status == 0) || (status == 1) ) {
- $('input').prop('disabled', false);
- $('button').prop('disabled', false);
- }
- });
- var WebUpdate_set;
- WebUpdate_set = setInterval(function(){WebUpdate(ctn)} , 10 * 1000)
-
- </script>
- <script>
- // 清洗浮選 致動器開關
- var tank_num = '{{tid}}';
- // 桶內 真空吸料機
- function tankVacuum(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_vacuum_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_vacuum_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_vacuum_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-02").prop('checked', false);
- if (!confirm("你確定要開啟真空吸料機嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-02").prop('checked', true);
- if (!confirm("你確定要關閉真空吸料機嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_vacuum_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-02").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-02").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 吸料機三通閥
- function tankThreeWayValveInput(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_threewayvalve_input_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_threewayvalve_input_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_threewayvalve_input_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-05").prop('checked', false);
- if (!confirm("你確定要開啟吸料機三通閥[入料]嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-05").prop('checked', true);
- if (!confirm("你確定要開啟吸料機三通閥[排氣]嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_threewayvalve_input_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-05").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-05").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 馬達
- function tankMotor_set() {
- var motor_data = $("input[id=motor_rpm_data]").val();
- if (motor_data == '') {
- alert("請先輸入要運轉的值!");
- return false;
- } else if (motor_data == 0) {
- alert("轉速 0 為關閉馬達");
- } else if (Number(motor_data) < -50 || Number(motor_data) > 50 || !Number(motor_data)) {
- alert("您輸入的值已超過範圍,請重新輸入!" + !Number(motor_data));
- return false;
- };
- var value = "off";
- if (motor_data != 0) {
- value = motor_data;
- if (!confirm("你確定要開啟攪拌馬達,運轉速度為 " + motor_data + " RPM 嗎?")) {
- return false;
- };
- } else {
- if (!confirm("你確定要關閉攪拌馬達嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_motor_status", "value": motor_data };
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- setTimeout("alert('攪拌馬達_開啟成功!')", 500);
- var timer = setInterval(Rotate, 60000);
- } else if (res == 'off') {
- setTimeout("alert('攪拌馬達_關閉成功!')", 500);
- clearInterval(timer);
- $("#motor_rpm_status").text('')
- } else {
- alert(res);
- };
- }, 'text')
- };
- function tankMotor(params) {
- var params_int = parseInt(params)
- if (-50 <= params_int <= 50) {
- var data = { "tank_num": "C" + tank_num, "command": "tank_motor_status", "value": params };
- } else {
- var data = { "tank_num": "C" + tank_num, "command": "tank_motor_status", "value": '0' };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-08").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-08").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 中水入水電磁閥
- function tankSolenoidReclaimedIn(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_in_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_in_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_solenoid_reclaimed_in_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-11").prop('checked', false);
- if (!confirm("你確定要開啟中水入水電磁閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-11").prop('checked', true);
- if (!confirm("你確定要關閉中水入水電磁閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_in_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-11").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-11").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 清水入水電磁閥
- function tankSolenoidWaterIn(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_in_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_in_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_solenoid_water_in_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-14").prop('checked', false);
- if (!confirm("你確定要開啟清水入水電磁閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-14").prop('checked', true);
- if (!confirm("你確定要關閉清水入水電磁閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_in_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-14").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-14").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 幫浦 (清水入水)
- function tankPumpWaterIn(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_water_in_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_water_in_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_pump_water_in_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-17").prop('checked', false);
- if (!confirm("你確定要開啟清水入水幫浦嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-17").prop('checked', true);
- if (!confirm("你確定要關閉清水入水幫浦嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_water_in_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-17").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-17").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 排水廢水電磁閥
- function tankSolenoidWaterOut(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_out_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_out_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_solenoid_water_out_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-20").prop('checked', false);
- if (!confirm("你確定要開啟排水廢水電磁閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-20").prop('checked', true);
- if (!confirm("你確定要關閉排水廢水電磁閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_water_out_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-20").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-20").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 排水中水電磁閥
- function tankSolenoidReclaimedOut(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_out_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_out_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_solenoid_reclaimed_out_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-23").prop('checked', false);
- if (!confirm("你確定要開啟排水中水電磁閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-23").prop('checked', true);
- if (!confirm("你確定要關閉排水中水電磁閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_reclaimed_out_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-23").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-23").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 消毒電磁閥
- function tankSolenoidDisinfect(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_disinfect_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_disinfect_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_solenoid_disinfect_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-26").prop('checked', false);
- if (!confirm("你確定要開啟消毒電磁閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-26").prop('checked', true);
- if (!confirm("你確定要關閉消毒電磁閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_solenoid_disinfect_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-26").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-26").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 混合槽幫浦
- function tankPumpDisinfect(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_disinfect_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_disinfect_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_pump_disinfect_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-29").prop('checked', false);
- if (!confirm("你確定要開啟混合槽幫浦嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-29").prop('checked', true);
- if (!confirm("你確定要關閉混合槽幫浦嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_pump_disinfect_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-29").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-29").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- // 桶內 蝴蝶閥
- function tankDiskvalve(params) {
- if (params == '1') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_diskvalve_status", "value": "on" };
- } else if (params == '0') {
- var data = { "tank_num": "C" + tank_num, "command": "tank_diskvalve_status", "value": "off" };
- } else {
- var status = "off";
- var check = $("input[name=tank_diskvalve_status]:checked");
- //大於0代表有被選中
- if (check.length > 0) {
- status = "on";
- $("#cmn-toggle-32").prop('checked', false);
- if (!confirm("你確定要開啟蝴蝶閥嗎?")) {
- return false;
- };
- } else {
- $("#cmn-toggle-32").prop('checked', true);
- if (!confirm("你確定要關閉蝴蝶閥嗎?")) {
- return false;
- };
- };
- var data = { "tank_num": "C" + tank_num, "command": "tank_diskvalve_status", "value": status };
- }
- $.post('/mqtt/{{tid}}', data, function (res) {
- console.log('data:', data)
- if (res == 'on') {
- $("#cmn-toggle-32").prop('checked', true);
- } else if (res == 'off') {
- $("#cmn-toggle-32").prop('checked', false);
- } else {
- };
- }, 'text')
- }
- </script>
- <script language="JavaScript">
- function changeUpdate() {
- clearInterval(WebUpdate_set);
- var webupdate_time = $("input[name=webupdate_time]").val()
- console.log('webupdate_time' + webupdate_time)
- WebUpdate_set = setInterval(function(){WebUpdate(ctn)} , webupdate_time * 1000);
- }
- // jQuery 更新感測器致動器狀態
- function WebUpdate(ctn) {
- $.get('/loading/C' + ctn, '', function (res) {
- if (res.tank_vacuum == 0) {
- $("#cmn-toggle-02").prop('checked', false);
- } else if (res.tank_vacuum == 1) {
- $("#cmn-toggle-02").prop('checked', true);
- }
- if (res.tank_threewayvalve_input == 0) {
- $("#cmn-toggle-05").prop('checked', false);
- } else if (res.tank_threewayvalve_input == 1) {
- $("#cmn-toggle-05").prop('checked', true);
- }
- if (res.tank_solenoid_reclaimed_in == 0) {
- $("#cmn-toggle-11").prop('checked', false);
- } else if (res.tank_solenoid_reclaimed_in == 1) {
- $("#cmn-toggle-11").prop('checked', true);
- }
- if (res.tank_solenoid_water_in == 0) {
- $("#cmn-toggle-14").prop('checked', false);
- } else if (res.tank_solenoid_water_in == 1) {
- $("#cmn-toggle-14").prop('checked', true);
- }
- if (res.tank_pump_water_in == 0) {
- $("#cmn-toggle-17").prop('checked', false);
- } else if (res.tank_pump_water_in == 1) {
- $("#cmn-toggle-17").prop('checked', true);
- }
- if (res.tank_solenoid_water_out == 0) {
- $("#cmn-toggle-20").prop('checked', false);
- } else if (res.tank_solenoid_water_out == 1) {
- $("#cmn-toggle-20").prop('checked', true);
- }
- if (res.tank_solenoid_reclaimed_out == 0) {
- $("#cmn-toggle-23").prop('checked', false);
- } else if (res.tank_solenoid_reclaimed_out == 1) {
- $("#cmn-toggle-23").prop('checked', true);
- }
- if (res.tank_solenoid_disinfect == 0) {
- $("#cmn-toggle-26").prop('checked', false);
- } else if (res.tank_solenoid_disinfect == 1) {
- $("#cmn-toggle-26").prop('checked', true);
- }
- if (res.tank_pump_disinfect == 0) {
- $("#cmn-toggle-29").prop('checked', false);
- } else if (res.tank_pump_disinfect == 1) {
- $("#cmn-toggle-29").prop('checked', true);
- }
- if (res.tank_diskvalve == 0) {
- $("#cmn-toggle-32").prop('checked', false);
- } else if (res.tank_diskvalve == 1) {
- $("#cmn-toggle-32").prop('checked', true);
- }
- $("#motor_rpm_data").attr("placeholder", res.tank_motor);
- $("#UltraSonic_t_status").text(res.UltraSonic);
- $("#MotorEncoder_t_status").text(res.Encoder);
- $("#tankTurbidity_t_status").text(res.tankTurbidity);
- $("#filterTurbidity_t_status").text(res.filterTurbidity);
- // setTimeout(function(){WebUpdate(ctn)}, 10 * 1000);
- }, 'json');
-
- }
- </script>
- </head>
- <body>
- <div id="wrapper">
- <div id="coffee_header">
- <!-- 匯入共同使用的 header.html 內容 -->
- {% include 'header.html' %}
- </div>
-
- <h4>致動器</h4>
- <table border="1" class="table-all" cellpadding="3" style="text-align: center;">
- <tr>
- <td style="color:red;">Valve</td>
- <td>真空吸料機</td>
- <td>吸料機<br>三通閥</td>
- <td>馬達</td>
- <td>中水入水<br>電磁閥</td>
- <td>清水入水<br>電磁閥</td>
- <td>幫浦<br>(清水入水)</td>
- <td>排水廢水<br>電磁閥</td>
- <td>排水中水<br>電磁閥</td>
- <td>消毒<br>電磁閥</td>
- <td>混合槽<br>幫浦</td>
- <td>蝴蝶閥</td>
- </tr>
- <tr>
- <td>
- <span style="color:#C0C0C0;">off</span>
- <span style="color:#008CBA;">on</span>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-01">
- </div>
- <div class="text-center">
- {% if tank_vacuum == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-02" checked
- name="tank_vacuum_status" value="ON" onclick="tankVacuum()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-02"
- name="tank_vacuum_status" value="OFF" onclick="tankVacuum()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-02"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-03">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-04">
- </div>
- <div class="text-center">
- {% if tank_threewayvalve_input == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-05" checked
- name="tank_threewayvalve_input_status" value="ON" onclick="tankThreeWayValveInput()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-05"
- name="tank_threewayvalve_input_status" value="OFF" onclick="tankThreeWayValveInput()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-05"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-06">
- </div>
- </div>
- </td>
- <td>
- <input type="text" class="input-text" id="motor_rpm_data" placeholder="{{tank_motor}}" value="">RPM
- <br>
- <span id="motor_rpm_status" style="color:red;"></span>
- <input type="button" class="input-button" value="Confirm" name="tank_motor_status" onclick="tankMotor_set()">
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-10">
- </div>
- <div class="text-center">
- {% if tank_solenoid_reclaimed_in == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-11" checked
- name="tank_solenoid_reclaimed_in_status" value="ON" onclick="tankSolenoidReclaimedIn()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-11"
- name="tank_solenoid_reclaimed_in_status" value="OFF" onclick="tankSolenoidReclaimedIn()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-11"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-12">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-13">
- </div>
- <div class="text-center">
- {% if tank_solenoid_water_in == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-14" checked
- name="tank_solenoid_water_in_status" value="ON" onclick="tankSolenoidWaterIn()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-14"
- name="tank_solenoid_water_in_status" value="OFF" onclick="tankSolenoidWaterIn()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-14"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-15">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-16">
- </div>
- <div class="text-center">
- {% if tank_pump_water_in == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-17" checked
- name="tank_pump_water_in_status" value="ON" onclick="tankPumpWaterIn()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-17"
- name="tank_pump_water_in_status" value="OFF" onclick="tankPumpWaterIn()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-17"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-18">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-19">
- </div>
- <div class="text-center">
- {% if tank_solenoid_water_out == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-20" checked
- name="tank_solenoid_water_out_status" value="ON" onclick="tankSolenoidWaterOut()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-20"
- name="tank_solenoid_water_out_status" value="OFF" onclick="tankSolenoidWaterOut()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-20"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-21">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-22">
- </div>
- <div class="text-center">
- {% if tank_solenoid_reclaimed_out == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-23" checked
- name="tank_solenoid_reclaimed_out_status" value="ON" onclick="tankSolenoidReclaimedOut()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-23"
- name="tank_solenoid_reclaimed_out_status" value="OFF" onclick="tankSolenoidReclaimedOut()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-23"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-24">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-25">
- </div>
- <div class="text-center">
- {% if tank_solenoid_disinfect == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-26" checked
- name="tank_solenoid_disinfect_status" value="ON" onclick="tankSolenoidDisinfect()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-26"
- name="tank_solenoid_disinfect_status" value="OFF" onclick="tankSolenoidDisinfect()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-26"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-27">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-28">
- </div>
- <div class="text-center">
- {% if tank_pump_disinfect == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-29" checked
- name="tank_pump_disinfect_status" value="ON" onclick="tankPumpDisinfect()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-29"
- name="tank_pump_disinfect_status" value="OFF" onclick="tankPumpDisinfect()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-29"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-30">
- </div>
- </div>
- </td>
- <td>
- <div class="switch_div">
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-round" id="cmn-toggle-31">
- </div>
- <div class="text-center">
- {% if tank_diskvalve == 1 %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-32" checked
- name="tank_diskvalve_status" value="ON" onclick="tankDiskvalve()">
- {% else %}
- <input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="cmn-toggle-32"
- name="tank_diskvalve_status" value="OFF" onclick="tankDiskvalve()">
- {% endif %}
- <label class="label_ActuatorStatus" for="cmn-toggle-32"></label>
- </div>
- <div>
- <input type="checkbox" class="cmn-toggle cmn-toggle-yes-no" id="cmn-toggle-33">
- </div>
- </div>
- </td>
- </tr>
- <tr>
- <td><span style="color:#008CBA;"><b>ON</b></span></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankVacuum('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankThreeWayValveInput('1')"></td>
- <td><input type="button" class="input-button-on" value="20" onclick="tankMotor('20')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankSolenoidReclaimedIn('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankSolenoidWaterIn('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankPumpWaterIn('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankSolenoidWaterOut('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankSolenoidReclaimedOut('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankSolenoidDisinfect('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankPumpDisinfect('1')"></td>
- <td><input type="button" class="input-button-on" value="ON" onclick="tankDiskvalve('1')"></td>
- </tr>
- <tr>
- <td><span style="color:#C0C0C0;"><b>OFF</b></span></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankVacuum('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankThreeWayValveInput('0')"></td>
- <td><input type="button" class="input-button-off" value="0" onclick="tankMotor('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankSolenoidReclaimedIn('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankSolenoidWaterIn('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankPumpWaterIn('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankSolenoidWaterOut('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankSolenoidReclaimedOut('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankSolenoidDisinfect('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankPumpDisinfect('0')"></td>
- <td><input type="button" class="input-button-off" value="OFF" onclick="tankDiskvalve('0')"></td>
- </tr>
- </table>
- <br>
- <h4>感測器</h4>
- <table border="1" class="table-all" cellpadding="5">
- <tr>
- <td style="background-color:#f3f3f3">生豆高度</td>
- <td><span id="UltraSonic_t_status">{{tank_UltraSonic.UltraSonic}}</span> 公分</td>
- <td style="background-color:#f3f3f3">桶內濁度計</td>
- <td><span id="tankTurbidity_t_status">{{tank_Turbidity.tankTurbidity}}</span> NTU</td>
- </tr>
- <tr>
- <td style="background-color:#f3f3f3">馬達編碼器</td>
- <td><span id="MotorEncoder_t_status">{{tank_Encoder.Encoder}}</span> RPM</td>
- <td style="background-color:#f3f3f3">過濾器濁度計</td>
- <td><span id="filterTurbidity_t_status">{{filter_Turbidity.filterTurbidity}}</span> NYU</td>
- </tr>
- </table>
- <br>
- <h4>排程測試</h4>
- <table border="1" class="table-all" cellpadding="5">
- <tr>
- <td>排氣下豆測試</td>
- </tr>
- <tr>
- <td>
- 吸料
- <input type="text" class="input-text" name="waiting_time_8" value="5">
- 秒
- <br>
- 放料
- <input type="text" class="input-text" name="waiting_time_9" value="10">
- 秒
- <br>
- 循環
- <input type="text" class="input-text" name="waiting_loop_3" value="4">
- 次
- </td>
- </tr>
- <tr>
- <td>
- <button type="submit" class="btn btn-primary" onclick="tank_BeanInputAir_testing()">排氣下豆測試</button>
- <script>
- function tank_BeanInputAir_testing() {
- // 循環次數
- var loop3 = $("input[name=waiting_loop_3]").val();
- console.log('--- 循環 ' + loop3 + ' 次 ---')
- for (step = 1; step <= loop3; step++) {
- // 真空吸料機 ON
- tankVacuum_ON()
- console.log('tankVacuum_ON')
- // 吸料時間
- var time8 = $("input[name=waiting_time_8]").val();
- console.log('等待 ' + time8 + ' 秒')
- var time = new Date();
- while ((new Date() - time) < time8 * 1000) { };
- // 真空吸料機 OFF
- tankVacuum_OFF()
- console.log('tankVacuum_OFF')
- // 吸料時間
- var time9 = $("input[name=waiting_time_9]").val();
- console.log('等待 ' + time9 + ' 秒')
- var time = new Date();
- while ((new Date() - time) < time9 * 1000) { };
- }
- }
- </script>
- </td>
- </tr>
- </table>
- <div id="coffee_footer">
- <!-- 匯入共同使用的 footer.html 內容 -->
- {% include 'footer.html' %}
- </div>
- </div>
- </body>
- </html>
|