| Prev | Start of Chapter | Next Chapter | Contents | Index | (5 out of 5)

Sine Wave


The Sine Wave block generates sine values. It is a periodic signal generator and repeats its pattern of outputs cyclically.

Specifying the Shape

The attributes Amplitude, Bias, and Period specify the shape of the sine wave. The Amplitude is half the difference between the minimum and maximum values. The Bias is the mean value between the minimum and the maximum. The Period is the amount of time that the block takes to complete a cycle.

Specifying a Phase

The Phase Angle determines where the Sine Wave block starts its cycle. It is a number of degrees between 0 and 360. For example, a Sine Wave block with a Phase Angle of 0 starts its cycle at the Bias going towards the maximum value. A Sine Wave block with a Phase Angle of 90 starts its cycle at the maximum value.

This figure shows a graph of a sine wave with a Period of 60, an Amplitude of 1.0, and a Bias of 0.0, and a Phase of 270.



Note: Another way to change the place where the block starts its cycle is to set the attribute Reset Phase to yes and choose reset from the block's menu. For more information see "Resetting" below.

Resetting

The attribute Reset Phase determines what happens when you choose reset from the block's menu:

If Reset Phase is The block does this when you choose reset
yes
Returns to the beginning of the wave's cycle.
no
Continues as before.

If you change Phase Angle as NOL is running, NOL uses the new value the next time you reset the block.

Configuring

This is the configuration panel for the Sine Wave block with its default values.


Attribute Description
Period
The amount of time that the block takes to complete a cycle.
Bias
The value between the minimum and the maximum.
Phase Angle
A number of degrees between 0 and 360, which determines where the Sine Wave block starts its cycle.
Amplitude
Half the difference between the minimum and maximum values.
Sample Period
How often the block passes a new value.
Reset Phase
Whether the block returns to the beginning of the cycle when reset (the default) or continues where the signal left off.

See Also

For more information on how to use this block, see the sections below

Click here for more information...
Basic Block Behavior
Overriding Block Values
Specifying Initial Values
Starting and Stopping Data From Flowing
Reading the Output Value
Specifying How Often to Generate Values

| Prev | Start of Chapter | Next Chapter | Contents | Index | (5 out of 5)

Copyright © 1996, Gensym Corporation, Inc.