# How to implement multi-port switch via C-script or other methods?

**URL:** <https://forum.plexim.com/t/how-to-implement-multi-port-switch-via-c-script-or-other-methods/788>\
**Category:** PLECS\
**Tags:** signal, c-script, input-signal\
**Created:** [June 20, 2020, 12:12pm UTC](https://forum.plexim.com/t/how-to-implement-multi-port-switch-via-c-script-or-other-methods/788 "2020-06-20T12:12:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shichenseu](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shichenseu](https://forum.plexim.com/u/shichenseu)\
**Post date:** [June 20, 2020, 12:12pm UTC](https://forum.plexim.com/t/how-to-implement-multi-port-switch-via-c-script-or-other-methods/788/1 "2020-06-20T12:12:35Z")

</div>

I wonder how to implement multi-port switch in plecs ,what it is look like is as follows:

I wonder whether I can use C-script to realize it? Can anyone help me ?

 ![191](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/6415b2d0deed6742d5661dda3ee2af53a1f7218c.png)

---

<div class="post-metadata">

**Author:** ![Manu\_Parimi](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/manu_parimi/32/6_2.png) [@Manu\_Parimi](https://forum.plexim.com/u/Manu_Parimi)\
**Post date:** [June 25, 2020, 4:54pm UTC](https://forum.plexim.com/t/how-to-implement-multi-port-switch-via-c-script-or-other-methods/788/2 "2020-06-25T16:54:18Z")

</div>

Hello,

You can simply use the “Signal Selector” block for this purpose. Please see the attached example.

Regards,  
Manu

[signal\_select.plecs](https://forum.plexim.com/uploads/short-url/9x45wtXWTPQmGQW7h4ZUbmUJH00.plecs) (12.4 KB)
