Cyclogram

| Vectorized | C |
in the palette on the schematic

The block implements the functions of the controlled functional generator and provides the ability to set arbitrary periodic functions in the form of a sequence of reference points that are interpolated in accordance with the selected method. Allows you to replace blocks such as “Square signal", "Triangular signal", "Sawtooth signal", "Reverse sawtooth signal", "Piecewise constant signal" and expand their capabilities.

Inputs

  • StateFlag – controlling input. It can have 3 states: 0 – the source is off; 1 – the source is on; 2 – the source is paused. In case of switching off the source, the initial value of the cyclogram is set at the output.
  • Modulation – an additional input included in the properties of the block, allows you to set the speed of execution of the cyclogram by setting the acceleration coefficient on it relative to the model time.

Outputs

  • OutValue – functional output of the block. It has a value in accordance with the current time of the specified cyclogram, if the unit is in operation.
  • EndOfCycle – discrete output. At the end of the cyclogram, it switches to one. Switching occurs impulsively if the block is configured to cycle the function.
  • CYCLETIME – additional output included in the block properties shows the current time of the cyclogram.

Properties:

  • Time samples, sec – an array of times for a tabular representation of an arbitrary function.
  • Values – an array of function values in the corresponding time periods.
  • Cyclic source – the option indicates whether the function at the output will be executed only once or will be executed cyclically. If the value is set to "NO", then after a single playback of the function, the last value of the function remains at the output of the block.
  • Output interpolation method – selection of the interpolation method (connection of neighboring points). Either stepped (connection of points by a step) or linear (connection of points by a linear function).
  • Cycle time output – turn on or off the auxiliary output (CYCLETIME), which shows the current time of the specified function (cyclogram).
  • Input for setting the acceleration coefficient – the activation or deactivation of an additional input that allows you to control the speed of the cyclogram by setting the acceleration coefficient on it relative to the model time.
An arbitrary function (cyclogram) is specified in the properties of the block in tabular form ([x1, xi, xn], [y1, yi, yn]), and the value of the function yi is maintained UNTIL the time point xi. Then there is a switch to the value of the function yi+1, which in turn is maintained at the output until the time xi+1.

Parameters

None

Прим.: The block is vectorized. Several cyclograms may be processed at once. In this case, the time samples and values specified in the properties of the block are set in the form of an array of vectors, where each vector corresponds to its cyclogram.