function varargout = VC(varargin)
% VC M-file for VC.fig
% VC, by itself, creates a new VC or raises the existing
% singleton*.
%
% H = VC returns the handle to a new VC or the handle to
% the existing singleton*.
%
% VC('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in VC.M with the given input arguments.
%
% VC('Property','Value',...) creates a new VC or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before VC_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to VC_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 VC
% Last Modified by GUIDE v2.5 01-Dec-2005 09:30:35
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @VC_OpeningFcn, ...
'gui_OutputFcn', @VC_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(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 VC is made visible.
function VC_OpeningFcn(hObject, eventdata, handles, varargin)
shake=s_out_ini;%获得握手信号
if shake==170
set(handles.text14,'String','系统准备好,请输入电压值!');
else
set(handles.text14,'BackgroundColor',[1,0,0],'String','串口通信故障,请检查!')
end
handles.Voltage=[1,1,1,1,1,1,1,1
2,2,2,2,2,2,2,2
3,3,3,3,3,3,3,3
4,4,4,4,4,4,4,4
5,5,5,5,5,5,5,5
6,6,6,6,6,6,6,6
7,7,7,7,7,7,7,7
8,8,8,8,8,8,8,8];
handles.N_Voltage=[1,1,1,1,1,1,1,1
2,2,2,2,2,2,2,2
3,3,3,3,3,3,3,3
4,4,4,4,4,4,4,4
5,5,5,5,5,5,5,5
6,6,6,6,6,6,6,6
7,7,7,7,7,7,7,7
8,8,8,8,8,8,8,8];
% 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 VC (see VARARGIN)
% Choose default command line output for VC
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes VC wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = VC_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 during object creation, after setting all properties.
function os11_CreateFcn(hObject, eventdata, handles)
% hObject handle to os11 (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
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function os11_Callback(hObject, eventdata, handles)
val = str2double(get(handles.os11,'String'));
s_out(1,val/0.73)
set(handles.oss1,'value',val);
% hObject handle to os11 (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 os11 as text
% str2double(get(hObject,'String')) returns contents of os11 as a double
% --- Executes during object creation, after setting all properties.
function os12_CreateFcn(hObject, eventdata, handles)
% hObject handle to os12 (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
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function os12_Callback(hObject, eventdata, handles)
val = str2double(get(handles.os12,'String'));
s_out(2,val/0.73)
set(handles.oss2,'value',val);
% hObject handle to os12 (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 os12 as text
% str2double(get(hObject,'String')) returns contents of os12 as a double
% --- Executes during object creation, after setting all properties.
function os13_CreateFcn(hObject, eventdata, handles)
% hObject handle to os13 (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
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function os13_Callback(hObject, eventdata, handles)
val = str2double(get(handles.os13,'String'));
s_out(3,val/0.73)
set(handles.oss3,'value',val);
% hObject handle to os13 (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 os13 as text
% str2double(get(hObject,'String')) returns contents of os13 as a double
% --- Executes during object creation, after setting all properties.
function os14_CreateFcn(hObject, eventdata, handles)
% hObject handle to os14 (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
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function os14_Callback(hObject, eventdata, handles)
val = str2double(get(handles.os14,'String'));
s_out(4,val/0.73)
set(handles.oss4,'value',val);
% hObject handle to os14 (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 os14 as text
% str2double(get(hObject,'String')) returns contents of os14 as a double
% --- Executes during object creation, after setting all properties.
function os21_CreateFcn(hObject, eventdata, handles)
% hObject handle to os21 (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
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function os21_Callback
周楷雯
- 粉丝: 97
- 资源: 1万+
最新资源
- IBM FileNet Content Manager智能内容服务介绍V3.8
- C++程序设计-参考答案
- STM32超声波测距模块HC-SR04用定时器输入捕获实现测距
- 管理系统开发指南:功能要求、技术栈及安全控制
- 小学生信息管理系统,仅供参考
- IBM决策管理平台ODM介绍
- 汽车租赁管理系统,仅供参考
- 改进多任务transformer模型,以提高输血分类预测和注射种类容量回归预测的精度-医疗AI领域的多任务Transformer模型改进与应用:提高输血分类与注射容量预测的准确性
- 基于霍夫变换的人数检测软件
- IBM Process Mining流程挖掘
- 宿舍管理系统项目源代码全套技术资料.zip
- 最新仿720云全景制作源码-krpano仿720云全景网站源码 新增微信支付+打赏+场景红包
- 02326操作系统历年真题及答案2004-2023及课件PPT
- 音频采样与转换软件界面
- 租房网站项目源代码全套技术资料.zip
- java毕设项目之ssm班主任助理系统的设计与实现+jsp(完整前后端+说明文档+mysql+lw).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈