sine
Purpose:
-
Apply a sine function to a variable.
Enter:
-
sine <variable> <offset> <amplitude> <frequency> <duration>
Where:
-
variable
Specify the name of the current CyFlex variable to which a sine wave is applied.
offset
Specify the offset value to superimpose on the sine function in units of the target variable. This may also be the label of a variable containing the value of the offset.
amplitude
Specify the amplitude of sine function in units of target variable. This may also be the label of a variable containing the value of the amplitude.
frequency
Specify the frequency of sine function in hertz. This may also be the label of a variable containing the value of the frequency.
duration
Specify the duration of time in seconds to apply sine function. This may also be the label of a variable containing the value of the duration.
Example:
-
sine gen_sine 10 3 1 10
The above command applies a sine function to the variable gen_sine as follows:
- offset of 10
- amplitude of +/- 3
- frequency of 1 hz
- duration of 10 seconds
Notes:
-
The sine command applies a sine function to the specified variable with the offset, amplitude, and frequency specified. The function is applied for a minimum of the duration period of time, plus the time required to end the sine function at the offset.
The smoothness of the sine function is dependent on processor availability. The sine function is updated at the CyFlex fast process interval (usually 20 Hz).
The variable name must be a valid CyFlex variable. This command does not create a new variable.