Subsections
rt_square_if
Robotics
This block is a event-driven square wave generator. It lets you adjust amplitude (A), period (P), impulse width (W), bias (B) and delay (D).
This block has one regular output. First pulse evaluation is done according to the following law: if t >= D pulse is ON, i.e.
-
y(t) = A + B, when t <= W
-
y(t) = B, otherwise
if t < D pulse is OFF, i.e. y(t) = 0.
Pulse repeats itself every P seconds.
Set RT square wave generator block parameters |
|
Amplitude |
1 |
Period |
4 |
Impulse width |
2 |
Bias |
0 |
Delay |
0 |
- Amplitude :
scalar. The pulse amplitude A.
- Period :
scalar. The pulse period P, in seconds.
- Impulse width :
scalar. The amount of time W in the period that the pulse is on, in seconds.
- Bias :
scalar. The pulse bias B.
- Delay :
scalar. The delay D before the pulse is generated, in seconds.
- always active:no
- direct-feedthrough:yes
- zero-crossing:no
- mode:no
- number/sizes of inputs:0 /
- number/sizes of activation inputs:1 / [1,1]
- number/sizes of outputs:1 / [1,1]
- number/sizes of activation outputs:0 /
- continuous-time state:no
- discrete-time state:no
- name of computational function:rt_square_cf4
<PATH>/macros/rt_square_if.sci
[view code]
<PATH>/src/rt_square.c
[view code]
rt_singen_if,
R. Bucher, The RTAI-Lab project, file "rtai-3.5/rtai-lab/scilab/devices/rtai_square.c".
Matteo Morelli - Interdepartmental Research Center "E. Piaggio", University of Pisa, April 2007