source: trunk/Block-Oriented EML/Control Systems/Saturation.mso @ 988

Last change on this file since 988 was 944, checked in by Argimiro Resende Secchi, 9 years ago

Adding Block-Oriented library by Jonathan Ospino Pinedo

File size: 1.4 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO is distributed under the terms of the ALSOC LICENSE as
9* available at http://www.enq.ufrgs.br/alsoc.
10*-----------------------------------------------------------------------
11* Author: Jonathan Ospino P.
12* $Id: Saturation.mso  2012$
13*---------------------------------------------------------------------*#
14
15using "types";
16
17Model Saturation
18
19ATTRIBUTES
20Pallete=true;
21Icon="icon/Saturation";
22Info="== Saturation block ==
23
24      It takes the input signal and compares it with the two limits
25          of a range for normalizing its value between them.
26          The resulting value is assigned to the output variable.";
27
28PARAMETERS
29Upper_Limit as Real(Brief="Upper limit of the range",Default=100);
30Lower_Limit as Real(Brief="Lower limit of the range",Default=0);
31
32VARIABLES
33in In as Real(Brief="Input without limiting",Protected=true,PosX=0,PosY=0.5);
34out Out as Real(Brief="Output once limited",Protected=true,PosX=1,PosY=0.5);
35
36EQUATIONS
37if In>=Upper_Limit then
38        Out=Upper_Limit;
39else
40        if In<=Lower_Limit then
41                Out=Lower_Limit;
42        else
43                Out=In;
44        end
45end
46
47end
Note: See TracBrowser for help on using the repository browser.