ISaGRAF. Version 3.4


RAND


:

base INT

Q INT [0..base - 1]

:

.

(*FBD RAND*)

(* ST : *)

selected := MUX4 ( RAND (4), 1, 4, 8, 16 );

(*

4

RAND [0..3],

'selected' MUX4,

1 0 RAND,

4 1 RAND,

8 2 RAND,

16 3 RAND,

*)

(* IL : *)

LD 4

RAND

MUX4 1,4,8,16

ST selected