GEN (FB)ΒΆ
FUNCTION_BLOCK GEN
Generates periodic functions of different, given types
The generation may be done relative to a specific time base or a given call-count base (BASE).
An example set of available types of periodic functions are shown in the following image.
 
- InOut:
- Scope - Name - Type - Initial - Comment - Input - MODE- Types available: - TRIANGLE: Triangular from -- AMPLITUDEto +- AMPLITUDE
- TRIANGLE_POS: Triangular from 0 to +- AMPLITUDE
- SAWTOOTH_RISE: Sawtooth increasing from -- AMPLITUDEto +- AMPLITUDE
- SAWTOOTH_FALL: Sawtooth decreasing from +- AMPLITUDEto -- AMPLITUDE
- RECTANGLE: Rectangular switching from -- AMPLITUDEto +- AMPLITUDE
- SINE: Sine
- COSINE: Cosine
 - BASE- BOOL- FALSE: Period referring to call (- CYCLES)- TRUE: Period referring to time (- PERIOD)- PERIOD- TIME- TIME#1s0ms - Period time, only relevant if - BASE=- TRUE- CYCLES- INT- 1000 - Number of calls per period, only relevant if - BASE=- FALSE- AMPLITUDE- INT- Amplitud of the function to be generated - RESET- BOOL- TRUE: Sets- OUTto zero- Output - OUT- INT- Generated function value 
