ferment_auto.html 105 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{{ title }}</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- <meta http-equiv="refresh" content="10" />每 content 秒網頁自動更新-->
  8. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  9. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  10. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  11. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  12. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  13. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  14. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  15. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  16. <!--
  17. <script src="../static/js/sign_in.js"></script>
  18. <link rel="stylesheet" href="../static/css/sign_in.css">
  19. -->
  20. <!-- Rita 發酵貨櫃 - 入料、桶槽、出料致動器 function-->
  21. <script type="text/javascript" src="../static/js/ferment_function.js"></script>
  22. <script>
  23. var tank_num = '1';
  24. $(document).ready(function(){
  25. $("#coffee_title").text('發酵自動化');
  26. // 脫皮出料顯示
  27. console.log('PO1: ' + '{{PO1}}')
  28. console.log('PO2: ' + '{{PO2}}')
  29. peel_output_status = ['{{PO1}}','{{PO2}}']
  30. for (let i=0; i<peel_output_status.length; i++) {
  31. if (peel_output_status[i] == 'PO_InputtingBean') {
  32. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 入豆中')
  33. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  34. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 入豆中")
  35. } else if (peel_output_status[i] == 'PO_Waiting') {
  36. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 空桶等待')
  37. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  38. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 空桶等待")
  39. } else if (peel_output_status[i] == 'PO_OutputtingBean') {
  40. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 可出豆')
  41. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  42. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 可出豆")
  43. } else if (peel_output_status[i] == 'PO_Stand_by') {
  44. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "HotPink")
  45. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 待命")
  46. } else {
  47. console.log('pass')
  48. }
  49. }
  50. // 乾燥入料顯示
  51. console.log('DO1: ' + '{{DI1}}')
  52. console.log('DO2: ' + '{{DI2}}')
  53. dry_input_status = ['{{DI1}}','{{DI2}}']
  54. for (let i=0; i<dry_input_status.length; i++) {
  55. if (dry_input_status[i] == 'DI_InputtingBean') {
  56. console.log('[動作] 乾燥入料 DO' + parseInt(i+1) + ' 入豆中')
  57. $("#DI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  58. $("#DI"+parseInt(i+1)+"_status").text("DI" + parseInt(i+1) + " 入豆中")
  59. } else if (dry_input_status[i] == 'DI_Waiting') {
  60. console.log('[動作] 乾燥入料 DI' + parseInt(i+1) + ' 空桶等待')
  61. $("#DI"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  62. $("#DI"+parseInt(i+1)+"_status").text("DI" + parseInt(i+1) + " 空桶等待")
  63. } else if (dry_input_status[i] == 'DI_OutputtingBean') {
  64. console.log('[動作] 乾燥入料 DI' + parseInt(i+1) + ' 可出豆')
  65. $("#DI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  66. $("#DI"+parseInt(i+1)+"_status").text("DI" + parseInt(i+1) + " 可出豆")
  67. } else if (dry_input_status[i] == 'DI_Stand_by') {
  68. $("#DI"+parseInt(i+1)+"_status_dot").css("background-color", "HotPink")
  69. $("#DI"+parseInt(i+1)+"_status").text("DI" + parseInt(i+1) + " 待命")
  70. } else {
  71. console.log('pass')
  72. }
  73. }
  74. // 桶槽入料顯示
  75. ferment_input_status_N = ['{{FI1}}', '{{FI2}}']
  76. // console.log('ferment_input_status_N: ' + ferment_input_status_N)
  77. for (let i=0; i<ferment_input_status_N.length; i++) {
  78. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  79. // console.log(i+1 + ' : '+ ferment_output_status[i])
  80. // 1 : F_InputtingBean
  81. // 2 : F_Waiting
  82. if (ferment_input_status_N[i] == 'FI_InputtingBean') {
  83. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  84. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 入豆中")
  85. } else if (ferment_input_status_N[i] == 'FI_Waiting') {
  86. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  87. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 空桶等待")
  88. } else if (ferment_input_status_N[i] == 'FI_OutputtingBean') {
  89. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  90. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 可出豆")
  91. } else if (ferment_input_status_N[i] == 'FI_Stand_by') {
  92. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "HotPink")
  93. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 待命")
  94. } else {
  95. console.log('pass')
  96. }
  97. }
  98. // 桶槽狀態顯示
  99. ferment_tank_status_N = ['{{F1}}', '{{F2}}', '{{F3}}', '{{F4}}', '{{F5}}', '{{F6}}',
  100. '{{F7}}', '{{F8}}', '{{F9}}', '{{F10}}', '{{F11}}', '{{F12}}']
  101. // console.log('ferment_tank_status_N: ' + ferment_tank_status_N)
  102. for (let i=0; i<ferment_tank_status_N.length; i++) {
  103. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  104. // console.log(i+1 + ' : '+ ferment_tank_status[i])
  105. // 1 : F_InputtingBean
  106. // 2 : F_Waiting
  107. if (ferment_tank_status_N[i] == 'F_InputtingBean') {
  108. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  109. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆中")
  110. } else if (ferment_tank_status_N[i] == 'F_InputtingBean_Pause') {
  111. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  112. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆暫停")
  113. } else if (ferment_tank_status_N[i] == 'F_InputtingBean_Finish') {
  114. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  115. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆完成")
  116. } else if (ferment_tank_status_N[i] == 'F_InputtingWater') {
  117. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  118. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入水中")
  119. } else if (ferment_tank_status_N[i] == 'F_Waiting') {
  120. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  121. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 空桶等待")
  122. } else if (ferment_tank_status_N[i] == 'F_Cleaning') {
  123. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "plum")
  124. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 清洗中")
  125. } else if (ferment_tank_status_N[i] == 'F_Fermenting') {
  126. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  127. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發酵中")
  128. } else if (ferment_tank_status_N[i] == 'F_OutputtingBean') {
  129. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  130. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 可出豆")
  131. } else if (ferment_tank_status_N[i] == 'F_Warning') {
  132. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "crimson")
  133. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發生錯誤")
  134. $("#F"+parseInt(i+1)+"_status").css("color", "crimson")
  135. } else if (ferment_tank_status_N[i] == 'F_Stand_by') {
  136. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "HotPink")
  137. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 待命中")
  138. } else {
  139. console.log('pass')
  140. }
  141. }
  142. // 桶槽出料顯示
  143. ferment_output_status_N = ['{{FO1}}', '{{FO2}}']
  144. // console.log('ferment_output_status_N: ' + ferment_output_status_N)
  145. for (let i=0; i<ferment_output_status_N.length; i++) {
  146. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  147. // console.log(i+1 + ' : '+ ferment_output_status[i])
  148. // 1 : F_InputtingBean
  149. // 2 : F_Waiting
  150. if (ferment_output_status_N[i] == 'FO_InputtingBean') {
  151. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  152. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 入豆中")
  153. } else if (ferment_output_status_N[i] == 'FO_Waiting') {
  154. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  155. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 空桶等待")
  156. } else if (ferment_output_status_N[i] == 'FO_OutputtingBean') {
  157. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  158. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 可出豆")
  159. } else if (ferment_output_status_N[i] == 'FO_Stand_by') {
  160. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "HotPink")
  161. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 待命")
  162. } else {
  163. console.log('pass')
  164. }
  165. }
  166. });
  167. $(function(){
  168. $('#cb_cleaning').on('change', function () {
  169. if ($('#cb_cleaning').prop('checked')) {
  170. $("input[name='Ferment_auto_cleaning_Ftimes']").attr('disabled', false);
  171. $("input[name='Ferment_auto_cleaning_Ftimes']").attr('value', '1');
  172. } else {
  173. $("input[name='Ferment_auto_cleaning_Ftimes']").attr('disabled', true);
  174. }
  175. })
  176. $('#cb_calibratingEC').on('change', function () {
  177. if ($('#cb_calibratingEC').prop('checked')) {
  178. $("input[name='Ferment_auto_calibratingEC_Ftimes']").attr('disabled', false);
  179. $("input[name='Ferment_auto_calibratingEC_Ftimes']").attr('value', '1');
  180. } else {
  181. $("input[name='Ferment_auto_calibratingEC_Ftimes']").attr('disabled', true);
  182. }
  183. })
  184. $('#cb_calibratingSTIR').on('change', function () {
  185. if ($('#cb_calibratingSTIR').prop('checked')) {
  186. $("input[name='Ferment_auto_calibratingSTIR_Ftimes']").attr('disabled', false);
  187. $("input[name='Ferment_auto_calibratingSTIR_Ftimes']").attr('value', '1');
  188. } else {
  189. $("input[name='Ferment_auto_calibratingSTIR_Ftimes']").attr('disabled', true);
  190. }
  191. })
  192. // <label><input type="checkbox" id="cb_cleaning">清洗:發酵
  193. // <input name="Ferment_auto_cleaning_Ftimes" class="input-text" type="text">次執行
  194. // </label><br>
  195. // <label><input type="checkbox" id="cb_calibratingEC">校正 EC
  196. // <input name="Ferment_auto_calibratingEC_Ftimes" class="input-text" type="text">次執行
  197. // </label><br>
  198. // <label><input type="checkbox" id="cb_calibratingSTIR">校正攪拌棒
  199. // <input name="Ferment_auto_calibratingSTIR_Ftimes" class="input-text" type="text">次執行
  200. // </label>
  201. })
  202. </script>
  203. <style>
  204. .F_status_css {
  205. font-weight: bold;
  206. text-align: center;
  207. }
  208. .FermentContainer_position {
  209. position: absolute;
  210. top: 95px;
  211. left: 53px;
  212. }
  213. .F1_position {
  214. width: 110px;
  215. }
  216. .F2_position {
  217. width: 110px;
  218. }
  219. .F3_position {
  220. width: 110px;
  221. }
  222. .F4_position {
  223. width: 110px;
  224. }
  225. .F5_position {
  226. width: 110px;
  227. }
  228. .F6_position {
  229. width: 110px;
  230. }
  231. .F7_position {
  232. width: 110px;
  233. }
  234. .F8_position {
  235. width: 110px;
  236. }
  237. .F9_position {
  238. width: 110px;
  239. }
  240. .F10_position {
  241. width: 110px;
  242. }
  243. .F11_position {
  244. width: 110px;
  245. }
  246. .F12_position {
  247. width: 110px;
  248. }
  249. .FI1_position {
  250. width: 110px;
  251. }
  252. .FI2_position {
  253. width: 110px;
  254. }
  255. .FO1_position {
  256. width: 110px;
  257. }
  258. .FO2_position {
  259. width: 110px;
  260. }
  261. .footer{
  262. position: absolute;
  263. bottom: 0px;
  264. width: 100%;
  265. background-color: #eee;
  266. text-align: center;
  267. }
  268. .input-text {
  269. height: 25px;
  270. width: 40px;
  271. text-align: center;
  272. margin-left: 2px;
  273. margin-right: 5px;
  274. }
  275. </style>
  276. <script language="JavaScript">
  277. // 指定 10秒 刷新網頁一次
  278. //var WebUpdate_set = setInterval(function(){WebUpdate()} , 60 * 1000) ;
  279. function WebUpdate(){
  280. console.log("-- 狀態更新 start --")
  281. /*
  282. $.get('/ferment_auto', '', function (res) {
  283. }, 'json');
  284. */
  285. console.log("-- 狀態更新 end --")
  286. };
  287. </script>
  288. <script language="JavaScript">
  289. function myrefresh()
  290. {
  291. window.location.reload();
  292. }
  293. setTimeout('myrefresh()',10000); //指定1秒刷新一次
  294. </script>
  295. </head>
  296. <body>
  297. <div id="wrapper">
  298. <div>
  299. <!-- 發酵貨櫃 測試按鈕-->
  300. <div style="text-align: center;">
  301. <button style="margin: 5px 10px 0px 10px;" type="submit" class="btn btn-primary" onclick="ferment_auto_status_stop()">
  302. <u>狀態判斷_停止</u></button>
  303. <button style="margin: 5px 10px 0px 10px;" type="submit" class="btn btn-primary" onclick="ferment_auto_status_testing()">
  304. <u>[測試] 發酵自動化_狀態判斷</u></button>
  305. <script>
  306. var ferment_status_interval // 每 5 秒更新桶槽狀態、致動器狀態、感測器數值, 放全域
  307. var loadingF
  308. var ferment_status_process = 0;
  309. function ferment_auto_status_testing(){
  310. console.log("------- 狀態判斷 開始 -------")
  311. loadingF = setInterval(loading_F, 10*1000)
  312. var Ferment_Input_bean_height = $("input[name=Ferment_Input_bean_height]").val();
  313. var Ferment_Input_vacuumON_time = $("input[name=Ferment_Input_vacuumON_time]").val();
  314. var Ferment_Input_vacuumOFF_time = $("input[name=Ferment_Input_vacuumOFF_time]").val();
  315. var Ferment_Tank_bean_height = $("input[name=Ferment_Tank_bean_height]").val();
  316. var Ferment_Tank_vacuumON_time = $("input[name=Ferment_Tank_vacuumON_time]").val();
  317. var Ferment_Tank_vacuumOFF_time = $("input[name=Ferment_Tank_vacuumOFF_time]").val();
  318. var Ferment_Tank_water_height = $("input[name=Ferment_Tank_water_height]").val();
  319. var Ferment_Tank_fermenting_temp = $("input[name=Ferment_Tank_fermenting_temp]").val();
  320. var Ferment_Tank_fermenting_time = $("input[name=Ferment_Tank_fermenting_time]").val();
  321. var Ferment_Tank_fermenting_pH = $("input[name=Ferment_Tank_fermenting_pH]").val();
  322. var Ferment_Tank_fermenting_DO = $("input[name=Ferment_Tank_fermenting_DO]").val();
  323. var Ferment_Tank_fermenting_ORP = $("input[name=Ferment_Tank_fermenting_ORP]").val();
  324. var Ferment_Tank_fermenting_EC = $("input[name=Ferment_Tank_fermenting_EC]").val();
  325. var Ferment_Tank_motor_rpm = $("input[name=Ferment_Tank_motor_rpm]").val();
  326. var Ferment_Tank_motor_time = $("input[name=Ferment_Tank_motor_time]").val();
  327. var Ferment_Tank_WaterOut_time = $("input[name=Ferment_Tank_WaterOut_time]").val();
  328. var Ferment_Tank_Disinfect_time = $("input[name=Ferment_Tank_Disinfect_time]").val();
  329. var Ferment_Output_bean_height = $("input[name=Ferment_Output_bean_height]").val();
  330. var Ferment_Output_vacuumON_time = $("input[name=Ferment_Output_vacuumON_time]").val();
  331. var Ferment_Output_vacuumOFF_time = $("input[name=Ferment_Output_vacuumOFF_time]").val();
  332. var FermentAuto_fermenting = $('#cb_fermenting').prop('checked') // true false
  333. var FermentAuto_cleaning = $('#cb_cleaning').prop('checked')
  334. var FermentAuto_calibratingEC = $('#cb_calibratingEC').prop('checked')
  335. var FermentAuto_calibratingSTIR = $('#cb_calibratingSTIR').prop('checked')
  336. var Ferment_auto_cleaning_Ftimes = $("input[name=Ferment_auto_cleaning_Ftimes]").val();
  337. var Ferment_auto_calibratingEC_Ftimes = $("input[name=Ferment_auto_calibratingEC_Ftimes]").val();
  338. var Ferment_auto_calibratingSTIR_Ftimes = $("input[name=Ferment_auto_calibratingSTIR_Ftimes]").val();
  339. var Ferment_cb_vacuum = $('#Ferment_cb_vacuum').prop('checked') // true false
  340. var Ferment_cb_vacuum_time = $("input[name=Ferment_cb_vacuum_time]").val();
  341. if ( (!(/(^[1-9]\d*$)/.test(Ferment_auto_cleaning_Ftimes)) && FermentAuto_cleaning) ||
  342. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingEC_Ftimes)) && FermentAuto_calibratingEC) ||
  343. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingSTIR_Ftimes)) && FermentAuto_calibratingSTIR) ) {
  344. alert('[發酵貨櫃] 次數只接受正整數, 請重新輸入')
  345. return
  346. } else {
  347. // 若發酵排程被勾選則為 1, 否則為 0 (預設發酵排程會不斷執行)
  348. if (FermentAuto_fermenting == true) { FermentAuto_fermenting = 1
  349. } else { FermentAuto_fermenting = 0 }
  350. // 若清洗排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  351. if (FermentAuto_cleaning == true) { FermentAuto_cleaning = Ferment_auto_cleaning_Ftimes
  352. } else { FermentAuto_cleaning = 0 }
  353. // 若校正 EC 排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  354. if (FermentAuto_calibratingEC == true) { FermentAuto_calibratingEC = Ferment_auto_calibratingEC_Ftimes
  355. } else { FermentAuto_calibratingEC = 0 }
  356. // 若校正攪拌棒排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  357. if (FermentAuto_calibratingSTIR == true) { FermentAuto_calibratingSTIR = Ferment_auto_calibratingSTIR_Ftimes
  358. } else { FermentAuto_calibratingSTIR = 0 }
  359. }
  360. var data = { 'command': 'Ferment_auto_parameter',
  361. 'FermentAuto_fermenting': FermentAuto_fermenting,
  362. 'FermentAuto_cleaning': FermentAuto_cleaning,
  363. 'FermentAuto_calibratingEC': FermentAuto_calibratingEC,
  364. 'FermentAuto_calibratingSTIR': FermentAuto_calibratingSTIR,
  365. 'Ferment_cb_vacuum': Ferment_cb_vacuum,
  366. 'Ferment_cb_vacuum_time': Ferment_cb_vacuum_time,
  367. 'Ferment_Tank_fermenting_pH': Ferment_Tank_fermenting_pH,
  368. 'Ferment_Input_bean_height':Ferment_Input_bean_height,
  369. 'Ferment_Input_vacuumON_time': Ferment_Input_vacuumON_time,
  370. 'Ferment_Input_vacuumOFF_time': Ferment_Input_vacuumOFF_time,
  371. 'Ferment_Tank_bean_height': Ferment_Tank_bean_height,
  372. 'Ferment_Tank_vacuumON_time': Ferment_Tank_vacuumON_time,
  373. 'Ferment_Tank_vacuumOFF_time': Ferment_Tank_vacuumOFF_time,
  374. 'Ferment_Tank_water_height': Ferment_Tank_water_height,
  375. 'Ferment_Tank_fermenting_temp': Ferment_Tank_fermenting_temp,
  376. 'Ferment_Tank_fermenting_time': Ferment_Tank_fermenting_time,
  377. 'Ferment_Tank_fermenting_pH': Ferment_Tank_fermenting_pH,
  378. 'Ferment_Tank_fermenting_DO': Ferment_Tank_fermenting_DO,
  379. 'Ferment_Tank_fermenting_ORP': Ferment_Tank_fermenting_ORP,
  380. 'Ferment_Tank_fermenting_EC': Ferment_Tank_fermenting_EC,
  381. 'Ferment_Tank_motor_rpm': Ferment_Tank_motor_rpm,
  382. 'Ferment_Tank_motor_time': Ferment_Tank_motor_time,
  383. 'Ferment_Tank_WaterOut_time': Ferment_Tank_WaterOut_time,
  384. 'Ferment_Tank_Disinfect_time': Ferment_Tank_Disinfect_time,
  385. 'Ferment_Output_bean_height': Ferment_Output_bean_height,
  386. 'Ferment_Output_vacuumON_time': Ferment_Output_vacuumON_time,
  387. 'Ferment_Output_vacuumOFF_time': Ferment_Output_vacuumOFF_time };
  388. ferment_status_interval = setInterval(ferment_auto_status, 5*1000);
  389. function ferment_auto_status(){
  390. if (ferment_status_process == 1) { return };
  391. ferment_status_process = 1;
  392. $.get('/ferment_auto_status', data, function (res) {
  393. FI1 = res.Ferment_Input_1
  394. F1 = res.Ferment_Tank_1
  395. F2 = res.Ferment_Tank_2
  396. F3 = res.Ferment_Tank_3
  397. F4 = res.Ferment_Tank_4
  398. F5 = res.Ferment_Tank_5
  399. F6 = res.Ferment_Tank_6
  400. FO1 = res.Ferment_Output_1
  401. console.log('FI1: ' + FI1)
  402. console.log('F1: ' + F1)
  403. console.log('F2: ' + F2)
  404. console.log('F3: ' + F3)
  405. console.log('F4: ' + F4)
  406. console.log('F5: ' + F5)
  407. console.log('F6: ' + F6)
  408. console.log('FO1: ' + FO1)
  409. // ----- 脫皮出料 PO1 狀態 --------------------------------------------------------------
  410. peel_output_status = [res.Peel_Output_1]
  411. for (let i=0; i<peel_output_status.length; i++) {
  412. if (peel_output_status[i] == 'PO_InputtingBean') {
  413. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 入豆中')
  414. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  415. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 入豆中")
  416. } else if (peel_output_status[i] == 'PO_Waiting') {
  417. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 空桶等待')
  418. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  419. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 空桶等待")
  420. } else if (peel_output_status[i] == 'PO_OutputtingBean') {
  421. console.log('[動作] 脫皮出料 PO' + parseInt(i+1) + ' 可出豆')
  422. $("#PO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  423. $("#PO"+parseInt(i+1)+"_status").text("PO" + parseInt(i+1) + " 可出豆")
  424. } else {
  425. console.log('PO pass')
  426. }
  427. }
  428. // ----- 發酵出料 FO1 狀態 --------------------------------------------------------------
  429. ferment_input_status = [res.Ferment_Input_1]
  430. for (let i=0; i<ferment_input_status.length; i++) {
  431. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  432. // console.log(i+1 + ' : '+ ferment_output_status[i])
  433. // 1 : F_InputtingBean
  434. // 2 : F_Waiting
  435. if (ferment_input_status[i] == 'FI_InputtingBean') {
  436. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 入豆中')
  437. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  438. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 入豆中")
  439. } else if (ferment_input_status[i] == 'FI_Waiting') {
  440. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 空桶等待')
  441. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  442. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 空桶等待")
  443. } else if (ferment_input_status[i] == 'FI_OutputtingBean') {
  444. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 可出豆')
  445. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  446. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 可出豆")
  447. } else {
  448. console.log('pass')
  449. }
  450. }
  451. // ----- 發酵桶槽 F1~F6 狀態 --------------------------------------------------------------
  452. ferment_tank_status = [res.Ferment_Tank_1, res.Ferment_Tank_2, res.Ferment_Tank_3,
  453. res.Ferment_Tank_4, res.Ferment_Tank_5, res.Ferment_Tank_6]
  454. for (let i=0; i<ferment_tank_status.length; i++) {
  455. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  456. // console.log(i+1 + ' : '+ ferment_tank_status[i])
  457. // 1 : F_InputtingBean
  458. // 2 : F_Waiting
  459. if (ferment_tank_status[i] == 'F_InputtingBean') {
  460. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆中')
  461. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  462. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆中")
  463. } else if (ferment_tank_status[i] == 'F_InputtingBean_Pause') {
  464. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆暫停')
  465. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  466. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆暫停")
  467. } else if (ferment_tank_status[i] == 'F_InputtingBean_Finish') {
  468. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆完成')
  469. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  470. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆完成")
  471. } else if (ferment_tank_status[i] == 'F_InputtingWater') {
  472. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入水中')
  473. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  474. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入水中")
  475. } else if (ferment_tank_status[i] == 'F_Waiting') {
  476. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 空桶等待')
  477. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  478. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 空桶等待")
  479. } else if (ferment_tank_status[i] == 'F_Fermenting') {
  480. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 發酵中')
  481. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  482. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發酵中")
  483. } else if (ferment_tank_status_N[i] == 'F_Cleaning') {
  484. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 清洗中')
  485. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "plum")
  486. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 清洗中")
  487. } else if (ferment_tank_status[i] == 'F_OutputtingBean') {
  488. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 可出豆')
  489. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  490. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 可出豆")
  491. } else if (ferment_tank_status[i] == 'F_Warning') {
  492. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 發生錯誤')
  493. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "crimson")
  494. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發生錯誤")
  495. $("#F"+parseInt(i+1)+"_status").css("color", "crimson")
  496. } else {
  497. console.log('pass')
  498. }
  499. }
  500. // ----- 發酵出料 FO1 狀態 --------------------------------------------------------------
  501. ferment_output_status = [res.Ferment_Output_1]
  502. for (let i=0; i<ferment_output_status.length; i++) {
  503. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  504. // console.log(i+1 + ' : '+ ferment_output_status[i])
  505. // 1 : F_InputtingBean
  506. // 2 : F_Waiting
  507. if (ferment_output_status[i] == 'FO_InputtingBean') {
  508. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 入豆中')
  509. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  510. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 入豆中")
  511. } else if (ferment_output_status[i] == 'FO_Waiting') {
  512. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 空桶等待')
  513. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  514. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 空桶等待")
  515. } else if (ferment_output_status[i] == 'FO_OutputtingBean') {
  516. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 可出豆')
  517. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  518. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 可出豆")
  519. } else {
  520. console.log('pass')
  521. }
  522. }
  523. ferment_status_process = 0;
  524. }, 'json');
  525. };
  526. };
  527. function ferment_auto_status_stop(){
  528. clearInterval(ferment_status_interval);
  529. clearInterval(loadingF);
  530. console.log("------- 狀態自動化判斷 停止 -------")
  531. };
  532. </script>
  533. </div>
  534. <!-- 發酵貨櫃 狀態表格-->
  535. <table style="border: 3px lightsteelblue solid; margin-right: auto; margin-left: auto; text-align: center; margin-top: 5px;" cellpadding="5" border="1">
  536. <tr>
  537. <td>
  538. <!-- 脫皮機出料儲豆槽 PO11 -->
  539. <div id="PO1" tabindex="0" class="PO1_position" role="button" style="text-align: center;">
  540. <span id="PO1_status" class="F_status_css">PO1 status</span>
  541. <div id="PO1_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  542. </div>
  543. </td>
  544. <td style="border: lightsteelblue 1px solid;">
  545. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  546. <tr>
  547. <td>
  548. <!-- 發酵槽入料儲豆槽 FI1 -->
  549. <div id="FI1" tabindex="0" class="FI1_position" role="button" style="text-align: center;">
  550. <span id="FI1_status" class="F_status_css">FI1 status</span>
  551. <div id="FI1_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  552. </div>
  553. </td>
  554. </tr>
  555. </table>
  556. </td>
  557. <td style="border: lightsteelblue 1px solid;">
  558. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  559. <tr>
  560. <td>
  561. <!-- 發酵槽 F1 -->
  562. <div id="F1" tabindex="0" class="F1_position" role="button">
  563. <span id="F1_status" class="F_status_css">F1 status</span>
  564. <!-- F1 狀態點點-->
  565. <div id="F1_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  566. </div>
  567. </td>
  568. <td>
  569. <!-- 發酵槽 F2 -->
  570. <div id="F2" tabindex="0" class="F2_position" role="button">
  571. <span id="F2_status" class="F_status_css">F2 status</span>
  572. <div id="F2_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  573. </div>
  574. </td>
  575. <td>
  576. <!-- 發酵槽 F3 -->
  577. <div id="F3" tabindex="0" class="F3_position" role="button">
  578. <span id="F3_status" class="F_status_css">F3 status</span>
  579. <div id="F3_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  580. </div>
  581. </td>
  582. <td>
  583. <!-- 發酵槽 F4 -->
  584. <div id="F4" tabindex="0" class="F4_position" role="button">
  585. <span id="F4_status" class="F_status_css">F4 status</span>
  586. <div id="F4_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  587. </div>
  588. </td>
  589. <td>
  590. <!-- 發酵槽 F5 -->
  591. <div id="F5" tabindex="0" class="F5_position" role="button">
  592. <span id="F5_status" class="F_status_css">F5 status</span>
  593. <div id="F5_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  594. </div>
  595. </td>
  596. <td>
  597. <!-- 發酵槽 F6 -->
  598. <div id="F6" tabindex="0" class="F6_position" role="button">
  599. <span id="F6_status" class="F_status_css">F6 status</span>
  600. <div id="F6_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  601. </div>
  602. </td>
  603. </tr>
  604. </table>
  605. </td>
  606. <td style="border: lightsteelblue 1px solid;">
  607. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  608. <tr>
  609. <td>
  610. <!-- 發酵槽出料儲豆槽 FO1 -->
  611. <div id="FO1" tabindex="0" class="FO1_position" role="button">
  612. <span id="FO1_status" class="F_status_css">FO1 status</span>
  613. <div id="FO1_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  614. </div>
  615. </td>
  616. </tr>
  617. </table>
  618. </td>
  619. <td style="border: lightsteelblue 1px solid;">
  620. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  621. <tr>
  622. <td>
  623. <!-- 發酵槽出料儲豆槽 FO1 -->
  624. <div id="DI1" tabindex="0" class="DI1_position" role="button">
  625. <span id="DI1_status" class="F_status_css">DI1 status</span>
  626. <div id="DI1_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  627. </div>
  628. </td>
  629. </tr>
  630. </table>
  631. </td>
  632. </tr>
  633. <tr>
  634. <td>脫皮機儲豆槽</td>
  635. <td style="border: lightsteelblue 1px solid;">
  636. 發酵入料儲豆槽
  637. </td>
  638. <td style="border: lightsteelblue 1px solid;">
  639. 發酵桶槽
  640. </td>
  641. <td style="border: lightsteelblue 1px solid;">
  642. 發酵出料儲豆槽
  643. </td>
  644. <td style="border: lightsteelblue 1px solid;">
  645. 乾燥入料儲豆槽
  646. </td>
  647. </tr>
  648. <tr>
  649. <td>
  650. <!-- 脫皮機出料儲豆槽 PO2 -->
  651. <div id="PO2" tabindex="0" class="PO2_position" role="button" style="text-align: center;">
  652. <span id="PO2_status" class="F_status_css">PO2 status</span>
  653. <div id="PO2_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  654. </div>
  655. </td>
  656. <td style="border: lightsteelblue 1px solid;">
  657. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  658. <tr>
  659. <td>
  660. <!-- 發酵槽入料儲豆槽 FI2 -->
  661. <div id="FI2" tabindex="0" class="FI2_position" role="button">
  662. <span id="FI2_status" class="F_status_css">FI2 status</span>
  663. <div id="FI2_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  664. </div>
  665. </td>
  666. </tr>
  667. </table>
  668. </td>
  669. <td style="border: lightsteelblue 1px solid;">
  670. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  671. <tr>
  672. <td>
  673. <!-- 發酵槽 F7 -->
  674. <div id="F7" tabindex="0" class="F7_position" role="button" style="vertical-align: bottom;">
  675. <span id="F7_status" class="F_status_css">F7 status</span>
  676. <div id="F7_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  677. </div>
  678. </td>
  679. <td>
  680. <!-- 發酵槽 F8 -->
  681. <div id="F8" tabindex="0" class="F8_position" role="button">
  682. <span id="F8_status" class="F_status_css">F8 status</span>
  683. <div id="F8_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  684. </div>
  685. </td>
  686. <td>
  687. <!-- 發酵槽 F9 -->
  688. <div id="F9" tabindex="0" class="F9_position" role="button">
  689. <span id="F9_status" class="F_status_css">F9 status</span>
  690. <div id="F9_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  691. </div>
  692. </td>
  693. <td>
  694. <!-- 發酵槽 F10 -->
  695. <div id="F10" tabindex="0" class="F10_position" role="button">
  696. <span id="F10_status" class="F_status_css">F10 status</span>
  697. <div id="F10_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  698. </div>
  699. </td>
  700. <td>
  701. <!-- 發酵槽 F11 -->
  702. <div id="F11" tabindex="0" class="F11_position" role="button">
  703. <span id="F11_status" class="F_status_css">F11 status</span>
  704. <div id="F11_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  705. </div>
  706. </td>
  707. <td>
  708. <!-- 發酵槽 F12 -->
  709. <div id="F12" tabindex="0" class="F12_position" role="button">
  710. <span id="F12_status" class="F_status_css">F12 status</span>
  711. <div id="F12_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  712. </div>
  713. </td>
  714. </tr>
  715. </table>
  716. </td>
  717. <td style="border: lightsteelblue 1px solid;">
  718. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  719. <tr>
  720. <td>
  721. <!-- 發酵槽出料儲豆槽 FO2 -->
  722. <div id="FO2" tabindex="0" class="FO2_position" role="button">
  723. <span id="FO2_status" class="F_status_css">FO2 status</span>
  724. <div id="FO2_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  725. </div>
  726. </td>
  727. </tr>
  728. </table>
  729. </td>
  730. <td style="border: lightsteelblue 1px solid;">
  731. <table style="border: 0px plum solid; margin-right: auto; margin-left: auto; text-align: center;" cellpadding="5">
  732. <tr>
  733. <td>
  734. <!-- 乾燥入料儲豆槽 DO2 -->
  735. <div id="DI2" tabindex="0" class="DI2_position" role="button">
  736. <span id="DI2_status" class="F_status_css">DI2 status</span>
  737. <div id="DI2_status_dot" style="width: 110px; height: 20px; background-color: black;"></div>
  738. </div>
  739. </td>
  740. </tr>
  741. </table>
  742. </td>
  743. </tr>
  744. </table>
  745. <!-- 發酵貨櫃 致動器狀態 感測器數值 -->
  746. <div style="text-align: center;">
  747. <table style="border: 3px lightsteelblue solid; margin-right: auto; margin-left: auto; text-align: center; margin-top: 5px;" cellpadding="5" border="1">
  748. <tr>
  749. <td>
  750. 入料<br>Vacuum
  751. </td>
  752. <td>
  753. 桶槽<br>
  754. Vacuum
  755. </td>
  756. <td>
  757. 入料<br>三通閥
  758. </td>
  759. <td>
  760. 蝴蝶閥
  761. </td>
  762. <td>
  763. 逆洗 pump<br>電磁閥
  764. </td>
  765. <td>
  766. 消毒<br>電磁閥
  767. </td>
  768. <td>
  769. 夾層入水<br>電磁閥
  770. </td>
  771. <td>
  772. 桶內入水<br>電磁閥
  773. </td>
  774. <td>
  775. 桶內排水<br>電磁閥
  776. </td>
  777. <td>
  778. 水質<br>pump
  779. </td>
  780. <td>
  781. 夾層浮選<br>三通閥
  782. </td>
  783. <td>
  784. 馬達
  785. </td>
  786. <td>
  787. 加熱器<br>1
  788. </td>
  789. <td>
  790. 加熱器<br>2
  791. </td>
  792. <td>
  793. 溫控開關
  794. </td>
  795. <td>
  796. 設定溫度
  797. </td>
  798. <td>
  799. 出料<br>Vacuum
  800. </td>
  801. </tr>
  802. <tr>
  803. <td>
  804. <span id="actuator_00">x</span>
  805. </td>
  806. <td>
  807. <span id="actuator_1">x</span>
  808. </td>
  809. <td>
  810. <span id="actuator_2">x</span>
  811. </td>
  812. <td>
  813. <span id="actuator_3">x</span>
  814. </td>
  815. <td>
  816. <span id="actuator_4">x</span>
  817. </td>
  818. <td>
  819. <span id="actuator_5">x</span>
  820. </td>
  821. <td>
  822. <span id="actuator_6">x</span>
  823. </td>
  824. <td>
  825. <span id="actuator_7">x</span>
  826. </td>
  827. <td>
  828. <span id="actuator_8">x</span>
  829. </td>
  830. <td>
  831. <span id="actuator_9">x</span>
  832. </td>
  833. <td>
  834. <span id="actuator_10">x</span>
  835. </td>
  836. <td>
  837. <span id="actuator_11">x</span>
  838. </td>
  839. <td>
  840. <span id="actuator_12">x</span>
  841. </td>
  842. <td>
  843. <span id="actuator_13">x</span>
  844. </td>
  845. <td>
  846. <span id="actuator_14">x</span>
  847. </td>
  848. <td>
  849. <span id="actuator_15">x</span>
  850. </td>
  851. <td>
  852. <span id="actuator_99">x</span>
  853. </td>
  854. </tr>
  855. </table>
  856. <table style="border: 3px lightsteelblue solid; margin-right: auto; margin-left: auto; text-align: center; margin-top: 5px;" cellpadding="5" border="1">
  857. <tr>
  858. <td>
  859. 入料<br>高度
  860. </td>
  861. <td>
  862. 高度
  863. </td>
  864. <td>
  865. 溫度
  866. </td>
  867. <td>
  868. 濕度
  869. </td>
  870. <td>
  871. 二氧化碳
  872. </td>
  873. <td>
  874. 大氣壓力
  875. </td>
  876. <td>
  877. pH
  878. </td>
  879. <td>
  880. ORP
  881. </td>
  882. <td>
  883. DO
  884. </td>
  885. <td>
  886. EC
  887. </td>
  888. <td>
  889. 水位計
  890. </td>
  891. <td>
  892. 出料<br>高度
  893. </td>
  894. </tr>
  895. <tr>
  896. <td>
  897. <span id="sensor_00">{{UltraSonic_input}}</span>
  898. </td>
  899. <td>
  900. <span id="sensor_1">{{UltraSonic_tank}}</span>
  901. </td>
  902. <td>
  903. <span id="sensor_2">{{SHT11_Temp}}</span>
  904. </td>
  905. <td>
  906. <span id="sensor_3">{{SHT11_Humidity}}</span>
  907. </td>
  908. <td>
  909. <span id="sensor_4">{{CO2}}</span>
  910. </td>
  911. <td>
  912. <span id="sensor_5">{{PA}}</span>
  913. </td>
  914. <td>
  915. <span id="sensor_6">{{PH}}</span>
  916. </td>
  917. <td>
  918. <span id="sensor_7">{{ORP}}</span>
  919. </td>
  920. <td>
  921. <span id="sensor_8">{{DO}}</span>
  922. </td>
  923. <td>
  924. <span id="sensor_9">{{EC}}</span>
  925. </td>
  926. <td>
  927. <span id="sensor_10">{{WaterLevel}}</span>
  928. </td>
  929. <td>
  930. <span id="sensor_99">{{UltraSonic_output}}</span>
  931. </td>
  932. </tr>
  933. </table>
  934. </div>
  935. <!-- 發酵貨櫃 參數設定-->
  936. <table style="border: 3px lightsteelblue solid; margin-right: auto; margin-left: auto; text-align: center; margin-top: 5px; line-height: 28px;" cellpadding="5" border="1">
  937. <tr>
  938. <td>
  939. 發酵自動化<br>
  940. 排程
  941. </td>
  942. <td>
  943. 入料儲豆槽<br>
  944. 參數設定
  945. </td>
  946. <td>
  947. 桶槽<br>
  948. 參數設定
  949. </td>
  950. <td>
  951. 出料儲豆槽<br>
  952. 參數設定
  953. </td>
  954. </tr>
  955. <tr>
  956. <td style="padding: 10px; text-align: left; vertical-align: text-top;">
  957. <label><input type="checkbox" id="cb_fermenting" checked>發酵</label><br>
  958. <label><input type="checkbox" id="cb_cleaning">清洗:發酵
  959. <input name="Ferment_auto_cleaning_Ftimes" class="input-text" type="text">次執行
  960. </label><br>
  961. <label><input type="checkbox" id="cb_calibratingEC">校正 EC:發酵
  962. <input name="Ferment_auto_calibratingEC_Ftimes" class="input-text" type="text">次執行
  963. </label><br>
  964. <label><input type="checkbox" id="cb_calibratingSTIR">校正攪拌棒:發酵
  965. <input name="Ferment_auto_calibratingSTIR_Ftimes" class="input-text" type="text">次執行
  966. </label>
  967. </td>
  968. <td style="padding: 10px; text-align: left; vertical-align: text-top;">
  969. 生豆高度
  970. <input name="Ferment_Input_bean_height" class="input-text" type="text" value="5">公分<br>
  971. 吸料時間
  972. <input name="Ferment_Input_vacuumON_time" class="input-text" type="text" value="5">秒<br>
  973. 放料時間
  974. <input name="Ferment_Input_vacuumOFF_time" class="input-text" type="text" value="10">秒<br>
  975. </td>
  976. <td style="padding: 10px; text-align: left; vertical-align: text-top;">
  977. 生豆高度
  978. <input name="Ferment_Tank_bean_height" class="input-text" type="text" value="5">公分<br>
  979. 吸料時間
  980. <input name="Ferment_Tank_vacuumON_time" class="input-text" type="text" value="5">秒<br>
  981. 放料時間
  982. <input name="Ferment_Tank_vacuumOFF_time" class="input-text" type="text" value="10">秒<br>
  983. 水位高度
  984. <input name="Ferment_Tank_water_height" class="input-text" type="text" value="8">公分<br>
  985. 馬達轉速
  986. <input name="Ferment_Tank_motor_rpm" class="input-text" type="text" value="15">rpm,
  987. 攪拌時間
  988. <input name="Ferment_Tank_motor_time" class="input-text" type="text" value="30">秒<br>
  989. <label><input type="checkbox" id="Ferment_cb_vacuum" class="input-checkbox">發酵時桶內抽真空?抽氣
  990. <input name="Ferment_cb_vacuum_time" class="input-text" type="text" value="30">秒</label><br>
  991. 發酵溫度
  992. <input name="Ferment_Tank_fermenting_temp" class="input-text" type="text" value="30">℃
  993. , 且持溫時間
  994. <input name="Ferment_Tank_fermenting_time" class="input-text" type="text" value="60">秒<br>
  995. 指定 pH
  996. <input name="Ferment_Tank_fermenting_pH" class="input-text" type="text" value="5">/
  997. <del>指定 DO
  998. <input name="Ferment_Tank_fermenting_DO" class="input-text" type="text" value="43">/
  999. 指定 ORP
  1000. <input name="Ferment_Tank_fermenting_ORP" class="input-text" type="text" value="-0.5">/
  1001. 指定 EC
  1002. <input name="Ferment_Tank_fermenting_EC" class="input-text" type="text" value="300"><br></del>
  1003. 廢水排放
  1004. <input name="Ferment_Tank_WaterOut_time" class="input-text" type="text" value="60">秒, 消毒開啟
  1005. <input name="Ferment_Tank_Disinfect_time" class="input-text" type="text" value="10">秒<br>
  1006. </td>
  1007. <td style="padding: 10px; text-align: left; vertical-align: text-top;">
  1008. 生豆高度
  1009. <input name="Ferment_Output_bean_height" class="input-text" type="text" value="5">公分<br>
  1010. 吸料時間
  1011. <input name="Ferment_Output_vacuumON_time" class="input-text" type="text" value="5">秒<br>
  1012. 放料時間
  1013. <input name="Ferment_Output_vacuumOFF_time" class="input-text" type="text" value="10">秒<br>
  1014. </td>
  1015. </tr>
  1016. </table>
  1017. <!-- 發酵貨櫃 測試按鈕-->
  1018. <div style="text-align: center;">
  1019. <button style="margin: 5px 10px 0px 10px;" type="submit" class="btn btn-primary" onclick="ferment_auto_testing()">
  1020. [測試] 發酵自動化_網頁控制</button>
  1021. <script>
  1022. // 入料儲豆槽 入豆狀態
  1023. var BeanIn_FI_Process = 0;
  1024. // 入豆狀態
  1025. var BeanIn_F_Process = 0;
  1026. // 入水狀態
  1027. var WaterIn_F_Process = 0;
  1028. // 發酵狀態
  1029. var Fermenting_F_Process = 0;
  1030. // 出料狀態
  1031. var WaterBeanOut_F_Process = 0;
  1032. // 出料儲豆槽 入豆狀態
  1033. var BeanIn_FO_Process = 0;
  1034. function ferment_auto_testing(){
  1035. var Ferment_Input_bean_height = parseFloat($("input[name=Ferment_Input_bean_height]").val());
  1036. var Ferment_Input_vacuumON_time = parseFloat($("input[name=Ferment_Input_vacuumON_time]").val());
  1037. var Ferment_Input_vacuumOFF_time = parseFloat($("input[name=Ferment_Input_vacuumOFF_time]").val());
  1038. var Ferment_Tank_bean_height = parseFloat($("input[name=Ferment_Tank_bean_height]").val());
  1039. var Ferment_Tank_vacuumON_time = parseFloat($("input[name=Ferment_Tank_vacuumON_time]").val());
  1040. var Ferment_Tank_vacuumOFF_time = parseFloat($("input[name=Ferment_Tank_vacuumOFF_time]").val());
  1041. var Ferment_Tank_water_height = parseFloat($("input[name=Ferment_Tank_water_height]").val());
  1042. var Ferment_Tank_fermenting_temp = parseFloat($("input[name=Ferment_Tank_fermenting_temp]").val());
  1043. var Ferment_Tank_fermenting_time = parseFloat($("input[name=Ferment_Tank_fermenting_time]").val());
  1044. var Ferment_Tank_fermenting_pH = parseFloat($("input[name=Ferment_Tank_fermenting_pH]").val());
  1045. var Ferment_Tank_fermenting_DO = parseFloat($("input[name=Ferment_Tank_fermenting_DO]").val());
  1046. var Ferment_Tank_fermenting_ORP = parseFloat($("input[name=Ferment_Tank_fermenting_ORP]").val());
  1047. var Ferment_Tank_fermenting_EC = parseFloat($("input[name=Ferment_Tank_fermenting_EC]").val());
  1048. var Ferment_Tank_motor_rpm = parseFloat($("input[name=Ferment_Tank_motor_rpm]").val());
  1049. var Ferment_Tank_motor_time = parseFloat($("input[name=Ferment_Tank_motor_time]").val());
  1050. var Ferment_Output_bean_height = parseFloat($("input[name=Ferment_Output_bean_height]").val());
  1051. var Ferment_Output_vacuumON_time = parseFloat($("input[name=Ferment_Output_vacuumON_time]").val());
  1052. var Ferment_Output_vacuumOFF_time = parseFloat($("input[name=Ferment_Output_vacuumOFF_time]").val());
  1053. var BeanIn_FI_interval = setInterval(BeanIn_FI, 5000);
  1054. function BeanIn_FI(){
  1055. if (BeanIn_FI_Process == 1) {
  1056. return; // 若還在處理就取消, 函式立即停止
  1057. }
  1058. // 取得桶內生豆高度, 若未達生豆高度則入豆
  1059. BeanIn_FI_Process = 1;
  1060. $.ajax({
  1061. async:false,
  1062. type:"GET",
  1063. url:"/ferment_input_UltraSonic_1",
  1064. dataType:'json',
  1065. success:function(response){
  1066. var present_FIBean_height = parseFloat(response.UltraSonic)
  1067. console.log("目前入料儲豆槽豆高: " + present_FIBean_height)
  1068. console.log("指定入料儲豆槽豆高: " + Ferment_Input_bean_height)
  1069. if ( present_FIBean_height >= Ferment_Input_bean_height ) {
  1070. clearInterval(BeanIn_FI_interval);
  1071. console.log("入料儲豆槽已達生豆高度!")
  1072. BeanIn_F_interval = setInterval(BeanIn_F, 5000);
  1073. } else {
  1074. // aaa inputVacuum_ON()
  1075. console.log("inputVacuum_ON")
  1076. var time = new Date();
  1077. while ((new Date() - time) < Ferment_Input_vacuumON_time * 1000) { };
  1078. // aaa inputVacuum_OFF()
  1079. console.log("inputVacuum_OFF")
  1080. var time = new Date();
  1081. while ((new Date() - time) < Ferment_Input_vacuumOFF_time * 1000) { };
  1082. }
  1083. BeanIn_FI_Process = 0;
  1084. },
  1085. error:function(thrownError){
  1086. console.log("Error: " + thrownError)
  1087. BeanIn_FI_Process = 0;
  1088. }
  1089. });
  1090. };
  1091. var BeanIn_F_interval;
  1092. function BeanIn_F(){
  1093. if (BeanIn_F_Process == 1) {
  1094. return; // 若還在處理就取消, 函式立即停止
  1095. }
  1096. // 取得桶內生豆高度, 若未達生豆高度則入豆
  1097. BeanIn_F_Process = 1;
  1098. $.ajax({
  1099. async:false,
  1100. type:"GET",
  1101. url:"/ferment_UltraSonic_1",
  1102. dataType:'json',
  1103. success:function(response){
  1104. var present_FBean_height = parseFloat(response.UltraSonic)
  1105. console.log("目前桶槽豆高: " + present_FBean_height)
  1106. console.log("指定桶槽豆高: " + Ferment_Tank_bean_height)
  1107. if ( present_FBean_height >= Ferment_Tank_bean_height ) {
  1108. clearInterval(BeanIn_F_interval);
  1109. console.log("桶槽豆高已達指定高度!")
  1110. console.log("指定水高: " + Ferment_Tank_water_height)
  1111. // 若桶內水還沒滿, 開啟桶內入水
  1112. $.get('/ferment_UltraSonic_1', '', function (res) {
  1113. if ( res.UltraSonic < Ferment_Tank_water_height ){
  1114. console.log('桶內開始入水')
  1115. // aaa tankSolenoidWaterIn_ON();
  1116. console.log('tankSolenoidWaterIn_ON')
  1117. console.log('請開啟水龍頭進水')
  1118. };
  1119. }, 'json');
  1120. // 若夾層水還沒滿, 開啟夾層入水
  1121. $.get('/ferment_WaterLevel_1', '', function (res) {
  1122. if ( res.WaterLevel != 1 ){
  1123. console.log('夾層開始入水')
  1124. // aaa outerSolenoidWater_ON();
  1125. console.log('tankSolenoidWaterIn_ON')
  1126. console.log('請開啟水龍頭進水')
  1127. };
  1128. }, 'json');
  1129. // 入水每五秒判斷
  1130. WaterIn_F_interval = setInterval(WaterIn_F, 5000);
  1131. } else {
  1132. // aaa tankVacuum_ON()
  1133. console.log("tankVacuum_ON")
  1134. var time = new Date();
  1135. while ((new Date() - time) < Ferment_Input_vacuumON_time * 1000) { };
  1136. // aaa tankVacuum_OFF()
  1137. console.log("tankVacuum_OFF")
  1138. var time = new Date();
  1139. while ((new Date() - time) < Ferment_Input_vacuumOFF_time * 1000) { };
  1140. }
  1141. BeanIn_F_Process = 0;
  1142. },
  1143. error:function(thrownError){
  1144. console.log("Error: " + thrownError)
  1145. BeanIn_F_Process = 0;
  1146. }
  1147. });
  1148. };
  1149. // 入豆排程
  1150. var Fermenting_F_interval
  1151. function WaterIn_F(){
  1152. if(WaterIn_F_Process == 1){
  1153. return; // 若還在處理就取消, 函式立即停止
  1154. }
  1155. // 取得桶內目前水位、取得夾層是否達水位計
  1156. WaterIn_F_Process = 1;
  1157. $.ajax({
  1158. async:false,
  1159. type:"GET",
  1160. url:"/ferment_WaterIn_" + tank_num,
  1161. dataType:"JSON",
  1162. success:function(response){
  1163. console.log("指定入水高度: " + Ferment_Tank_water_height)
  1164. var present_tank_water_height = parseInt(response.UltraSonic)
  1165. console.log("目前水位高度: " + present_tank_water_height)
  1166. var present_WaterLevel = response.WaterLevel
  1167. console.log("目前夾層水位計高度: " + present_WaterLevel)
  1168. if (present_WaterLevel == 1 && present_tank_water_height >= Ferment_Tank_water_height) {
  1169. clearInterval(WaterIn_F_interval);
  1170. console.log("入水完成!")
  1171. console.log("指定溫度: " + Ferment_Tank_fermenting_temp)
  1172. console.log("指定時間: " + Ferment_Tank_fermenting_time)
  1173. // aaa tankMotor_ON()
  1174. console.log("tankMotor_ON")
  1175. // 取得桶內溫度, 若低於指定溫度則開啟加熱器
  1176. $.get('/ferment_SHT11_' + tank_num, '', function(res){
  1177. if (res.SHT11_Temp < Ferment_Tank_fermenting_temp){
  1178. // aaa setTemp(Ferment_Tank_fermenting_temp, Ferment_Tank_fermenting_time)
  1179. console.log("setTemp(" + Ferment_Tank_fermenting_temp + ", " + Ferment_Tank_fermenting_time + ")")
  1180. }
  1181. });
  1182. // -- 發酵 --
  1183. console.log("進入發酵流程")
  1184. Fermenting_F_interval = setInterval(Fermenting_F, 5000);
  1185. }
  1186. else if (present_WaterLevel == 1) {
  1187. // aaa outerSolenoidWater_OFF()
  1188. console.log("outerSolenoidWater_OFF")
  1189. console.log("保溫夾層入水完成, 桶內加水中")
  1190. }
  1191. else if (present_tank_water_height > Ferment_Tank_water_height) {
  1192. // aaa tankSolenoidWaterIn_OFF()
  1193. console.log("tankSolenoidWaterIn_OFF")
  1194. console.log("桶內入水完成, 保溫夾層加水中")
  1195. }
  1196. WaterIn_F_Process = 0;
  1197. },
  1198. error:function(thrownError){
  1199. console.log("Error: " + thrownError)
  1200. WaterIn_F_Process = 0;
  1201. }
  1202. });
  1203. };
  1204. // 出水排豆排程
  1205. var WaterBeanOut_F_interval
  1206. function Fermenting_F(){
  1207. if (Fermenting_F_Process == 1) {
  1208. return;
  1209. }
  1210. // 取得現在溫度
  1211. Fermenting_F_Process = 1;
  1212. $.ajax({
  1213. async:false,
  1214. type:"GET",
  1215. url:"/ferment_SHT11_" + tank_num,
  1216. dataType:"json",
  1217. success:function(response){
  1218. var present_Temp = response.SHT11_Temp
  1219. console.log("現在溫度: " + present_Temp)
  1220. if (present_Temp >= Ferment_Tank_fermenting_temp) {
  1221. clearInterval(Fermenting_F_interval)
  1222. console.log("已達指定溫度!")
  1223. console.log("發酵 " + Ferment_Tank_fermenting_time + " 秒")
  1224. var time = new Date();
  1225. while ((new Date() - time) < Ferment_Tank_fermenting_time * 1000) { };
  1226. console.log("發酵完成, 準備出豆")
  1227. // aaa tankTempEnable_OFF()
  1228. console.log("tankTempEnable_OFF")
  1229. // aaa tankMotor_OFF()
  1230. console.log("tankMotor_OFF")
  1231. // aaa tankSolenoidWaterOut_ON()
  1232. console.log("tankSolenoidWaterOut_ON")
  1233. console.log("暫停 1 分鐘排放廢水")
  1234. var time = new Date();
  1235. while ((new Date() - time) < 60 * 1000) { };
  1236. // aaa tankSolenoidWaterOut_OFF()
  1237. console.log("tankSolenoidWaterOut_OFF")
  1238. WaterBeanOut_F_interval = setInterval(WaterBeanOut_F, 5000);
  1239. }
  1240. Fermenting_F_Process = 0;
  1241. },
  1242. error:function(thrownError){
  1243. console.log("Error: " + thrownError)
  1244. Fermenting_F_Process = 0;
  1245. }
  1246. });
  1247. };
  1248. function WaterBeanOut_F(){
  1249. // -- 出料 --
  1250. // 設定空桶高度
  1251. var testing_tank_empty_height_F = 3.0;
  1252. console.log("設定空桶高度: " + testing_tank_empty_height_F)
  1253. if (WaterBeanOut_F_Process == 1){
  1254. return;
  1255. }
  1256. // 取得桶內生豆高度
  1257. WaterBeanOut_F_Process = 1;
  1258. $.ajax({
  1259. async:false,
  1260. type:"GET",
  1261. url:"/ferment_UltraSonic_" + tank_num,
  1262. dataType:"json",
  1263. success:function(response){
  1264. var present_Bean_height = parseFloat(response.UltraSonic);
  1265. console.log("目前發酵豆高/水位: " + present_Bean_height)
  1266. if (present_Bean_height > testing_tank_empty_height_F) {
  1267. // aaa outputVacuum_ON()
  1268. console.log("outputVacuum_ON")
  1269. var time = new Date();
  1270. while ((new Date() - time) < Ferment_Output_vacuumON_time * 1000) { };
  1271. // aaa outputVacuum_OFF()
  1272. console.log("outputVacuum_OFF")
  1273. var time = new Date();
  1274. while ((new Date() - time) < Ferment_Output_vacuumOFF_time * 1000) { };
  1275. } else {
  1276. clearInterval(WaterBeanOut_F_interval);
  1277. console.log("發酵完成!槽內已無生豆")
  1278. }
  1279. WaterBeanOut_F_Process = 0;
  1280. },
  1281. error:function(thrownError){
  1282. console.log("Error: " + thrownError)
  1283. WaterBeanOut_F_Process = 0;
  1284. }
  1285. })
  1286. };
  1287. }
  1288. </script>
  1289. <button style="margin: 5px 10px 0px 10px;" type="submit" class="btn btn-primary" onclick="ferment_auto()">
  1290. [測試] MQTT + 每 60 秒更新貨櫃狀態</button>
  1291. <script>
  1292. function ferment_auto(){
  1293. var Ferment_Input_bean_height = $("input[name=Ferment_Input_bean_height]").val();
  1294. var Ferment_Input_vacuumON_time = $("input[name=Ferment_Input_vacuumON_time]").val();
  1295. var Ferment_Input_vacuumOFF_time = $("input[name=Ferment_Input_vacuumOFF_time]").val();
  1296. var Ferment_Tank_bean_height = $("input[name=Ferment_Tank_bean_height]").val();
  1297. var Ferment_Tank_vacuumON_time = $("input[name=Ferment_Tank_vacuumON_time]").val();
  1298. var Ferment_Tank_vacuumOFF_time = $("input[name=Ferment_Tank_vacuumOFF_time]").val();
  1299. var Ferment_Tank_water_height = $("input[name=Ferment_Tank_water_height]").val();
  1300. var Ferment_Tank_fermenting_temp = $("input[name=Ferment_Tank_fermenting_temp]").val();
  1301. var Ferment_Tank_fermenting_time = $("input[name=Ferment_Tank_fermenting_time]").val();
  1302. var Ferment_Tank_fermenting_pH = $("input[name=Ferment_Tank_fermenting_pH]").val();
  1303. var Ferment_Tank_fermenting_DO = $("input[name=Ferment_Tank_fermenting_DO]").val();
  1304. var Ferment_Tank_fermenting_ORP = $("input[name=Ferment_Tank_fermenting_ORP]").val();
  1305. var Ferment_Tank_fermenting_EC = $("input[name=Ferment_Tank_fermenting_EC]").val();
  1306. var Ferment_Tank_motor_rpm = $("input[name=Ferment_Tank_motor_rpm]").val();
  1307. var Ferment_Tank_motor_time = $("input[name=Ferment_Tank_motor_time]").val();
  1308. var Ferment_Tank_Disinfect_time = $("input[name=Ferment_Tank_Disinfect_time]").val();
  1309. var Ferment_Output_bean_height = $("input[name=Ferment_Output_bean_height]").val();
  1310. var Ferment_Output_vacuumON_time = $("input[name=Ferment_Output_vacuumON_time]").val();
  1311. var Ferment_Output_vacuumOFF_time = $("input[name=Ferment_Output_vacuumOFF_time]").val();
  1312. var FermentAuto_fermenting = $('#cb_fermenting').prop('checked') // true false
  1313. var FermentAuto_cleaning = $('#cb_cleaning').prop('checked')
  1314. var FermentAuto_calibratingEC = $('#cb_calibratingEC').prop('checked')
  1315. var FermentAuto_calibratingSTIR = $('#cb_calibratingSTIR').prop('checked')
  1316. var Ferment_auto_cleaning_Ftimes = $("input[name=Ferment_auto_cleaning_Ftimes]").val();
  1317. var Ferment_auto_calibratingEC_Ftimes = $("input[name=Ferment_auto_calibratingEC_Ftimes]").val();
  1318. var Ferment_auto_calibratingSTIR_Ftimes = $("input[name=Ferment_auto_calibratingSTIR_Ftimes]").val();
  1319. if ( (!(/(^[1-9]\d*$)/.test(Ferment_auto_cleaning_Ftimes)) && FermentAuto_cleaning) ||
  1320. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingEC_Ftimes)) && FermentAuto_calibratingEC) ||
  1321. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingSTIR_Ftimes)) && FermentAuto_calibratingSTIR) ) {
  1322. alert('[發酵貨櫃] 次數只接受正整數, 請重新輸入')
  1323. return
  1324. } else {
  1325. // 若發酵排程被勾選則為 1, 否則為 0 (預設發酵排程會不斷執行)
  1326. if (FermentAuto_fermenting == true) { FermentAuto_fermenting = 1
  1327. } else { FermentAuto_fermenting = 0 }
  1328. // 若清洗排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1329. if (FermentAuto_cleaning == true) { FermentAuto_cleaning = Ferment_auto_cleaning_Ftimes
  1330. } else { FermentAuto_cleaning = 0 }
  1331. // 若校正 EC 排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1332. if (FermentAuto_calibratingEC == true) { FermentAuto_calibratingEC = Ferment_auto_calibratingEC_Ftimes
  1333. } else { FermentAuto_calibratingEC = 0 }
  1334. // 若校正攪拌棒排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1335. if (FermentAuto_calibratingSTIR == true) { FermentAuto_calibratingSTIR = Ferment_auto_calibratingSTIR_Ftimes
  1336. } else { FermentAuto_calibratingSTIR = 0 }
  1337. }
  1338. var data = { 'command': 'Ferment_auto_parameter',
  1339. 'FermentAuto_fermenting': FermentAuto_fermenting,
  1340. 'FermentAuto_cleaning': FermentAuto_cleaning,
  1341. 'FermentAuto_calibratingEC': FermentAuto_calibratingEC,
  1342. 'FermentAuto_calibratingSTIR': FermentAuto_calibratingSTIR,
  1343. 'Ferment_Input_bean_height':Ferment_Input_bean_height,
  1344. 'Ferment_Input_vacuumON_time': Ferment_Input_vacuumON_time,
  1345. 'Ferment_Input_vacuumOFF_time': Ferment_Input_vacuumOFF_time,
  1346. 'Ferment_Tank_bean_height': Ferment_Tank_bean_height,
  1347. 'Ferment_Tank_vacuumON_time': Ferment_Tank_vacuumON_time,
  1348. 'Ferment_Tank_vacuumOFF_time': Ferment_Tank_vacuumOFF_time,
  1349. 'Ferment_Tank_water_height': Ferment_Tank_water_height,
  1350. 'Ferment_Tank_fermenting_temp': Ferment_Tank_fermenting_temp,
  1351. 'Ferment_Tank_fermenting_time': Ferment_Tank_fermenting_time,
  1352. 'Ferment_Tank_fermenting_pH': Ferment_Tank_fermenting_pH,
  1353. 'Ferment_Tank_fermenting_DO': Ferment_Tank_fermenting_DO,
  1354. 'Ferment_Tank_fermenting_ORP': Ferment_Tank_fermenting_ORP,
  1355. 'Ferment_Tank_fermenting_EC': Ferment_Tank_fermenting_EC,
  1356. 'Ferment_Tank_motor_rpm': Ferment_Tank_motor_rpm,
  1357. 'Ferment_Tank_motor_time': Ferment_Tank_motor_time,
  1358. 'Ferment_Output_bean_height': Ferment_Output_bean_height,
  1359. 'Ferment_Output_vacuumON_time': Ferment_Output_vacuumON_time,
  1360. 'Ferment_Output_vacuumOFF_time': Ferment_Output_vacuumOFF_time };
  1361. $.post('/mqtt/101', data, function (res) {
  1362. console.log('data: ', data)
  1363. console.log('res: ', res)
  1364. }, 'text')
  1365. var ferment_interval = setInterval(testing_F_auto, 30*1000)
  1366. }
  1367. </script>
  1368. <button style="margin: 5px 10px 0px 10px;" type="submit" class="btn btn-primary" onclick="testing_F_auto()">
  1369. [測試] 發酵貨櫃狀態</button>
  1370. <script>
  1371. function test(){
  1372. var FermentAuto_fermenting = $('#cb_fermenting').prop('checked') // true false
  1373. var FermentAuto_cleaning = $('#cb_cleaning').prop('checked')
  1374. var FermentAuto_calibratingEC = $('#cb_calibratingEC').prop('checked')
  1375. var FermentAuto_calibratingSTIR = $('#cb_calibratingSTIR').prop('checked')
  1376. /*
  1377. if ($('#cb_fermenting').prop('checked')) {
  1378. console.log("發酵自動化:加入發酵排程");
  1379. }
  1380. if ($('#cb_cleaning').prop('checked')) {
  1381. console.log("發酵自動化:加入清洗排程");
  1382. }
  1383. if ($('#cb_calibratingEC').prop('checked')) {
  1384. console.log("發酵自動化:加入校正 EC 排程");
  1385. }
  1386. if ($('#cb_calibratingSTIR').prop('checked')) {
  1387. console.log("發酵自動化:加入校正攪拌棒排程");
  1388. }
  1389. */
  1390. Ferment_auto_cleaning_Ftimes = $("input[name=Ferment_auto_cleaning_Ftimes]").val();
  1391. console.log('Ferment_auto_cleaning_Ftimes: ' + Ferment_auto_cleaning_Ftimes)
  1392. if ( !(/(^[1-9]\d*$)/.test(Ferment_auto_cleaning_Ftimes)) ){
  1393. console.log('不可為小數')
  1394. }
  1395. console.log(FermentAuto_fermenting)
  1396. console.log(FermentAuto_cleaning)
  1397. console.log(FermentAuto_calibratingEC)
  1398. console.log(FermentAuto_calibratingSTIR)
  1399. };
  1400. function testing_F_auto(){
  1401. var FermentAuto_fermenting = $('#cb_fermenting').prop('checked') // true false
  1402. var FermentAuto_cleaning = $('#cb_cleaning').prop('checked')
  1403. var FermentAuto_calibratingEC = $('#cb_calibratingEC').prop('checked')
  1404. var FermentAuto_calibratingSTIR = $('#cb_calibratingSTIR').prop('checked')
  1405. var Ferment_auto_cleaning_Ftimes = $("input[name=Ferment_auto_cleaning_Ftimes]").val();
  1406. var Ferment_auto_calibratingEC_Ftimes = $("input[name=Ferment_auto_calibratingEC_Ftimes]").val();
  1407. var Ferment_auto_calibratingSTIR_Ftimes = $("input[name=Ferment_auto_calibratingSTIR_Ftimes]").val();
  1408. if ((!FermentAuto_fermenting) && (!FermentAuto_cleaning) && !FermentAuto_calibratingEC && !FermentAuto_calibratingSTIR) {
  1409. alert('[發酵貨櫃] 未勾選任何排程, 自動化結束')
  1410. return
  1411. } else if ( (!(/(^[1-9]\d*$)/.test(Ferment_auto_cleaning_Ftimes)) && FermentAuto_cleaning) ||
  1412. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingEC_Ftimes)) && FermentAuto_calibratingEC) ||
  1413. (!(/(^[1-9]\d*$)/.test(Ferment_auto_calibratingSTIR_Ftimes)) && FermentAuto_calibratingSTIR) ) {
  1414. alert('[發酵貨櫃] 次數只接受正整數, 請重新輸入')
  1415. return
  1416. } else {
  1417. // 若發酵排程被勾選則為 1, 否則為 0 (預設發酵排程會不斷執行)
  1418. if (FermentAuto_fermenting == true) { FermentAuto_fermenting = 1
  1419. } else { FermentAuto_fermenting = 0 }
  1420. // 若清洗排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1421. if (FermentAuto_cleaning == true) { FermentAuto_cleaning = Ferment_auto_cleaning_Ftimes
  1422. } else { FermentAuto_cleaning = 0 }
  1423. // 若校正 EC 排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1424. if (FermentAuto_calibratingEC == true) { FermentAuto_calibratingEC = Ferment_auto_calibratingEC_Ftimes
  1425. } else { FermentAuto_calibratingEC = 0 }
  1426. // 若校正攪拌棒排程被勾選則取得輸入框次數, 否則為 0 (勾選預設為 1)
  1427. if (FermentAuto_calibratingSTIR == true) { FermentAuto_calibratingSTIR = Ferment_auto_calibratingSTIR_Ftimes
  1428. } else { FermentAuto_calibratingSTIR = 0 }
  1429. }
  1430. var Ferment_Input_vacuumON_time = $("input[name=Ferment_Input_vacuumON_time]").val();
  1431. var Ferment_Input_vacuumOFF_time = $("input[name=Ferment_Input_vacuumOFF_time]").val();
  1432. var Ferment_Tank_bean_height = $("input[name=Ferment_Tank_bean_height]").val();
  1433. var Ferment_Tank_vacuumON_time = $("input[name=Ferment_Tank_vacuumON_time]").val();
  1434. var Ferment_Tank_vacuumOFF_time = $("input[name=Ferment_Tank_vacuumOFF_time]").val();
  1435. var Ferment_Tank_water_height = $("input[name=Ferment_Tank_water_height]").val();
  1436. var Ferment_Tank_fermenting_temp = $("input[name=Ferment_Tank_fermenting_temp]").val();
  1437. var Ferment_Tank_fermenting_time = $("input[name=Ferment_Tank_fermenting_time]").val();
  1438. var Ferment_Tank_fermenting_pH = $("input[name=Ferment_Tank_fermenting_pH]").val();
  1439. var Ferment_Tank_fermenting_DO = $("input[name=Ferment_Tank_fermenting_DO]").val();
  1440. var Ferment_Tank_fermenting_ORP = $("input[name=Ferment_Tank_fermenting_ORP]").val();
  1441. var Ferment_Tank_fermenting_EC = $("input[name=Ferment_Tank_fermenting_EC]").val();
  1442. var Ferment_Tank_motor_rpm = $("input[name=Ferment_Tank_motor_rpm]").val();
  1443. var Ferment_Tank_Disinfect_time = $("input[name=Ferment_Tank_Disinfect_time]").val();
  1444. var Ferment_Output_vacuumON_time = $("input[name=Ferment_Output_vacuumON_time]").val();
  1445. var Ferment_Output_vacuumOFF_time = $("input[name=Ferment_Output_vacuumOFF_time]").val();
  1446. var data = { 'command': 'Ferment_auto_parameter',
  1447. 'FermentAuto_fermenting': FermentAuto_fermenting,
  1448. 'FermentAuto_cleaning': FermentAuto_cleaning,
  1449. 'FermentAuto_calibratingEC': FermentAuto_calibratingEC,
  1450. 'FermentAuto_calibratingSTIR': FermentAuto_calibratingSTIR,
  1451. 'Ferment_Input_vacuumON_time': Ferment_Input_vacuumON_time,
  1452. 'Ferment_Input_vacuumOFF_time': Ferment_Input_vacuumOFF_time,
  1453. 'Ferment_Tank_bean_height': Ferment_Tank_bean_height,
  1454. 'Ferment_Tank_vacuumON_time': Ferment_Tank_vacuumON_time,
  1455. 'Ferment_Tank_vacuumOFF_time': Ferment_Tank_vacuumOFF_time,
  1456. 'Ferment_Tank_water_height': Ferment_Tank_water_height,
  1457. 'Ferment_Tank_fermenting_temp': Ferment_Tank_fermenting_temp,
  1458. 'Ferment_Tank_fermenting_time': Ferment_Tank_fermenting_time,
  1459. 'Ferment_Tank_fermenting_pH': Ferment_Tank_fermenting_pH,
  1460. 'Ferment_Tank_fermenting_DO': Ferment_Tank_fermenting_DO,
  1461. 'Ferment_Tank_fermenting_ORP': Ferment_Tank_fermenting_ORP,
  1462. 'Ferment_Tank_fermenting_EC': Ferment_Tank_fermenting_EC,
  1463. 'Ferment_Tank_motor_rpm': Ferment_Tank_motor_rpm,
  1464. 'Ferment_Output_vacuumON_time': Ferment_Output_vacuumON_time,
  1465. 'Ferment_Output_vacuumOFF_time': Ferment_Output_vacuumOFF_time };
  1466. $.get('/ferment_auto_status', data, function (res) {
  1467. console.log('FI1: ' + res.Ferment_Input_1)
  1468. console.log('F1: ' + res.Ferment_Tank_1)
  1469. console.log('F2: ' + res.Ferment_Tank_2)
  1470. console.log('F3: ' + res.Ferment_Tank_3)
  1471. console.log('F4: ' + res.Ferment_Tank_4)
  1472. console.log('F5: ' + res.Ferment_Tank_5)
  1473. console.log('F6: ' + res.Ferment_Tank_6)
  1474. console.log('FO1: ' + res.Ferment_Output_1)
  1475. // ----- 發酵出料 FO1 狀態 --------------------------------------------------------------
  1476. ferment_input_status = [res.Ferment_Input_1]
  1477. for (let i=0; i<ferment_input_status.length; i++) {
  1478. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  1479. // console.log(i+1 + ' : '+ ferment_output_status[i])
  1480. // 1 : F_InputtingBean
  1481. // 2 : F_Waiting
  1482. if (ferment_input_status[i] == 'FI_InputtingBean') {
  1483. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 入豆中')
  1484. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1485. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 入豆中")
  1486. } else if (ferment_input_status[i] == 'FI_Waiting') {
  1487. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 空桶等待')
  1488. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  1489. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 空桶等待")
  1490. } else if (ferment_input_status[i] == 'FI_OutputtingBean') {
  1491. console.log('[動作] 發酵入料 FI' + parseInt(i+1) + ' 可出豆')
  1492. $("#FI"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1493. $("#FI"+parseInt(i+1)+"_status").text("FI" + parseInt(i+1) + " 可出豆")
  1494. } else {
  1495. console.log('pass')
  1496. }
  1497. }
  1498. // ----- 發酵桶槽 F1~F6 狀態 --------------------------------------------------------------
  1499. ferment_tank_status = [res.Ferment_Tank_1, res.Ferment_Tank_2, res.Ferment_Tank_3,
  1500. res.Ferment_Tank_4, res.Ferment_Tank_5, res.Ferment_Tank_6]
  1501. for (let i=0; i<ferment_tank_status.length; i++) {
  1502. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  1503. // console.log(i+1 + ' : '+ ferment_tank_status[i])
  1504. // 1 : F_InputtingBean
  1505. // 2 : F_Waiting
  1506. if (ferment_tank_status[i] == 'F_InputtingBean') {
  1507. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆中')
  1508. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1509. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆中")
  1510. } else if (ferment_tank_status[i] == 'F_InputtingBean_Pause') {
  1511. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆暫停')
  1512. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1513. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆暫停")
  1514. } else if (ferment_tank_status[i] == 'F_InputtingBean_Finish') {
  1515. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入豆完成')
  1516. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1517. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入豆完成")
  1518. } else if (ferment_tank_status[i] == 'F_InputtingWater') {
  1519. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 入水中')
  1520. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1521. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 入水中")
  1522. } else if (ferment_tank_status[i] == 'F_Waiting') {
  1523. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 空桶等待')
  1524. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  1525. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 空桶等待")
  1526. } else if (ferment_tank_status[i] == 'F_Fermenting') {
  1527. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 發酵中')
  1528. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1529. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發酵中")
  1530. } else if (ferment_tank_status_N[i] == 'F_Cleaning') {
  1531. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 清洗中')
  1532. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "plum")
  1533. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 清洗中")
  1534. } else if (ferment_tank_status[i] == 'F_OutputtingBean') {
  1535. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 可出豆')
  1536. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1537. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 可出豆")
  1538. } else if (ferment_tank_status[i] == 'F_Warning') {
  1539. console.log('[動作] 發酵桶槽 F' + parseInt(i+1) + ' 發生錯誤')
  1540. $("#F"+parseInt(i+1)+"_status_dot").css("background-color", "crimson")
  1541. $("#F"+parseInt(i+1)+"_status").text("F" + parseInt(i+1) + " 發生錯誤")
  1542. $("#F"+parseInt(i+1)+"_status").css("color", "crimson")
  1543. } else {
  1544. console.log('pass')
  1545. }
  1546. }
  1547. // ----- 發酵出料 FO1 狀態 --------------------------------------------------------------
  1548. ferment_output_status = [res.Ferment_Output_1]
  1549. for (let i=0; i<ferment_output_status.length; i++) {
  1550. // 顯示對應發酵桶槽號碼 F1~F6 和目前狀態
  1551. // console.log(i+1 + ' : '+ ferment_output_status[i])
  1552. // 1 : F_InputtingBean
  1553. // 2 : F_Waiting
  1554. if (ferment_output_status[i] == 'FO_InputtingBean') {
  1555. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 入豆中')
  1556. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1557. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 入豆中")
  1558. } else if (ferment_output_status[i] == 'FO_Waiting') {
  1559. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 空桶等待')
  1560. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "lightgray")
  1561. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 空桶等待")
  1562. } else if (ferment_output_status[i] == 'FO_OutputtingBean') {
  1563. console.log('[動作] 發酵出料 FO' + parseInt(i+1) + ' 可出豆')
  1564. $("#FO"+parseInt(i+1)+"_status_dot").css("background-color", "MediumSeaGreen")
  1565. $("#FO"+parseInt(i+1)+"_status").text("FO" + parseInt(i+1) + " 可出豆")
  1566. } else {
  1567. console.log('pass')
  1568. }
  1569. }
  1570. /*
  1571. console.log(res.Ferment_Input_2)
  1572. console.log(res.Ferment_Tank_7)
  1573. console.log(res.Ferment_Tank_8)
  1574. console.log(res.Ferment_Tank_9)
  1575. console.log(res.Ferment_Tank_10)
  1576. console.log(res.Ferment_Tank_11)
  1577. console.log(res.Ferment_Tank_12)
  1578. console.log(res.Ferment_Output_1)
  1579. console.log(res.Ferment_Output_2)
  1580. */
  1581. }, 'json');
  1582. // console.log("-- 自動化程式 end --")
  1583. }
  1584. </script>
  1585. </div>
  1586. <br>
  1587. <br>
  1588. </div>
  1589. </div>
  1590. </body>
  1591. </html>