Code covered by the BSD License  

Highlights from
ECALS (supervisory control of fermentors)

ECALS (supervisory control of fermentors)

by

 

30 Aug 2012 (Updated )

Enables supervisory control of bioreactors using arbitrary MATLAB functions via OPC

...
function [terminateFlag saveStateFlag logFlag caOutputs] = ...
calibration_curve( ...
    recipestepObj,...
    masterRecipeObj,...
    initFlag,...
    restartFlag,...
    runTime,...
    caInputs)  %#ok<INUSL>
%%
%CA
%CA  INPUTS
%CA     input  double  Agitation_CO
%CA  OUTPUTS
%CA     output      double Agitation_CS
%CA  PARAMETERS
%CA     input_values  double [0 100]
%CA     output_values   double [0 1000]

% maps a vector of input_values to a vector of output_values and
% uses this as a calibration curve.

%% BEGIN LOCAL VARIABLE ASSIGNMENT 
% default values for ECALS
saveStateFlag = false; % if true then a recovery point will be saved
logFlag = false;
terminateFlag = false;  

% Inputs
input = caInputs.input;

% Parameters
input_values = recipestepObj.caParamStruct.input_values.value;
output_values   = recipestepObj.caParamStruct.output_values.value;

%% BEGIN OUTPUTS ASSIGNMENT
% Configure the caOutputs structure
caOutputs.output = interp1q(input_values,output_values,input);
%% END OUTPUTS ASSIGNMENT

Contact us