xxsimAddPlotWindow

PURPOSE ^

xxsimAddPlotWindow - Add a new plot window to the simulator

SYNOPSIS ^

function retval = xxsimAddPlotWindow(window_name)

DESCRIPTION ^

 xxsimAddPlotWindow - Add a new plot window to the simulator 

 Syntax: 
   retval = xxsimAddPlotWindow('window_name')

 Inputs:
   window_name   =  name of the to be added plot window

 Outputs: 
   retval = returns a unique ID corresponding to the plot window
 
 Example:
   retval = xxsimAddPlotWindow('Motor Torque')
   
     - a new plot window with name "Motor Torque" will be added 
        to the simulator.
     - retval now contains an ID that is uniquely coupled to this
       newly added plot window.
     - Note: The simulator should be open before calling this function.  

 See also: xxsimRemovePlotWindow, xxsimOpenSimulator, xxsimAddPlotToWindow

 Author: Controllab Products B.V.
 email: info@controllab.nl
 Website: http://www.controllab.nl
 November 2015

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function retval = xxsimAddPlotWindow(window_name)
0002 % xxsimAddPlotWindow - Add a new plot window to the simulator
0003 %
0004 % Syntax:
0005 %   retval = xxsimAddPlotWindow('window_name')
0006 %
0007 % Inputs:
0008 %   window_name   =  name of the to be added plot window
0009 %
0010 % Outputs:
0011 %   retval = returns a unique ID corresponding to the plot window
0012 %
0013 % Example:
0014 %   retval = xxsimAddPlotWindow('Motor Torque')
0015 %
0016 %     - a new plot window with name "Motor Torque" will be added
0017 %        to the simulator.
0018 %     - retval now contains an ID that is uniquely coupled to this
0019 %       newly added plot window.
0020 %     - Note: The simulator should be open before calling this function.
0021 %
0022 % See also: xxsimRemovePlotWindow, xxsimOpenSimulator, xxsimAddPlotToWindow
0023 %
0024 % Author: Controllab Products B.V.
0025 % email: info@controllab.nl
0026 % Website: http://www.controllab.nl
0027 % November 2015
0028 
0029 %------------- BEGIN CODE --------------
0030 
0031   % Check the obtained amount of input arguments.
0032   if(nargin>1)
0033     error('Too many input arguments were specified.');
0034   elseif(nargin<1)
0035     error('Too little input arguments were specified.');
0036   endif;
0037 
0038   % Check if the input is a string
0039   if(!ischar(window_name))
0040     error('Please specify a string as name for the plot window');
0041   endif;
0042 
0043   % And make the actual call to 20-sim
0044   retval = xrlinvoke('xxsim.plot.addPlotWindow', struct('windowName',window_name) );
0045 
0046 end
0047 %------------- END OF CODE --------------

Generated on Tue 19-Oct-2021 21:32:08