source: branches/gui/Block-Oriented EML/Basic Blocks/Step.mso @ 968

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

Adding Block-Oriented library by Jonathan Ospino Pinedo

File size: 1.1 KB
RevLine 
[944]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: Step.mso  2012$
13*---------------------------------------------------------------------*#
14
15using "types";
16 
17Model Step
18       
19        ATTRIBUTES
20
21        Pallete=true;
22        Icon="icon/Step2";
23        Info="== Step signal source ==.";
24
25       
26        PARAMETERS
27
28        Start_time as time_sec(Brief="Time of the step",Default=0);
29        Initial_Value as Real(Brief="Initial value of the variable",Default=0);
30        Final_Value as Real(Brief="Final value of the variable",Default=0);
31
32               
33        VARIABLES
34
35        out Out as Real(Brief="Output",Protected=true,PosX=1,PosY=0.5);
36
37       
38        EQUATIONS
39               
40        if time<Start_time then
41                Out=Initial_Value;
42        else
43                Out=Final_Value;
44        end
45       
46end
Note: See TracBrowser for help on using the repository browser.