functioncount

Function logic of a simple counter

Inputs

TypeNameDefaultDescription
IntegervalCurrent value of counter
Integerpreset_valPreset value
BooleanSSet signal at time t
BooleanS_oldSet signal at time t-1
BooleanCUCountUp signal at time t
BooleanCU_oldCountUp signal at time t-1
BooleanCDCountDown signal at time t
BooleanCD_oldCountDown signal at time t-1
BooleanRReset signal at time t
IntegerMaxmodule of the counter

Outputs

TypeNameDefaultDescription
IntegerNValCurrent up to date value of the counter
BooleanQOutput logic value

Revisions

First release of the Industrial Control Systems: April-May 2012
List of revisions:

  • 11 May 2012 (author: Marco Bonvini)

Main Authors:
Marco Bonvini; <bonvini@elet.polimi.it>
Alberto Leva <leva@elet.polimi.it>
Politecnico di Milano
Dipartimento di Elettronica e Informazione
Via Ponzio 34/5
20133 Milano - ITALIA -
Copyright:
Copyright © 2010-2012, Marco Bonvini and Alberto Leva.
The IndustrialControlSystems package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package Modelica in file "Modelica/package.mo".