• 大小: 3.22MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-04
  • 语言: Matlab
  • 标签: CAN  MATLAB  源代码  

资源简介

USB CAN Tool 开发,包含接口函数库(二次开发库)使用说明书,样例程序操作说明,matlab版本32位代码和64位代码各一套 (The source code of USB CAN Tool)

资源截图

代码片段和文件信息

function varargout = CAN_Demo(varargin)
% Edit the above text to modify the response to help CAN_Demo

% Last Modified by GUIDE v2.5 10-Dec-2014 09:58:58

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘       mfilename ...
                   ‘gui_Singleton‘  gui_Singleton ...
                   ‘gui_OpeningFcn‘ @CAN_Demo_OpeningFcn ...
                   ‘gui_OutputFcn‘  @CAN_Demo_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 CAN_Demo is made visible.
function CAN_Demo_OpeningFcn(hobject eventdata handles varargin)
global CONNECTED;
global LISTBOXNUM;
LISTBOXNUM = 0;
CONNECTED = 0;%--开始时为没连接状态
set(handles.edit_Timing0‘Enable‘‘off‘);
set(handles.edit_Timing1‘Enable‘‘off‘);
if libisloaded(‘ControlCAN‘)~=1
end

%初始化
global DEVICETYPE;
set(handles.popupmenu_DeviceName‘value‘3);
DEVICETYPE=4;

global DEVICEINDEX;
set(handles.popupmenu_DeviceIndex‘value‘1);
DEVICEINDEX=0;

global CANINDEX;
set(handles.popupmenu_CANIndex‘value‘1);
CANINDEX=0;

global SENDTYPE;
SENDTYPE=0;

global frameTYPE;
frameTYPE=0;

global frameFORMAT;
frameFORMAT=0;

% Choose default command line output for CAN_Demo
handles.output = hobject;

% Update handles structure
guidata(hobject handles);



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


% --- Outputs from this function are returned to the command line.
function varargout = CAN_Demo_OutputFcn(hobject eventdata handles) 
% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on selection change in popupmenu_DeviceName.
function popupmenu_DeviceName_Callback(hobject eventdata handles)
global DEVICETYPE;
dev=get(hobject‘value‘);
switch dev
    case 1
        DEVICETYPE=2;
    case 2     
        DEVICETYPE=3;
    case 3
        DEVICETYPE=4;
    case 4
        DEVICETYPE=5;
    case 5
        DEVICETYPE=12;
    case 6
        DEVICETYPE=14;
    case 7
        DEVICETYPE=15;
    case 8
        DEVICETYPE=16;
    case 9
        DEVICETYPE=17;
    case 10
        DEVICETYPE=24;
    otherwise
        disp(‘Unknown DeviceType.‘);
end


% --- Executes on selection change in popupmenu_DeviceIndex.
function popupmenu_DeviceIndex_Callback(hobject eventdata handles)
global DEVICEINDEX;
DEVICEINDEX=get(handles.popupmenu_DeviceIndex‘value‘)-1;




% --- Executes on selection change in popupmenu_CANIndex.
function popupmenu_CANIndex_Callback(hobject eventdata handles)
global CANINDEX;
CANINDEX=get(handles.popupmenu_CANInde

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7498  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\CAN_Demo.fig

     文件      16116  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\CAN_Demo.m

     文件    1352704  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\CAN调用动态库必看.doc

     文件      38912  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\ControlCAN.dll

     文件       4961  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\ControlCAN.h

     文件       7312  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\ControlCAN.lib

     文件          0  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\mxREAL.m

     文件        549  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ClearBuffer.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ClearBuffer.mexw32

     文件        447  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_CloseDevice.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_CloseDevice.mexw32

     文件        498  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_GetReceiveNum.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_GetReceiveNum.mexw32

     文件       1027  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_InitCAN.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_InitCAN.mexw32

     文件        507  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_OpenDevice.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_OpenDevice.mexw32

     文件       1879  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ReadBoardInfo.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ReadBoardInfo.mexw32

     文件       2390  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_Receive.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_Receive.mexw32

     文件        479  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ResetCAN.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_ResetCAN.mexw32

     文件        479  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_StartCAN.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_StartCAN.mexw32

     文件       2341  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_Transmit.cpp

     文件      20480  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)32位\CAN_Demo(matlab)\VCI_Transmit.mexw32

     文件       7498  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)64位\CAN_Demo(matlab)\CAN_Demo.fig

     文件      16116  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)64位\CAN_Demo(matlab)\CAN_Demo.m

     文件    2094080  2019-05-05 12:51  CAN_Demo(matlab)\CAN_Demo(matlab)64位\CAN_Demo(matlab)\CAN调用动态库必看.doc

............此处省略32个文件信息

评论

共有 条评论