Last change
on this file since 998 was
944,
checked in by Argimiro Resende Secchi, 10 years ago
|
Adding Block-Oriented library by Jonathan Ospino Pinedo
|
File size:
1.2 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: High_Selector.mso 2012$ |
---|
13 | *---------------------------------------------------------------------*# |
---|
14 | |
---|
15 | using "types"; |
---|
16 | |
---|
17 | Model HS |
---|
18 | |
---|
19 | ATTRIBUTES |
---|
20 | |
---|
21 | Pallete=true; |
---|
22 | Icon="icon/HS"; |
---|
23 | Info="== High-Selector block == |
---|
24 | |
---|
25 | It takes two input variables and compares them for selecting the highest value of them. |
---|
26 | The resulting value is assigned to the output variable"; |
---|
27 | |
---|
28 | |
---|
29 | VARIABLES |
---|
30 | |
---|
31 | in In1 as Real(Brief="First input signal",PosX=0,PosY=0.2); |
---|
32 | in In2 as Real(Brief="Second input signal",PosX=0,PosY=0.8); |
---|
33 | out Out as Real(Brief="Highest value",Protected=true,PosX=1,PosY=0.5); |
---|
34 | |
---|
35 | |
---|
36 | EQUATIONS |
---|
37 | |
---|
38 | if In1>=In2 then |
---|
39 | Out=In1; |
---|
40 | else |
---|
41 | Out=In2; |
---|
42 | end |
---|
43 | |
---|
44 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.