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

Last change on this file since 306 was 306, checked in by Argimiro Resende Secchi, 15 years ago

Changing icons position.

  • 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* Author: Tiago Osório
16* $Id: HiLoSelect.mso 306 2007-07-05 01:34:37Z arge $
17*---------------------------------------------------------------------*#
18
19using "types";
20 
21Model HiLoSelect
22
23ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/HiLoSelect";
26        Brief           = "Model HiLo Select.";
27        Info            =
28        "
29        - Inputs:
30        * Two different input signals.
31       
32        - Outputs:
33        * One output signal.
34       
35        ";
36       
37        PARAMETERS
38        Select as Switcher (Brief="HiLoSelect option", Valid=["higher","lower"], Default="higher");
39
40        VARIABLES
41        input1 as Real (Brief="input signal 1");
42        input2 as Real (Brief="input signal 2");
43        output as Real (Brief="output signal");
44
45        EQUATIONS
46 
47switch Select
48               
49        case "higher":
50       
51"Calculate output maximum"     
52                output = max([input1,input2]);
53               
54case "lower":
55                "Calculate output minimum"
56                output = min([input1,input2]);
57        end
58       
59end
Note: See TracBrowser for help on using the repository browser.