Generates an array containing a ramp pattern. You must manually select the polymorphic instance you want to use.


icon

Inputs/Outputs

  • ci32.png samples

    samples is the number of samples of the Ramp Pattern. If samples is less than two, the VI sets Ramp Pattern to an empty array and returns an error. The default is 128.

    If samples is 1 and exclude end? is TRUE, the VI returns an array with one element of start.

  • cdbl.png end

    end is the ending value, or final value, of Ramp Pattern. The default is 1.

  • cdbl.png start

    start is the starting value, or first value, of Ramp Pattern. The default is 0.

  • cbool.png exclude end?

    exclude end? specifies whether Ramp Pattern includes end. Ramp Pattern does not include end if exclude end? is TRUE. The default is FALSE.

    If samples is 1 and exclude end? is TRUE, the VI returns an array with one element of start, with no error.

  • cu16.png type

    type specifies the type of Ramp Pattern to generate.

    0Linear (default)
    1Logarithmic
  • i1ddbl.png Ramp Pattern

    Ramp Pattern returns the ramp pattern of samples.

    The largest Ramp Pattern this VI can generate depends on the amount of memory in your system, and it is theoretically limited to 2,147,483,647 (231 – 1) elements.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • Let the sequence X represent Ramp Pattern. For the Ramp Pattern by Samples instance, if type is Linear, the Ramp Pattern VI generates the pattern according to the following equation:

    xi = x0 + iΔx

    for i = 0, 1, 2, …, n – 1

    where x0 is the start. Δx = (endstart)/m. n is the samples. m = n if exclude end? is TRUE. Otherwise, m = n – 1.

    Let the sequence X represent Ramp Pattern. If type is Logarithmic, the Ramp Pattern VI generates the pattern according to the following equation:

    xi = exp[ln(x0) + iΔx]

    for i = 0, 1, 2, …, n – 1

    where x0 is the start. Δx = [ln(end) – ln(start)]/m. start and end must be greater than 0. n is the samples. m = n if exclude end? is TRUE. Otherwise, m = n – 1.

    For the Ramp Pattern by Delta instance, this VI generates the pattern according to the following equation:

    for i = 0, 1, 2, …, n – 1, and

    where x0 is the start, Δx is delta, and [ ] means round towards -Infinity.

    The Ramp Pattern VI does not impose conditions on the relationship between start and end. Therefore, the Ramp Pattern VI can generate ramp-up and ramp-down patterns.

    The following block diagram illustrates how to use the Ramp Pattern VI to generate the ramp pattern of any size greater than or equal to 1.