function freblkUpdateMaskDisplay(blk)
%   Utility function of FRE block

%   Author: R. Chen
%   Copyright 2018 The MathWorks, Inc.

IsOutputCD = strcmpi(get_param(blk,'OutputMode'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementCplusD'));
IsExternalSource = strcmpi(get_param(blk,'SineSource'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementPort'));
IsOnlineEstimation = strcmpi(get_param(blk,'EstimationMode'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementOnline'));
Title = "fprintf('Frequency\nResponse\nEstimator');";
InCtrl = "port_label('input',1,'u');";
InY = "port_label('input',2,'y');";...
InSS = "port_label('input',3,'start/stop');";
if IsExternalSource    
    InW = "port_label('input',4,'w');";
    InAmp = "port_label('input',5,'amp');";
else
    InW = [];
    InAmp = [];
end
if IsOutputCD
    Out = "port_label('output',1,['u+' '\Delta','u'],'texmode','on');";
else
    Out = "port_label('output',1,['\Delta','u'],'texmode','on');";
end
OutData = "port_label('output',2,'data');";
if IsOnlineEstimation
    OutFRD = "port_label('output',3,'frd');";
else
    OutFRD = [];
end
maskdisplay = [Title;InCtrl;InY;InSS;InW;InAmp;Out;OutData;OutFRD];
set_param(blk,'MaskDisplay',sprintf('%s',maskdisplay));
