Allen-Bradley Micro800 General Instructions Manual page 94

Programmable controllers
Hide thumbs Also See for Micro800:
Table of Contents

Advertisement

Chapter 5
Arithmetic instructions
94
Structured text
(* ST Equivalence: *)
selected := MUX4 ( RAND (4), 1, 4, 8, 16 );
(*
random selection of 1 of 4 pre-defined values
the value issued of RAND call is in set [0..3],
so 'selected' issued from MUX4, will get 'randomly' the value
1 if 0 is issued from RAND,
or 4 if 1 is issued from RAND,
or 8 if 2 is issued from RAND,
or 16 if 3 is issued from RAND,
*)
Results
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015

Advertisement

Table of Contents
loading

Table of Contents