📄 convsp_f.sci
字号:
//CONVSP_f Scicos Serial to Bus converter
//Classical interface function ver1.0 - scilab-2.7
//22 d?cembre 2003 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=CONVSP_f(job,arg1,arg2)
x=[];y=[];typ=[]
select job
case 'plot' then
standard_draw(arg1)
case 'getinputs' then
[x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
[x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
[x,y]=standard_origin(arg1)
case 'set' then
x=arg1;
graphics=arg1.graphics;model=arg1.model;
exprs=graphics.exprs;
while %t do
[ok,ny,initc,exprs]=getvalue('Scicos Serial to Bus converter block',...
['Size of output';'Init counter value'],list('vec',1,'vec',1),exprs)
if ~ok then break,end;
if ok then
graphics.exprs=exprs
model.dstate=[zeros(ny,1);initc]
model.in=1;model.out=ny
x.graphics=graphics;x.model=model
break;
end
end
case 'define' then
ny=8
initc=0
model=scicos_model()
model.sim=list('convsp',2)
model.in=1
model.out=ny
model.evtin=1
model.evtout=[]
model.dstate=[zeros(ny,1);initc]
model.rpar=[]
model.ipar=[]
model.blocktype='d'
model.firing=[]
model.dep_ut=[%f %f]
gr_i=['txt=[''Serial to Bus'';''Converter''];';
'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']
exprs=[string(ny),string(initc)]
x=standard_define([2 2],model,exprs,gr_i)
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -