📄 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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -