
The Function Block RAND generates a random number as an integer.
Tip: If a boolean random value is to be generated, it can be created with MIN=0 and MAX=1. In this case, the PLC evaluates 0 as FALSE and 1 as TRUE.
The input generates a random number between MIN and MAX at the output Q on a positive edge.
The input MIN defines the lower limit as an integer.
The input MAX defines the upper limit as an integer.
Returns the random number as an integer. If no random number has been generated yet, 0 is output,