?? tank_init.m
字號:
function tank_init%%% Initialize kernelttInitKernel(2, 1, 'prioFP'); % nbrOfInputs, nbrOfOutputs, FP%%% Initialize data structure for controller taskdata.u = 0; % used to store the control signaldata.K = 3; % the gain of the controller% These variables are used to implement integral action%data.e = 0; % error state%data.I = 0; % integral state%data.Ti = 0.3; % integral time%data.h = 0.05; % sampling interval%%% Create controller taskperiod = 0.05;prio = 8;ttCreatePeriodicTask('Regul', period, prio, 'regulcode', data);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -