lib/timer.txt
changeset 276 1679f514f38a
parent 217 f5dfadf5de54
child 277 f88718b71b6c
equal deleted inserted replaced
275:af3d0e3ac65d 276:1679f514f38a
     1 (*
     1 (*
     2  * (c) 2005 Mario de Sousa
     2  *  matiec - a compiler for the programming languages defined in IEC 61131-3
     3  *
     3  *
     4  * Offered to the public under the terms of the GNU General Public License
     4  *  Copyright (C) 2005, 2011  Mario de Sousa (msousa@fe.up.pt)
     5  * as published by the Free Software Foundation; either version 2 of the
     5  *
     6  * License, or (at your option) any later version.
     6  *  This program is free software: you can redistribute it and/or modify
     7  *
     7  *  it under the terms of the GNU General Public License as published by
     8  * This program is distributed in the hope that it will be useful, but
     8  *  the Free Software Foundation, either version 3 of the License, or
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
     9  *  (at your option) any later version.
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    10  *
    11  * Public License for more details.
    11  *  This program is distributed in the hope that it will be useful,
       
    12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    14  *  GNU General Public License for more details.
       
    15  *
       
    16  *  You should have received a copy of the GNU General Public License
       
    17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
       
    18  *
    12  *
    19  *
    13  * This code is made available on the understanding that it will not be
    20  * This code is made available on the understanding that it will not be
    14  * used in safety-critical situations without a full and competent review.
    21  * used in safety-critical situations without a full and competent review.
    15  *)
    22  *)
    16 
    23 
    17 (*
    24 (*
    18  * An IEC 61131-3 IL and ST compiler.
    25  * An IEC 61131-3 compiler.
    19  *
    26  *
    20  * Based on the
    27  * Based on the
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    28  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    22  *
    29  *
    23  *)
    30  *)
    27  * and function blocks defined in the standard.
    34  * and function blocks defined in the standard.
    28  *
    35  *
    29  * Timer Function Blocks
    36  * Timer Function Blocks
    30  * ---------------------
    37  * ---------------------
    31  *
    38  *
    32  * NOTE: The timing diagrams in the comments were taken from the 
    39  * NOTE: The timing diagrams in the comments (except the state variable) 
    33  *       IEC 61131-3 standard.
    40  *       were taken from the IEC 61131-3 standard.
    34  *)
    41  *)
    35 
    42 
    36 
    43 
    37 
    44 
    38 (****************************************************************
    45 (****************************************************************