squarew
Purpose:
-
Apply a square_wave function to a variable
Enter:
-
squarew <variable> <offset> <amplitude> <frequency> <duration>
Where:
-
variable
Specify the name of a current CyFlex variable to which a square wave is applied.
offset
Specify the offset value to superimpose on the sine function in units of the target variable.
amplitude
Specify the amplitude of the sine function in units of the target variable.
frequency
Specify the frequency of the sine function in hertz.
duration
Specify the duration of time in seconds to apply to the sine function.
Example:
-
squarew gen_square 10 3 1 10
The above command applies a square wave function to the variable gen_square as follows:offset of 10, amplitude of +/- 3, frequency of 1 hz, duration of 10 seconds.
Notes:
-
The square 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.