Cicode Programming Reference > Cicode Function Categories > Miscellaneous Functions > TestRandomWave

TestRandomWave

Generates a random wave. The height of the wave is restricted by minimum and maximum values. You can offset the starting point of the wave, for example, to display multiple waves at the same AN. You can use this function to generate test input.

Syntax

TestRandomWave( [Period] [, Low] [, High] [, Offset] )

Period:

The number of seconds required to generate one cycle of the wave. If no period is entered, the period has a default of 60.

Low:

The lowest value of the wave. If no low value is entered, this value has a default of 0.

High:

The highest value of the wave. If no high value is entered, this value has a default of 100.

Offset:

The offset in seconds, to generate the wave. If no offset is entered, the offset has a default of 0.

Return Value

The value of the random wave.

Related Functions

TestSawWave, TestSinWave, TestSquareWave, TestTriangWave

Example

/* Specify a random wave of 60 seconds duration, with a minimum 
value of 0 units and a maximum value of 100 units, with no offset. 
*/
TestRandomWave(60,0,100,0);

See Also

Miscellaneous Functions

Published June 2018