modelPrinter

Model that prints values to a file

Extends from Modelica.Blocks.Interfaces.DiscreteBlock (Base class of discrete control blocks).

Information

This model prints to a file or the terminal at a fixed sample interval.

The parameter configuration controls the printing as follows:

configurationconfiguration
1 print at sample times only
2 print at sample times and at end of simulation
3 print at end of simulation only

Parameters

TypeNameDefaultDescription
SI.TimesamplePeriod (from DiscreteBlock)Sample period of component
SI.TimestartTime (from DiscreteBlock)0First sample time instant
Stringheader""Header to be printed
StringfileName""File name (empty string is the terminal)
Integernin1Number of inputs
Integerconfiguration1Index for treating final report (see documentation)
IntegerminimumLength1Minimum length of result string
IntegersignificantDigits16Number of significant digits

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInput[nin]xValue to be printed

Revisions

  • September 24, 2015 by Michael Wetter:
    Set start value for firstTrigger. This is for issue 426.
  • May 27, 2011 by Michael Wetter:
    Changed parameter precision to significantDigits and minimumWidth to minimumLength to use the same terminology as the Modelica Standard Library.
  • October 1, 2008 by Michael Wetter:
    Revised implementation and moved to new package.
  • July 20, 2007 by Michael Wetter:
    First implementation.