# logic::ADemux2

    sys::Obj
      sys::Virtual
        sys::Component
          logic::ADemux2

`public class ADemux2` `[niagaraIcon="module://icons/x16/control/util/split.png"]`

ADemux2 object selects one of two outputs to receive the input value, depending on the value of boolean switch input. The value of the other output remains unchanged.

If s1 is false, then out1 is updated with in, and out2 value remains constant at previous value If s2 is true, then out2 is updated with in, and out1 value remains constant at previous value

in

  `public property float in`

  value to get routed to out1 or out2

out1

  `public property float out1 [readonly]`

  output 1

out2

  `public property float out2 [readonly]`

  output 2

s1

  `public property bool s1`

  s1 selects whether 'in' gets routed to 'out1' (if false) or 'out2' (if true)

execute

  `public virtual override void execute()`

  Execute is called once every scan.