source: trunk/eml/controllers/HiLoSelect.mso @ 233

Last change on this file since 233 was 74, checked in by Paula Bettio Staudt, 17 years ago

Updated controllers files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
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 Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*----------------------------------------------------------------------
16* Model HiLoSelect
17*-----------------------------------------------------------------------
18* - Inputs
19*               - Two different input signals
20*
21* - Outputs
22*               - One output signal
23*
24*
25*-----------------------------------------------------------------------
26* Author: Tiago Osório
27* $Id: HiLoSelect.mso 74 2006-12-08 18:43:02Z paula $
28*---------------------------------------------------------------------*#
29
30using "types";
31 
32Model HiLoSelect
33
34        PARAMETERS
35        select as Real (Brief="HiLoSelect option: (1) output=higher input, (0) output=lower input");
36
37        VARIABLES
38        input1 as Real (Brief="input signal 1");
39        input2 as Real (Brief="input signal 2");
40        output as Real (Brief="output signal");
41
42        EQUATIONS
43 
44        if ((select>0 and input1 > input2) or (select<1  and input2>input1)) then
45                "Calculate output"     
46                output = input1;
47        else
48                "Calculate output"
49                output = input2;
50        end
51       
52end
Note: See TracBrowser for help on using the repository browser.