ISaGRAF. Version 3.4

         

MUX


:

SEL INT ( [0..3])

IN1..IN4 INT

Q INT = value1 if SEL = 0

= value2 if SEL = 1

= value3 if SEL = 2

= value4 if SEL = 3

= 0

:

4 : .

(*FBD MUX4*)

(* ST : *)

range := MUX4 (choice, 1, 10, 100, 1000);

(* 4 , , - 1, 10 *)

(* IL : *)

LD choice

MUX4 1,10,100,1000

ST range


㬥:

SEL INT 楫 ᥫ ( [0..7])

IN1..IN8 INT 楫 稭

Q INT = value1 if SEL = 0

= value2 if SEL = 1

...

= value8 if selector = 7

= 0 㣨 祭 ᥫ

ᠭ:

⨯ 8 室: 롨ࠥ 쬨 楫 ᥫ.

(*FBD ਬ "MUX8"*)

(* ST : *)

range := MUX8 (choice, 1, 5, 10, 50, 100, 500, 1000, 5000);

(* 롨ࠥ 8 ।। 祭, ਬ, ᫨ ࠭ 3, 祭 㤥 50 *)

(* IL : *)

LD choice

MUX8 1,5,10,50,100,500,1000,5000

ST range