Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Xcos > palettes > Events_pal > M_freq

M_freq

Multiple Frequencies

Block Screenshot

Description

This blocks generates events at specific sample time of the simulation time. The sample time is given in the "Sample Time" field and the offset is given in the "Offset" field. This block has one event input, the number of event outputs depends on the number of different sample time. For example if the vector of sample time is [1 1 2] and the vector of offset is [0 .5 0] then the block has 7 outputs.

  1. The first output is activated when the simulation time is equal to a multiple of the first sample time plus the first offset

  2. The second output is activated when the simulation time is equal to a multiple of the second sample time plus the second offset.

  3. The third output is activated when we have both cases, first case and second case.

  4. The fourth output is activated when the simulation time is equal to a multiple of the third sample time plus the third offset.

  5. The fifth output is activated when we have both cases, first case and forth case.

  6. The sixth output is activated when we have both cases, second case and fourth case.

  7. The seventh output is activated when we have both cases, third case and forth case.

  8. etc...

So the number of outputs is equal to 2**number of different time values. Each of these time values is represented by a binary number associated to the output's number in decimal.

Parameters

  • Sample time

    Vector of sample time values.

    Properties : Type 'vec' of size -1.

  • Offset

    Vector of offset values. Must have the same size as the Sample time and each offset value must be less than its corresponding sample time.

    Properties : Type 'vec' of size -1.

Default properties

  • always active: no

  • direct-feedthrough: no

  • zero-crossing: no

  • mode: no

  • number/sizes of activation inputs: 1

  • number/sizes of activation outputs: 3

  • continuous-time state: no

  • discrete-time state: no

  • object discrete-time state: no

  • name of computational function: m_frequ

Examples

Let us take the example where the sample time is equal to [1 1 2] and the
offset is equal to [0 .5 0]. Consider t=simulation time.

When t=0  , the fifth output  is activated (001 + 100).
When t=0.5, the second output is activated (010).
When t=1  , the first output  is activated (001).
When t=1.5, the second output is activated (010).
When t=2  , we loop back to 0.

Other example:

Interfacing function

  • SCI/modules/scicos_blocks/macros/Events/M_freq.sci

Computational function

  • SCI/modules/scicos_blocks/src/c/m_frequ.c (Type 4)

See also

  • MFCLCK_f — triggered double clock with two output frequencies
Report an issue
<< IFTHEL_f Events_pal MCLOCK_f >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:35:33 CET 2022