by @Alberthe Nordbjerg Fork
{"functions":[{"rawId":"id_6a051c0a_cf98_4ec2_9e8a_da71dfd17005","tpe":"Void","name":"connect_plc","statements":[{"@type":"Begin","id":"id_a96397c3_5b00_4f8e_92f7_e9d802992569"},{"@type":"Assign","name":"plc_ID","id":"id_763efb1a_57e9_497f_aa73_e5ce1495ce42","value":"text_box_PLC.get()"},{"newline":true,"@type":"Output","id":"id_8529bfb6_e66e_43e2_93f0_681d95e74fd1","value":"plc_ID"},{"@type":"Assign","name":"Client","id":"id_1758a434_4abd_468f_b892_0e8005b4576c","value":"ModbusClient(plc_ID,timeout=5)"},{"@type":"Call","id":"id_9cf0cc57_d298_4dc6_94a9_c8cc93ff63dd","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_e3701195_7847_4947_8ecc_3d030f840401","value":"start_stop_data_collection_write()"},{"@type":"Call","id":"id_d494eaa5_54f2_4ede_b0fc_ca4887c0410b","value":"start_stop_data_collection_read()"},{"@type":"Call","id":"id_2140d7f8_ab32_4e6d_8037_dc29912ffc5c","value":"get_PID()"},{"@type":"Return","id":"id_7ccfdda3_6f48_42c5_a4de_aa08bbfa6213","maybeValue":null}],"parameters":[]},{"rawId":"id_b2f3c687_1a10_45fa_87d3_52b2c66a08fe","tpe":"Void","name":"get_PID","statements":[{"@type":"Begin","id":"id_610aa024_0d23_4a5f_9afe_c191e9f590ae"},{"@type":"Assign","name":"response","id":"id_56dd7299_926a_43ec_ac1d_bb7cdaaf5390","value":"client.read_holding_registers(7, 3)"},{"@type":"Assign","name":"setp","id":"id_8833ca10_f6ca_4e01_9e96_fbfa781b7888","value":"client.read_holding_registers(2, 1)"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_f5d699b7_08da_4ec2_8158_74e8c8b286ec","value":"\"Kunne ikke læse PID værdierne fra PLC'en.\""}],"id":"id_eabac9cf_35cf_40c3_8a0c_bf48b3f3b0d1"},"trueBlock":{"statements":[{"@type":"Assign","name":"P_v","id":"id_0d3fdabe_d068_4b39_a3bf_60208b8b0de4","value":"response[0]"},{"@type":"Assign","name":"I_v","id":"id_cb2355aa_b7c0_4046_a7fd_b51dc89d2b22","value":"response[1]"},{"@type":"Assign","name":"D_v","id":"id_3ac688bc_5e3e_47a1_9410_84f4b2d9b0bc","value":"response[2]"},{"@type":"Assign","name":"sp","id":"id_7d72035b_933f_4603_8ea3_6edd46b94889","value":"setp[0]"},{"@type":"Assign","name":"labelP","id":"id_e7a6f68a_bbba_43d9_ae34_09ea66816453","value":"ttk.Label(tab1, text=f'{P_v} ')"},{"@type":"Call","id":"id_38e4bce7_24bf_4ae8_8550_077876298154","value":"labelP.place(x=610, y=195)"},{"@type":"Assign","name":"labelI","id":"id_33bbde93_2401_4c60_a923_62739d514546","value":"ttk.Label(tab1, text=f'{I_v} ')"},{"@type":"Call","id":"id_0b1a040b_53fb_42a0_b16a_270c3eb7c4fd","value":"labelI.place(x=610, y=232)"},{"@type":"Assign","name":"labelD","id":"id_95005ab7_165b_42c8_8a10_8ce3e10ac43e","value":"ttk.Label(tab1, text=f'{D_v} ')"},{"@type":"Call","id":"id_ef3b918f_9b46_425c_bd3c_054558883e37","value":"labelD.place(x=610, y=267)"},{"@type":"Assign","name":"labelSV","id":"id_9cc6e5ab_02d9_42cb_a0b8_6f514340e279","value":"ttk.Label(tab1, text=f'{sp} °C')"},{"@type":"Call","id":"id_3c3e0c19_51e1_40f0_8cea_47361441c38b","value":"labelSV.place(x=630, y=162)"}],"id":"id_51be40c2_b130_4b85_bd2e_4bf263f5c834"},"condition":"response","@type":"If","id":"id_4f4b5f4d_00ec_4e06_b8bc_bf80ee157f90"},{"@type":"Return","id":"id_98baec7e_5fbe_4daa_817a_b73e71bcdd53","maybeValue":null}],"parameters":[]},{"rawId":"id_b8338114_e96e_4e6e_89cc_68ca94fdb52b","tpe":"Void","name":"get_data","statements":[{"@type":"Begin","id":"id_19d2ec43_bf1e_4ea6_8bb0_dfee857141ec"},{"@type":"Assign","name":"running","id":"id_0197bc93_b9be_4a84_bf55_193a0540d0c8","value":"True"},{"@type":"Assign","name":"last_time","id":"id_12459da2_ea4c_4f84_b61f_9511edf0057a","value":"time.time()"},{"condition":"running","@type":"While","id":"id_d3ddcb3b_78f5_45ec_8831_e8489e7dd9a3","body":{"statements":[{"@type":"Call","id":"id_05c6563c_b401_4935_921e_e877c68f1826","value":"start_stop_data_collection_read()"},{"@type":"Assign","name":"response","id":"id_a9d0221c_c3ff_4110_a971_1054e878cc86","value":"client.read_holding_registers(0, 2)"},{"falseBlock":{"statements":[],"id":"id_ab33de2a_4398_4215_9283_18be3a0384a0"},"trueBlock":{"statements":[{"@type":"Assign","name":"data_temp","id":"id_c22a71a5_6434_4fd9_83c5_917d5225774e","value":"response[0]"},{"@type":"Assign","name":"data_volt_pumpe","id":"id_1841f097_62e4_4178_b4df_d16277433487","value":"response[1]"},{"@type":"Assign","name":"current_time","id":"id_08cc3b0e_6348_4b0d_a1e4_7800d9a4b609","value":"time.time()"},{"falseBlock":{"statements":[],"id":"id_36d24906_5f5f_493d_b2ff_9e047a193a5d"},"trueBlock":{"statements":[{"@type":"Assign","name":"last_time","id":"id_8d0a3573_b160_4ae6_b1f9_8a308a3b2720","value":"current_time"},{"@type":"Call","id":"id_e69b9155_dde8_4c37_a953_7a048000ea53","value":"get_PID()"},{"falseBlock":{"statements":[],"id":"id_ef2641f4_6e66_46ff_9f23_f73118041d07"},"trueBlock":{"statements":[{"@type":"Call","id":"id_415ea3f0_aa01_42c2_815d_26bcc70bc79c","value":"data_temp_liste.append(data_temp / 10)"},{"@type":"Assign","name":"tid","id":"id_eeea83f4_cd85_4e5d_8790_5553f6b5e78d","value":"len(data_temp_liste)"},{"@type":"Call","id":"id_49b22f53_0363_42ed_b844_2b5ac2d19039","value":"x_tid.append(tid)"},{"newline":true,"@type":"Output","id":"id_f27b5f85_d298_4032_a2cd_f508c2c65c68","value":"f\"Data modtaget pumpe: {data_volt_pumpe / 102.5}\""},{"@type":"Call","id":"id_65700dbf_aeae_4637_937b_4a6a62c0dcf6","value":"data_volt_pumpe_liste.append(data_volt_pumpe / 102.5)"}],"id":"id_fd717994_e25a_421c_914f_89005357cd95"},"condition":"data_temp","@type":"If","id":"id_65962eec_c56a_44b7_a86d_407d1c0d6af5"},{"@type":"Assign","name":"labelPB","id":"id_ddb06613_b34a_4830_bc45_eb9d9fcaf477","value":"ttk.Label(tab1, text=f'{data_temp / 10} °C')"},{"@type":"Call","id":"id_b928129b_c14e_4701_9620_5e90fd0c44f5","value":"labelPB.place(x=800, y=162)"},{"@type":"Call","id":"id_7c0807ff_0223_40f1_81fc_2401eec6d70e","value":"update_setpoint()"},{"@type":"Call","id":"id_6e9f1c71_10d5_4017_9e04_9d002e24cc7c","value":"update_plot()"}],"id":"id_c4afe6a3_d624_4451_b0bb_e9fd12e8f022"},"condition":"current_time - last_time >= 1","@type":"If","id":"id_4e499e52_4096_4462_967f_7c556c850a71"}],"id":"id_8819348b_20c8_4c1a_a53e_7e44477cc32c"},"condition":"response","@type":"If","id":"id_0e5ab20b_3b26_44b3_92e8_350b31a5fdd6"}],"id":"id_3613646d_0341_43b4_abfd_876ba32ae1c8"}},{"@type":"Return","id":"id_5ecdd61b_8434_402f_bb3c_dd89c230e7da","maybeValue":null}],"parameters":[]},{"rawId":"id_c544a6d7_233f_4787_85fa_00f267361687","tpe":"Void","name":"start_stop_redlion","statements":[{"@type":"Begin","id":"id_9c59b3e3_8c5c_41d8_871d_bcbc89539b07"},{"newline":true,"@type":"Output","id":"id_b790afa4_ec6e_489b_85f7_3eeb2bb87bc0","value":"\"data_collecting\",data_collecting"},{"falseBlock":{"statements":[{"@type":"Call","id":"id_3663ca8f_b493_41a0_829c_3e266bf90c1a","value":"client.write_single_register(6,0)"},{"@type":"Call","id":"id_a8a35244_c72b_435d_a08e_0c29fb0b6fe4","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_1373016f_929d_44f6_ba96_9a5767deb58c","value":"start_stop_data_collection_write()"}],"id":"id_35b08b0f_2d1b_47b6_81fa_3eaa8765fe2e"},"trueBlock":{"statements":[{"@type":"Call","id":"id_a4ea5212_efaf_4b07_a1cc_505368aa4f5f","value":"client.write_single_register(6,1)"},{"@type":"Call","id":"id_19740045_0330_4371_b3d7_4f4ef1850dbb","value":"time.sleep(0.3)"},{"@type":"Call","id":"id_6719ee52_2580_4c01_b3f1_0452bfcb7608","value":"start_stop_data_collection_write()"}],"id":"id_954ef44d_df63_49ee_9314_3583c87517be"},"condition":"data_collecting","@type":"If","id":"id_32e403a0_a7c8_4d2d_b7e9_649a4715f569"},{"@type":"Return","id":"id_1d6067e8_934e_4d8b_9bde_aee59f0fef76","maybeValue":null}],"parameters":[]},{"rawId":"id_5aafebe6_4b4d_4ed9_9aef_7753112554c5","tpe":"Void","name":"toggle_data_collection","statements":[{"@type":"Begin","id":"id_bc343c45_48bd_42c4_80fc_05721bfdc8e6"},{"@type":"Assign","name":"data_collecting","id":"id_0823aa73_c26e_489f_a862_e7d80637086e","value":"not data_collecting"},{"falseBlock":{"statements":[{"@type":"Call","id":"id_881db709_4010_48e4_9dec_05895000c6e2","value":"start_stop_knap.config(text=\"Start\")"},{"@type":"Assign","name":"running","id":"id_e63ba429_9003_492b_bb65_56c2ff251f84","value":"False"},{"@type":"Call","id":"id_0ce73800_92e3_4426_ab9f_4c560f3998fb","value":"start_stop_redlion()"}],"id":"id_df8f3eb5_c9af_4653_8419_5b92d6b18661"},"trueBlock":{"statements":[{"@type":"Call","id":"id_34a47fc3_4f59_4c28_b4e5_9e9ef5889f7f","value":"start_stop_knap.config(text=\"Stop\")"},{"@type":"Call","id":"id_5db20010_02bd_47a1_ba6a_6de9f479520b","value":"start_stop_redlion()"},{"@type":"Call","id":"id_eb9872dd_22b8_4600_99f8_be74b4f902c1","value":"threading.Thread(target=get_data).start()"},{"@type":"Call","id":"id_e6fec379_796c_43dd_be67_66f76e3937aa","value":"data_temp_liste.clear()"},{"@type":"Call","id":"id_36a8ad5e_51cf_4e48_85d0_744f418da100","value":"data_volt_pumpe_liste.clear()"},{"@type":"Call","id":"id_a8e41283_5ad8_4bba_a3e0_3b58098fd6b7","value":"ax.clear()"},{"@type":"Call","id":"id_15aa47ce_e25e_4100_b493_a19ce3eb44a4","value":"x_tid.clear()"}],"id":"id_f5b31e3b_9a7b_498c_bc2d_0b69cbbbd50a"},"condition":"data_collecting","@type":"If","id":"id_310fbd52_3cd3_4a15_ba1a_3fa1382bbadd"},{"@type":"Return","id":"id_da3f1781_d9cd_43ed_a2aa_9feb49155671","maybeValue":null}],"parameters":[]},{"rawId":"id_9bee65f6_3510_4d41_9a88_e243d5edc487","tpe":"Void","name":"set_sp_data","statements":[{"@type":"Begin","id":"id_c06e53ce_ec4d_4f04_bddc_1f4368746b5a"},{"@type":"Assign","name":"sp_value","id":"id_12eb6761_0e6d_4057_9a3f_7a53016f9309","value":"float(text_box_SP.get())"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_41e67a0d_6b59_475d_9e22_f07dd2a04e5a","value":"\"Kunne ikke forbinde til PLC'en\""}],"id":"id_e0e301e7_0964_48eb_9881_afcfd5359085"},"trueBlock":{"statements":[{"@type":"Assign","name":"setpoint_værdi","id":"id_0e126715_3a69_423e_b5b8_fbb98559be77","value":"int(SP*10)"},{"@type":"Call","id":"id_fbc1bd78_0e8b_4d00_9481_2e93de379cc2","value":"client.write_single_register(3-1, setpoint_værdi)"},{"@type":"Call","id":"id_c6aff588_fe4d_49dd_b8e8_34b237eb7f5c","value":"start_stop_data_collection_write()"}],"id":"id_83c36615_93d5_4059_94cc_7cc8a5e238ef"},"condition":"client.open()","@type":"If","id":"id_7ebe5f34_04ac_4fe8_a20a_b67a7b0d5d78"},{"@type":"Return","id":"id_dc45a51e_1c4c_4ab1_8fa4_4f3abee9638d","maybeValue":null}],"parameters":[]},{"rawId":"id_dc96bd34_c725_46a7_a4cd_1483755da237","tpe":"Void","name":"save_data","statements":[{"@type":"Begin","id":"id_7895ce8a_2ae8_42e9_9fa6_af2431214b48"},{"@type":"Assign","name":"wb","id":"id_8adc6c8a_87c5_4690_8cc9_a9c139edec62","value":"Workbook()"},{"@type":"Assign","name":"ws","id":"id_4b02ba2e_559c_492c_92cb_7f80e6bfabbb","value":"wb.active"},{"@type":"Assign","name":"ws.title","id":"id_a7346396_fa96_452d_ae39_9f309f334df5","value":"\"Data\""},{"@type":"Call","id":"id_d33e0d5a_9df8_4623_a4ee_08ed3be0d7a6","value":"ws.append([\"Sid [sek]\",\"Data Temp\", \"Data Volt Pumpe\"])"},{"condition":"tid, temp, volt in zip(x_tid, data_temp_liste, data_volt_pumpe_liste):","@type":"While","id":"id_3720cff0_b557_4b00_b261_333facbd4234","body":{"statements":[{"newline":true,"@type":"Output","id":"id_eeb460e6_9a66_4e03_8958_00a89dca6d47","value":"f\"Data: {temp} °C, {volt} V\""},{"@type":"Call","id":"id_5d191c0a_c4fa_4517_864e_60baf25cd133","value":"ws.append([tid, temp, volt])"}],"id":"id_6adafc06_0a7b_46f2_a748_9dd00c565e67"}},{"@type":"Assign","name":"filnavnet","id":"id_fe1f5d59_6679_40aa_8197_34bc1b563282","value":"text_box_TXT.get()"},{"@type":"Assign","name":"fill","id":"id_f9b43369_0a19_4be7_b6c2_19ae5719b6c6","value":"filnavnet+\".xlsx\""},{"@type":"Call","id":"id_10ea5a15_1b7e_4b23_b705_4338d8b62971","value":"wb.save(fill)"},{"newline":true,"@type":"Output","id":"id_ddadf0f6_f4ff_4c92_93d6_1291fca542c9","value":"\"Data gemt i filen\""},{"@type":"Return","id":"id_cde1c3e5_ee0b_4903_8c6e_dc17aa87fcf8","maybeValue":null}],"parameters":[]},{"rawId":"id_f05a1579_4aee_485e_8e1a_80086145fa63","tpe":"Void","name":"start_stop_data_collection_write","statements":[{"@type":"Begin","id":"id_f3bc383a_1d14_4108_ab6f_50e267b8f117"},{"falseBlock":{"statements":[],"id":"id_d120e191_b6d7_4314_b7b6_beda98c5bb71"},"trueBlock":{"statements":[{"@type":"Assign","name":"tænd","id":"id_b50d4a4b_1346_4adb_b2c5_032a0cb83661","value":"client.write_single_coil(0,True)"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_a40de355_c713_4e33_a6d9_0273c4b79f73","value":"\"Kunne ikke skrive værdien til PLC'en. 1 \""}],"id":"id_b8b24c34_90bf_4043_b0d5_f12f6178bd48"},"trueBlock":{"statements":[{"@type":"Call","id":"id_84ae8f68_ad7e_4e57_bfe6_6ee90d157c40","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_fe520334_7c23_4fc7_814c_002105073a9e","value":"client.write_single_coil(0,False)"}],"id":"id_98b6a6fb_41de_4cda_9eb4_129423fec14d"},"condition":"tænd","@type":"If","id":"id_0deee6ea_c745_4c49_b295_dc766d7af67b"}],"id":"id_0d0c3fae_3636_43cc_8c07_a0b4142dbefd"},"condition":"client.open()","@type":"If","id":"id_22f6d098_78a3_4a6d_92c7_8b3d7efbdc00"},{"@type":"Return","id":"id_a69d39e9_862c_4992_ac4f_84d3e3d4df16","maybeValue":null}],"parameters":[]},{"rawId":"id_94b0fd74_4e6e_4fb5_a4ba_a90fcefd6401","tpe":"Void","name":"start_stop_data_collection_read","statements":[{"@type":"Begin","id":"id_8d08f58c_8fb7_4430_bde4_2e002ceea1c5"},{"falseBlock":{"statements":[],"id":"id_90891e01_3f19_46b5_a22b_2f4b56b23e1a"},"trueBlock":{"statements":[{"@type":"Assign","name":"tænd","id":"id_6fed2910_b6bf_4eee_a2e2_93c680154e71","value":"client.write_single_coil(1,True)"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_b1617b7a_a224_4e9b_a8ef_d2eeb9b3d807","value":"\"Kunne ikke skrive værdien til PLC'en. 2 \""}],"id":"id_9e7088ef_f71f_4b3e_8095_202539e0953f"},"trueBlock":{"statements":[{"@type":"Call","id":"id_ca9229e3_caa8_45f0_ab60_aafa62f6729b","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_ec68a036_f1d2_48a8_805e_880a26811b31","value":"client.write_single_coil(1,False)"}],"id":"id_2c4007d6_02e6_4ec2_8674_63d6b1839528"},"condition":"tænd","@type":"If","id":"id_718ed546_3200_442f_a200_c090f181101e"}],"id":"id_789f0b80_a42d_4294_83c9_1e2eb632c97c"},"condition":"client.open()","@type":"If","id":"id_6ba588cb_af6c_4c6f_b483_2a6dcb25338d"},{"@type":"Return","id":"id_bdfadff6_9c35_4313_91ab_5ea3f574ae9a","maybeValue":null}],"parameters":[]},{"rawId":"id_aab9144d_28c4_4865_9ffa_4a8b68dce4c1","tpe":"Void","name":"toggle_auto_tune","statements":[{"@type":"Begin","id":"id_d40c7988_6eea_4ad0_b7da_d989b93b964b"},{"@type":"Assign","name":"auto","id":"id_82eb5e48_a292_4af2_bf14_78fea6c0f0c5","value":"not auto"},{"falseBlock":{"statements":[{"@type":"Call","id":"id_29f51e23_dd02_4678_a4b6_9e236f940b33","value":"auto_knap.config(text=\"Auto-Tune Start\")"},{"@type":"Call","id":"id_7ebab85e_b03c_4c6f_8def_86693d11f423","value":"client.write_single_register(10,0)"},{"@type":"Call","id":"id_2e40d301_906b_4a9a_9734_4f4082f5bce5","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_5d5654be_a959_4a23_ad28_2d5527c57788","value":"start_stop_data_collection_write()"}],"id":"id_413ae7b0_aee5_4504_af90_fb896c4c5c02"},"trueBlock":{"statements":[{"@type":"Call","id":"id_481de761_93ab_4dbe_93ef_39bbac646e6d","value":"auto_knap.config(text=\"Auto-Tune Stop\")"},{"@type":"Call","id":"id_a51aedf9_b2fe_4965_94f2_465793a4801c","value":"client.write_single_register(10,1)"},{"@type":"Call","id":"id_28de6aba_3fe6_4fcf_ab79_53711edb97d3","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_c946b836_78bc_48c8_902c_7aeaeb95d049","value":"start_stop_data_collection_write()"}],"id":"id_c4f37888_c50d_4cbc_b55e_3efefe0d62d9"},"condition":"auto","@type":"If","id":"id_0cec7e28_5a50_4367_818f_4f218b7ed527"},{"@type":"Return","id":"id_076c04c9_f1bb_4bd6_a12a_a117e1d16b73","maybeValue":null}],"parameters":[]},{"rawId":"id_6946f371_26c8_4e8f_8c8b_4e0dac756805","tpe":"Void","name":"get_P","statements":[{"@type":"Begin","id":"id_dc380e2d_b5bd_499e_a93b_7c9cb0e1c70b"},{"@type":"Assign","name":"P_value","id":"id_29372c65_e220_4219_a0c9_f38dc7c82418","value":"int(text_box_Pled.get())"},{"@type":"Call","id":"id_3b1c6e22_3d8c_4669_81b3_22fdda15c8b4","value":"client.write_single_register(4-1,P_value*10)"},{"@type":"Call","id":"id_677cb202_de02_4c99_a58e_31d047ffdad5","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_28de6ea5_443b_4014_a2c9_02c3448a6716","value":"start_stop_data_collection_write()"},{"@type":"Return","id":"id_2f753854_9505_4cca_b119_85d29c3e3665","maybeValue":null}],"parameters":[]},{"rawId":"id_6d9e812f_1217_413c_83a1_35bca9132648","tpe":"Void","name":"get_I","statements":[{"@type":"Begin","id":"id_d8be44b2_ed91_4ac6_b324_22f59ced8d76"},{"@type":"Assign","name":"I_value","id":"id_f57bd127_56ab_441d_a2f3_bd6b412475c2","value":"int(text_box_Iled.get())"},{"@type":"Call","id":"id_fd6950fa_03f7_446e_9b19_1cdf1f7f6ae1","value":"client.write_single_register(5-1,I_value)"},{"@type":"Call","id":"id_3c430b12_6e6a_4509_b93a_4a03953d8ede","value":"time.sleep(0.1)"},{"@type":"Call","id":"id_075515c2_8c61_447b_ba5c_37acddf483c2","value":"start_stop_data_collection_write()"},{"@type":"Return","id":"id_48cec665_49bf_4b47_8b1d_fde04106fa09","maybeValue":null}],"parameters":[]},{"rawId":"id_c0235616_36cb_4059_9826_3d7fd4deef31","tpe":"Void","name":"get_D","statements":[{"@type":"Begin","id":"id_a132634c_f291_4ad1_accb_4cd4df8dd52b"},{"@type":"Assign","name":"D_value","id":"id_db673045_caed_4b9f_9b00_f5a421f87cc1","value":"int(text_box_Dled.get())"},{"@type":"Call","id":"id_dd20fddb_d6b8_4275_a9fb_4169a812e0d9","value":"client.write_single_register(6-1,D_value)"},{"@type":"Call","id":"id_ca85a6c2_148e_4eef_8645_6ad6b9494327","value":"time.sleep(1)"},{"@type":"Call","id":"id_a102f247_8c4d_492f_9d35_22b7d3d904e3","value":"start_stop_data_collection_write()"},{"@type":"Return","id":"id_881000ab_ff6a_4652_8ffb_6f879d2581fa","maybeValue":null}],"parameters":[]},{"rawId":"id_19897dd3_993d_45be_adf5_93b1c680664d","tpe":"Void","name":"update_setpoint","statements":[{"@type":"Begin","id":"id_c304c910_6fc2_421c_ae17_6353aab6c857"},{"condition":"line in ax.get_lines()","@type":"While","id":"id_e6bde4e0_aef1_4ba0_a4ee_f3f4de35fb30","body":{"statements":[{"falseBlock":{"statements":[],"id":"id_e70dd35d_4027_40bc_abdc_64736b034844"},"trueBlock":{"statements":[{"@type":"Call","id":"id_4563c780_fd55_4e89_bc58_e78fcbd17fea","value":"line.remove()"}],"id":"id_4dcca4d6_607a_47c5_bdd1_f55910963f52"},"condition":"line.get_label() == 'SP'","@type":"If","id":"id_0a32ce82_b740_45f8_bc60_aa2a5472c07c"}],"id":"id_d2677d99_7bfc_409c_a9c6_81059b566617"}},{"@type":"Call","id":"id_fd761b44_dbd7_4363_b6b0_c64eb9913852","value":"ax.axhline(y=sp_value, color='g', linestyle='-', label='SP')"},{"@type":"Call","id":"id_ab90adcb_82ee_48a4_a458_2e7c90db1607","value":"ax.legend()"},{"@type":"Call","id":"id_f06d0ade_2f47_4599_b1ba_70b275557517","value":"canvas.draw()"},{"@type":"Return","id":"id_89d66c08_911a_4d57_a331_569ff092fc85","maybeValue":null}],"parameters":[]},{"rawId":"id_dda66543_ea6b_43bb_9eba_9e48d7252d03","tpe":"Void","name":"update_plot","statements":[{"@type":"Begin","id":"id_cb6edc93_2dc1_41f8_9396_66e1a572632c"},{"@type":"Call","id":"id_a093aebf_3918_4a2e_a465_b71a8f6acf82","value":"ax.plot(x_tid, data_temp_liste, 'ro-', labe2='Data')"},{"@type":"Call","id":"id_751b422b_4567_4edc_8c08_de788ad6df0a","value":"ax.set_ylim(0, 40)"},{"@type":"Call","id":"id_785a976e_5c71_4017_88cd_4b52dfe5900e","value":"ax.grid(True)"},{"@type":"Call","id":"id_0bf4378c_e912_4f81_98fb_e4fda476930c","value":"canvas.draw()"},{"@type":"Return","id":"id_3426f285_6202_4535_b926_daf92e1e181a","maybeValue":null}],"parameters":[]},{"rawId":"id_e33c07fc_c131_429d_bb96_be839337fe9a","tpe":"Void","name":"on_close","statements":[{"@type":"Begin","id":"id_d74b390c_4244_40cb_9c6b_0aa635e9d6d5"},{"@type":"Call","id":"id_19f24080_ea1e_443e_a52a_2e9342157d41","value":"plt.close(fig)"},{"@type":"Call","id":"id_dd890831_0cb6_4ba7_a9a6_fd1ec947e130","value":"app.destroy()"},{"@type":"Return","id":"id_a43ae8a5_5294_4891_b764_deea6da0b4b6","maybeValue":null}],"parameters":[]}],"name":"pap_flow_2.2","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_c72a6360_1df5_43f4_a969_efad83ea15ba"},{"@type":"Call","id":"id_2d411f82_e232_473a_b37a_3f79d440f16b","value":"SP_buttons.grid(row=4, column=0, columnspan=1, pady=5)"},{"@type":"Assign","name":"text_box_SP","id":"id_6caedaeb_f57e_4e15_88bd_e1d406f2e109","value":"ttk.Entry(tab1,justify='right')"},{"@type":"Call","id":"id_e8193f27_2d9f_480d_b5b7_dd5f25e277e7","value":"text_box_SP.place(x=455, y=162, width=45)"},{"@type":"Assign","name":"label3","id":"id_cb1594af_477a_4aa8_a58d_99e3551a248e","value":"ttk.Label(tab1, text='Hvad skal setpunkt være:')"},{"@type":"Call","id":"id_05cd73b4_c3d1_40a3_9c3b_364f7a5a8d23","value":"label3.place(x=320, y=162)"},{"@type":"Assign","name":"label4","id":"id_122c1434_7598_4b37_9366_6fe311062fb3","value":"ttk.Label(tab1, text='°C')"},{"@type":"Call","id":"id_fdc7b3e4_3c7c_46a0_bc50_cd135ab136a8","value":"label4.place(x=500, y=162)"},{"@type":"Assign","name":"label5","id":"id_43fda707_70e4_41c0_8252_62eeabbf5bc4","value":"ttk.Label(tab1, text='setpunkt:')"},{"@type":"Call","id":"id_d92597aa_9786_473b_bc89_93bb4192e7e2","value":"label5.place(x=570, y=162)"},{"@type":"Assign","name":"label6","id":"id_641da110_158d_47b0_bfdf_8c43dd149efc","value":"ttk.Label(tab1, text='Proses værdi:')"},{"@type":"Call","id":"id_7fe2ed56_8598_4e5a_8697_efbfd63dc31e","value":"label6.place(x=709, y=162)"},{"@type":"Assign","name":"Pled_buttons","id":"id_fdd3b671_3c44_4e27_bb04_90b86c2acfce","value":"ttk.Button(tab1, text='Brug P ', command=get_P)"},{"@type":"Call","id":"id_3b0b84d0_758a_4e76_aeb1_2d01eb29ce63","value":"Pled_buttons.grid(row=5, column=0, columnspan=1, pady=5)"},{"@type":"Assign","name":"text_box_Pled","id":"id_ba85dc91_7b0c_49d4_aabb_8cf2721bae9f","value":"ttk.Entry(tab1,justify='right')"},{"@type":"Call","id":"id_d5aab603_08be_4572_a034_b9e5a2939a99","value":"text_box_Pled.place(x=440, y=195, width=60)"},{"@type":"Assign","name":"labelP_vardig","id":"id_49f6e15f_ec20_4c19_b175_05ce856de8b5","value":"ttk.Label(tab1, text='Hvad skal P-led være:')"},{"@type":"Call","id":"id_18f0bc5f_2748_4a7e_94bf_c6bdd243442a","value":"labelP_vardig.place(x=320, y=195)"},{"@type":"Assign","name":"label7","id":"id_b890d01b_4764_417c_97ed_296de2161143","value":"ttk.Label(tab1, text='P-led:')"},{"@type":"Call","id":"id_59eb8c6d_a710_4730_874c_7c868d8d7c0b","value":"label7.place(x=570, y=195)"},{"@type":"Comment","id":"id_21ba97ac_f0a4_4777_b0e4_fd819f49eeb1","text":"linje 400"},{"@type":"Return","id":"id_4dfed3b2_19fb_4d54_bc80_e4b0754f2aab","maybeValue":null}],"parameters":[]},"id":"id_4ee2f265_cc33_4750_9740_deeb9d783600","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"python","showGenCode":true},"version":"0.2","revision":2363}