Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

Rand

  • Last UpdatedJan 11, 2023
  • 1 minute read

Return a random number between 0 and 1. For specified x and y values, return a random number between x - y/2 and x + y/2.

Syntax

Rand(x, y)

Arguments

  • x

    A real number specifying the center point of the range

  • y

    A real number specifying the size of the range.

    If no arguments are specified, the default range is from 0 to 1.

Returns

A random number between 0 and 1. For specified x and y values, returns a random number between x- y/2 and x + y/2.

Exceptions

None

Example

  • Rand()

  • Rand(500, 250)

In This Topic
TitleResults for “How to create a CRG?”Also Available in