sine

Purpose:

Apply a sine wave to a specified CyFlex variable with a given offset, amplitude, frequency, and duration, updating at the CyFlex fast process interval.

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. If duration is less than or equal to zero, the sine continues indefinitely until stopped.

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 function is applied for at least the specified duration, plus time to end at the offset if applicable.

Smoothness depends on processor availability and is updated at the CyFlex fast process interval (typically 20 Hz).

The specified variable must be a valid existing CyFlex variable.

This command does not create new variables.

See Also:

ramp