SET @Set_Air_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_O2_Flow,@Orig_Set_O2_Flow,@Status_O2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_O2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_N2_Flow,@Orig_Set_N2_Flow,@Status_N2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_N2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_CO2_Flow,@Orig_Set_CO2_Flow,@Status_CO2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_CO2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Gas_Flow,@Orig_Set_Gas_Flow,@Status_Gas_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Gas_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Gas_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1,@Orig_Set_Pump1,@Status_Pump1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1_Total_Flow,@Orig_Set_Pump1_Total_Flow,@Status_Pump1_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2,@Orig_Set_Pump2,@Status_Pump2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2_Total_Flow,@Orig_Set_Pump2_Total_Flow,@Status_Pump2_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3,@Orig_Set_Pump3,@Status_Pump3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3_Total_Flow,@Orig_Set_Pump3_Total_Flow,@Status_Pump3_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4,@Orig_Set_Pump4,@Status_Pump4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4_Total_Flow,@Orig_Set_Pump4_Total_Flow,@Status_Pump4_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_1,@Orig_Set_Level_1,@Status_Level_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_2,@Orig_Set_Level_2,@Status_Level_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Jacket_Level,@Orig_Set_Jacket_Level,@Status_Jacket_Level FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Jacket_Level";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Jacket_Level = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_Aux,@Orig_Set_Temperature_Aux,@Status_Temperature_Aux FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_Aux";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_Aux = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Weight,@Orig_Set_Weight,@Status_Weight FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Weight";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Weight = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_1,@Orig_Set_A_In_1,@Status_A_In_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_2,@Orig_Set_A_In_2,@Status_A_In_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_3,@Orig_Set_A_In_3,@Status_A_In_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_4,@Orig_Set_A_In_4,@Status_A_In_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_1,@Orig_Set_A_Out_1,@Status_A_Out_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_2,@Orig_Set_A_Out_2,@Status_A_Out_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_3,@Orig_Set_A_Out_3,@Status_A_Out_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_4,@Orig_Set_A_Out_4,@Status_A_Out_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_4 = NULL;
SET @Set_Pump4 = 0;
  SET @Set_Pump3 = @R;
  START TRANSACTION;
IF(@Set_Temperature IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Temperature,Logic_Active=1 WHERE Name="Temperature";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Stirring IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Stirring,Logic_Active=1 WHERE Name="Stirring";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_pH IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_pH,Logic_Active=1 WHERE Name="pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_dO2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_dO2,Logic_Active=1 WHERE Name="dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pressure IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pressure,Logic_Active=1 WHERE Name="Pressure";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Air_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Air_Flow,Logic_Active=1 WHERE Name="Air_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_O2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_O2_Flow,Logic_Active=1 WHERE Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_N2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_N2_Flow,Logic_Active=1 WHERE Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_CO2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_CO2_Flow,Logic_Active=1 WHERE Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump1,Logic_Active=1 WHERE Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump2,Logic_Active=1 WHERE Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump3,Logic_Active=1 WHERE Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump4,Logic_Active=1 WHERE Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_1,Logic_Active=1 WHERE Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_2,Logic_Active=1 WHERE Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_3,Logic_Active=1 WHERE Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_4,Logic_Active=1 WHERE Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
COMMIT;
SET @query = CONCAT('UPDATE solaris_server.logic_threads SET Sleep_Block="19520541451949723920438977567317417021824545126" WHERE Source=1 AND Procedure_Name="logic_procedure_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DO SLEEP(10800 - (20 / @R) * 60);/*19520541451949723920438977567317417021824545126*/SELECT Elapsed_Time,Phase_Id,Current_Step INTO @Elapsed_Time,@Phase_Id,@Current_Step FROM info;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Heater,@Orig_Set_Heater,@Status_Heater FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Heater";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Heater = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Cooler,@Orig_Set_Cooler,@Status_Cooler FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Cooler";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Cooler = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature,@Orig_Set_Temperature,@Status_Temperature FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring,@Orig_Set_Stirring,@Status_Stirring FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring_Power,@Orig_Set_Stirring_Power,@Status_Stirring_Power FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring_Power";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring_Power = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring_Current,@Orig_Set_Stirring_Current,@Status_Stirring_Current FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring_Current";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring_Current = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_pH,@Orig_Set_pH,@Status_pH FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_pH = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_pH,@Orig_Set_Temperature_pH,@Status_Temperature_pH FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_pH = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_ORP,@Orig_Set_ORP,@Status_ORP FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="ORP";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_ORP = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_dO2,@Orig_Set_dO2,@Status_dO2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_dO2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_dO2,@Orig_Set_Temperature_dO2,@Status_Temperature_dO2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_dO2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Conductivity,@Orig_Set_Conductivity,@Status_Conductivity FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Conductivity";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Conductivity = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pressure,@Orig_Set_Pressure,@Status_Pressure FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pressure";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pressure = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Air_Flow,@Orig_Set_Air_Flow,@Status_Air_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Air_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Air_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_O2_Flow,@Orig_Set_O2_Flow,@Status_O2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_O2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_N2_Flow,@Orig_Set_N2_Flow,@Status_N2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_N2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_CO2_Flow,@Orig_Set_CO2_Flow,@Status_CO2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_CO2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Gas_Flow,@Orig_Set_Gas_Flow,@Status_Gas_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Gas_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Gas_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1,@Orig_Set_Pump1,@Status_Pump1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1_Total_Flow,@Orig_Set_Pump1_Total_Flow,@Status_Pump1_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2,@Orig_Set_Pump2,@Status_Pump2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2_Total_Flow,@Orig_Set_Pump2_Total_Flow,@Status_Pump2_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3,@Orig_Set_Pump3,@Status_Pump3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3_Total_Flow,@Orig_Set_Pump3_Total_Flow,@Status_Pump3_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4,@Orig_Set_Pump4,@Status_Pump4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4_Total_Flow,@Orig_Set_Pump4_Total_Flow,@Status_Pump4_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_1,@Orig_Set_Level_1,@Status_Level_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_2,@Orig_Set_Level_2,@Status_Level_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Jacket_Level,@Orig_Set_Jacket_Level,@Status_Jacket_Level FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Jacket_Level";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Jacket_Level = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_Aux,@Orig_Set_Temperature_Aux,@Status_Temperature_Aux FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_Aux";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_Aux = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Weight,@Orig_Set_Weight,@Status_Weight FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Weight";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Weight = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_1,@Orig_Set_A_In_1,@Status_A_In_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_2,@Orig_Set_A_In_2,@Status_A_In_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_3,@Orig_Set_A_In_3,@Status_A_In_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_4,@Orig_Set_A_In_4,@Status_A_In_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_1,@Orig_Set_A_Out_1,@Status_A_Out_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_2,@Orig_Set_A_Out_2,@Status_A_Out_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_3,@Orig_Set_A_Out_3,@Status_A_Out_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_4,@Orig_Set_A_Out_4,@Status_A_Out_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_4 = NULL;

START TRANSACTION;
IF(@Set_Temperature IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Temperature,Logic_Active=1 WHERE Name="Temperature";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Stirring IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Stirring,Logic_Active=1 WHERE Name="Stirring";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_pH IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_pH,Logic_Active=1 WHERE Name="pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_dO2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_dO2,Logic_Active=1 WHERE Name="dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pressure IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pressure,Logic_Active=1 WHERE Name="Pressure";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Air_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Air_Flow,Logic_Active=1 WHERE Name="Air_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_O2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_O2_Flow,Logic_Active=1 WHERE Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_N2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_N2_Flow,Logic_Active=1 WHERE Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_CO2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_CO2_Flow,Logic_Active=1 WHERE Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump1,Logic_Active=1 WHERE Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump2,Logic_Active=1 WHERE Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump3,Logic_Active=1 WHERE Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump4,Logic_Active=1 WHERE Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_1,Logic_Active=1 WHERE Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_2,Logic_Active=1 WHERE Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_3,Logic_Active=1 WHERE Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_4,Logic_Active=1 WHERE Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
COMMIT;
SET @query = CONCAT('UPDATE solaris_server.logic_threads SET Sleep_Block="17340146186898124347971454230448019519655913815" WHERE Source=1 AND Procedure_Name="logic_procedure_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DO SLEEP(1);/*17340146186898124347971454230448019519655913815*/SELECT Elapsed_Time,Phase_Id,Current_Step INTO @Elapsed_Time,@Phase_Id,@Current_Step FROM info;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Heater,@Orig_Set_Heater,@Status_Heater FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Heater";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Heater = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Cooler,@Orig_Set_Cooler,@Status_Cooler FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Cooler";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Cooler = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature,@Orig_Set_Temperature,@Status_Temperature FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring,@Orig_Set_Stirring,@Status_Stirring FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring_Power,@Orig_Set_Stirring_Power,@Status_Stirring_Power FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring_Power";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring_Power = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Stirring_Current,@Orig_Set_Stirring_Current,@Status_Stirring_Current FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Stirring_Current";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Stirring_Current = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_pH,@Orig_Set_pH,@Status_pH FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_pH = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_pH,@Orig_Set_Temperature_pH,@Status_Temperature_pH FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_pH = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_ORP,@Orig_Set_ORP,@Status_ORP FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="ORP";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_ORP = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_dO2,@Orig_Set_dO2,@Status_dO2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_dO2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_dO2,@Orig_Set_Temperature_dO2,@Status_Temperature_dO2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_dO2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Conductivity,@Orig_Set_Conductivity,@Status_Conductivity FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Conductivity";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Conductivity = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pressure,@Orig_Set_Pressure,@Status_Pressure FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pressure";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pressure = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Air_Flow,@Orig_Set_Air_Flow,@Status_Air_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Air_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Air_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_O2_Flow,@Orig_Set_O2_Flow,@Status_O2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_O2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_N2_Flow,@Orig_Set_N2_Flow,@Status_N2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_N2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_CO2_Flow,@Orig_Set_CO2_Flow,@Status_CO2_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_CO2_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Gas_Flow,@Orig_Set_Gas_Flow,@Status_Gas_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Gas_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Gas_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1,@Orig_Set_Pump1,@Status_Pump1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump1_Total_Flow,@Orig_Set_Pump1_Total_Flow,@Status_Pump1_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump1_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump1_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2,@Orig_Set_Pump2,@Status_Pump2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump2_Total_Flow,@Orig_Set_Pump2_Total_Flow,@Status_Pump2_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump2_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump2_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3,@Orig_Set_Pump3,@Status_Pump3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump3_Total_Flow,@Orig_Set_Pump3_Total_Flow,@Status_Pump3_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump3_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump3_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4,@Orig_Set_Pump4,@Status_Pump4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Pump4_Total_Flow,@Orig_Set_Pump4_Total_Flow,@Status_Pump4_Total_Flow FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Pump4_Total_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Pump4_Total_Flow = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_1,@Orig_Set_Level_1,@Status_Level_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Level_2,@Orig_Set_Level_2,@Status_Level_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Level_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Level_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Jacket_Level,@Orig_Set_Jacket_Level,@Status_Jacket_Level FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Jacket_Level";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Jacket_Level = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Temperature_Aux,@Orig_Set_Temperature_Aux,@Status_Temperature_Aux FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Temperature_Aux";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Temperature_Aux = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_Weight,@Orig_Set_Weight,@Status_Weight FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="Weight";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_Weight = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_1,@Orig_Set_A_In_1,@Status_A_In_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_2,@Orig_Set_A_In_2,@Status_A_In_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_3,@Orig_Set_A_In_3,@Status_A_In_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_In_4,@Orig_Set_A_In_4,@Status_A_In_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_In_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_In_4 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_1,@Orig_Set_A_Out_1,@Status_A_Out_1 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_1 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_2,@Orig_Set_A_Out_2,@Status_A_Out_2 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_2 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_3,@Orig_Set_A_Out_3,@Status_A_Out_3 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_3 = NULL;
SET @query = CONCAT('SELECT process_data.Process_Value,process_data.Set_Value,phases.Status INTO @Process_A_Out_4,@Orig_Set_A_Out_4,@Status_A_Out_4 FROM process_data LEFT JOIN phases ON phases.Name = process_data.Name AND phases.Phase_Id=',@Phase_Id,' WHERE process_data.Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET @Set_A_Out_4 = NULL;

END WHILE;


START TRANSACTION;
IF(@Set_Temperature IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Temperature,Logic_Active=1 WHERE Name="Temperature";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Stirring IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Stirring,Logic_Active=1 WHERE Name="Stirring";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_pH IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_pH,Logic_Active=1 WHERE Name="pH";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_dO2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_dO2,Logic_Active=1 WHERE Name="dO2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pressure IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pressure,Logic_Active=1 WHERE Name="Pressure";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Air_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Air_Flow,Logic_Active=1 WHERE Name="Air_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_O2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_O2_Flow,Logic_Active=1 WHERE Name="O2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_N2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_N2_Flow,Logic_Active=1 WHERE Name="N2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_CO2_Flow IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_CO2_Flow,Logic_Active=1 WHERE Name="CO2_Flow";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump1,Logic_Active=1 WHERE Name="Pump1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump2,Logic_Active=1 WHERE Name="Pump2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump3,Logic_Active=1 WHERE Name="Pump3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_Pump4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_Pump4,Logic_Active=1 WHERE Name="Pump4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_1 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_1,Logic_Active=1 WHERE Name="A_Out_1";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_2 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_2,Logic_Active=1 WHERE Name="A_Out_2";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_3 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_3,Logic_Active=1 WHERE Name="A_Out_3";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
IF(@Set_A_Out_4 IS NOT NULL) THEN SET @query = CONCAT('UPDATE process_data SET Logic_Set_Value=@Set_A_Out_4,Logic_Active=1 WHERE Name="A_Out_4";');
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END IF;
COMMIT;
 END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `calibration`
--

CREATE TABLE `calibration` (
  `Name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `x0` float NOT NULL DEFAULT 0,
  `x1` float NOT NULL DEFAULT 1,
  `x2` float NOT NULL DEFAULT 0,
  `x3` float NOT NULL DEFAULT 0,
  `Drift` double NOT NULL DEFAULT 0,
  `Raw_1` float DEFAULT NULL,
  `Point_1` float DEFAULT NULL,
  `Raw_2` float DEFAULT NULL,
  `Point_2` float DEFAULT NULL,
  `Raw_3` float DEFAULT NULL,
  `Point_3` float DEFAULT NULL,
  `Device_Type` enum('INPUT','OUTPUT') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'INPUT' COMMENT 'Sets the device type',
  `Max_Deviation` float DEFAULT 0.05 COMMENT 'Max deviation under which the value is considered stable',
  `Last_Calibration` datetime DEFAULT NULL,
  `Loaded_Profile` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Probe_Info` varchar(2048) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Probe info in JSON format',
  `Probe_Config` varchar(2048) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Probe config in JSON format'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `calibration`
--

INSERT INTO `calibration` (`Name`, `x0`, `x1`, `x2`, `x3`, `Drift`, `Raw_1`, `Point_1`, `Raw_2`, `Point_2`, `Raw_3`, `Point_3`, `Device_Type`, `Max_Deviation`, `Last_Calibration`, `Loaded_Profile`, `Probe_Info`, `Probe_Config`) VALUES
('A_In_1', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true}}'),
('A_In_2', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true}}'),
('A_In_3', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true}}'),
('A_In_4', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true}}'),
('A_Out_1', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true},\"Max\":{\"value\":\"100\",\"editable\":true}}'),
('A_Out_2', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true},\"Max\":{\"value\":\"100\",\"editable\":true}}'),
('A_Out_3', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true},\"Max\":{\"value\":\"100\",\"editable\":true}}'),
('A_Out_4', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, NULL, NULL, '{\"Unit\":{\"value\":\"%\",\"editable\":true},\"Decimals\":{\"value\":\"1\",\"editable\":true},\"Max\":{\"value\":\"100\",\"editable\":true}}'),
('Conductivity', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, '{\"1\":{\"name\":\"Operating hours\",\"value\":\"0:00\"},\"2\":{\"name\":\"SIP Pv\",\"value\":\"0\"},\"3\":{\"name\":\"CIP Pv\",\"value\":\"0\"},\"4\":{\"name\":\"Measure warnings\",\"value\":\"\"},\"5\":{\"name\":\"Calibration warnings\",\"value\":\"\"},\"6\":{\"name\":\"Hardware warnings\",\"value\":\"\"},\"7\":{\"name\":\"Measure errors\",\"value\":\"\"},\"8\":{\"name\":\"Calibration errors\",\"value\":\"\"},\"9\":{\"name\":\"Hardware errors\",\"value\":\"\"},\"11\":{\"name\":\"Serial number\",\"value\":\"\"},\"10\":{\"name\":\"Quality\",\"value\":\"0%\"}}', NULL),
('dO2', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, '{\"1\":{\"name\":\"Operating hours\",\"value\":\"3664:29\"},\"2\":{\"name\":\"SIP Pv\",\"value\":\"0\"},\"3\":{\"name\":\"CIP Pv\",\"value\":\"0\"},\"4\":{\"name\":\"Measure warnings\",\"value\":\"\"},\"5\":{\"name\":\"Calibration warnings\",\"value\":\"\"},\"6\":{\"name\":\"Hardware warnings\",\"value\":\"\"},\"7\":{\"name\":\"Measure errors\",\"value\":\"\"},\"8\":{\"name\":\"Calibration errors\",\"value\":\"\"},\"9\":{\"name\":\"Hardware errors\",\"value\":\"\"},\"11\":{\"name\":\"Serial number\",\"value\":\"1155\"},\"10\":{\"name\":\"Quality\",\"value\":\"100%\"}}', NULL),
('ORP', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, '{\"1\":{\"name\":\"Operating hours\",\"value\":\"0:00\"},\"2\":{\"name\":\"SIP Pv\",\"value\":\"0\"},\"3\":{\"name\":\"CIP Pv\",\"value\":\"0\"},\"4\":{\"name\":\"Measure warnings\",\"value\":\"\"},\"5\":{\"name\":\"Calibration warnings\",\"value\":\"\"},\"6\":{\"name\":\"Hardware warnings\",\"value\":\"\"},\"7\":{\"name\":\"Measure errors\",\"value\":\"\"},\"8\":{\"name\":\"Calibration errors\",\"value\":\"\"},\"9\":{\"name\":\"Hardware errors\",\"value\":\"\"},\"11\":{\"name\":\"Serial number\",\"value\":\"\"},\"10\":{\"name\":\"Quality\",\"value\":\"0%\"}}', NULL),
('pH', 0, 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 'INPUT', 0.05, NULL, NULL, '{\"1\":{\"name\":\"Operating hours\",\"value\":\"3500:55\"},\"2\":{\"name\":\"SIP Pv\",\"value\":\"0\"},\"3\":{\"name\":\"CIP Pv\",\"value\":\"0\"},\"4\":{\"name\":\"Measure warnings\",\"value\":\"\"},\"5\":{\"name\":\"Calibration warnings\",\"value\":\"\"},\"6\":{\"name\":\"Hardware warnings\",\"value\":\"\"},\"7\":{\"name\":\"Measure errors\",\"value\":\"\"},\"8\":{\"name\":\"Calibration errors\",\"value\":\"\"},\"9\":{\"name\":\"Hardware errors\",\"value\":\"\"},\"11\":{\"name\":\"Serial number\",\"value\":\"2218\"},\"10\":{\"name\":\"Quality\",\"value\":\"100%\"}}', NULL),
('Pump1', 0, 3.508, 0, 0, 0, 100, 28.5, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, '60 rpm, tube diameter 3.2 mm', NULL, NULL),
('Pump2', 12.5147, 9.29705, 0, 0, 0, 100, 9.41, 59, 5, NULL, NULL, 'OUTPUT', 0.05, '2019-08-26 14:26:41', '60 rpm, tube diameter 3.2 mm', NULL, NULL),
('Pump3', 0, 3.508, 0, 0, 0, 100, 28.5, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, '60 rpm, tube diameter 3.2 mm', NULL, NULL),
('Pump4', 0, 3.508, 0, 0, 0, 100, 28.5, NULL, NULL, NULL, NULL, 'OUTPUT', 0.05, NULL, 'Stepper, tube diameter 3.2 mm', NULL, NULL),
('Temperature', -37.5034, 0.00678181, 0, 0, 0, 5530, 0, 27648, 150, NULL, NULL, 'INPUT', 10, NULL, 'vessel pt100', NULL, NULL),
('Temperature_Aux', -25.0023, 0.0045212, 0, 0, 0, 5530, 0, 27648, 100, NULL, NULL, 'INPUT', 10, NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `cascade_dCO2`
--

CREATE TABLE `cascade_dCO2` (
  `Id` int(10) UNSIGNED NOT NULL,
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of the quantity',
  `Phase_Id` int(11) NOT NULL DEFAULT 1 COMMENT 'ID of phase',
  `Priority` int(11) NOT NULL COMMENT 'Processing order of the quantity in the cascade',
  `Min` float NOT NULL,
  `Max` float NOT NULL,
  `K` float NOT NULL,
  `Time` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cascade_dO2`
--

CREATE TABLE `cascade_dO2` (
  `Id` int(10) UNSIGNED NOT NULL,
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of the quantity',
  `Phase_Id` int(11) NOT NULL DEFAULT 1 COMMENT 'ID of phase',
  `Priority` int(11) NOT NULL COMMENT 'Processing order of the quantity in the cascade',
  `Min` float NOT NULL,
  `Max` float NOT NULL,
  `K` float NOT NULL,
  `Time` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `cascade_dO2`
--

INSERT INTO `cascade_dO2` (`Id`, `Name`, `Phase_Id`, `Priority`, `Min`, `Max`, `K`, `Time`) VALUES
(1, 'Temperature', 1, 3, 30, 40, 1, 60),
(2, 'Stirring', 1, 1, 300, 400, 1.4, 60),
(3, 'Pressure', 1, 9, 0, 2, 0.1, 60),
(4, 'Air_Flow', 1, 2, 1, 3.5, 0.1, 60),
(5, 'O2_Flow', 1, 2, 1, 3.5, 0.1, 60),
(6, 'N2_Flow', 1, 2, 1, 3.5, 0.1, 60),
(7, 'CO2_Flow', 1, 2, 1, 3.5, 0.1, 60),
(8, 'Pump1', 1, 5, 0, 20, 1, 60),
(9, 'Pump2', 1, 5, 0, 20, 1, 60),
(10, 'Pump3', 1, 5, 0, 20, 1, 60),
(11, 'Pump4', 1, 5, 0, 20, 1, 60),
(12, 'A_Out_1', 1, 10, 0, 100, 1, 60),
(13, 'A_Out_2', 1, 10, 0, 100, 1, 60),
(14, 'A_Out_3', 1, 10, 0, 100, 1, 60),
(15, 'A_Out_4', 1, 10, 0, 100, 1, 60),
(16, 'Temperature', 2, 3, 30, 40, 1, 60),
(17, 'Stirring', 2, 1, 300, 800, 1.4, 60),
(18, 'Pressure', 2, 9, 0, 2, 0.1, 60),
(19, 'Air_Flow', 2, 2, 1, 3.5, 0.1, 60),
(20, 'O2_Flow', 2, 2, 1, 3.5, 0.1, 60),
(21, 'N2_Flow', 2, 2, 1, 3.5, 0.1, 60),
(22, 'CO2_Flow', 2, 2, 1, 3.5, 0.1, 60),
(23, 'Pump1', 2, 5, 0, 20, 1, 60),
(24, 'Pump2', 2, 5, 0, 20, 1, 60),
(25, 'Pump3', 2, 5, 0, 20, 1, 60),
(26, 'Pump4', 2, 5, 0, 20, 1, 60),
(27, 'A_Out_1', 2, 10, 0, 100, 1, 60),
(28, 'A_Out_2', 2, 10, 0, 100, 1, 60),
(29, 'A_Out_3', 2, 10, 0, 100, 1, 60),
(30, 'A_Out_4', 2, 10, 0, 100, 1, 60),
(31, 'Temperature', 3, 3, 30, 40, 1, 60),
(32, 'Stirring', 3, 1, 300, 800, 1.4, 60),
(33, 'Pressure', 3, 9, 0, 2, 0.1, 60),
(34, 'Air_Flow', 3, 2, 1, 3.5, 0.1, 60),
(35, 'O2_Flow', 3, 2, 1, 3.5, 0.1, 60),
(36, 'N2_Flow', 3, 2, 1, 3.5, 0.1, 60),
(37, 'CO2_Flow', 3, 2, 1, 3.5, 0.1, 60),
(38, 'Pump1', 3, 5, 0, 20, 1, 60),
(39, 'Pump2', 3, 5, 0, 20, 1, 60),
(40, 'Pump3', 3, 5, 0, 20, 1, 60),
(41, 'Pump4', 3, 5, 0, 20, 1, 60),
(42, 'A_Out_1', 3, 10, 0, 100, 1, 60),
(43, 'A_Out_2', 3, 10, 0, 100, 1, 60),
(44, 'A_Out_3', 3, 10, 0, 100, 1, 60),
(45, 'A_Out_4', 3, 10, 0, 100, 1, 60),
(46, 'Temperature', 4, 3, 30, 40, 1, 60),
(47, 'Stirring', 4, 1, 300, 800, 1.4, 60),
(48, 'Pressure', 4, 9, 0, 2, 0.1, 60),
(49, 'Air_Flow', 4, 2, 1, 3.5, 0.1, 60),
(50, 'O2_Flow', 4, 2, 1, 3.5, 0.1, 60),
(51, 'N2_Flow', 4, 2, 1, 3.5, 0.1, 60),
(52, 'CO2_Flow', 4, 2, 1, 3.5, 0.1, 60),
(53, 'Pump1', 4, 5, 0, 20, 1, 60),
(54, 'Pump2', 4, 5, 0, 20, 1, 60),
(55, 'Pump3', 4, 5, 0, 20, 1, 60),
(56, 'Pump4', 4, 5, 0, 20, 1, 60),
(57, 'A_Out_1', 4, 10, 0, 100, 1, 60),
(58, 'A_Out_2', 4, 10, 0, 100, 1, 60),
(59, 'A_Out_3', 4, 10, 0, 100, 1, 60),
(60, 'A_Out_4', 4, 10, 0, 100, 1, 60),
(61, 'Temperature', 5, 3, 30, 40, 1, 60),
(62, 'Stirring', 5, 1, 300, 800, 1.4, 60),
(63, 'Pressure', 5, 9, 0, 2, 0.1, 60),
(64, 'Air_Flow', 5, 2, 1, 3.5, 0.1, 60),
(65, 'O2_Flow', 5, 2, 1, 3.5, 0.1, 60),
(66, 'N2_Flow', 5, 2, 1, 3.5, 0.1, 60),
(67, 'CO2_Flow', 5, 2, 1, 3.5, 0.1, 60),
(68, 'Pump1', 5, 5, 0, 20, 1, 60),
(69, 'Pump2', 5, 5, 0, 20, 1, 60),
(70, 'Pump3', 5, 5, 0, 20, 1, 60),
(71, 'Pump4', 5, 5, 0, 20, 1, 60),
(72, 'A_Out_1', 5, 10, 0, 100, 1, 60),
(73, 'A_Out_2', 5, 10, 0, 100, 1, 60),
(74, 'A_Out_3', 5, 10, 0, 100, 1, 60),
(75, 'A_Out_4', 5, 10, 0, 100, 1, 60);

-- --------------------------------------------------------

--
-- Table structure for table `checkup`
--

CREATE TABLE `checkup` (
  `Step_Number` int(10) UNSIGNED NOT NULL,
  `Step_Code` int(11) NOT NULL,
  `Step_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Step_Status` int(11) NOT NULL DEFAULT 0,
  `Step_Progress` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `checkup`
--

INSERT INTO `checkup` (`Step_Number`, `Step_Code`, `Step_Name`, `Step_Status`, `Step_Progress`) VALUES
(1, 15, 'Temperature connection test', 0, NULL),
(2, 12, 'Stirring connection test', 0, NULL),
(3, 14, 'Stirring warm up (2 min)', 0, NULL),
(4, 2, 'pH connection test', 0, NULL),
(5, 3, 'dO2 connection test', 0, NULL),
(6, 17, 'Pressure connection test', 0, NULL),
(7, 0, 'Air connection test', 0, NULL),
(8, 0, 'Air functional test', 0, NULL),
(9, 0, 'O2 connection test', 0, NULL),
(10, 0, 'O2 functional test', 0, NULL),
(11, 0, 'N2 connection test', 0, NULL),
(12, 0, 'N2 functional test', 0, NULL),
(13, 0, 'CO2 connection test', 0, NULL),
(14, 0, 'CO2 functional test', 0, NULL),
(15, 4, 'Gas connection test', 0, NULL),
(16, 16, 'Gas functional test', 0, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `event_list`
--

CREATE TABLE `event_list` (
  `Id` int(11) NOT NULL,
  `Class` varchar(100) COLLATE utf8_unicode_ci DEFAULT 'PhaseStatus_Tag' COMMENT 'Class of event',
  `Phase_Id` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Phase Id',
  `Name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Variable associated to this event',
  `Code` int(11) DEFAULT 0 COMMENT 'Event code',
  `Type` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Event type (subphase, interaction, ecc)',
  `Description` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '' COMMENT 'Event description',
  `Switch_Off_Message` varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Event switch off message',
  `Switch_On_Timestamp` timestamp NULL DEFAULT NULL COMMENT 'Timestamp of last event switch on',
  `Ack` int(11) DEFAULT NULL COMMENT 'Acknowledge flag (0=ack wanted, 1=ack received)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `event_list`
--

INSERT INTO `event_list` (`Id`, `Class`, `Phase_Id`, `Name`, `Code`, `Type`, `Description`, `Switch_Off_Message`, `Switch_On_Timestamp`, `Ack`) VALUES
(1, 'Alarm_Tag', NULL, 'Temperature', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(2, 'Alarm_Tag', NULL, 'Temperature', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(3, 'Alarm_Tag', NULL, 'Temperature', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(4, 'Alarm_Tag', NULL, 'Temperature', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(5, 'Alarm_Tag', NULL, 'Temperature', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', '2019-08-27 11:43:56', 0),
(6, 'Alarm_Tag', NULL, 'Stirring', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(7, 'Alarm_Tag', NULL, 'Stirring', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(8, 'Alarm_Tag', NULL, 'Stirring', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(9, 'Alarm_Tag', NULL, 'Stirring', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(10, 'Alarm_Tag', NULL, 'Stirring', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(11, 'Alarm_Tag', NULL, 'Stirring', 2, 'Event_Warning', 'Drive error', 'Drive OK', NULL, NULL),
(12, 'Alarm_Tag', NULL, 'pH', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(13, 'Alarm_Tag', NULL, 'pH', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(14, 'Alarm_Tag', NULL, 'pH', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(15, 'Alarm_Tag', NULL, 'pH', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(16, 'Alarm_Tag', NULL, 'pH', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(17, 'Alarm_Tag', NULL, 'ORP', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(18, 'Alarm_Tag', NULL, 'ORP', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(19, 'Alarm_Tag', NULL, 'ORP', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(20, 'Alarm_Tag', NULL, 'ORP', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(21, 'Alarm_Tag', NULL, 'ORP', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(22, 'Alarm_Tag', NULL, 'dO2', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(23, 'Alarm_Tag', NULL, 'dO2', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(24, 'Alarm_Tag', NULL, 'dO2', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(25, 'Alarm_Tag', NULL, 'dO2', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(26, 'Alarm_Tag', NULL, 'dO2', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(27, 'Alarm_Tag', NULL, 'Conductivity', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(28, 'Alarm_Tag', NULL, 'Conductivity', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(29, 'Alarm_Tag', NULL, 'Conductivity', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(30, 'Alarm_Tag', NULL, 'Conductivity', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(31, 'Alarm_Tag', NULL, 'Conductivity', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(32, 'Alarm_Tag', NULL, 'Pressure', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(33, 'Alarm_Tag', NULL, 'Pressure', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(34, 'Alarm_Tag', NULL, 'Pressure', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(35, 'Alarm_Tag', NULL, 'Pressure', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(36, 'Alarm_Tag', NULL, 'Pressure', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(37, 'Alarm_Tag', NULL, 'Air_Flow', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(38, 'Alarm_Tag', NULL, 'Air_Flow', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(39, 'Alarm_Tag', NULL, 'Air_Flow', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(40, 'Alarm_Tag', NULL, 'Air_Flow', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(41, 'Alarm_Tag', NULL, 'Air_Flow', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(42, 'Alarm_Tag', NULL, 'O2_Flow', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(43, 'Alarm_Tag', NULL, 'O2_Flow', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(44, 'Alarm_Tag', NULL, 'O2_Flow', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(45, 'Alarm_Tag', NULL, 'O2_Flow', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(46, 'Alarm_Tag', NULL, 'O2_Flow', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(47, 'Alarm_Tag', NULL, 'N2_Flow', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(48, 'Alarm_Tag', NULL, 'N2_Flow', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(49, 'Alarm_Tag', NULL, 'N2_Flow', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(50, 'Alarm_Tag', NULL, 'N2_Flow', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(51, 'Alarm_Tag', NULL, 'N2_Flow', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(52, 'Alarm_Tag', NULL, 'CO2_Flow', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(53, 'Alarm_Tag', NULL, 'CO2_Flow', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(54, 'Alarm_Tag', NULL, 'CO2_Flow', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(55, 'Alarm_Tag', NULL, 'CO2_Flow', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(56, 'Alarm_Tag', NULL, 'CO2_Flow', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(57, 'Alarm_Tag', NULL, 'Temperature_Aux', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(58, 'Alarm_Tag', NULL, 'Temperature_Aux', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(59, 'Alarm_Tag', NULL, 'Temperature_Aux', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(60, 'Alarm_Tag', NULL, 'Temperature_Aux', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(61, 'Alarm_Tag', NULL, 'Temperature_Aux', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', '2019-08-27 11:43:57', 0),
(62, 'Alarm_Tag', NULL, 'Weight', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(63, 'Alarm_Tag', NULL, 'Weight', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(64, 'Alarm_Tag', NULL, 'Weight', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(65, 'Alarm_Tag', NULL, 'Weight', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(66, 'Alarm_Tag', NULL, 'Weight', 1, 'Event_Warning', 'Bus connection error', 'Bus connection OK', NULL, NULL),
(67, 'Alarm_Tag', NULL, 'A_In_1', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(68, 'Alarm_Tag', NULL, 'A_In_1', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(69, 'Alarm_Tag', NULL, 'A_In_1', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(70, 'Alarm_Tag', NULL, 'A_In_1', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(71, 'Alarm_Tag', NULL, 'A_In_1', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', NULL, NULL),
(72, 'Alarm_Tag', NULL, 'A_In_2', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(73, 'Alarm_Tag', NULL, 'A_In_2', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(74, 'Alarm_Tag', NULL, 'A_In_2', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(75, 'Alarm_Tag', NULL, 'A_In_2', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(76, 'Alarm_Tag', NULL, 'A_In_2', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', NULL, NULL),
(77, 'Alarm_Tag', NULL, 'A_In_3', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(78, 'Alarm_Tag', NULL, 'A_In_3', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(79, 'Alarm_Tag', NULL, 'A_In_3', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(80, 'Alarm_Tag', NULL, 'A_In_3', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(81, 'Alarm_Tag', NULL, 'A_In_3', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', NULL, NULL),
(82, 'Alarm_Tag', NULL, 'A_In_4', 12, 'Event_Alarm', 'Out of HIGHEST range', 'In HIGHEST range', NULL, NULL),
(83, 'Alarm_Tag', NULL, 'A_In_4', 13, 'Event_Warning', 'Out of HIGH range', 'In HIGH range', NULL, NULL),
(84, 'Alarm_Tag', NULL, 'A_In_4', 14, 'Event_Warning', 'Out of LOW range', 'In LOW range', NULL, NULL),
(85, 'Alarm_Tag', NULL, 'A_In_4', 15, 'Event_Alarm', 'Out of LOWEST range', 'In LOWEST range', NULL, NULL),
(86, 'Alarm_Tag', NULL, 'A_In_4', 0, 'Event_Warning', 'Analog measure error', 'Analog measure OK', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `info`
--

CREATE TABLE `info` (
  `Errors` int(10) NOT NULL DEFAULT 0,
  `Global_Events` int(11) NOT NULL DEFAULT 0,
  `Phase_Id` int(11) NOT NULL DEFAULT 0,
  `Current_Step` int(11) NOT NULL DEFAULT 0,
  `Workflow_Status` int(11) NOT NULL DEFAULT 0 COMMENT '0=stop 1=run 99=pause',
  `Elapsed_Time` int(11) NOT NULL DEFAULT 0,
  `Phase_Time` int(11) DEFAULT 0,
  `Starting_Time` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Table_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Table name in solaris_x_data where data is currently saved',
  `Description` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Command` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Last_Startup` datetime NOT NULL DEFAULT current_timestamp(),
  `Acquisition_Time` int(11) NOT NULL DEFAULT 60,
  `Id` int(11) NOT NULL DEFAULT 1,
  `Model` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Jupiter'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `info`
--

INSERT INTO `info` (`Errors`, `Global_Events`, `Phase_Id`, `Current_Step`, `Workflow_Status`, `Elapsed_Time`, `Phase_Time`, `Starting_Time`, `Table_Name`, `Description`, `Command`, `Last_Startup`, `Acquisition_Time`, `Id`, `Model`) VALUES
(0, 0, 1, 1, 1, 170166, 170166, '2019-09-20 11:14:22', 'W20', 'test logic antheia', NULL, '0000-00-00 00:00:00', 5, 1, 'Jupiter');

-- --------------------------------------------------------

--
-- Table structure for table `logic`
--

CREATE TABLE `logic` (
  `XML` longtext COLLATE utf8_unicode_ci NOT NULL,
  `Code` longtext COLLATE utf8_unicode_ci NOT NULL,
  `Enabled` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `logic`
--

INSERT INTO `logic` (`XML`, `Code`, `Enabled`) VALUES
('<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n  <block type=\"variables_set\" x=\"-1163\" y=\"-987\">\n    <field name=\"VAR\">R</field>\n    <value name=\"VALUE\">\n      <block type=\"math_number\">\n        <field name=\"NUM\">8.50209</field>\n      </block>\n    </value>\n    <next>\n      <block type=\"controls_wait\">\n        <data>7713825325462179116272302021281489133203941954520125</data>\n        <value name=\"NUM\">\n          <shadow type=\"math_number\">\n            <field name=\"NUM\">1</field>\n          </shadow>\n          <block type=\"math_number\">\n            <field name=\"NUM\">900</field>\n          </block>\n        </value>\n        <next>\n          <block type=\"aliases_set\" editable=\"false\">\n            <field name=\"VAR\">p4</field>\n            <data>Set_Pump4</data>\n            <value name=\"VALUE\">\n              <block type=\"math_number\">\n                <field name=\"NUM\">65</field>\n              </block>\n            </value>\n            <next>\n              <block type=\"controls_wait\">\n                <data>3850125162154302534818532425669470141631713179</data>\n                <value name=\"NUM\">\n                  <shadow type=\"math_number\">\n                    <field name=\"NUM\">1</field>\n                  </shadow>\n                  <block type=\"math_arithmetic\">\n                    <field name=\"OP\">MULTIPLY</field>\n                    <value name=\"A\">\n                      <shadow type=\"math_number\">\n                        <field name=\"NUM\">1</field>\n                      </shadow>\n                      <block type=\"math_arithmetic\">\n                        <field name=\"OP\">DIVIDE</field>\n                        <value name=\"A\">\n                          <shadow type=\"math_number\">\n                            <field name=\"NUM\">1</field>\n                          </shadow>\n                          <block type=\"math_number\">\n                            <field name=\"NUM\">1.6</field>\n                          </block>\n                        </value>\n                        <value name=\"B\">\n                          <shadow type=\"math_number\">\n                            <field name=\"NUM\">1</field>\n                          </shadow>\n                          <block type=\"variables_get\">\n                            <field name=\"VAR\">R</field>\n                          </block>\n                        </value>\n                      </block>\n                    </value>\n                    <value name=\"B\">\n                      <shadow type=\"math_number\">\n                        <field name=\"NUM\">1</field>\n                      </shadow>\n                      <block type=\"math_number\">\n                        <field name=\"NUM\">60</field>\n                      </block>\n                    </value>\n                  </block>\n                </value>\n                <next>\n                  <block type=\"aliases_set\" editable=\"false\">\n                    <field name=\"VAR\">p4</field>\n                    <data>Set_Pump4</data>\n                    <value name=\"VALUE\">\n                      <block type=\"math_number\">\n                        <field name=\"NUM\">0</field>\n                      </block>\n                    </value>\n                    <next>\n                      <block type=\"controls_wait\">\n                        <data>2081892217519315916225266101462208622824724532352402</data>\n                        <value name=\"NUM\">\n                          <shadow type=\"math_number\">\n                            <field name=\"NUM\">1</field>\n                          </shadow>\n                          <block type=\"math_arithmetic\">\n                            <field name=\"OP\">MINUS</field>\n                            <value name=\"A\">\n                              <shadow type=\"math_number\">\n                                <field name=\"NUM\">1</field>\n                              </shadow>\n                              <block type=\"math_number\">\n                                <field name=\"NUM\">7200</field>\n                              </block>\n                            </value>\n                            <value name=\"B\">\n                              <shadow type=\"math_number\">\n                                <field name=\"NUM\">1</field>\n                              </shadow>\n                              <block type=\"math_arithmetic\">\n                                <field name=\"OP\">MULTIPLY</field>\n                                <value name=\"A\">\n                                  <shadow type=\"math_number\">\n                                    <field name=\"NUM\">1</field>\n                                  </shadow>\n                                  <block type=\"math_arithmetic\">\n                                    <field name=\"OP\">DIVIDE</field>\n                                    <value name=\"A\">\n                                      <shadow type=\"math_number\">\n                                        <field name=\"NUM\">1</field>\n                                      </shadow>\n                                      <block type=\"math_number\">\n                                        <field name=\"NUM\">1.6</field>\n                                      </block>\n                                    </value>\n                                    <value name=\"B\">\n                                      <shadow type=\"math_number\">\n                                        <field name=\"NUM\">1</field>\n                                      </shadow>\n                                      <block type=\"variables_get\">\n                                        <field name=\"VAR\">R</field>\n                                      </block>\n                                    </value>\n                                  </block>\n                                </value>\n                                <value name=\"B\">\n                                  <shadow type=\"math_number\">\n                                    <field name=\"NUM\">1</field>\n                                  </shadow>\n                                  <block type=\"math_number\">\n                                    <field name=\"NUM\">60</field>\n                                  </block>\n                                </value>\n                              </block>\n                            </value>\n                          </block>\n                        </value>\n                        <next>\n                          <block type=\"aliases_set\" editable=\"false\">\n                            <field name=\"VAR\">p4</field>\n                            <data>Set_Pump4</data>\n                            <value name=\"VALUE\">\n                              <block type=\"math_number\">\n                                <field name=\"NUM\">65</field>\n                              </block>\n                            </value>\n                            <next>\n                              <block type=\"controls_wait\">\n                                <data>246826992179232417124638109735521920220785152119248</data>\n                                <value name=\"NUM\">\n                                  <shadow type=\"math_number\">\n                                    <field name=\"NUM\">1</field>\n                                  </shadow>\n                                  <block type=\"math_arithmetic\">\n                                    <field name=\"OP\">MULTIPLY</field>\n                                    <value name=\"A\">\n                                      <shadow type=\"math_number\">\n                                        <field name=\"NUM\">1</field>\n                                      </shadow>\n                                      <block type=\"math_arithmetic\">\n                                        <field name=\"OP\">DIVIDE</field>\n                                        <value name=\"A\">\n                                          <shadow type=\"math_number\">\n                                            <field name=\"NUM\">1</field>\n                                          </shadow>\n                                          <block type=\"math_number\">\n                                            <field name=\"NUM\">3.2</field>\n                                          </block>\n                                        </value>\n                                        <value name=\"B\">\n                                          <shadow type=\"math_number\">\n                                            <field name=\"NUM\">1</field>\n                                          </shadow>\n                                          <block type=\"variables_get\">\n                                            <field name=\"VAR\">R</field>\n                                          </block>\n                                        </value>\n                                      </block>\n                                    </value>\n                                    <value name=\"B\">\n                                      <shadow type=\"math_number\">\n                                        <field name=\"NUM\">1</field>\n                                      </shadow>\n                                      <block type=\"math_number\">\n                                        <field name=\"NUM\">60</field>\n                                      </block>\n                                    </value>\n                                  </block>\n                                </value>\n                                <next>\n                                  <block type=\"aliases_set\" editable=\"false\">\n                                    <field name=\"VAR\">p4</field>\n                                    <data>Set_Pump4</data>\n                                    <value name=\"VALUE\">\n                                      <block type=\"math_number\">\n                                        <field name=\"NUM\">0</field>\n                                      </block>\n                                    </value>\n                                    <next>\n                                      <block type=\"controls_wait\">\n                                        <data>16918214021654228132102524222610216241315313425323196</data>\n                                        <value name=\"NUM\">\n                                          <shadow type=\"math_number\">\n                                            <field name=\"NUM\">1</field>\n                                          </shadow>\n                                          <block type=\"math_arithmetic\">\n                                            <field name=\"OP\">MINUS</field>\n                                            <value name=\"A\">\n                                              <shadow type=\"math_number\">\n                                                <field name=\"NUM\">1</field>\n                                              </shadow>\n                                              <block type=\"math_number\">\n                                                <field name=\"NUM\">10800</field>\n                                              </block>\n                                            </value>\n                                            <value name=\"B\">\n                                              <shadow type=\"math_number\">\n                                                <field name=\"NUM\">1</field>\n                                              </shadow>\n                                              <block type=\"math_arithmetic\">\n                                                <field name=\"OP\">MULTIPLY</field>\n                                                <value name=\"A\">\n                                                  <shadow type=\"math_number\">\n                                                    <field name=\"NUM\">1</field>\n                                                  </shadow>\n                                                  <block type=\"math_arithmetic\">\n                                                    <field name=\"OP\">DIVIDE</field>\n                                                    <value name=\"A\">\n                                                      <shadow type=\"math_number\">\n                                                        <field name=\"NUM\">1</field>\n                                                      </shadow>\n                                                      <block type=\"math_number\">\n                                                        <field name=\"NUM\">3.2</field>\n                                                      </block>\n                                                    </value>\n                                                    <value name=\"B\">\n                                                      <shadow type=\"math_number\">\n                                                        <field name=\"NUM\">1</field>\n                                                      </shadow>\n                                                      <block type=\"variables_get\">\n                                                        <field name=\"VAR\">R</field>\n                                                      </block>\n                                                    </value>\n                                                  </block>\n                                                </value>\n                                                <value name=\"B\">\n                                                  <shadow type=\"math_number\">\n                                                    <field name=\"NUM\">1</field>\n                                                  </shadow>\n                                                  <block type=\"math_number\">\n                                                    <field name=\"NUM\">60</field>\n                                                  </block>\n                                                </value>\n                                              </block>\n                                            </value>\n                                          </block>\n                                        </value>\n                                        <next>\n                                          <block type=\"aliases_set\" editable=\"false\">\n                                            <field name=\"VAR\">p4</field>\n                                            <data>Set_Pump4</data>\n                                            <value name=\"VALUE\">\n                                              <block type=\"math_number\">\n                                                <field name=\"NUM\">65</field>\n                                              </block>\n                                            </value>\n                                            <next>\n                                              <block type=\"controls_wait\">\n                                                <data>1042161733410082211911441768731219771173821224716897</data>\n                                                <value name=\"NUM\">\n                                                  <shadow type=\"math_number\">\n                                                    <field name=\"NUM\">1</field>\n                                                  </shadow>\n                                                  <block type=\"math_arithmetic\">\n                                                    <field name=\"OP\">MULTIPLY</field>\n                                                    <value name=\"A\">\n                                                      <shadow type=\"math_number\">\n                                                        <field name=\"NUM\">1</field>\n                                                      </shadow>\n                                                      <block type=\"math_arithmetic\">\n                                                        <field name=\"OP\">DIVIDE</field>\n                                                        <value name=\"A\">\n                                                          <shadow type=\"math_number\">\n                                                            <field name=\"NUM\">1</field>\n                                                          </shadow>\n                                                          <block type=\"math_number\">\n                                                            <field name=\"NUM\">4.8</field>\n                                                          </block>\n                                                        </value>\n                                                        <value name=\"B\">\n                                                          <shadow type=\"math_number\">\n                                                            <field name=\"NUM\">1</field>\n                                                          </shadow>\n                                                          <block type=\"variables_get\">\n                                                            <field name=\"VAR\">R</field>\n                                                          </block>\n                                                        </value>\n                                                      </block>\n                                                    </value>\n                                                    <value name=\"B\">\n                                                      <shadow type=\"math_number\">\n                                                        <field name=\"NUM\">1</field>\n                                                      </shadow>\n                                                      <block type=\"math_number\">\n                                                        <field name=\"NUM\">60</field>\n                                                      </block>\n                                                    </value>\n                                                  </block>\n                                                </value>\n                                                <next>\n                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                    <field name=\"VAR\">p4</field>\n                                                    <data>Set_Pump4</data>\n                                                    <value name=\"VALUE\">\n                                                      <block type=\"math_number\">\n                                                        <field name=\"NUM\">0</field>\n                                                      </block>\n                                                    </value>\n                                                    <next>\n                                                      <block type=\"controls_wait\">\n                                                        <data>1031051202328219115973150781982715566579310077163237</data>\n                                                        <value name=\"NUM\">\n                                                          <shadow type=\"math_number\">\n                                                            <field name=\"NUM\">1</field>\n                                                          </shadow>\n                                                          <block type=\"math_arithmetic\">\n                                                            <field name=\"OP\">MINUS</field>\n                                                            <value name=\"A\">\n                                                              <shadow type=\"math_number\">\n                                                                <field name=\"NUM\">1</field>\n                                                              </shadow>\n                                                              <block type=\"math_number\">\n                                                                <field name=\"NUM\">10800</field>\n                                                              </block>\n                                                            </value>\n                                                            <value name=\"B\">\n                                                              <shadow type=\"math_number\">\n                                                                <field name=\"NUM\">1</field>\n                                                              </shadow>\n                                                              <block type=\"math_arithmetic\">\n                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                <value name=\"A\">\n                                                                  <shadow type=\"math_number\">\n                                                                    <field name=\"NUM\">1</field>\n                                                                  </shadow>\n                                                                  <block type=\"math_arithmetic\">\n                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                    <value name=\"A\">\n                                                                      <shadow type=\"math_number\">\n                                                                        <field name=\"NUM\">1</field>\n                                                                      </shadow>\n                                                                      <block type=\"math_number\">\n                                                                        <field name=\"NUM\">4.8</field>\n                                                                      </block>\n                                                                    </value>\n                                                                    <value name=\"B\">\n                                                                      <shadow type=\"math_number\">\n                                                                        <field name=\"NUM\">1</field>\n                                                                      </shadow>\n                                                                      <block type=\"variables_get\">\n                                                                        <field name=\"VAR\">R</field>\n                                                                      </block>\n                                                                    </value>\n                                                                  </block>\n                                                                </value>\n                                                                <value name=\"B\">\n                                                                  <shadow type=\"math_number\">\n                                                                    <field name=\"NUM\">1</field>\n                                                                  </shadow>\n                                                                  <block type=\"math_number\">\n                                                                    <field name=\"NUM\">60</field>\n                                                                  </block>\n                                                                </value>\n                                                              </block>\n                                                            </value>\n                                                          </block>\n                                                        </value>\n                                                        <next>\n                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                            <field name=\"VAR\">p4</field>\n                                                            <data>Set_Pump4</data>\n                                                            <value name=\"VALUE\">\n                                                              <block type=\"math_number\">\n                                                                <field name=\"NUM\">65</field>\n                                                              </block>\n                                                            </value>\n                                                            <next>\n                                                              <block type=\"controls_wait\">\n                                                                <data>1128810221681692396525214159216102174164241103212562</data>\n                                                                <value name=\"NUM\">\n                                                                  <shadow type=\"math_number\">\n                                                                    <field name=\"NUM\">1</field>\n                                                                  </shadow>\n                                                                  <block type=\"math_arithmetic\">\n                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                    <value name=\"A\">\n                                                                      <shadow type=\"math_number\">\n                                                                        <field name=\"NUM\">1</field>\n                                                                      </shadow>\n                                                                      <block type=\"math_arithmetic\">\n                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                        <value name=\"A\">\n                                                                          <shadow type=\"math_number\">\n                                                                            <field name=\"NUM\">1</field>\n                                                                          </shadow>\n                                                                          <block type=\"math_number\">\n                                                                            <field name=\"NUM\">6.4</field>\n                                                                          </block>\n                                                                        </value>\n                                                                        <value name=\"B\">\n                                                                          <shadow type=\"math_number\">\n                                                                            <field name=\"NUM\">1</field>\n                                                                          </shadow>\n                                                                          <block type=\"variables_get\">\n                                                                            <field name=\"VAR\">R</field>\n                                                                          </block>\n                                                                        </value>\n                                                                      </block>\n                                                                    </value>\n                                                                    <value name=\"B\">\n                                                                      <shadow type=\"math_number\">\n                                                                        <field name=\"NUM\">1</field>\n                                                                      </shadow>\n                                                                      <block type=\"math_number\">\n                                                                        <field name=\"NUM\">60</field>\n                                                                      </block>\n                                                                    </value>\n                                                                  </block>\n                                                                </value>\n                                                                <next>\n                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                    <field name=\"VAR\">p4</field>\n                                                                    <data>Set_Pump4</data>\n                                                                    <value name=\"VALUE\">\n                                                                      <block type=\"math_number\">\n                                                                        <field name=\"NUM\">0</field>\n                                                                      </block>\n                                                                    </value>\n                                                                    <next>\n                                                                      <block type=\"controls_wait\">\n                                                                        <data>10620281611116022390252116112439597179473152899</data>\n                                                                        <value name=\"NUM\">\n                                                                          <shadow type=\"math_number\">\n                                                                            <field name=\"NUM\">1</field>\n                                                                          </shadow>\n                                                                          <block type=\"math_arithmetic\">\n                                                                            <field name=\"OP\">MINUS</field>\n                                                                            <value name=\"A\">\n                                                                              <shadow type=\"math_number\">\n                                                                                <field name=\"NUM\">1</field>\n                                                                              </shadow>\n                                                                              <block type=\"math_number\">\n                                                                                <field name=\"NUM\">10800</field>\n                                                                              </block>\n                                                                            </value>\n                                                                            <value name=\"B\">\n                                                                              <shadow type=\"math_number\">\n                                                                                <field name=\"NUM\">1</field>\n                                                                              </shadow>\n                                                                              <block type=\"math_arithmetic\">\n                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                <value name=\"A\">\n                                                                                  <shadow type=\"math_number\">\n                                                                                    <field name=\"NUM\">1</field>\n                                                                                  </shadow>\n                                                                                  <block type=\"math_arithmetic\">\n                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                    <value name=\"A\">\n                                                                                      <shadow type=\"math_number\">\n                                                                                        <field name=\"NUM\">1</field>\n                                                                                      </shadow>\n                                                                                      <block type=\"math_number\">\n                                                                                        <field name=\"NUM\">6.4</field>\n                                                                                      </block>\n                                                                                    </value>\n                                                                                    <value name=\"B\">\n                                                                                      <shadow type=\"math_number\">\n                                                                                        <field name=\"NUM\">1</field>\n                                                                                      </shadow>\n                                                                                      <block type=\"variables_get\">\n                                                                                        <field name=\"VAR\">R</field>\n                                                                                      </block>\n                                                                                    </value>\n                                                                                  </block>\n                                                                                </value>\n                                                                                <value name=\"B\">\n                                                                                  <shadow type=\"math_number\">\n                                                                                    <field name=\"NUM\">1</field>\n                                                                                  </shadow>\n                                                                                  <block type=\"math_number\">\n                                                                                    <field name=\"NUM\">60</field>\n                                                                                  </block>\n                                                                                </value>\n                                                                              </block>\n                                                                            </value>\n                                                                          </block>\n                                                                        </value>\n                                                                        <next>\n                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                            <field name=\"VAR\">p4</field>\n                                                                            <data>Set_Pump4</data>\n                                                                            <value name=\"VALUE\">\n                                                                              <block type=\"math_number\">\n                                                                                <field name=\"NUM\">65</field>\n                                                                              </block>\n                                                                            </value>\n                                                                            <next>\n                                                                              <block type=\"controls_wait\">\n                                                                                <data>162244191631461817869312448010110514521010019720321157</data>\n                                                                                <value name=\"NUM\">\n                                                                                  <shadow type=\"math_number\">\n                                                                                    <field name=\"NUM\">1</field>\n                                                                                  </shadow>\n                                                                                  <block type=\"math_arithmetic\">\n                                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                                    <value name=\"A\">\n                                                                                      <shadow type=\"math_number\">\n                                                                                        <field name=\"NUM\">1</field>\n                                                                                      </shadow>\n                                                                                      <block type=\"math_arithmetic\">\n                                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                                        <value name=\"A\">\n                                                                                          <shadow type=\"math_number\">\n                                                                                            <field name=\"NUM\">1</field>\n                                                                                          </shadow>\n                                                                                          <block type=\"math_number\">\n                                                                                            <field name=\"NUM\">8</field>\n                                                                                          </block>\n                                                                                        </value>\n                                                                                        <value name=\"B\">\n                                                                                          <shadow type=\"math_number\">\n                                                                                            <field name=\"NUM\">1</field>\n                                                                                          </shadow>\n                                                                                          <block type=\"variables_get\">\n                                                                                            <field name=\"VAR\">R</field>\n                                                                                          </block>\n                                                                                        </value>\n                                                                                      </block>\n                                                                                    </value>\n                                                                                    <value name=\"B\">\n                                                                                      <shadow type=\"math_number\">\n                                                                                        <field name=\"NUM\">1</field>\n                                                                                      </shadow>\n                                                                                      <block type=\"math_number\">\n                                                                                        <field name=\"NUM\">60</field>\n                                                                                      </block>\n                                                                                    </value>\n                                                                                  </block>\n                                                                                </value>\n                                                                                <next>\n                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                    <field name=\"VAR\">p4</field>\n                                                                                    <data>Set_Pump4</data>\n                                                                                    <value name=\"VALUE\">\n                                                                                      <block type=\"math_number\">\n                                                                                        <field name=\"NUM\">0</field>\n                                                                                      </block>\n                                                                                    </value>\n                                                                                    <next>\n                                                                                      <block type=\"controls_wait\">\n                                                                                        <data>972279617358169166704585116157771292429616120123183</data>\n                                                                                        <value name=\"NUM\">\n                                                                                          <shadow type=\"math_number\">\n                                                                                            <field name=\"NUM\">1</field>\n                                                                                          </shadow>\n                                                                                          <block type=\"math_arithmetic\">\n                                                                                            <field name=\"OP\">MINUS</field>\n                                                                                            <value name=\"A\">\n                                                                                              <shadow type=\"math_number\">\n                                                                                                <field name=\"NUM\">1</field>\n                                                                                              </shadow>\n                                                                                              <block type=\"math_number\">\n                                                                                                <field name=\"NUM\">10800</field>\n                                                                                              </block>\n                                                                                            </value>\n                                                                                            <value name=\"B\">\n                                                                                              <shadow type=\"math_number\">\n                                                                                                <field name=\"NUM\">1</field>\n                                                                                              </shadow>\n                                                                                              <block type=\"math_arithmetic\">\n                                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                                <value name=\"A\">\n                                                                                                  <shadow type=\"math_number\">\n                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                  </shadow>\n                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                                    <value name=\"A\">\n                                                                                                      <shadow type=\"math_number\">\n                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                      </shadow>\n                                                                                                      <block type=\"math_number\">\n                                                                                                        <field name=\"NUM\">8</field>\n                                                                                                      </block>\n                                                                                                    </value>\n                                                                                                    <value name=\"B\">\n                                                                                                      <shadow type=\"math_number\">\n                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                      </shadow>\n                                                                                                      <block type=\"variables_get\">\n                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                      </block>\n                                                                                                    </value>\n                                                                                                  </block>\n                                                                                                </value>\n                                                                                                <value name=\"B\">\n                                                                                                  <shadow type=\"math_number\">\n                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                  </shadow>\n                                                                                                  <block type=\"math_number\">\n                                                                                                    <field name=\"NUM\">60</field>\n                                                                                                  </block>\n                                                                                                </value>\n                                                                                              </block>\n                                                                                            </value>\n                                                                                          </block>\n                                                                                        </value>\n                                                                                        <next>\n                                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                                            <field name=\"VAR\">p4</field>\n                                                                                            <data>Set_Pump4</data>\n                                                                                            <value name=\"VALUE\">\n                                                                                              <block type=\"math_number\">\n                                                                                                <field name=\"NUM\">65</field>\n                                                                                              </block>\n                                                                                            </value>\n                                                                                            <next>\n                                                                                              <block type=\"controls_wait\">\n                                                                                                <data>2052090599222015415220754202552174592201212027641</data>\n                                                                                                <value name=\"NUM\">\n                                                                                                  <shadow type=\"math_number\">\n                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                  </shadow>\n                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                                                    <value name=\"A\">\n                                                                                                      <shadow type=\"math_number\">\n                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                      </shadow>\n                                                                                                      <block type=\"math_arithmetic\">\n                                                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                                                        <value name=\"A\">\n                                                                                                          <shadow type=\"math_number\">\n                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                          </shadow>\n                                                                                                          <block type=\"math_number\">\n                                                                                                            <field name=\"NUM\">10.4</field>\n                                                                                                          </block>\n                                                                                                        </value>\n                                                                                                        <value name=\"B\">\n                                                                                                          <shadow type=\"math_number\">\n                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                          </shadow>\n                                                                                                          <block type=\"variables_get\">\n                                                                                                            <field name=\"VAR\">R</field>\n                                                                                                          </block>\n                                                                                                        </value>\n                                                                                                      </block>\n                                                                                                    </value>\n                                                                                                    <value name=\"B\">\n                                                                                                      <shadow type=\"math_number\">\n                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                      </shadow>\n                                                                                                      <block type=\"math_number\">\n                                                                                                        <field name=\"NUM\">60</field>\n                                                                                                      </block>\n                                                                                                    </value>\n                                                                                                  </block>\n                                                                                                </value>\n                                                                                                <next>\n                                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                                    <field name=\"VAR\">p4</field>\n                                                                                                    <data>Set_Pump4</data>\n                                                                                                    <value name=\"VALUE\">\n                                                                                                      <block type=\"math_number\">\n                                                                                                        <field name=\"NUM\">0</field>\n                                                                                                      </block>\n                                                                                                    </value>\n                                                                                                    <next>\n                                                                                                      <block type=\"controls_wait\">\n                                                                                                        <data>4846118185520117219239144991155639311731240058</data>\n                                                                                                        <value name=\"NUM\">\n                                                                                                          <shadow type=\"math_number\">\n                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                          </shadow>\n                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                            <field name=\"OP\">MINUS</field>\n                                                                                                            <value name=\"A\">\n                                                                                                              <shadow type=\"math_number\">\n                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                              </shadow>\n                                                                                                              <block type=\"math_number\">\n                                                                                                                <field name=\"NUM\">10800</field>\n                                                                                                              </block>\n                                                                                                            </value>\n                                                                                                            <value name=\"B\">\n                                                                                                              <shadow type=\"math_number\">\n                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                              </shadow>\n                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                                                <value name=\"A\">\n                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                  </shadow>\n                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                                                    <value name=\"A\">\n                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                      </shadow>\n                                                                                                                      <block type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">10.4</field>\n                                                                                                                      </block>\n                                                                                                                    </value>\n                                                                                                                    <value name=\"B\">\n                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                      </shadow>\n                                                                                                                      <block type=\"variables_get\">\n                                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                                      </block>\n                                                                                                                    </value>\n                                                                                                                  </block>\n                                                                                                                </value>\n                                                                                                                <value name=\"B\">\n                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                  </shadow>\n                                                                                                                  <block type=\"math_number\">\n                                                                                                                    <field name=\"NUM\">60</field>\n                                                                                                                  </block>\n                                                                                                                </value>\n                                                                                                              </block>\n                                                                                                            </value>\n                                                                                                          </block>\n                                                                                                        </value>\n                                                                                                        <next>\n                                                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                                                            <field name=\"VAR\">p4</field>\n                                                                                                            <data>Set_Pump4</data>\n                                                                                                            <value name=\"VALUE\">\n                                                                                                              <block type=\"math_number\">\n                                                                                                                <field name=\"NUM\">65</field>\n                                                                                                              </block>\n                                                                                                            </value>\n                                                                                                            <next>\n                                                                                                              <block type=\"controls_wait\">\n                                                                                                                <data>10212410220133209228181715712552252111658693106234153</data>\n                                                                                                                <value name=\"NUM\">\n                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                  </shadow>\n                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                                                                    <value name=\"A\">\n                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                      </shadow>\n                                                                                                                      <block type=\"math_arithmetic\">\n                                                                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                                                                        <value name=\"A\">\n                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                          </shadow>\n                                                                                                                          <block type=\"math_number\">\n                                                                                                                            <field name=\"NUM\">12</field>\n                                                                                                                          </block>\n                                                                                                                        </value>\n                                                                                                                        <value name=\"B\">\n                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                          </shadow>\n                                                                                                                          <block type=\"variables_get\">\n                                                                                                                            <field name=\"VAR\">R</field>\n                                                                                                                          </block>\n                                                                                                                        </value>\n                                                                                                                      </block>\n                                                                                                                    </value>\n                                                                                                                    <value name=\"B\">\n                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                      </shadow>\n                                                                                                                      <block type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">60</field>\n                                                                                                                      </block>\n                                                                                                                    </value>\n                                                                                                                  </block>\n                                                                                                                </value>\n                                                                                                                <next>\n                                                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                    <field name=\"VAR\">p4</field>\n                                                                                                                    <data>Set_Pump4</data>\n                                                                                                                    <value name=\"VALUE\">\n                                                                                                                      <block type=\"math_number\">\n                                                                                                                        <field name=\"NUM\">0</field>\n                                                                                                                      </block>\n                                                                                                                    </value>\n                                                                                                                    <next>\n                                                                                                                      <block type=\"controls_wait\">\n                                                                                                                        <data>381311242501731351682252084111221492225121522821478178</data>\n                                                                                                                        <value name=\"NUM\">\n                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                          </shadow>\n                                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                                            <field name=\"OP\">MINUS</field>\n                                                                                                                            <value name=\"A\">\n                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                              </shadow>\n                                                                                                                              <block type=\"math_number\">\n                                                                                                                                <field name=\"NUM\">10800</field>\n                                                                                                                              </block>\n                                                                                                                            </value>\n                                                                                                                            <value name=\"B\">\n                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                              </shadow>\n                                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                <value name=\"A\">\n                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                  </shadow>\n                                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                                                                    <value name=\"A\">\n                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                      </shadow>\n                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">12</field>\n                                                                                                                                      </block>\n                                                                                                                                    </value>\n                                                                                                                                    <value name=\"B\">\n                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                      </shadow>\n                                                                                                                                      <block type=\"variables_get\">\n                                                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                                                      </block>\n                                                                                                                                    </value>\n                                                                                                                                  </block>\n                                                                                                                                </value>\n                                                                                                                                <value name=\"B\">\n                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                  </shadow>\n                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                    <field name=\"NUM\">60</field>\n                                                                                                                                  </block>\n                                                                                                                                </value>\n                                                                                                                              </block>\n                                                                                                                            </value>\n                                                                                                                          </block>\n                                                                                                                        </value>\n                                                                                                                        <next>\n                                                                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                            <field name=\"VAR\">p4</field>\n                                                                                                                            <data>Set_Pump4</data>\n                                                                                                                            <value name=\"VALUE\">\n                                                                                                                              <block type=\"math_number\">\n                                                                                                                                <field name=\"NUM\">65</field>\n                                                                                                                              </block>\n                                                                                                                            </value>\n                                                                                                                            <next>\n                                                                                                                              <block type=\"controls_wait\">\n                                                                                                                                <data>19195522525198249325519212237912325412416445109128</data>\n                                                                                                                                <value name=\"NUM\">\n                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                  </shadow>\n                                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                    <value name=\"A\">\n                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                      </shadow>\n                                                                                                                                      <block type=\"math_arithmetic\">\n                                                                                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                                                                                        <value name=\"A\">\n                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                          </shadow>\n                                                                                                                                          <block type=\"math_number\">\n                                                                                                                                            <field name=\"NUM\">16</field>\n                                                                                                                                          </block>\n                                                                                                                                        </value>\n                                                                                                                                        <value name=\"B\">\n                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                          </shadow>\n                                                                                                                                          <block type=\"variables_get\">\n                                                                                                                                            <field name=\"VAR\">R</field>\n                                                                                                                                          </block>\n                                                                                                                                        </value>\n                                                                                                                                      </block>\n                                                                                                                                    </value>\n                                                                                                                                    <value name=\"B\">\n                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                      </shadow>\n                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">60</field>\n                                                                                                                                      </block>\n                                                                                                                                    </value>\n                                                                                                                                  </block>\n                                                                                                                                </value>\n                                                                                                                                <next>\n                                                                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                    <field name=\"VAR\">p4</field>\n                                                                                                                                    <data>Set_Pump4</data>\n                                                                                                                                    <value name=\"VALUE\">\n                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                        <field name=\"NUM\">0</field>\n                                                                                                                                      </block>\n                                                                                                                                    </value>\n                                                                                                                                    <next>\n                                                                                                                                      <block type=\"controls_wait\">\n                                                                                                                                        <data>2191951992262072051451441111152311872131601056710314718699</data>\n                                                                                                                                        <value name=\"NUM\">\n                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                          </shadow>\n                                                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                                                            <field name=\"OP\">MINUS</field>\n                                                                                                                                            <value name=\"A\">\n                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                              </shadow>\n                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                <field name=\"NUM\">10800</field>\n                                                                                                                                              </block>\n                                                                                                                                            </value>\n                                                                                                                                            <value name=\"B\">\n                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                              </shadow>\n                                                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                                <value name=\"A\">\n                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                  </shadow>\n                                                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                                                                                    <value name=\"A\">\n                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                      </shadow>\n                                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">16</field>\n                                                                                                                                                      </block>\n                                                                                                                                                    </value>\n                                                                                                                                                    <value name=\"B\">\n                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                      </shadow>\n                                                                                                                                                      <block type=\"variables_get\">\n                                                                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                                                                      </block>\n                                                                                                                                                    </value>\n                                                                                                                                                  </block>\n                                                                                                                                                </value>\n                                                                                                                                                <value name=\"B\">\n                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                  </shadow>\n                                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                                    <field name=\"NUM\">60</field>\n                                                                                                                                                  </block>\n                                                                                                                                                </value>\n                                                                                                                                              </block>\n                                                                                                                                            </value>\n                                                                                                                                          </block>\n                                                                                                                                        </value>\n                                                                                                                                        <next>\n                                                                                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                            <field name=\"VAR\">p4</field>\n                                                                                                                                            <data>Set_Pump4</data>\n                                                                                                                                            <value name=\"VALUE\">\n                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                <field name=\"NUM\">65</field>\n                                                                                                                                              </block>\n                                                                                                                                            </value>\n                                                                                                                                            <next>\n                                                                                                                                              <block type=\"controls_wait\">\n                                                                                                                                                <data>1513089847450143661171764222711120391053123112555</data>\n                                                                                                                                                <value name=\"NUM\">\n                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                  </shadow>\n                                                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                                                    <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                                    <value name=\"A\">\n                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                      </shadow>\n                                                                                                                                                      <block type=\"math_arithmetic\">\n                                                                                                                                                        <field name=\"OP\">DIVIDE</field>\n                                                                                                                                                        <value name=\"A\">\n                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                          </shadow>\n                                                                                                                                                          <block type=\"math_number\">\n                                                                                                                                                            <field name=\"NUM\">17.6</field>\n                                                                                                                                                          </block>\n                                                                                                                                                        </value>\n                                                                                                                                                        <value name=\"B\">\n                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                          </shadow>\n                                                                                                                                                          <block type=\"variables_get\">\n                                                                                                                                                            <field name=\"VAR\">R</field>\n                                                                                                                                                          </block>\n                                                                                                                                                        </value>\n                                                                                                                                                      </block>\n                                                                                                                                                    </value>\n                                                                                                                                                    <value name=\"B\">\n                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                      </shadow>\n                                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">60</field>\n                                                                                                                                                      </block>\n                                                                                                                                                    </value>\n                                                                                                                                                  </block>\n                                                                                                                                                </value>\n                                                                                                                                                <next>\n                                                                                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                                    <field name=\"VAR\">p4</field>\n                                                                                                                                                    <data>Set_Pump4</data>\n                                                                                                                                                    <value name=\"VALUE\">\n                                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                                        <field name=\"NUM\">0</field>\n                                                                                                                                                      </block>\n                                                                                                                                                    </value>\n                                                                                                                                                    <next>\n                                                                                                                                                      <block type=\"controls_wait\">\n                                                                                                                                                        <data>58170212110156302248743239594715202351821144287</data>\n                                                                                                                                                        <value name=\"NUM\">\n                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                          </shadow>\n                                                                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                                                                            <field name=\"OP\">MINUS</field>\n                                                                                                                                                            <value name=\"A\">\n                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                              </shadow>\n                                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                                <field name=\"NUM\">10800</field>\n                                                                                                                                                              </block>\n                                                                                                                                                            </value>\n                                                                                                                                                            <value name=\"B\">\n                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                              </shadow>\n                                                                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                                                                <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                                                <value name=\"A\">\n                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                  </shadow>\n                                                                                                                                                                  <block type=\"math_arithmetic\">\n                                                                                                                                                                    <field name=\"OP\">DIVIDE</field>\n                                                                                                                                                                    <value name=\"A\">\n                                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                                      </shadow>\n                                                                                                                                                                      <block type=\"math_number\">\n                                                                                                                                                                        <field name=\"NUM\">17.6</field>\n                                                                                                                                                                      </block>\n                                                                                                                                                                    </value>\n                                                                                                                                                                    <value name=\"B\">\n                                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                                      </shadow>\n                                                                                                                                                                      <block type=\"variables_get\">\n                                                                                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                                                                                      </block>\n                                                                                                                                                                    </value>\n                                                                                                                                                                  </block>\n                                                                                                                                                                </value>\n                                                                                                                                                                <value name=\"B\">\n                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                  </shadow>\n                                                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                                                    <field name=\"NUM\">60</field>\n                                                                                                                                                                  </block>\n                                                                                                                                                                </value>\n                                                                                                                                                              </block>\n                                                                                                                                                            </value>\n                                                                                                                                                          </block>\n                                                                                                                                                        </value>\n                                                                                                                                                        <next>\n                                                                                                                                                          <block type=\"controls_whileUntil\">\n                                                                                                                                                            <field name=\"MODE\">WHILE</field>\n                                                                                                                                                            <data>17340146186898124347971454230448019519655913815</data>\n                                                                                                                                                            <value name=\"BOOL\">\n                                                                                                                                                              <shadow type=\"logic_boolean\">\n                                                                                                                                                                <field name=\"BOOL\">TRUE</field>\n                                                                                                                                                              </shadow>\n                                                                                                                                                            </value>\n                                                                                                                                                            <statement name=\"DO\">\n                                                                                                                                                              <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                                                <field name=\"VAR\">p4</field>\n                                                                                                                                                                <data>Set_Pump4</data>\n                                                                                                                                                                <value name=\"VALUE\">\n                                                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                                                    <field name=\"NUM\">65</field>\n                                                                                                                                                                  </block>\n                                                                                                                                                                </value>\n                                                                                                                                                                <next>\n                                                                                                                                                                  <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                                                    <field name=\"VAR\">p3</field>\n                                                                                                                                                                    <data>Set_Pump3</data>\n                                                                                                                                                                    <value name=\"VALUE\">\n                                                                                                                                                                      <block type=\"variables_get\">\n                                                                                                                                                                        <field name=\"VAR\">R</field>\n                                                                                                                                                                      </block>\n                                                                                                                                                                    </value>\n                                                                                                                                                                    <next>\n                                                                                                                                                                      <block type=\"controls_wait\">\n                                                                                                                                                                        <data>21968202212116524416023814421718120135657153144174197</data>\n                                                                                                                                                                        <value name=\"NUM\">\n                                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                                          </shadow>\n                                                                                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                                                                                            <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                                                            <value name=\"A\">\n                                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                                              </shadow>\n                                                                                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                                                                                <field name=\"OP\">DIVIDE</field>\n                                                                                                                                                                                <value name=\"A\">\n                                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                                  </shadow>\n                                                                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                                                                    <field name=\"NUM\">20</field>\n                                                                                                                                                                                  </block>\n                                                                                                                                                                                </value>\n                                                                                                                                                                                <value name=\"B\">\n                                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                                  </shadow>\n                                                                                                                                                                                  <block type=\"variables_get\">\n                                                                                                                                                                                    <field name=\"VAR\">R</field>\n                                                                                                                                                                                  </block>\n                                                                                                                                                                                </value>\n                                                                                                                                                                              </block>\n                                                                                                                                                                            </value>\n                                                                                                                                                                            <value name=\"B\">\n                                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                                              </shadow>\n                                                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                                                <field name=\"NUM\">60</field>\n                                                                                                                                                                              </block>\n                                                                                                                                                                            </value>\n                                                                                                                                                                          </block>\n                                                                                                                                                                        </value>\n                                                                                                                                                                        <next>\n                                                                                                                                                                          <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                                                            <field name=\"VAR\">p4</field>\n                                                                                                                                                                            <data>Set_Pump4</data>\n                                                                                                                                                                            <value name=\"VALUE\">\n                                                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                                                <field name=\"NUM\">0</field>\n                                                                                                                                                                              </block>\n                                                                                                                                                                            </value>\n                                                                                                                                                                            <next>\n                                                                                                                                                                              <block type=\"aliases_set\" editable=\"false\">\n                                                                                                                                                                                <field name=\"VAR\">p3</field>\n                                                                                                                                                                                <data>Set_Pump3</data>\n                                                                                                                                                                                <value name=\"VALUE\">\n                                                                                                                                                                                  <block type=\"variables_get\">\n                                                                                                                                                                                    <field name=\"VAR\">R</field>\n                                                                                                                                                                                  </block>\n                                                                                                                                                                                </value>\n                                                                                                                                                                                <next>\n                                                                                                                                                                                  <block type=\"controls_wait\">\n                                                                                                                                                                                    <data>19520541451949723920438977567317417021824545126</data>\n                                                                                                                                                                                    <value name=\"NUM\">\n                                                                                                                                                                                      <shadow type=\"math_number\">\n                                                                                                                                                                                        <field name=\"NUM\">1</field>\n                                                                                                                                                                                      </shadow>\n                                                                                                                                                                                      <block type=\"math_arithmetic\">\n                                                                                                                                                                                        <field name=\"OP\">MINUS</field>\n                                                                                                                                                                                        <value name=\"A\">\n                                                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                                                          </shadow>\n                                                                                                                                                                                          <block type=\"math_number\">\n                                                                                                                                                                                            <field name=\"NUM\">10800</field>\n                                                                                                                                                                                          </block>\n                                                                                                                                                                                        </value>\n                                                                                                                                                                                        <value name=\"B\">\n                                                                                                                                                                                          <shadow type=\"math_number\">\n                                                                                                                                                                                            <field name=\"NUM\">1</field>\n                                                                                                                                                                                          </shadow>\n                                                                                                                                                                                          <block type=\"math_arithmetic\">\n                                                                                                                                                                                            <field name=\"OP\">MULTIPLY</field>\n                                                                                                                                                                                            <value name=\"A\">\n                                                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                                                              </shadow>\n                                                                                                                                                                                              <block type=\"math_arithmetic\">\n                                                                                                                                                                                                <field name=\"OP\">DIVIDE</field>\n                                                                                                                                                                                                <value name=\"A\">\n                                                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                                                  </shadow>\n                                                                                                                                                                                                  <block type=\"math_number\">\n                                                                                                                                                                                                    <field name=\"NUM\">20</field>\n                                                                                                                                                                                                  </block>\n                                                                                                                                                                                                </value>\n                                                                                                                                                                                                <value name=\"B\">\n                                                                                                                                                                                                  <shadow type=\"math_number\">\n                                                                                                                                                                                                    <field name=\"NUM\">1</field>\n                                                                                                                                                                                                  </shadow>\n                                                                                                                                                                                                  <block type=\"variables_get\">\n                                                                                                                                                                                                    <field name=\"VAR\">R</field>\n                                                                                                                                                                                                  </block>\n                                                                                                                                                                                                </value>\n                                                                                                                                                                                              </block>\n                                                                                                                                                                                            </value>\n                                                                                                                                                                                            <value name=\"B\">\n                                                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                                                              </shadow>\n                                                                                                                                                                                              <block type=\"math_number\">\n                                                                                                                                                                                                <field name=\"NUM\">60</field>\n                                                                                                                                                                                              </block>\n                                                                                                                                                                                            </value>\n                                                                                                                                                                                          </block>\n                                                                                                                                                                                        </value>\n                                                                                                                                                                                      </block>\n                                                                                                                                                                                    </value>\n                                                                                                                                                                                  </block>\n                                                                                                                                                                                </next>\n                                                                                                                                                                              </block>\n                                                                                                                                                                            </next>\n                                                                                                                                                                          </block>\n                                                                                                                                                                        </next>\n                                                                                                                                                                      </block>\n                                                                                                                                                                    </next>\n                                                                                                                                                                  </block>\n                                                                                                                                                                </next>\n                                                                                                                                                              </block>\n                                                                                                                                                            </statement>\n                                                                                                                                                            <value name=\"NUM\">\n                                                                                                                                                              <shadow type=\"math_number\">\n                                                                                                                                                                <field name=\"NUM\">1</field>\n                                                                                                                                                              </shadow>\n                                                                                                                                                            </value>\n                                                                                                                                                          </block>\n                                                                                                                                                        </next>\n                                                                                                                                                      </block>\n                                                                                                                                                    </next>\n                                                                                                                                                  </block>\n                                                                                                                                                </next>\n                                                                                                                                              </block>\n                                                                                                                                            </next>\n                                                                                                                                          </block>\n                                                                                                                                        </next>\n                                                                                                                                      </block>\n                                                                                                                                    </next>\n                                                                                                                                  </block>\n                                                                                                                                </next>\n                                                                                                                              </block>\n                                                                                                                            </next>\n                                                                                                                          </block>\n                                                                                                                        </next>\n                                                                                                                      </block>\n                                                                                                                    </next>\n                                                                                                                  </block>\n                                                                                                                </next>\n                                                                                                              </block>\n                                                                                                            </next>\n                                                                                                          </block>\n                                                                                                        </next>\n                                                                                                      </block>\n                                                                                                    </next>\n                                                                                                  </block>\n                                                                                                </next>\n                                                                                              </block>\n                                                                                            </next>\n                                                                                          </block>\n                                                                                        </next>\n                                                                                      </block>\n                                                                                    </next>\n                                                                                  </block>\n                                                                                </next>\n                                                                              </block>\n                                                                            </next>\n                                                                          </block>\n                                                                        </next>\n                                                                      </block>\n                                                                    </next>\n                                                                  </block>\n                                                                </next>\n                                                              </block>\n                                                            </next>\n                                                          </block>\n                                                        </next>\n                                                      </block>\n                                                    </next>\n                                                  </block>\n                                                </next>\n                                              </block>\n                                            </next>\n                                          </block>\n                                        </next>\n                                      </block>\n                                    </next>\n                                  </block>\n                                </next>\n                              </block>\n                            </next>\n                          </block>\n                        </next>\n                      </block>\n                    </next>\n                  </block>\n                </next>\n              </block>\n            </next>\n          </block>\n        </next>\n      </block>\n    </next>\n  </block>\n</xml>', '-- TOP LEVEL\nSET @R = 8.50209;\nDO SLEEP(900);/*7713825325462179116272302021281489133203941954520125*/SET @Set_Pump4 = 65;\nDO SLEEP((1.6 / @R) * 60);/*3850125162154302534818532425669470141631713179*/SET @Set_Pump4 = 0;\nDO SLEEP(7200 - (1.6 / @R) * 60);/*2081892217519315916225266101462208622824724532352402*/SET @Set_Pump4 = 65;\nDO SLEEP((3.2 / @R) * 60);/*246826992179232417124638109735521920220785152119248*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (3.2 / @R) * 60);/*16918214021654228132102524222610216241315313425323196*/SET @Set_Pump4 = 65;\nDO SLEEP((4.8 / @R) * 60);/*1042161733410082211911441768731219771173821224716897*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (4.8 / @R) * 60);/*1031051202328219115973150781982715566579310077163237*/SET @Set_Pump4 = 65;\nDO SLEEP((6.4 / @R) * 60);/*1128810221681692396525214159216102174164241103212562*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (6.4 / @R) * 60);/*10620281611116022390252116112439597179473152899*/SET @Set_Pump4 = 65;\nDO SLEEP((8 / @R) * 60);/*162244191631461817869312448010110514521010019720321157*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (8 / @R) * 60);/*972279617358169166704585116157771292429616120123183*/SET @Set_Pump4 = 65;\nDO SLEEP((10.4 / @R) * 60);/*2052090599222015415220754202552174592201212027641*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (10.4 / @R) * 60);/*4846118185520117219239144991155639311731240058*/SET @Set_Pump4 = 65;\nDO SLEEP((12 / @R) * 60);/*10212410220133209228181715712552252111658693106234153*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (12 / @R) * 60);/*381311242501731351682252084111221492225121522821478178*/SET @Set_Pump4 = 65;\nDO SLEEP((16 / @R) * 60);/*19195522525198249325519212237912325412416445109128*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (16 / @R) * 60);/*2191951992262072051451441111152311872131601056710314718699*/SET @Set_Pump4 = 65;\nDO SLEEP((17.6 / @R) * 60);/*1513089847450143661171764222711120391053123112555*/SET @Set_Pump4 = 0;\nDO SLEEP(10800 - (17.6 / @R) * 60);/*58170212110156302248743239594715202351821144287*/WHILE TRUE DO\n  SET @Set_Pump4 = 65;\n  SET @Set_Pump3 = @R;\n  DO SLEEP((20 / @R) * 60);/*21968202212116524416023814421718120135657153144174197*/SET @Set_Pump4 = 0;\n  SET @Set_Pump3 = @R;\n  DO SLEEP(10800 - (20 / @R) * 60);/*19520541451949723920438977567317417021824545126*/\nDO SLEEP(1);/*17340146186898124347971454230448019519655913815*/\nEND WHILE;\n', 1);

-- --------------------------------------------------------

--
-- Table structure for table `parameter`
--

CREATE TABLE `parameter` (
  `Id` int(11) NOT NULL,
  `Table_Name` varchar(50) COLLATE utf8_unicode_ci DEFAULT 'workflow',
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Field_Name` varchar(50) COLLATE utf8_unicode_ci DEFAULT 'Value',
  `Phase_Id` int(11) DEFAULT NULL,
  `Unit` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Min` float DEFAULT NULL,
  `Max` float DEFAULT NULL,
  `Dot_Precision` tinyint(3) DEFAULT NULL COMMENT 'Decimal precision'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `parameter`
--

INSERT INTO `parameter` (`Id`, `Table_Name`, `Name`, `Field_Name`, `Phase_Id`, `Unit`, `Min`, `Max`, `Dot_Precision`) VALUES
(1, 'workflow', 'Temperature', 'Value', NULL, '°C', 0, 80, 1),
(2, 'workflow', 'Temperature', 'Pid_1', NULL, '', 0, 1000, NULL),
(3, 'workflow', 'Temperature', 'Pid_2', NULL, '', 0, 1000, NULL),
(4, 'workflow', 'Temperature', 'Pid_3', NULL, '', 0, 1000, NULL),
(5, 'workflow', 'Temperature', 'Pid_4', NULL, '', 0, 0.999999, NULL),
(6, 'workflow', 'Temperature', 'Pid_5', NULL, '°C', 0, 10, NULL),
(7, 'workflow', 'Temperature', 'Pid_6', NULL, '°C', 0, 10, NULL),
(8, 'workflow', 'Temperature', 'Pid_7', NULL, '', 0, 10, NULL),
(9, 'workflow', 'Temperature', 'Pid_8', NULL, 's', 0, 120, NULL),
(10, 'workflow', 'Temperature', 'Pid_9', NULL, '°C', 0, 10, NULL),
(11, 'workflow', 'Temperature', 'Pid_10', NULL, '°C', 0, 10, NULL),
(12, 'workflow', 'Temperature', 'Pid_11', NULL, '', 0, 10, NULL),
(13, 'workflow', 'Temperature', 'Pid_12', NULL, '', 0, 10, NULL),
(14, 'workflow', 'Temperature', 'Pid_13', NULL, 's', 1, 60, NULL),
(15, 'workflow', 'Temperature', 'Alarm_Lowest', NULL, '°C', NULL, NULL, NULL),
(16, 'workflow', 'Temperature', 'Alarm_Low', NULL, '°C', NULL, NULL, NULL),
(17, 'workflow', 'Temperature', 'Alarm_High', NULL, '°C', NULL, NULL, NULL),
(18, 'workflow', 'Temperature', 'Alarm_Highest', NULL, '°C', NULL, NULL, NULL),
(19, 'synoptic', 'Cooler', 'Value', NULL, '%', 0, 100, -2),
(20, 'workflow', 'Cooler', 'Value', NULL, '%', 0, 100, -2),
(21, 'synoptic', 'Heater', 'Value', NULL, '%', 0, 100, -2),
(22, 'workflow', 'Heater', 'Value', NULL, '%', 0, 100, -2),
(23, 'workflow', 'Stirring', 'Value', NULL, 'rpm', -2000, 2000, 0),
(24, 'synoptic', 'Stirring', 'Value', NULL, 'rpm', -2000, 2000, 0),
(25, 'workflow', 'Stirring_Power', 'Value', NULL, 'W', NULL, NULL, 1),
(26, 'workflow', 'Stirring_Current', 'Value', NULL, '%', NULL, NULL, 1),
(27, 'workflow', 'pH', 'Value', NULL, '', 0, 14, 2),
(28, 'workflow', 'pH', 'Pid_1', NULL, '', 0, 1000, NULL),
(29, 'workflow', 'pH', 'Pid_2', NULL, '', 0, 1000, NULL),
(30, 'workflow', 'pH', 'Pid_3', NULL, '', 0, 1000, NULL),
(31, 'workflow', 'pH', 'Pid_4', NULL, '', 0, 0.999999, NULL),
(32, 'workflow', 'pH', 'Pid_5', NULL, '', 0, 10, NULL),
(33, 'workflow', 'pH', 'Pid_6', NULL, '', 0, 10, NULL),
(34, 'workflow', 'pH', 'Pid_7', NULL, '', 0, 10, NULL),
(35, 'workflow', 'pH', 'Pid_8', NULL, 's', 0, 120, NULL),
(36, 'workflow', 'pH', 'Pid_9', NULL, '', 0, 10, NULL),
(37, 'workflow', 'pH', 'Pid_10', NULL, '', 0, 10, NULL),
(38, 'workflow', 'pH', 'Pid_11', NULL, '', 0, 10, NULL),
(39, 'workflow', 'pH', 'Pid_12', NULL, '', 0, 10, NULL),
(40, 'workflow', 'pH', 'Pid_13', NULL, 's', 1, 60, NULL),
(41, 'workflow', 'pH', 'Alarm_Lowest', NULL, '', NULL, NULL, NULL),
(42, 'workflow', 'pH', 'Alarm_Low', NULL, '', NULL, NULL, NULL),
(43, 'workflow', 'pH', 'Alarm_High', NULL, '', NULL, NULL, NULL),
(44, 'workflow', 'pH', 'Alarm_Highest', NULL, '', NULL, NULL, NULL),
(45, 'workflow', 'Temperature_pH', 'Value', NULL, '°C', NULL, NULL, 1),
(46, 'workflow', 'ORP', 'Value', NULL, 'mV', NULL, NULL, 0),
(47, 'workflow', 'dO2', 'Value', NULL, '%', 0, 200, 0),
(48, 'workflow', 'Temperature_dO2', 'Value', NULL, '°C', NULL, NULL, 1),
(49, 'workflow', 'Conductivity', 'Value', NULL, 'µS/cm', NULL, NULL, 1),
(50, 'workflow', 'Pressure', 'Value', NULL, 'bar', 0, 1.6, 2),
(51, 'synoptic', 'Pressure', 'Value', NULL, 'bar', 0, 1.6, 2),
(52, 'workflow', 'Air_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(53, 'synoptic', 'Air_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(54, 'workflow', 'O2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(55, 'synoptic', 'O2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(56, 'workflow', 'N2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(57, 'synoptic', 'N2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(58, 'workflow', 'CO2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(59, 'synoptic', 'CO2_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(60, 'workflow', 'Gas_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(61, 'synoptic', 'Gas_Flow', 'Value', NULL, 'Nl/min', 0, 20, 1),
(62, 'workflow', 'Gas_Flow', 'Period', NULL, 's', 10, 120, NULL),
(63, 'workflow', 'Pump1', 'Value', NULL, 'ml/min', 0, 28.5, 1),
(64, 'synoptic', 'Pump1', 'Value', NULL, '%', 0, 100, 0),
(65, 'workflow', 'Pump1', 'Period', NULL, 's', 10, 120, NULL),
(66, 'workflow', 'Pump1_Total_Flow', 'Value', NULL, 'ml', NULL, NULL, 3),
(67, 'workflow', 'Pump2', 'Value', NULL, 'ml/min', 0, 9.41, 1),
(68, 'synoptic', 'Pump2', 'Value', NULL, '%', 0, 100, 0),
(69, 'workflow', 'Pump2', 'Period', NULL, 's', 10, 120, NULL),
(70, 'workflow', 'Pump2_Total_Flow', 'Value', NULL, 'ml', NULL, NULL, 3),
(71, 'workflow', 'Pump3', 'Value', NULL, 'ml/min', 0, 28.5, 1),
(72, 'synoptic', 'Pump3', 'Value', NULL, '%', 0, 100, 0),
(73, 'workflow', 'Pump3', 'Period', NULL, 's', 10, 120, NULL),
(74, 'workflow', 'Pump3_Total_Flow', 'Value', NULL, 'ml', NULL, NULL, 3),
(75, 'workflow', 'Pump4', 'Value', NULL, 'ml/min', 0, 28.5, 1),
(76, 'synoptic', 'Pump4', 'Value', NULL, '%', 0, 100, 0),
(77, 'workflow', 'Pump4', 'Period', NULL, 's', 10, 120, NULL),
(78, 'workflow', 'Pump4_Total_Flow', 'Value', NULL, 'ml', NULL, NULL, 3),
(79, 'workflow', 'Level_1', 'Value', NULL, '%', NULL, NULL, 0),
(80, 'workflow', 'Level_2', 'Value', NULL, '%', NULL, NULL, 0),
(81, 'workflow', 'Jacket_Level', 'Value', NULL, '%', NULL, NULL, 0),
(82, 'workflow', 'Temperature_Aux', 'Value', NULL, '°C', NULL, NULL, 1),
(83, 'workflow', 'Weight', 'Value', NULL, NULL, NULL, NULL, 1),
(84, 'workflow', 'A_In_1', 'Value', NULL, '%', NULL, NULL, 1),
(85, 'workflow', 'A_In_2', 'Value', NULL, '%', NULL, NULL, 1),
(86, 'workflow', 'A_In_3', 'Value', NULL, '%', NULL, NULL, 1),
(87, 'workflow', 'A_In_4', 'Value', NULL, '%', NULL, NULL, 1),
(88, 'workflow', 'A_Out_1', 'Value', NULL, '%', 0, 100, 1),
(89, 'synoptic', 'A_Out_1', 'Value', NULL, '%', 0, 100, 1),
(90, 'workflow', 'A_Out_2', 'Value', NULL, '%', 0, 100, 1),
(91, 'synoptic', 'A_Out_2', 'Value', NULL, '%', 0, 100, 1),
(92, 'workflow', 'A_Out_3', 'Value', NULL, '%', 0, 100, 1),
(93, 'synoptic', 'A_Out_3', 'Value', NULL, '%', 0, 100, 1),
(94, 'workflow', 'A_Out_4', 'Value', NULL, '%', 0, 100, 1),
(95, 'synoptic', 'A_Out_4', 'Value', NULL, '%', 0, 100, 1);

-- --------------------------------------------------------

--
-- Table structure for table `phases`
--

CREATE TABLE `phases` (
  `Id` int(11) NOT NULL,
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Phase_Id` int(11) NOT NULL DEFAULT 1,
  `OFF` int(11) NOT NULL DEFAULT 1,
  `ON` int(11) NOT NULL DEFAULT 1,
  `CASCADE` int(11) NOT NULL DEFAULT 0,
  `CASCADE_DCO2` int(11) NOT NULL DEFAULT 0,
  `Status` enum('OFF','ON','CASCADE','CASCADE_DCO2') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Par_Value` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `phases`
--

INSERT INTO `phases` (`Id`, `Name`, `Phase_Id`, `OFF`, `ON`, `CASCADE`, `CASCADE_DCO2`, `Status`, `Par_Value`) VALUES
(1, 'Temperature', 1, 1, 1, 1, 0, 'OFF', NULL),
(2, 'Stirring', 1, 1, 1, 1, 0, 'CASCADE', NULL),
(3, 'Stirring_Power', 1, 1, 1, 0, 0, NULL, NULL),
(4, 'Stirring_Current', 1, 1, 1, 0, 0, NULL, NULL),
(5, 'pH', 1, 1, 1, 1, 0, 'OFF', NULL),
(6, 'Temperature_pH', 1, 1, 1, 0, 0, NULL, NULL),
(7, 'ORP', 1, 1, 1, 0, 0, NULL, NULL),
(8, 'dO2', 1, 1, 1, 0, 0, 'OFF', NULL),
(9, 'Temperature_dO2', 1, 1, 1, 0, 0, NULL, NULL),
(10, 'Conductivity', 1, 1, 1, 0, 0, NULL, NULL),
(11, 'Pressure', 1, 1, 1, 1, 0, 'OFF', NULL),
(12, 'Air_Flow', 1, 1, 1, 1, 0, 'CASCADE', NULL),
(13, 'O2_Flow', 1, 1, 1, 1, 0, 'OFF', NULL),
(14, 'N2_Flow', 1, 1, 1, 1, 0, 'OFF', NULL),
(15, 'CO2_Flow', 1, 1, 1, 1, 0, 'OFF', NULL),
(16, 'Gas_Flow', 1, 1, 1, 0, 0, NULL, NULL),
(17, 'Pump1', 1, 1, 1, 1, 0, 'ON', NULL),
(18, 'Pump1_Total_Flow', 1, 1, 1, 0, 0, NULL, NULL),
(19, 'Pump2', 1, 1, 1, 1, 0, 'ON', NULL),
(20, 'Pump2_Total_Flow', 1, 1, 1, 0, 0, NULL, NULL),
(21, 'Pump3', 1, 1, 1, 1, 0, 'ON', NULL),
(22, 'Pump3_Total_Flow', 1, 1, 1, 0, 0, NULL, NULL),
(23, 'Pump4', 1, 1, 1, 1, 0, 'ON', NULL),
(24, 'Pump4_Total_Flow', 1, 1, 1, 0, 0, NULL, NULL),
(25, 'Level_1', 1, 1, 1, 0, 0, NULL, NULL),
(26, 'Level_2', 1, 1, 1, 0, 0, NULL, NULL),
(27, 'Jacket_Level', 1, 1, 1, 0, 0, NULL, NULL),
(28, 'Temperature_Aux', 1, 1, 1, 0, 0, NULL, NULL),
(29, 'Weight', 1, 1, 1, 0, 0, NULL, NULL),
(30, 'A_In_1', 1, 1, 1, 0, 0, NULL, NULL),
(31, 'A_In_2', 1, 1, 1, 0, 0, NULL, NULL),
(32, 'A_In_3', 1, 1, 1, 0, 0, NULL, NULL),
(33, 'A_In_4', 1, 1, 1, 0, 0, NULL, NULL),
(34, 'A_Out_1', 1, 1, 1, 1, 0, 'OFF', NULL),
(35, 'A_Out_2', 1, 1, 1, 1, 0, 'OFF', NULL),
(36, 'A_Out_3', 1, 1, 1, 1, 0, 'OFF', NULL),
(37, 'A_Out_4', 1, 1, 1, 1, 0, 'OFF', NULL),
(38, 'Temperature', 0, 1, 1, 1, 0, 'OFF', NULL),
(39, 'Stirring', 0, 1, 1, 1, 0, 'OFF', NULL),
(40, 'Stirring_Power', 0, 1, 1, 0, 0, NULL, NULL),
(41, 'Stirring_Current', 0, 1, 1, 0, 0, NULL, NULL),
(42, 'pH', 0, 1, 1, 1, 0, 'OFF', NULL),
(43, 'Temperature_pH', 0, 1, 1, 0, 0, NULL, NULL),
(44, 'ORP', 0, 1, 1, 0, 0, NULL, NULL),
(45, 'dO2', 0, 1, 1, 0, 0, 'OFF', NULL),
(46, 'Temperature_dO2', 0, 1, 1, 0, 0, NULL, NULL),
(47, 'Conductivity', 0, 1, 1, 0, 0, NULL, NULL),
(48, 'Pressure', 0, 1, 1, 1, 0, 'OFF', NULL),
(49, 'Air_Flow', 0, 1, 1, 1, 0, 'OFF', NULL),
(50, 'O2_Flow', 0, 1, 1, 1, 0, 'OFF', NULL),
(51, 'N2_Flow', 0, 1, 1, 1, 0, 'OFF', NULL),
(52, 'CO2_Flow', 0, 1, 1, 1, 0, 'OFF', NULL),
(53, 'Gas_Flow', 0, 1, 1, 0, 0, NULL, NULL),
(54, 'Pump1', 0, 1, 1, 1, 0, 'OFF', NULL),
(55, 'Pump1_Total_Flow', 0, 1, 1, 0, 0, NULL, NULL),
(56, 'Pump2', 0, 1, 1, 1, 0, 'OFF', NULL),
(57, 'Pump2_Total_Flow', 0, 1, 1, 0, 0, NULL, NULL),
(58, 'Pump3', 0, 1, 1, 1, 0, 'OFF', NULL),
(59, 'Pump3_Total_Flow', 0, 1, 1, 0, 0, NULL, NULL),
(60, 'Pump4', 0, 1, 1, 1, 0, 'OFF', NULL),
(61, 'Pump4_Total_Flow', 0, 1, 1, 0, 0, NULL, NULL),
(62, 'Level_1', 0, 1, 1, 0, 0, NULL, NULL),
(63, 'Level_2', 0, 1, 1, 0, 0, NULL, NULL),
(64, 'Jacket_Level', 0, 1, 1, 0, 0, NULL, NULL),
(65, 'Temperature_Aux', 0, 1, 1, 0, 0, NULL, NULL),
(66, 'Weight', 0, 1, 1, 0, 0, NULL, NULL),
(67, 'A_In_1', 0, 1, 1, 0, 0, NULL, NULL),
(68, 'A_In_2', 0, 1, 1, 0, 0, NULL, NULL),
(69, 'A_In_3', 0, 1, 1, 0, 0, NULL, NULL),
(70, 'A_In_4', 0, 1, 1, 0, 0, NULL, NULL),
(71, 'A_Out_1', 0, 1, 1, 1, 0, 'OFF', NULL),
(72, 'A_Out_2', 0, 1, 1, 1, 0, 'OFF', NULL),
(73, 'A_Out_3', 0, 1, 1, 1, 0, 'OFF', NULL),
(74, 'A_Out_4', 0, 1, 1, 1, 0, 'OFF', NULL),
(101, 'Temperature', 2, 1, 1, 1, 0, 'OFF', NULL),
(102, 'Stirring', 2, 1, 1, 1, 0, 'OFF', NULL),
(103, 'Stirring_Power', 2, 1, 1, 0, 0, NULL, NULL),
(104, 'Stirring_Current', 2, 1, 1, 0, 0, NULL, NULL),
(105, 'pH', 2, 1, 1, 1, 0, 'OFF', NULL),
(106, 'Temperature_pH', 2, 1, 1, 0, 0, NULL, NULL),
(107, 'ORP', 2, 1, 1, 0, 0, NULL, NULL),
(108, 'dO2', 2, 1, 1, 0, 0, 'OFF', NULL),
(109, 'Temperature_dO2', 2, 1, 1, 0, 0, NULL, NULL),
(110, 'Conductivity', 2, 1, 1, 0, 0, NULL, NULL),
(111, 'Pressure', 2, 1, 1, 1, 0, 'OFF', NULL),
(112, 'Air_Flow', 2, 1, 1, 1, 0, 'OFF', NULL),
(113, 'O2_Flow', 2, 1, 1, 1, 0, 'OFF', NULL),
(114, 'N2_Flow', 2, 1, 1, 1, 0, 'OFF', NULL),
(115, 'CO2_Flow', 2, 1, 1, 1, 0, 'OFF', NULL),
(116, 'Gas_Flow', 2, 1, 1, 0, 0, NULL, NULL),
(117, 'Pump1', 2, 1, 1, 1, 0, 'ON', NULL),
(118, 'Pump1_Total_Flow', 2, 1, 1, 0, 0, NULL, NULL),
(119, 'Pump2', 2, 1, 1, 1, 0, 'ON', NULL),
(120, 'Pump2_Total_Flow', 2, 1, 1, 0, 0, NULL, NULL),
(121, 'Pump3', 2, 1, 1, 1, 0, 'ON', NULL),
(122, 'Pump3_Total_Flow', 2, 1, 1, 0, 0, NULL, NULL),
(123, 'Pump4', 2, 1, 1, 1, 0, 'ON', NULL),
(124, 'Pump4_Total_Flow', 2, 1, 1, 0, 0, NULL, NULL),
(125, 'Level_1', 2, 1, 1, 0, 0, NULL, NULL),
(126, 'Level_2', 2, 1, 1, 0, 0, NULL, NULL),
(127, 'Jacket_Level', 2, 1, 1, 0, 0, NULL, NULL),
(128, 'Temperature_Aux', 2, 1, 1, 0, 0, NULL, NULL),
(129, 'Weight', 2, 1, 1, 0, 0, NULL, NULL),
(130, 'A_In_1', 2, 1, 1, 0, 0, NULL, NULL),
(131, 'A_In_2', 2, 1, 1, 0, 0, NULL, NULL),
(132, 'A_In_3', 2, 1, 1, 0, 0, NULL, NULL),
(133, 'A_In_4', 2, 1, 1, 0, 0, NULL, NULL),
(134, 'A_Out_1', 2, 1, 1, 1, 0, 'OFF', NULL),
(135, 'A_Out_2', 2, 1, 1, 1, 0, 'OFF', NULL),
(136, 'A_Out_3', 2, 1, 1, 1, 0, 'OFF', NULL),
(137, 'A_Out_4', 2, 1, 1, 1, 0, 'OFF', NULL),
(164, 'Temperature', 3, 1, 1, 1, 0, 'OFF', NULL),
(165, 'Stirring', 3, 1, 1, 1, 0, 'OFF', NULL),
(166, 'Stirring_Power', 3, 1, 1, 0, 0, NULL, NULL),
(167, 'Stirring_Current', 3, 1, 1, 0, 0, NULL, NULL),
(168, 'pH', 3, 1, 1, 1, 0, 'OFF', NULL),
(169, 'Temperature_pH', 3, 1, 1, 0, 0, NULL, NULL),
(170, 'ORP', 3, 1, 1, 0, 0, NULL, NULL),
(171, 'dO2', 3, 1, 1, 0, 0, 'OFF', NULL),
(172, 'Temperature_dO2', 3, 1, 1, 0, 0, NULL, NULL),
(173, 'Conductivity', 3, 1, 1, 0, 0, NULL, NULL),
(174, 'Pressure', 3, 1, 1, 1, 0, 'OFF', NULL),
(175, 'Air_Flow', 3, 1, 1, 1, 0, 'OFF', NULL),
(176, 'O2_Flow', 3, 1, 1, 1, 0, 'OFF', NULL),
(177, 'N2_Flow', 3, 1, 1, 1, 0, 'OFF', NULL),
(178, 'CO2_Flow', 3, 1, 1, 1, 0, 'OFF', NULL),
(179, 'Gas_Flow', 3, 1, 1, 0, 0, NULL, NULL),
(180, 'Pump1', 3, 1, 1, 1, 0, 'ON', NULL),
(181, 'Pump1_Total_Flow', 3, 1, 1, 0, 0, NULL, NULL),
(182, 'Pump2', 3, 1, 1, 1, 0, 'ON', NULL),
(183, 'Pump2_Total_Flow', 3, 1, 1, 0, 0, NULL, NULL),
(184, 'Pump3', 3, 1, 1, 1, 0, 'ON', NULL),
(185, 'Pump3_Total_Flow', 3, 1, 1, 0, 0, NULL, NULL),
(186, 'Pump4', 3, 1, 1, 1, 0, 'ON', NULL),
(187, 'Pump4_Total_Flow', 3, 1, 1, 0, 0, NULL, NULL),
(188, 'Level_1', 3, 1, 1, 0, 0, NULL, NULL),
(189, 'Level_2', 3, 1, 1, 0, 0, NULL, NULL),
(190, 'Jacket_Level', 3, 1, 1, 0, 0, NULL, NULL),
(191, 'Temperature_Aux', 3, 1, 1, 0, 0, NULL, NULL),
(192, 'Weight', 3, 1, 1, 0, 0, NULL, NULL),
(193, 'A_In_1', 3, 1, 1, 0, 0, NULL, NULL),
(194, 'A_In_2', 3, 1, 1, 0, 0, NULL, NULL),
(195, 'A_In_3', 3, 1, 1, 0, 0, NULL, NULL),
(196, 'A_In_4', 3, 1, 1, 0, 0, NULL, NULL),
(197, 'A_Out_1', 3, 1, 1, 1, 0, 'OFF', NULL),
(198, 'A_Out_2', 3, 1, 1, 1, 0, 'OFF', NULL),
(199, 'A_Out_3', 3, 1, 1, 1, 0, 'OFF', NULL),
(200, 'A_Out_4', 3, 1, 1, 1, 0, 'OFF', NULL),
(227, 'Temperature', 4, 1, 1, 1, 0, 'OFF', NULL),
(228, 'Stirring', 4, 1, 1, 1, 0, 'OFF', NULL),
(229, 'Stirring_Power', 4, 1, 1, 0, 0, NULL, NULL),
(230, 'Stirring_Current', 4, 1, 1, 0, 0, NULL, NULL),
(231, 'pH', 4, 1, 1, 1, 0, 'OFF', NULL),
(232, 'Temperature_pH', 4, 1, 1, 0, 0, NULL, NULL),
(233, 'ORP', 4, 1, 1, 0, 0, NULL, NULL),
(234, 'dO2', 4, 1, 1, 0, 0, 'OFF', NULL),
(235, 'Temperature_dO2', 4, 1, 1, 0, 0, NULL, NULL),
(236, 'Conductivity', 4, 1, 1, 0, 0, NULL, NULL),
(237, 'Pressure', 4, 1, 1, 1, 0, 'OFF', NULL),
(238, 'Air_Flow', 4, 1, 1, 1, 0, 'OFF', NULL),
(239, 'O2_Flow', 4, 1, 1, 1, 0, 'OFF', NULL),
(240, 'N2_Flow', 4, 1, 1, 1, 0, 'OFF', NULL),
(241, 'CO2_Flow', 4, 1, 1, 1, 0, 'OFF', NULL),
(242, 'Gas_Flow', 4, 1, 1, 0, 0, NULL, NULL),
(243, 'Pump1', 4, 1, 1, 1, 0, 'ON', NULL),
(244, 'Pump1_Total_Flow', 4, 1, 1, 0, 0, NULL, NULL),
(245, 'Pump2', 4, 1, 1, 1, 0, 'ON', NULL),
(246, 'Pump2_Total_Flow', 4, 1, 1, 0, 0, NULL, NULL),
(247, 'Pump3', 4, 1, 1, 1, 0, 'ON', NULL),
(248, 'Pump3_Total_Flow', 4, 1, 1, 0, 0, NULL, NULL),
(249, 'Pump4', 4, 1, 1, 1, 0, 'ON', NULL),
(250, 'Pump4_Total_Flow', 4, 1, 1, 0, 0, NULL, NULL),
(251, 'Level_1', 4, 1, 1, 0, 0, NULL, NULL),
(252, 'Level_2', 4, 1, 1, 0, 0, NULL, NULL),
(253, 'Jacket_Level', 4, 1, 1, 0, 0, NULL, NULL),
(254, 'Temperature_Aux', 4, 1, 1, 0, 0, NULL, NULL),
(255, 'Weight', 4, 1, 1, 0, 0, NULL, NULL),
(256, 'A_In_1', 4, 1, 1, 0, 0, NULL, NULL),
(257, 'A_In_2', 4, 1, 1, 0, 0, NULL, NULL),
(258, 'A_In_3', 4, 1, 1, 0, 0, NULL, NULL),
(259, 'A_In_4', 4, 1, 1, 0, 0, NULL, NULL),
(260, 'A_Out_1', 4, 1, 1, 1, 0, 'OFF', NULL),
(261, 'A_Out_2', 4, 1, 1, 1, 0, 'OFF', NULL),
(262, 'A_Out_3', 4, 1, 1, 1, 0, 'OFF', NULL),
(263, 'A_Out_4', 4, 1, 1, 1, 0, 'OFF', NULL),
(290, 'Temperature', 5, 1, 1, 1, 0, 'OFF', NULL),
(291, 'Stirring', 5, 1, 1, 1, 0, 'OFF', NULL),
(292, 'Stirring_Power', 5, 1, 1, 0, 0, NULL, NULL),
(293, 'Stirring_Current', 5, 1, 1, 0, 0, NULL, NULL),
(294, 'pH', 5, 1, 1, 1, 0, 'OFF', NULL),
(295, 'Temperature_pH', 5, 1, 1, 0, 0, NULL, NULL),
(296, 'ORP', 5, 1, 1, 0, 0, NULL, NULL),
(297, 'dO2', 5, 1, 1, 0, 0, 'OFF', NULL),
(298, 'Temperature_dO2', 5, 1, 1, 0, 0, NULL, NULL),
(299, 'Conductivity', 5, 1, 1, 0, 0, NULL, NULL),
(300, 'Pressure', 5, 1, 1, 1, 0, 'OFF', NULL),
(301, 'Air_Flow', 5, 1, 1, 1, 0, 'OFF', NULL),
(302, 'O2_Flow', 5, 1, 1, 1, 0, 'OFF', NULL),
(303, 'N2_Flow', 5, 1, 1, 1, 0, 'OFF', NULL),
(304, 'CO2_Flow', 5, 1, 1, 1, 0, 'OFF', NULL),
(305, 'Gas_Flow', 5, 1, 1, 0, 0, NULL, NULL),
(306, 'Pump1', 5, 1, 1, 1, 0, 'ON', NULL),
(307, 'Pump1_Total_Flow', 5, 1, 1, 0, 0, NULL, NULL),
(308, 'Pump2', 5, 1, 1, 1, 0, 'ON', NULL),
(309, 'Pump2_Total_Flow', 5, 1, 1, 0, 0, NULL, NULL),
(310, 'Pump3', 5, 1, 1, 1, 0, 'ON', NULL),
(311, 'Pump3_Total_Flow', 5, 1, 1, 0, 0, NULL, NULL),
(312, 'Pump4', 5, 1, 1, 1, 0, 'ON', NULL),
(313, 'Pump4_Total_Flow', 5, 1, 1, 0, 0, NULL, NULL),
(314, 'Level_1', 5, 1, 1, 0, 0, NULL, NULL),
(315, 'Level_2', 5, 1, 1, 0, 0, NULL, NULL),
(316, 'Jacket_Level', 5, 1, 1, 0, 0, NULL, NULL),
(317, 'Temperature_Aux', 5, 1, 1, 0, 0, NULL, NULL),
(318, 'Weight', 5, 1, 1, 0, 0, NULL, NULL),
(319, 'A_In_1', 5, 1, 1, 0, 0, NULL, NULL),
(320, 'A_In_2', 5, 1, 1, 0, 0, NULL, NULL),
(321, 'A_In_3', 5, 1, 1, 0, 0, NULL, NULL),
(322, 'A_In_4', 5, 1, 1, 0, 0, NULL, NULL),
(323, 'A_Out_1', 5, 1, 1, 1, 0, 'OFF', NULL),
(324, 'A_Out_2', 5, 1, 1, 1, 0, 'OFF', NULL),
(325, 'A_Out_3', 5, 1, 1, 1, 0, 'OFF', NULL),
(326, 'A_Out_4', 5, 1, 1, 1, 0, 'OFF', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `phase_info`
--

CREATE TABLE `phase_info` (
  `Id` int(11) NOT NULL,
  `Phase_Id` int(11) NOT NULL,
  `Partial_Time` varchar(50) COLLATE utf8_unicode_ci DEFAULT '0' COMMENT 'Subphase elapsed time',
  `Command` varchar(50) COLLATE utf8_unicode_ci DEFAULT '0' COMMENT 'Command to send for reacting to event',
  `Status` varchar(50) COLLATE utf8_unicode_ci DEFAULT '0' COMMENT 'Actual status of event',
  `Result` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Final phase result'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `phase_list`
--

CREATE TABLE `phase_list` (
  `Phase_Id` int(11) NOT NULL,
  `Display` int(11) DEFAULT NULL,
  `Phase_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Class` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Control'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `phase_list`
--

INSERT INTO `phase_list` (`Phase_Id`, `Display`, `Phase_Name`, `Class`) VALUES
(0, NULL, 'standby', 'Control'),
(1, 1, 'before cultivation', 'Control'),
(2, 2, 'cultivation', 'Control'),
(3, 3, 'custom 1', 'Control'),
(4, 4, 'custom 2', 'Control'),
(5, 5, 'custom 3', 'Control');

-- --------------------------------------------------------

--
-- Table structure for table `pid`
--

CREATE TABLE `pid` (
  `Id` int(11) NOT NULL,
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Pid_Control_Mode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Pid_1` float DEFAULT NULL,
  `Pid_2` float DEFAULT NULL,
  `Pid_3` float DEFAULT NULL,
  `Pid_4` float DEFAULT NULL,
  `Pid_5` float DEFAULT NULL,
  `Pid_6` float DEFAULT NULL,
  `Pid_7` float DEFAULT NULL,
  `Pid_8` float DEFAULT NULL,
  `Pid_9` float DEFAULT NULL,
  `Pid_10` float DEFAULT NULL,
  `Pid_11` float DEFAULT NULL,
  `Pid_12` float DEFAULT NULL,
  `Pid_13` float DEFAULT NULL,
  `Pid_14` float DEFAULT NULL,
  `Pid_15` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `pid`
--

INSERT INTO `pid` (`Id`, `Name`, `Pid_Control_Mode`, `Pid_1`, `Pid_2`, `Pid_3`, `Pid_4`, `Pid_5`, `Pid_6`, `Pid_7`, `Pid_8`, `Pid_9`, `Pid_10`, `Pid_11`, `Pid_12`, `Pid_13`, `Pid_14`, `Pid_15`) VALUES
(1, 'Temperature', 'CHILLER', 0.5, 0.01, 10, 0.5, 1, 0.2, 0.3, 40, 1, 0.2, 11, 0.1, 10, NULL, NULL),
(2, 'Temperature', 'TAP_WATER', 4, 4, 1, 1, 1, 1, 0.3, 40, 1, NULL, NULL, NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `process_data`
--

CREATE TABLE `process_data` (
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Errors` int(10) NOT NULL DEFAULT 0,
  `Set_Value` float DEFAULT NULL COMMENT 'Actual SET value',
  `Process_Value` float DEFAULT NULL COMMENT 'Actual PV value',
  `Raw_Value` float DEFAULT NULL COMMENT 'Non-calibrated value',
  `Logic_Set_Value` float NOT NULL DEFAULT 0,
  `Logic_Active` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `process_data`
--

INSERT INTO `process_data` (`Name`, `Errors`, `Set_Value`, `Process_Value`, `Raw_Value`, `Logic_Set_Value`, `Logic_Active`) VALUES
('A_In_1', 0, NULL, -0.7, -1, 0, 0),
('A_In_2', 0, NULL, -0.6, 0, 0, 0),
('A_In_3', 0, NULL, -0.9, 0, 0, 0),
('A_In_4', 0, NULL, -0.6, 0, 0, 0),
('A_Out_1', 0, 0, 0, NULL, 0, 0),
('A_Out_2', 0, 0, 0, NULL, 0, 0),
('A_Out_3', 0, 0, 0, NULL, 0, 0),
('A_Out_4', 0, 0, 0, NULL, 0, 0),
('Air_Flow', 0, 1, 0.006214, NULL, 0, 0),
('CO2_Flow', 0, 0, 0, NULL, 0, 0),
('Conductivity', 2, NULL, 0, 0, 0, 0),
('Cooler', 0, NULL, 0, NULL, 0, 0),
('dO2', 2, 0, 0, 0, 0, 0),
('Gas_Flow', 2, NULL, 0, NULL, 0, 0),
('Heater', 0, NULL, 0, NULL, 0, 0),
('Jacket_Level', 0, NULL, 0, NULL, 0, 0),
('Level_1', 0, NULL, 0, NULL, 0, 0),
('Level_2', 0, NULL, 0, NULL, 0, 0),
('N2_Flow', 2, 0, 0, NULL, 0, 0),
('O2_Flow', 0, 0, 0.0000876514, NULL, 0, 0),
('ORP', 2, NULL, 0, 0, 0, 0),
('pH', 2, 0, 0, 0, 0, 0),
('Pressure', 0, 0, 0.00178788, NULL, 0, 0),
('Pump1', 0, 10, 10, NULL, 0, 0),
('Pump1_Total_Flow', 0, NULL, 4733.73, NULL, 0, 0),
('Pump2', 0, 0, 0, NULL, 0, 0),
('Pump2_Total_Flow', 0, NULL, 0, NULL, 0, 0),
('Pump3', 0, 8.50209, 8.50209, NULL, 8.50209, 1),
('Pump3_Total_Flow', 0, NULL, 1913.01, NULL, 0, 0),
('Pump4', 0, 0, 0, NULL, 0, 1),
('Pump4_Total_Flow', 0, NULL, 1911.76, NULL, 0, 0),
('Stirring', 0, 300, 0, NULL, 0, 0),
('Stirring_Current', 0, NULL, 0, NULL, 0, 0),
('Stirring_Power', 0, NULL, 0, NULL, 0, 0),
('Temperature', 1, 0, -37.5034, 0, 0, 0),
('Temperature_Aux', 1, NULL, -25.0023, 0, 0, 0),
('Temperature_dO2', 0, NULL, 0, NULL, 0, 0),
('Temperature_pH', 2, NULL, 0, NULL, 0, 0),
('Weight', 2, NULL, 0, NULL, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `profile`
--

CREATE TABLE `profile` (
  `Id` int(10) UNSIGNED NOT NULL,
  `Phase_Id` int(11) NOT NULL DEFAULT 1,
  `Name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `Time` float NOT NULL,
  `Setpoint` float NOT NULL,
  `Mode` enum('ABSOLUTE','RELATIVE') COLLATE utf8_unicode_ci DEFAULT 'RELATIVE',
  `Repeat` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `profile`
--

INSERT INTO `profile` (`Id`, `Phase_Id`, `Name`, `Time`, `Setpoint`, `Mode`, `Repeat`) VALUES
(3, 1, 'pH', 0, 7, 'RELATIVE', 0),
(4, 1, 'dO2', 0, 100, 'RELATIVE', 0),
(5, 1, 'Pressure', 0, 0, 'RELATIVE', 0),
(6, 1, 'Air_Flow', 0, 0, 'RELATIVE', 0),
(7, 1, 'O2_Flow', 0, 0, 'RELATIVE', 0),
(8, 1, 'N2_Flow', 0, 0, 'RELATIVE', 0),
(9, 1, 'CO2_Flow', 0, 0, 'RELATIVE', 0),
(11, 1, 'Pump2', 0, 0, 'RELATIVE', 0),
(12, 1, 'Pump3', 0, 0, 'RELATIVE', 0),
(14, 1, 'A_Out_1', 0, 0, 'RELATIVE', 0),
(15, 1, 'A_Out_2', 0, 0, 'RELATIVE', 0),
(16, 1, 'A_Out_3', 0, 0, 'RELATIVE', 0),
(17, 1, 'A_Out_4', 0, 0, 'RELATIVE', 0),
(18, 2, 'Temperature', 0, 30, 'RELATIVE', 0),
(19, 2, 'Stirring', 0, 100, 'RELATIVE', 0),
(20, 2, 'pH', 0, 7, 'RELATIVE', 0),
(21, 2, 'dO2', 0, 100, 'RELATIVE', 0),
(22, 2, 'Pressure', 0, 0, 'RELATIVE', 0),
(23, 2, 'Air_Flow', 0, 0, 'RELATIVE', 0),
(24, 2, 'O2_Flow', 0, 0, 'RELATIVE', 0),
(25, 2, 'N2_Flow', 0, 0, 'RELATIVE', 0),
(26, 2, 'CO2_Flow', 0, 0, 'RELATIVE', 0),
(27, 2, 'Pump1', 0, 0, 'RELATIVE', 0),
(28, 2, 'Pump2', 0, 0, 'RELATIVE', 0),
(29, 2, 'Pump3', 0, 0, 'RELATIVE', 0),
(30, 2, 'Pump4', 0, 0, 'RELATIVE', 0),
(31, 2, 'A_Out_1', 0, 0, 'RELATIVE', 0),
(32, 2, 'A_Out_2', 0, 0, 'RELATIVE', 0),
(33, 2, 'A_Out_3', 0, 0, 'RELATIVE', 0),
(34, 2, 'A_Out_4', 0, 0, 'RELATIVE', 0),
(49, 3, 'Temperature', 0, 30, 'RELATIVE', 0),
(50, 3, 'Stirring', 0, 100, 'RELATIVE', 0),
(51, 3, 'pH', 0, 7, 'RELATIVE', 0),
(52, 3, 'dO2', 0, 100, 'RELATIVE', 0),
(53, 3, 'Pressure', 0, 0, 'RELATIVE', 0),
(54, 3, 'Air_Flow', 0, 0, 'RELATIVE', 0),
(55, 3, 'O2_Flow', 0, 0, 'RELATIVE', 0),
(56, 3, 'N2_Flow', 0, 0, 'RELATIVE', 0),
(57, 3, 'CO2_Flow', 0, 0, 'RELATIVE', 0),
(58, 3, 'Pump1', 0, 0, 'RELATIVE', 0),
(59, 3, 'Pump2', 0, 0, 'RELATIVE', 0),
(60, 3, 'Pump3', 0, 0, 'RELATIVE', 0),
(61, 3, 'Pump4', 0, 0, 'RELATIVE', 0),
(62, 3, 'A_Out_1', 0, 0, 'RELATIVE', 0),
(63, 3, 'A_Out_2', 0, 0, 'RELATIVE', 0),
(64, 3, 'A_Out_3', 0, 0, 'RELATIVE', 0),
(65, 3, 'A_Out_4', 0, 0, 'RELATIVE', 0),
(80, 4, 'Temperature', 0, 30, 'RELATIVE', 0),
(81, 4, 'Stirring', 0, 100, 'RELATIVE', 0),
(82, 4, 'pH', 0, 7, 'RELATIVE', 0),
(83, 4, 'dO2', 0, 100, 'RELATIVE', 0),
(84, 4, 'Pressure', 0, 0, 'RELATIVE', 0),
(85, 4, 'Air_Flow', 0, 0, 'RELATIVE', 0),
(86, 4, 'O2_Flow', 0, 0, 'RELATIVE', 0),
(87, 4, 'N2_Flow', 0, 0, 'RELATIVE', 0),
(88, 4, 'CO2_Flow', 0, 0, 'RELATIVE', 0),
(89, 4, 'Pump1', 0, 0, 'RELATIVE', 0),
(90, 4, 'Pump2', 0, 0, 'RELATIVE', 0),
(91, 4, 'Pump3', 0, 0, 'RELATIVE', 0),
(92, 4, 'Pump4', 0, 0, 'RELATIVE', 0),
(93, 4, 'A_Out_1', 0, 0, 'RELATIVE', 0),
(94, 4, 'A_Out_2', 0, 0, 'RELATIVE', 0),
(95, 4, 'A_Out_3', 0, 0, 'RELATIVE', 0),
(96, 4, 'A_Out_4', 0, 0, 'RELATIVE', 0),
(111, 5, 'Temperature', 0, 30, 'RELATIVE', 0),
(112, 5, 'Stirring', 0, 100, 'RELATIVE', 0),
(113, 5, 'pH', 0, 7, 'RELATIVE', 0),
(114, 5, 'dO2', 0, 100, 'RELATIVE', 0),
(115, 5, 'Pressure', 0, 0, 'RELATIVE', 0),
(116, 5, 'Air_Flow', 0, 0, 'RELATIVE', 0),
(117, 5, 'O2_Flow', 0, 0, 'RELATIVE', 0),
(118, 5, 'N2_Flow', 0, 0, 'RELATIVE', 0),
(119, 5, 'CO2_Flow', 0, 0, 'RELATIVE', 0),
(120, 5, 'Pump1', 0, 0, 'RELATIVE', 0),
(121, 5, 'Pump2', 0, 0, 'RELATIVE', 0),
(122, 5, 'Pump3', 0, 0, 'RELATIVE', 0),
(123, 5, 'Pump4', 0, 0, 'RELATIVE', 0),
(124, 5, 'A_Out_1', 0, 0, 'RELATIVE', 0),
(125, 5, 'A_Out_2', 0, 0, 'RELATIVE', 0),
(126, 5, 'A_Out_3', 0, 0, 'RELATIVE', 0),
(127, 5, 'A_Out_4', 0, 0, 'RELATIVE', 0),
(151, 1, 'Stirring', 0, 100, 'RELATIVE', 1),
(152, 1, 'Stirring', 1200, 100, 'RELATIVE', 0),
(153, 1, 'Stirring', 1260, 500, 'RELATIVE', 0),
(154, 1, 'Stirring', 3000, 500, 'RELATIVE', 0),
(155, 1, 'Stirring', 3060, 300, 'RELATIVE', 0),
(156, 1, 'Stirring', 3120, 300, 'RELATIVE', 0),
(159, 1, 'Pump1', 0, 10, 'RELATIVE', 0),
(161, 1, 'Pump4', 0, 15, 'RELATIVE', 0);

-- --------------------------------------------------------

--
-- Table structure for table `sensor_data`
--

CREATE TABLE `sensor_data` (
  `Id` int(11) NOT NULL,
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Parameter` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Value` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Unit` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `sensor_data`
--

INSERT INTO `sensor_data` (`Id`, `Name`, `Parameter`, `Value`, `Unit`) VALUES
(1, 'Temperature', 'PID_P', '0.0', '%'),
(2, 'Temperature', 'PID_I', '0.0', '%'),
(3, 'Temperature', 'PID_D', '0.0', '%'),
(4, 'Temperature', 'PID_Q', '0.0', '%'),
(5, 'Temperature', 'PID_M', '0.0', '%'),
(6, 'pH', 'PID_P', '0.0', '%'),
(7, 'pH', 'PID_Q', '0.0', '%'),
(8, 'pH', 'PID_M', '0.0', '%');

-- --------------------------------------------------------

--
-- Table structure for table `steps`
--

CREATE TABLE `steps` (
  `Step` int(11) NOT NULL,
  `Phase_Id` int(11) NOT NULL,
  `Comments` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `synoptic`
--

CREATE TABLE `synoptic` (
  `Name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Alias` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Mode` enum('AUTO','MANUAL') COLLATE utf8_unicode_ci DEFAULT 'AUTO',
  `Value` float NOT NULL DEFAULT 0,
  `Table_Display` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `synoptic`
--

INSERT INTO `synoptic` (`Name`, `Alias`, `Mode`, `Value`, `Table_Display`) VALUES
('A_In_1', 'A_In_1', NULL, 0, 'auto'),
('A_In_2', 'A_In_2', NULL, 0, 'auto'),
('A_In_3', 'A_In_3', NULL, 0, 'auto'),
('A_In_4', 'A_In_4', NULL, 0, 'auto'),
('A_Out_1', 'A_Out_1', 'AUTO', 0, NULL),
('A_Out_2', 'A_Out_2', 'AUTO', 0, NULL),
('A_Out_3', 'A_Out_3', 'AUTO', 0, NULL),
('A_Out_4', 'A_Out_4', 'AUTO', 0, NULL),
('Cooler', 'Cooler', 'AUTO', 100, NULL),
('dO2', 'dO2', NULL, 0, 'auto'),
('Air_Flow', 'Flow1', 'AUTO', 11.1, NULL),
('O2_Flow', 'Flow2', 'AUTO', 0, NULL),
('N2_Flow', 'Flow3', 'AUTO', 20, NULL),
('CO2_Flow', 'Flow4', 'AUTO', 0, NULL),
('Gas_Flow', 'Gas_Flow', 'AUTO', 20, NULL),
('Heater', 'Heater', 'AUTO', 100, NULL),
('Jacket_Level', 'Jacket_Level', NULL, 0, 'auto'),
('Level_1', 'Level_1', NULL, 0, 'auto'),
('Level_2', 'Level_2', NULL, 0, 'auto'),
('ORP', 'ORP', NULL, 0, 'auto'),
('pH', 'pH', NULL, 0, 'auto'),
('Pressure', 'Pressure', 'AUTO', 0.35, NULL),
('Pump1', 'Pump1', 'AUTO', 0, NULL),
('Pump2', 'Pump2', 'AUTO', 100, NULL),
('Pump3', 'Pump3', 'AUTO', 100, NULL),
('Pump4', 'Pump4', 'AUTO', 46, NULL),
('Stirring', 'Stirring', 'AUTO', 500, 'auto'),
('Stirring_Current', 'Stirring_Current', NULL, 0, 'auto'),
('Stirring_Power', 'Stirring_Power', NULL, 0, 'auto'),
('Temperature', 'Temperature', NULL, 0, 'auto'),
('Weight', 'Weight', NULL, 0, 'auto');

-- --------------------------------------------------------

--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `Id` int(11) NOT NULL,
  `Tag_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Address` varchar(1024) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1:1',
  `Table_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Field_Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Filter` varchar(1024) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Mode` enum('R','W','RW') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'R',
  `Datatype` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Float',
  `Class` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'PLC_Tag'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `tags`
--

INSERT INTO `tags` (`Id`, `Tag_Name`, `Address`, `Table_Name`, `Name`, `Field_Name`, `Filter`, `Mode`, `Datatype`, `Class`) VALUES
(1, 'M001', '1:18', 'process_data', 'Temperature', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(2, 'M001', '1:2', 'process_data', 'Temperature', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(3, 'M001', '1:6', 'calibration', 'Temperature', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(4, 'M001', '1:46', 'process_data', 'Temperature', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(5, 'M001', '1:22', 'workflow', 'Temperature', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(6, 'M001', '1:26', 'workflow', 'Temperature', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(7, 'M001', '1:30', 'workflow', 'Temperature', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(8, 'M001', '1:34', 'workflow', 'Temperature', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(9, 'M001', '1:48', 'workflow', 'Temperature', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(10, 'L001', '3001:0', 'cascade_dO2', 'Temperature', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(11, 'L001', '2001:0', 'profile', 'Temperature', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(12, 'L001', '2001:2', 'profile', 'Temperature', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(13, 'L001', '2001:12', 'profile', 'Temperature', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(14, 'L001', '1001:6', 'phases', 'Temperature', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(15, 'L001', '1001:8', 'process_data', 'Temperature', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(16, 'L001', '4001:0', 'process_data', 'Temperature', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(17, 'L001', '4001:2', 'process_data', 'Temperature', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(18, 'L001', '1001:48', 'workflow', 'Temperature', 'PID_1', '', 'W', 'Float', 'PLC_Tag'),
(19, 'L001', '1001:52', 'workflow', 'Temperature', 'PID_2', '', 'W', 'Float', 'PLC_Tag'),
(20, 'L001', '1001:56', 'workflow', 'Temperature', 'PID_3', '', 'W', 'Float', 'PLC_Tag'),
(21, 'L001', '1001:40', 'workflow', 'Temperature', 'PID_5', '', 'W', 'Float', 'PLC_Tag'),
(22, 'L001', '1001:44', 'workflow', 'Temperature', 'PID_6', '', 'W', 'Float', 'PLC_Tag'),
(23, 'L001', '1001:60', 'workflow', 'Temperature', 'PID_7', '', 'W', 'Float', 'PLC_Tag'),
(24, 'L001', '1001:64', 'workflow', 'Temperature', 'PID_8', '', 'W', 'Float', 'PLC_Tag'),
(25, 'L001', '1001:68', 'workflow', 'Temperature', 'PID_11', '', 'W', 'Float', 'PLC_Tag'),
(26, 'L001', '1001:72', 'workflow', 'Temperature', 'PID_12', '', 'W', 'Float', 'PLC_Tag'),
(27, 'L001', '1001:76', 'workflow', 'Temperature', 'PID_13', '', 'W', 'Float', 'PLC_Tag'),
(28, 'L001', '1001:20', 'sensor_data', 'Temperature', 'Value', 'Parameter=\"PID_M\"', 'R', 'Percent', 'PLC_Tag'),
(29, 'L001', '1001:24', 'sensor_data', 'Temperature', 'Value', 'Parameter=\"PID_P\"', 'R', 'Percent', 'PLC_Tag'),
(30, 'L001', '1001:28', 'sensor_data', 'Temperature', 'Value', 'Parameter=\"PID_I\"', 'R', 'Percent', 'PLC_Tag'),
(31, 'L001', '1001:32', 'sensor_data', 'Temperature', 'Value', 'Parameter=\"PID_D\"', 'R', 'Percent', 'PLC_Tag'),
(32, 'L001', '1001:36', 'sensor_data', 'Temperature', 'Value', 'Parameter=\"PID_Q\"', 'R', 'Percent', 'PLC_Tag'),
(33, 'D001', '10001:2', 'synoptic', 'Cooler', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(34, 'D001', '10001:4', 'synoptic', 'Cooler', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(35, 'D001', '10001:12', 'process_data', 'Cooler', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(36, 'D002', '10002:2', 'synoptic', 'Heater', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(37, 'D002', '10002:4', 'synoptic', 'Heater', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(38, 'D002', '10002:12', 'process_data', 'Heater', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(39, 'M100', '100:18', 'process_data', 'Stirring', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(40, 'M101', '101:18', 'process_data', 'Stirring_Current', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(41, 'M102', '102:18', 'process_data', 'Stirring_Power', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(42, 'M101', '101:22', 'workflow', 'Stirring_Current', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(43, 'M101', '101:26', 'workflow', 'Stirring_Current', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(44, 'M101', '101:30', 'workflow', 'Stirring_Current', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(45, 'M101', '101:34', 'workflow', 'Stirring_Current', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(46, 'M101', '101:48', 'workflow', 'Stirring_Current', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(47, 'M101', '101:46', 'process_data', 'Stirring_Current', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(48, 'M102', '102:22', 'workflow', 'Stirring_Power', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(49, 'M102', '102:26', 'workflow', 'Stirring_Power', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(50, 'M102', '102:30', 'workflow', 'Stirring_Power', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(51, 'M102', '102:34', 'workflow', 'Stirring_Power', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(52, 'M102', '102:48', 'workflow', 'Stirring_Power', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(53, 'M102', '102:46', 'process_data', 'Stirring_Power', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(54, 'L100', '3100:0', 'cascade_dO2', 'Stirring', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(55, 'L100', '2100:0', 'profile', 'Stirring', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(56, 'L100', '2100:2', 'profile', 'Stirring', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(57, 'L100', '2100:12', 'profile', 'Stirring', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(58, 'L100', '1100:6', 'phases', 'Stirring', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(59, 'L100', '1100:8', 'process_data', 'Stirring', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(60, 'L100', '4100:0', 'process_data', 'Stirring', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(61, 'L100', '4100:2', 'process_data', 'Stirring', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(62, 'D012', '10012:2', 'synoptic', 'Stirring', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(63, 'D012', '10012:4', 'synoptic', 'Stirring', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(64, 'M008', '8:18', 'process_data', 'pH', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(65, 'M008', '8:2', 'process_data', 'pH', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(66, 'M008', '8:6', 'calibration', 'pH', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(67, 'M008', '8:46', 'process_data', 'pH', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(68, 'M008', '8:22', 'workflow', 'pH', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(69, 'M008', '8:26', 'workflow', 'pH', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(70, 'M008', '8:30', 'workflow', 'pH', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(71, 'M008', '8:34', 'workflow', 'pH', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(72, 'M008', '8:48', 'workflow', 'pH', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(73, 'L007', '1007:6', 'phases', 'pH', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(74, 'L007', '1007:8', 'process_data', 'pH', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(75, 'L007', '4007:0', 'process_data', 'pH', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(76, 'L007', '4007:2', 'process_data', 'pH', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(77, 'L007', '2007:0', 'profile', 'pH', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(78, 'L007', '2007:2', 'profile', 'pH', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(79, 'L007', '2007:12', 'profile', 'pH', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(80, 'L007', '1007:48', 'workflow', 'pH', 'PID_1', '', 'W', 'Float', 'PLC_Tag'),
(81, 'L007', '1007:40', 'workflow', 'pH', 'PID_5', '', 'W', 'Float', 'PLC_Tag'),
(82, 'L007', '1007:44', 'workflow', 'pH', 'PID_6', '', 'W', 'Float', 'PLC_Tag'),
(83, 'L007', '1007:60', 'workflow', 'pH', 'PID_7', '', 'W', 'Float', 'PLC_Tag'),
(84, 'L007', '1007:64', 'workflow', 'pH', 'PID_8', '', 'W', 'Float', 'PLC_Tag'),
(85, 'L007', '1007:68', 'workflow', 'pH', 'PID_11', '', 'W', 'Float', 'PLC_Tag'),
(86, 'L007', '1007:72', 'workflow', 'pH', 'PID_12', '', 'W', 'Float', 'PLC_Tag'),
(87, 'L007', '1007:76', 'workflow', 'pH', 'PID_13', '', 'W', 'Float', 'PLC_Tag'),
(88, 'L007', '1007:20', 'sensor_data', 'pH', 'Value', 'Parameter=\"PID_M\"', 'R', 'Percent', 'PLC_Tag'),
(89, 'L007', '1007:24', 'sensor_data', 'pH', 'Value', 'Parameter=\"PID_P\"', 'R', 'Percent', 'PLC_Tag'),
(90, 'L007', '1007:36', 'sensor_data', 'pH', 'Value', 'Parameter=\"PID_Q\"', 'R', 'Percent', 'PLC_Tag'),
(91, 'M008', '8:54', 'calibration', 'pH', 'Probe_Info', '', 'R', 'Float', 'Probe_Info_Tag'),
(92, 'M003', '3:18', 'process_data', 'Temperature_pH', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(93, 'M003', '3:46', 'process_data', 'Temperature_pH', 'Errors', '', 'R', 'ShortLE', 'PLC_Tag'),
(94, 'M018', '18:18', 'process_data', 'ORP', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(95, 'M018', '18:2', 'process_data', 'ORP', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(96, 'M018', '18:6', 'calibration', 'ORP', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(97, 'M018', '18:46', 'process_data', 'ORP', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(98, 'M018', '18:22', 'workflow', 'ORP', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(99, 'M018', '18:26', 'workflow', 'ORP', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(100, 'M018', '18:30', 'workflow', 'ORP', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(101, 'M018', '18:34', 'workflow', 'ORP', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(102, 'M018', '18:48', 'workflow', 'ORP', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(103, 'M018', '18:54', 'calibration', 'ORP', 'Probe_Info', '', 'R', 'Float', 'Probe_Info_Tag'),
(104, 'M010', '10:18', 'process_data', 'dO2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(105, 'M010', '10:2', 'process_data', 'dO2', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(106, 'M010', '10:6', 'calibration', 'dO2', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(107, 'M010', '10:46', 'process_data', 'dO2', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(108, 'M010', '10:22', 'workflow', 'dO2', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(109, 'M010', '10:26', 'workflow', 'dO2', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(110, 'M010', '10:30', 'workflow', 'dO2', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(111, 'M010', '10:34', 'workflow', 'dO2', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(112, 'M010', '10:48', 'workflow', 'dO2', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(113, 'L009', '2009:0', 'profile', 'dO2', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(114, 'L009', '2009:2', 'profile', 'dO2', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(115, 'L009', '2009:12', 'profile', 'dO2', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(116, 'L009', '1009:6', 'phases', 'dO2', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(117, 'L009', '1009:8', 'process_data', 'dO2', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(118, 'L009', '4009:0', 'process_data', 'dO2', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(119, 'L009', '4009:2', 'process_data', 'dO2', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(120, 'M010', '10:54', 'calibration', 'dO2', 'Probe_Info', '', 'R', 'Float', 'Probe_Info_Tag'),
(121, 'M004', '4:18', 'process_data', 'Temperature_dO2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(122, 'M004', '4:46', 'process_data', 'Temperature_dO2', 'Errors', '', 'R', 'ShortLE', 'PLC_Tag'),
(123, 'M020', '20:18', 'process_data', 'Conductivity', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(124, 'M020', '20:2', 'process_data', 'Conductivity', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(125, 'M020', '20:6', 'calibration', 'Conductivity', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(126, 'M020', '20:46', 'process_data', 'Conductivity', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(127, 'M020', '20:22', 'workflow', 'Conductivity', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(128, 'M020', '20:26', 'workflow', 'Conductivity', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(129, 'M020', '20:30', 'workflow', 'Conductivity', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(130, 'M020', '20:34', 'workflow', 'Conductivity', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(131, 'M020', '20:48', 'workflow', 'Conductivity', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(132, 'M020', '20:54', 'calibration', 'Conductivity', 'Probe_Info', '', 'R', 'Float', 'Probe_Info_Tag'),
(133, 'M006', '6:18', 'process_data', 'Pressure', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(134, 'M006', '6:46', 'process_data', 'Pressure', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(135, 'M006', '6:48', 'workflow', 'Pressure', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(136, 'M006', '6:22', 'workflow', 'Pressure', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(137, 'M006', '6:26', 'workflow', 'Pressure', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(138, 'M006', '6:30', 'workflow', 'Pressure', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(139, 'M006', '6:34', 'workflow', 'Pressure', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(140, 'L006', '2006:0', 'profile', 'Pressure', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(141, 'L006', '2006:2', 'profile', 'Pressure', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(142, 'L006', '2006:12', 'profile', 'Pressure', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(143, 'L006', '3006:0', 'cascade_dO2', 'Pressure', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(144, 'L006', '1006:6', 'phases', 'Pressure', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(145, 'L006', '1006:8', 'process_data', 'Pressure', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(146, 'L006', '4006:0', 'process_data', 'Pressure', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(147, 'L006', '4006:2', 'process_data', 'Pressure', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(148, 'D013', '10013:2', 'synoptic', 'Pressure', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(149, 'D013', '10013:4', 'synoptic', 'Pressure', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(150, 'M029', '29:46', 'process_data', 'Air_Flow', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(151, 'M029', '29:18', 'process_data', 'Air_Flow', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(152, 'M029', '29:22', 'workflow', 'Air_Flow', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(153, 'M029', '29:26', 'workflow', 'Air_Flow', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(154, 'M029', '29:30', 'workflow', 'Air_Flow', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(155, 'M029', '29:34', 'workflow', 'Air_Flow', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(156, 'M029', '29:48', 'workflow', 'Air_Flow', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(157, 'L029', '2029:0', 'profile', 'Air_Flow', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(158, 'L029', '2029:2', 'profile', 'Air_Flow', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(159, 'L029', '2029:12', 'profile', 'Air_Flow', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(160, 'L029', '3029:0', 'cascade_dO2', 'Air_Flow', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(161, 'L029', '1029:6', 'phases', 'Air_Flow', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(162, 'L029', '1029:8', 'process_data', 'Air_Flow', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(163, 'L029', '4029:0', 'process_data', 'Air_Flow', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(164, 'L029', '4029:2', 'process_data', 'Air_Flow', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(165, 'D014', '10014:2', 'synoptic', 'Air_Flow', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(166, 'D014', '10014:4', 'synoptic', 'Air_Flow', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(167, 'M030', '30:46', 'process_data', 'O2_Flow', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(168, 'M030', '30:18', 'process_data', 'O2_Flow', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(169, 'M030', '30:22', 'workflow', 'O2_Flow', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(170, 'M030', '30:26', 'workflow', 'O2_Flow', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(171, 'M030', '30:30', 'workflow', 'O2_Flow', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(172, 'M030', '30:34', 'workflow', 'O2_Flow', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(173, 'M030', '30:48', 'workflow', 'O2_Flow', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(174, 'L030', '2030:0', 'profile', 'O2_Flow', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(175, 'L030', '2030:2', 'profile', 'O2_Flow', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(176, 'L030', '2030:12', 'profile', 'O2_Flow', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(177, 'L030', '3030:0', 'cascade_dO2', 'O2_Flow', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(178, 'L030', '1030:6', 'phases', 'O2_Flow', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(179, 'L030', '1030:8', 'process_data', 'O2_Flow', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(180, 'L030', '4030:0', 'process_data', 'O2_Flow', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(181, 'L030', '4030:2', 'process_data', 'O2_Flow', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(182, 'D015', '10015:2', 'synoptic', 'O2_Flow', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(183, 'D015', '10015:4', 'synoptic', 'O2_Flow', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(184, 'M031', '31:46', 'process_data', 'N2_Flow', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(185, 'M031', '31:18', 'process_data', 'N2_Flow', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(186, 'M031', '31:22', 'workflow', 'N2_Flow', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(187, 'M031', '31:26', 'workflow', 'N2_Flow', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(188, 'M031', '31:30', 'workflow', 'N2_Flow', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(189, 'M031', '31:34', 'workflow', 'N2_Flow', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(190, 'M031', '31:48', 'workflow', 'N2_Flow', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(191, 'L031', '2031:0', 'profile', 'N2_Flow', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(192, 'L031', '2031:2', 'profile', 'N2_Flow', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(193, 'L031', '2031:12', 'profile', 'N2_Flow', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(194, 'L031', '3031:0', 'cascade_dO2', 'N2_Flow', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(195, 'L031', '1031:6', 'phases', 'N2_Flow', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(196, 'L031', '1031:8', 'process_data', 'N2_Flow', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(197, 'L031', '4031:0', 'process_data', 'N2_Flow', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(198, 'L031', '4031:2', 'process_data', 'N2_Flow', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(199, 'D016', '10016:2', 'synoptic', 'N2_Flow', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(200, 'D016', '10016:4', 'synoptic', 'N2_Flow', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(201, 'M032', '32:46', 'process_data', 'CO2_Flow', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(202, 'M032', '32:18', 'process_data', 'CO2_Flow', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(203, 'M032', '32:22', 'workflow', 'CO2_Flow', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(204, 'M032', '32:26', 'workflow', 'CO2_Flow', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(205, 'M032', '32:30', 'workflow', 'CO2_Flow', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(206, 'M032', '32:34', 'workflow', 'CO2_Flow', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(207, 'M032', '32:48', 'workflow', 'CO2_Flow', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(208, 'L032', '2032:0', 'profile', 'CO2_Flow', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(209, 'L032', '2032:2', 'profile', 'CO2_Flow', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(210, 'L032', '2032:12', 'profile', 'CO2_Flow', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(211, 'L032', '3032:0', 'cascade_dO2', 'CO2_Flow', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(212, 'L032', '1032:6', 'phases', 'CO2_Flow', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(213, 'L032', '1032:8', 'process_data', 'CO2_Flow', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(214, 'L032', '4032:0', 'process_data', 'CO2_Flow', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(215, 'L032', '4032:2', 'process_data', 'CO2_Flow', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(216, 'D017', '10017:2', 'synoptic', 'CO2_Flow', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(217, 'D017', '10017:4', 'synoptic', 'CO2_Flow', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(218, 'M035', '35:46', 'process_data', 'Gas_Flow', 'Errors', '', 'R', 'ShortLE', 'PLC_Tag'),
(219, 'M035', '35:18', 'process_data', 'Gas_Flow', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(220, 'L035', '1035:12', 'workflow', 'Gas_Flow', 'Period', '', 'W', 'Float', 'PLC_Tag'),
(221, 'D018', '10018:2', 'synoptic', 'Gas_Flow', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(222, 'D018', '10018:4', 'synoptic', 'Gas_Flow', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(223, 'D004', '10004:34', 'process_data', 'Pump1_Total_Flow', 'Process_Value', '', 'RW', 'Float', 'PLC_Tag'),
(224, 'D004', '10004:8', 'process_data', 'Pump1', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(225, 'L073', '1073:6', 'phases', 'Pump1', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(226, 'L073', '3073:0', 'cascade_dO2', 'Pump1', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(227, 'L073', '2073:0', 'profile', 'Pump1', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(228, 'L073', '2073:2', 'profile', 'Pump1', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(229, 'L073', '2073:12', 'profile', 'Pump1', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(230, 'L073', '4073:0', 'process_data', 'Pump1', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(231, 'L073', '4073:2', 'process_data', 'Pump1', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(232, 'L073', '1073:4', 'workflow', 'Pump1', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(233, 'L073', '1073:8', 'process_data', 'Pump1', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(234, 'D004', '10004:2', 'synoptic', 'Pump1', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(235, 'D004', '10004:4', 'synoptic', 'Pump1', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(236, 'D004', '10004:30', 'workflow', 'Pump1', 'Period', '', 'W', 'Float', 'PLC_Tag'),
(237, 'D004', '10004:18', 'calibration', 'Pump1', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(238, 'D005', '10005:34', 'process_data', 'Pump2_Total_Flow', 'Process_Value', '', 'RW', 'Float', 'PLC_Tag'),
(239, 'D005', '10005:8', 'process_data', 'Pump2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(240, 'L074', '1074:6', 'phases', 'Pump2', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(241, 'L074', '3074:0', 'cascade_dO2', 'Pump2', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(242, 'L074', '2074:0', 'profile', 'Pump2', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(243, 'L074', '2074:2', 'profile', 'Pump2', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(244, 'L074', '2074:12', 'profile', 'Pump2', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(245, 'L074', '4074:0', 'process_data', 'Pump2', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(246, 'L074', '4074:2', 'process_data', 'Pump2', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(247, 'L074', '1074:4', 'workflow', 'Pump2', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(248, 'L074', '1074:8', 'process_data', 'Pump2', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(249, 'D005', '10005:2', 'synoptic', 'Pump2', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(250, 'D005', '10005:4', 'synoptic', 'Pump2', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(251, 'D005', '10005:30', 'workflow', 'Pump2', 'Period', '', 'W', 'Float', 'PLC_Tag'),
(252, 'D005', '10005:18', 'calibration', 'Pump2', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(253, 'D006', '10006:34', 'process_data', 'Pump3_Total_Flow', 'Process_Value', '', 'RW', 'Float', 'PLC_Tag'),
(254, 'D006', '10006:8', 'process_data', 'Pump3', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(255, 'L075', '1075:6', 'phases', 'Pump3', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(256, 'L075', '3075:0', 'cascade_dO2', 'Pump3', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(257, 'L075', '2075:0', 'profile', 'Pump3', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(258, 'L075', '2075:2', 'profile', 'Pump3', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(259, 'L075', '2075:12', 'profile', 'Pump3', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(260, 'L075', '4075:0', 'process_data', 'Pump3', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(261, 'L075', '4075:2', 'process_data', 'Pump3', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(262, 'L075', '1075:4', 'workflow', 'Pump3', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(263, 'L075', '1075:8', 'process_data', 'Pump3', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(264, 'D006', '10006:2', 'synoptic', 'Pump3', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(265, 'D006', '10006:4', 'synoptic', 'Pump3', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(266, 'D006', '10006:30', 'workflow', 'Pump3', 'Period', '', 'W', 'Float', 'PLC_Tag'),
(267, 'D006', '10006:18', 'calibration', 'Pump3', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(268, 'D203', '10203:34', 'process_data', 'Pump4_Total_Flow', 'Process_Value', '', 'RW', 'Float', 'PLC_Tag'),
(269, 'D203', '10203:8', 'process_data', 'Pump4', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(270, 'L076', '1076:6', 'phases', 'Pump4', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(271, 'L076', '3076:0', 'cascade_dO2', 'Pump4', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(272, 'L076', '2076:0', 'profile', 'Pump4', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(273, 'L076', '2076:2', 'profile', 'Pump4', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(274, 'L076', '2076:12', 'profile', 'Pump4', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(275, 'L076', '4076:0', 'process_data', 'Pump4', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(276, 'L076', '4076:2', 'process_data', 'Pump4', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(277, 'L076', '1076:4', 'workflow', 'Pump4', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(278, 'L076', '1076:8', 'process_data', 'Pump4', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(279, 'D203', '10203:2', 'synoptic', 'Pump4', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(280, 'D203', '10203:4', 'synoptic', 'Pump4', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(281, 'D203', '10203:18', 'calibration', 'Pump4', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(282, 'M069', '69:18', 'process_data', 'Level_1', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(283, 'M069', '69:50', 'workflow', 'Level_1', 'Level_Inversion-1', '', 'W', 'Short', 'PLC_Tag'),
(284, 'M070', '70:18', 'process_data', 'Level_2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(285, 'M070', '70:50', 'workflow', 'Level_2', 'Level_Inversion-1', '', 'W', 'Short', 'PLC_Tag'),
(286, 'M071', '71:18', 'process_data', 'Jacket_Level', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(287, 'M071', '71:50', 'workflow', 'Jacket_Level', 'Level_Inversion-1', '', 'W', 'Short', 'PLC_Tag'),
(288, 'M005', '5:18', 'process_data', 'Temperature_Aux', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(289, 'M005', '5:2', 'process_data', 'Temperature_Aux', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(290, 'M005', '5:6', 'calibration', 'Temperature_Aux', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(291, 'M005', '5:46', 'process_data', 'Temperature_Aux', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(292, 'M005', '5:22', 'workflow', 'Temperature_Aux', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(293, 'M005', '5:26', 'workflow', 'Temperature_Aux', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(294, 'M005', '5:30', 'workflow', 'Temperature_Aux', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(295, 'M005', '5:34', 'workflow', 'Temperature_Aux', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(296, 'M005', '5:48', 'workflow', 'Temperature_Aux', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(297, 'M016', '16:18', 'process_data', 'Weight', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(298, 'M016', '16:46', 'process_data', 'Weight', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(299, 'M016', '16:22', 'workflow', 'Weight', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(300, 'M016', '16:26', 'workflow', 'Weight', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(301, 'M016', '16:30', 'workflow', 'Weight', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(302, 'M016', '16:34', 'workflow', 'Weight', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(303, 'M016', '16:48', 'workflow', 'Weight', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(304, 'M060', '60:18', 'process_data', 'A_In_1', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(305, 'M060', '60:2', 'process_data', 'A_In_1', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(306, 'M060', '60:6', 'calibration', 'A_In_1', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(307, 'M060', '60:46', 'process_data', 'A_In_1', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(308, 'M060', '60:22', 'workflow', 'A_In_1', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(309, 'M060', '60:26', 'workflow', 'A_In_1', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(310, 'M060', '60:30', 'workflow', 'A_In_1', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(311, 'M060', '60:34', 'workflow', 'A_In_1', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(312, 'M060', '60:48', 'workflow', 'A_In_1', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(313, 'M061', '61:18', 'process_data', 'A_In_2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(314, 'M061', '61:2', 'process_data', 'A_In_2', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(315, 'M061', '61:6', 'calibration', 'A_In_2', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(316, 'M061', '61:46', 'process_data', 'A_In_2', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(317, 'M061', '61:22', 'workflow', 'A_In_2', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(318, 'M061', '61:26', 'workflow', 'A_In_2', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(319, 'M061', '61:30', 'workflow', 'A_In_2', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(320, 'M061', '61:34', 'workflow', 'A_In_2', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(321, 'M061', '61:48', 'workflow', 'A_In_2', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(322, 'M062', '62:18', 'process_data', 'A_In_3', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(323, 'M062', '62:2', 'process_data', 'A_In_3', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(324, 'M062', '62:6', 'calibration', 'A_In_3', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(325, 'M062', '62:46', 'process_data', 'A_In_3', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(326, 'M062', '62:22', 'workflow', 'A_In_3', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(327, 'M062', '62:26', 'workflow', 'A_In_3', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(328, 'M062', '62:30', 'workflow', 'A_In_3', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(329, 'M062', '62:34', 'workflow', 'A_In_3', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(330, 'M062', '62:48', 'workflow', 'A_In_3', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(331, 'M063', '63:18', 'process_data', 'A_In_4', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(332, 'M063', '63:2', 'process_data', 'A_In_4', 'Raw_Value', '', 'R', 'Float', 'PLC_Tag'),
(333, 'M063', '63:6', 'calibration', 'A_In_4', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(334, 'M063', '63:46', 'process_data', 'A_In_4', 'Errors', '', 'R', 'ShortLE', 'Alarm_Tag'),
(335, 'M063', '63:22', 'workflow', 'A_In_4', 'Alarm_Highest', '', 'W', 'Float', 'PLC_Tag'),
(336, 'M063', '63:26', 'workflow', 'A_In_4', 'Alarm_High', '', 'W', 'Float', 'PLC_Tag'),
(337, 'M063', '63:30', 'workflow', 'A_In_4', 'Alarm_Low', '', 'W', 'Float', 'PLC_Tag'),
(338, 'M063', '63:34', 'workflow', 'A_In_4', 'Alarm_Lowest', '', 'W', 'Float', 'PLC_Tag'),
(339, 'M063', '63:48', 'workflow', 'A_In_4', 'Alarm_Enabled-1', '', 'W', 'ShortLE', 'Alarm_Tag'),
(340, 'D050', '10050:8', 'process_data', 'A_Out_1', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(341, 'L060', '1060:6', 'phases', 'A_Out_1', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(342, 'L060', '3060:0', 'cascade_dO2', 'A_Out_1', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(343, 'L060', '2060:0', 'profile', 'A_Out_1', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(344, 'L060', '2060:2', 'profile', 'A_Out_1', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(345, 'L060', '2060:12', 'profile', 'A_Out_1', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(346, 'L060', '4060:0', 'process_data', 'A_Out_1', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(347, 'L060', '4060:2', 'process_data', 'A_Out_1', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(348, 'L060', '1060:4', 'workflow', 'A_Out_1', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(349, 'L060', '1060:8', 'process_data', 'A_Out_1', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(350, 'D050', '10050:2', 'synoptic', 'A_Out_1', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(351, 'D050', '10050:4', 'synoptic', 'A_Out_1', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(352, 'D050', '10050:18', 'calibration', 'A_Out_1', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(353, 'D051', '10051:8', 'process_data', 'A_Out_2', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(354, 'L061', '1061:6', 'phases', 'A_Out_2', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(355, 'L061', '3061:0', 'cascade_dO2', 'A_Out_2', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(356, 'L061', '2061:0', 'profile', 'A_Out_2', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(357, 'L061', '2061:2', 'profile', 'A_Out_2', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(358, 'L061', '2061:12', 'profile', 'A_Out_2', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(359, 'L061', '4061:0', 'process_data', 'A_Out_2', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(360, 'L061', '4061:2', 'process_data', 'A_Out_2', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(361, 'L061', '1061:4', 'workflow', 'A_Out_2', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(362, 'L061', '1061:8', 'process_data', 'A_Out_2', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(363, 'D051', '10051:2', 'synoptic', 'A_Out_2', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(364, 'D051', '10051:4', 'synoptic', 'A_Out_2', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(365, 'D051', '10051:18', 'calibration', 'A_Out_2', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(366, 'D052', '10052:8', 'process_data', 'A_Out_3', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(367, 'L062', '1062:6', 'phases', 'A_Out_3', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(368, 'L062', '3062:0', 'cascade_dO2', 'A_Out_3', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(369, 'L062', '2062:0', 'profile', 'A_Out_3', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(370, 'L062', '2062:2', 'profile', 'A_Out_3', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(371, 'L062', '2062:12', 'profile', 'A_Out_3', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(372, 'L062', '4062:0', 'process_data', 'A_Out_3', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(373, 'L062', '4062:2', 'process_data', 'A_Out_3', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(374, 'L062', '1062:4', 'workflow', 'A_Out_3', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(375, 'L062', '1062:8', 'process_data', 'A_Out_3', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(376, 'D052', '10052:2', 'synoptic', 'A_Out_3', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(377, 'D052', '10052:4', 'synoptic', 'A_Out_3', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(378, 'D052', '10052:18', 'calibration', 'A_Out_3', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag'),
(379, 'D053', '10053:8', 'process_data', 'A_Out_4', 'Process_Value', '', 'R', 'Float', 'PLC_Tag'),
(380, 'L063', '1063:6', 'phases', 'A_Out_4', 'Status-1', '', 'W', 'Short', 'Status_Tag'),
(381, 'L063', '3063:0', 'cascade_dO2', 'A_Out_4', 'Priority,Min,Max,K,Time', '', 'W', '', 'Cascade_Tag'),
(382, 'L063', '2063:0', 'profile', 'A_Out_4', '`Mode`-1', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(383, 'L063', '2063:2', 'profile', 'A_Out_4', '`Repeat`', 'Time=0', 'W', 'Short', 'Phase_Tag'),
(384, 'L063', '2063:12', 'profile', 'A_Out_4', 'Time,Setpoint', '', 'W', 'Float', 'Profile_Tag'),
(385, 'L063', '4063:0', 'process_data', 'A_Out_4', 'Logic_Active', '', 'W', 'Short', 'PLC_Tag'),
(386, 'L063', '4063:2', 'process_data', 'A_Out_4', 'Logic_Set_Value', '', 'W', 'Float', 'PLC_Tag'),
(387, 'L063', '1063:4', 'workflow', 'A_Out_4', 'Function-1', '', 'W', 'Short', 'PLC_Tag'),
(388, 'L063', '1063:8', 'process_data', 'A_Out_4', 'Set_Value', '', 'R', 'Float', 'PLC_Tag'),
(389, 'D053', '10053:2', 'synoptic', 'A_Out_4', 'Mode-1', '', 'W', 'Short', 'PLC_Tag'),
(390, 'D053', '10053:4', 'synoptic', 'A_Out_4', 'Value', '', 'W', 'Float', 'PLC_Tag'),
(391, 'D053', '10053:18', 'calibration', 'A_Out_4', 'x0,x1,x2', '', 'W', 'Float', 'Calibration_Tag');

-- --------------------------------------------------------

--
-- Table structure for table `workflow`
--

CREATE TABLE `workflow` (
  `Name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `Display` float DEFAULT NULL COMMENT 'Display order, NULL is not shown (same integral part means belonging to same view group)',
  `Configurable` int(11) DEFAULT 0 COMMENT 'Show configuration button',
  `Default_Set_Value` float DEFAULT NULL COMMENT 'Default SET value at boot (DEMO)',
  `Default_Process_Value` float DEFAULT NULL COMMENT 'Default PV value at boot (DEMO)',
  `Unit` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `Raw_Unit` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Measure unit for raw value',
  `Function` enum('FEED','ACID','ALKALI','LEVEL 1','LEVEL 2') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Function_CO2` enum('FEED','ACID') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Temperature_Main_Probe` enum('PT100','pH Temperature') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Pid_Control_Mode` enum('CHILLER','TAP_WATER') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Main_Probe` enum('DIGITAL','ANALOG') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Pid_1` float DEFAULT NULL,
  `Pid_2` float DEFAULT NULL,
  `Pid_3` float DEFAULT NULL,
  `Pid_4` float DEFAULT NULL,
  `Pid_5` float DEFAULT NULL,
  `Pid_6` float DEFAULT NULL,
  `Pid_7` float DEFAULT NULL,
  `Pid_8` float DEFAULT NULL,
  `Pid_9` float DEFAULT NULL,
  `Pid_10` float DEFAULT NULL,
  `Pid_11` float DEFAULT NULL,
  `Pid_12` float DEFAULT NULL,
  `Pid_13` float DEFAULT NULL,
  `Pid_14` float DEFAULT NULL,
  `Pid_15` float DEFAULT NULL,
  `Period` int(10) UNSIGNED DEFAULT NULL,
  `Level_Inversion` enum('NORMAL','INVERTED') COLLATE utf8_unicode_ci DEFAULT NULL,
  `Alarm_Lowest` float DEFAULT NULL,
  `Alarm_Low` float DEFAULT NULL,
  `Alarm_High` float DEFAULT NULL,
  `Alarm_Highest` float DEFAULT NULL,
  `Alarm_Enabled` enum('OFF','ON') COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `workflow`
--

INSERT INTO `workflow` (`Name`, `Display`, `Configurable`, `Default_Set_Value`, `Default_Process_Value`, `Unit`, `Raw_Unit`, `Function`, `Function_CO2`, `Temperature_Main_Probe`, `Pid_Control_Mode`, `Main_Probe`, `Pid_1`, `Pid_2`, `Pid_3`, `Pid_4`, `Pid_5`, `Pid_6`, `Pid_7`, `Pid_8`, `Pid_9`, `Pid_10`, `Pid_11`, `Pid_12`, `Pid_13`, `Pid_14`, `Pid_15`, `Period`, `Level_Inversion`, `Alarm_Lowest`, `Alarm_Low`, `Alarm_High`, `Alarm_Highest`, `Alarm_Enabled`) VALUES
('A_In_1', 260, 1, NULL, 0, '%', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 100, 100, 'OFF'),
('A_In_2', 270, 1, NULL, 0, '%', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 100, 100, 'OFF'),
('A_In_3', 280, 1, NULL, 0, '%', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 100, 100, 'OFF'),
('A_In_4', 290, 1, NULL, 0, '%', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 100, 100, 'OFF'),
('A_Out_1', 300, 1, 0, 0, '%', '%', 'FEED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('A_Out_2', 310, 1, 0, 0, '%', '%', 'FEED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('A_Out_3', 320, 1, 0, 0, '%', '%', 'FEED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('A_Out_4', 330, 1, 0, 0, '%', '%', 'FEED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Air_Flow', 120, 1, 0, 0, 'Nl/min', 'Nl/min', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 50, 50, 'OFF'),
('CO2_Flow', 150, 1, 0, 0, 'Nl/min', 'Nl/min', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 50, 50, 'OFF'),
('Conductivity', 100, 1, NULL, 0, 'µS/cm', 'µS/cm', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'OFF'),
('Cooler', NULL, 0, NULL, 0, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('dO2', 80, 1, 100, 100, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 150, 150, 'OFF'),
('Gas_Flow', 160, 1, NULL, 0, 'Nl/min', 'Nl/min', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL),
('Heater', NULL, 0, NULL, 0, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Jacket_Level', 230, 0, NULL, 0, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'NORMAL', NULL, NULL, NULL, NULL, 'OFF'),
('Level_1', 210, 1, NULL, 0, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'NORMAL', NULL, NULL, NULL, NULL, 'OFF'),
('Level_2', 220, 1, NULL, 0, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'NORMAL', NULL, NULL, NULL, NULL, 'OFF'),
('N2_Flow', 140, 1, 0, 0, 'Nl/min', 'Nl/min', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 50, 50, 'OFF'),
('O2_Flow', 130, 1, 0, 0, 'Nl/min', 'Nl/min', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 50, 50, 'OFF'),
('ORP', 70, 1, NULL, 250, 'mV', 'mV', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('pH', 50, 1, 7, 7, '', '', NULL, NULL, NULL, NULL, NULL, 0.03, NULL, NULL, NULL, 0.05, 0.05, 0.05, 4, NULL, NULL, 1, 1, 5, NULL, NULL, NULL, NULL, 0, 0, 14, 14, 'OFF'),
('Pressure', 110, 1, 0, 0, 'bar', 'bar', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1.8, 2, 'OFF'),
('Pump1', 170, 1, 0, 5, 'ml/min', '%', 'FEED', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump1_Total_Flow', 170.1, 0, NULL, 0, 'ml', 'ml', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump2', 180, 1, 0, 5, 'ml/min', '%', 'ALKALI', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump2_Total_Flow', 180.1, 0, NULL, 0, 'ml', 'ml', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump3', 190, 1, 0, 5, 'ml/min', '%', 'ACID', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump3_Total_Flow', 190.1, 0, NULL, 0, 'ml', 'ml', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump4', 200, 1, 0, 5, 'ml/min', '%', 'LEVEL 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Pump4_Total_Flow', 200.1, 0, NULL, 0, 'ml', 'ml', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Stirring', 40, 1, 100, 100, 'rpm', 'rpm', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Stirring_Current', 40.2, 1, NULL, 15, '%', '%', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 60, 70, 'OFF'),
('Stirring_Power', 40.1, 1, NULL, 10, 'W', 'W', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 60, 70, 'OFF'),
('Temperature', 10, 1, 30, 30, '°C', '', NULL, NULL, NULL, NULL, NULL, 0.7, 0.0008, 80, NULL, NULL, NULL, 0.5, 60, NULL, NULL, 1, 0.7, 5, NULL, NULL, NULL, NULL, 0, 0, 50, 80, 'OFF'),
('Temperature_Aux', 240, 0, NULL, 30, '°C', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Temperature_dO2', 80.1, 0, NULL, 0, '°C', '°C', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Temperature_pH', 50.1, 0, NULL, 0, '°C', '°C', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
('Weight', 250, 0, NULL, 0, 'g', 'g', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `calibration`
--
ALTER TABLE `calibration`
  ADD PRIMARY KEY (`Name`);

--
-- Indexes for table `cascade_dCO2`
--
ALTER TABLE `cascade_dCO2`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `cascade_dO2`
--
ALTER TABLE `cascade_dO2`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `checkup`
--
ALTER TABLE `checkup`
  ADD PRIMARY KEY (`Step_Number`);

--
-- Indexes for table `event_list`
--
ALTER TABLE `event_list`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `info`
--
ALTER TABLE `info`
  ADD PRIMARY KEY (`Phase_Id`);

--
-- Indexes for table `logic`
--
ALTER TABLE `logic`
  ADD PRIMARY KEY (`Enabled`);

--
-- Indexes for table `parameter`
--
ALTER TABLE `parameter`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `phases`
--
ALTER TABLE `phases`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `phase_info`
--
ALTER TABLE `phase_info`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `phase_list`
--
ALTER TABLE `phase_list`
  ADD PRIMARY KEY (`Phase_Id`);

--
-- Indexes for table `pid`
--
ALTER TABLE `pid`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `process_data`
--
ALTER TABLE `process_data`
  ADD UNIQUE KEY `Name` (`Name`);

--
-- Indexes for table `profile`
--
ALTER TABLE `profile`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `sensor_data`
--
ALTER TABLE `sensor_data`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `steps`
--
ALTER TABLE `steps`
  ADD PRIMARY KEY (`Step`);

--
-- Indexes for table `synoptic`
--
ALTER TABLE `synoptic`
  ADD PRIMARY KEY (`Alias`);

--
-- Indexes for table `tags`
--
ALTER TABLE `tags`
  ADD PRIMARY KEY (`Id`);

--
-- Indexes for table `workflow`
--
ALTER TABLE `workflow`
  ADD UNIQUE KEY `Name` (`Name`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `cascade_dCO2`
--
ALTER TABLE `cascade_dCO2`
  MODIFY `Id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cascade_dO2`
--
ALTER TABLE `cascade_dO2`
  MODIFY `Id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;

--
-- AUTO_INCREMENT for table `checkup`
--
ALTER TABLE `checkup`
  MODIFY `Step_Number` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `event_list`
--
ALTER TABLE `event_list`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=87;

--
-- AUTO_INCREMENT for table `parameter`
--
ALTER TABLE `parameter`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=96;

--
-- AUTO_INCREMENT for table `phases`
--
ALTER TABLE `phases`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=327;

--
-- AUTO_INCREMENT for table `phase_info`
--
ALTER TABLE `phase_info`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pid`
--
ALTER TABLE `pid`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `profile`
--
ALTER TABLE `profile`
  MODIFY `Id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=162;

--
-- AUTO_INCREMENT for table `sensor_data`
--
ALTER TABLE `sensor_data`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `steps`
--
ALTER TABLE `steps`
  MODIFY `Step` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tags`
--
ALTER TABLE `tags`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=392;
COMMIT;

