function varargout = Steff_gui(varargin)
% STEFF_GUI MATLAB code for Steff_gui.fig
%      STEFF_GUI, by itself, creates a new STEFF_GUI or raises the existing
%      singleton*.
%
%      H = STEFF_GUI returns the handle to a new STEFF_GUI or the handle to
%      the existing singleton*.
%
%      STEFF_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in STEFF_GUI.M with the given input arguments.
%
%      STEFF_GUI('Property','Value',...) creates a new STEFF_GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Steff_gui_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Steff_gui_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Steff_gui

% Last Modified by GUIDE v2.5 16-Jun-2013 22:13:42

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Steff_gui_OpeningFcn, ...
                   'gui_OutputFcn',  @Steff_gui_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before Steff_gui is made visible.
function Steff_gui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Steff_gui (see VARARGIN)

% Choose default command line output for Steff_gui
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Steff_gui wait for user response (see UIRESUME)
% uiwait(handles.Steff_gui);

open Steff_sim



% --- Outputs from this function are returned to the command line.
function varargout = Steff_gui_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;



% --- Executes on button press in pushbutton_Messen.
function pushbutton_Messen_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_Messen (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

evalin('base','clear');
set_param('Steff_sim','SimulationCommand','start')



% --- Executes on button press in pushbutton_Stop.
function pushbutton_Stop_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_Stop (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

set_param('Steff_sim', 'SimulationCommand', 'stop')



% --- Executes on button press in pushbutton_Beenden.
function pushbutton_Beenden_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_Beenden (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

clear all
% clear Workspace
evalin('base','clear'); 
% Closes Simulink model unconditionally
bdclose('Steff_sim')
% Closes GUI
close Steff_gui






function edit_Drehzahl_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Drehzahl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Drehzahl as text
%        str2double(get(hObject,'String')) returns contents of edit_Drehzahl as a double


% --- Executes during object creation, after setting all properties.
function edit_Drehzahl_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Drehzahl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_DrehzahlV_Callback(hObject, eventdata, handles)
% hObject    handle to edit_DrehzahlV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_DrehzahlV as text
%        str2double(get(hObject,'String')) returns contents of edit_DrehzahlV as a double


% --- Executes during object creation, after setting all properties.
function edit_DrehzahlV_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_DrehzahlV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Uhr_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Uhr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Uhr as text
%        str2double(get(hObject,'String')) returns contents of edit_Uhr as a double


% --- Executes during object creation, after setting all properties.
function edit_Uhr_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Uhr (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Durchfluss_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Durchfluss (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Durchfluss as text
%        str2double(get(hObject,'String')) returns contents of edit_Durchfluss as a double


% --- Executes during object creation, after setting all properties.
function edit_Durchfluss_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Durchfluss (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_DurchflussV_Callback(hObject, eventdata, handles)
% hObject    handle to edit_DurchflussV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_DurchflussV as text
%        str2double(get(hObject,'String')) returns contents of edit_DurchflussV as a double


% --- Executes during object creation, after setting all properties.
function edit_DurchflussV_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_DurchflussV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Wasser1_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Wasser1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Wasser1 as text
%        str2double(get(hObject,'String')) returns contents of edit_Wasser1 as a double


% --- Executes during object creation, after setting all properties.
function edit_Wasser1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Wasser1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Kraft1_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Kraft1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Kraft1 as text
%        str2double(get(hObject,'String')) returns contents of edit_Kraft1 as a double


% --- Executes during object creation, after setting all properties.
function edit_Kraft1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Kraft1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Wasser2_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Wasser2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Wasser2 as text
%        str2double(get(hObject,'String')) returns contents of edit_Wasser2 as a double


% --- Executes during object creation, after setting all properties.
function edit_Wasser2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Wasser2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_WasserT_Callback(hObject, eventdata, handles)
% hObject    handle to edit_WasserT (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_WasserT as text
%        str2double(get(hObject,'String')) returns contents of edit_WasserT as a double


% --- Executes during object creation, after setting all properties.
function edit_WasserT_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_WasserT (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Leistung_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Leistung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Leistung as text
%        str2double(get(hObject,'String')) returns contents of edit_Leistung as a double


% --- Executes during object creation, after setting all properties.
function edit_Leistung_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Leistung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_LeistungV_Callback(hObject, eventdata, handles)
% hObject    handle to edit_LeistungV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_LeistungV as text
%        str2double(get(hObject,'String')) returns contents of edit_LeistungV as a double


% --- Executes during object creation, after setting all properties.
function edit_LeistungV_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_LeistungV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Temp_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Temp (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Temp as text
%        str2double(get(hObject,'String')) returns contents of edit_Temp as a double


% --- Executes during object creation, after setting all properties.
function edit_Temp_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Temp (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Kraft2_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Kraft2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Kraft2 as text
%        str2double(get(hObject,'String')) returns contents of edit_Kraft2 as a double


% --- Executes during object creation, after setting all properties.
function edit_Kraft2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Kraft2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Wasser3_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Wasser3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Wasser3 as text
%        str2double(get(hObject,'String')) returns contents of edit_Wasser3 as a double


% --- Executes during object creation, after setting all properties.
function edit_Wasser3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Wasser3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Zaehler_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Zaehler (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Zaehler as text
%        str2double(get(hObject,'String')) returns contents of edit_Zaehler as a double


% --- Executes during object creation, after setting all properties.
function edit_Zaehler_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Zaehler (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Intervall_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Intervall (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Intervall as text
%        str2double(get(hObject,'String')) returns contents of edit_Intervall as a double


% --- Executes during object creation, after setting all properties.
function edit_Intervall_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Intervall (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Neigung_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Neigung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Neigung as text
%        str2double(get(hObject,'String')) returns contents of edit_Neigung as a double


% --- Executes during object creation, after setting all properties.
function edit_Neigung_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Neigung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit_Bezeichnung_Callback(hObject, eventdata, handles)
% hObject    handle to edit_Bezeichnung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_Bezeichnung as text
%        str2double(get(hObject,'String')) returns contents of edit_Bezeichnung as a double


% --- Executes during object creation, after setting all properties.
function edit_Bezeichnung_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_Bezeichnung (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit19_Callback(hObject, eventdata, handles)
% hObject    handle to edit19 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit19 as text
%        str2double(get(hObject,'String')) returns contents of edit19 as a double


% --- Executes during object creation, after setting all properties.
function edit19_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit19 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
