---
title: "Commands for selecting inputs"
canonical: "https://docs.cuesystem.com/space/CVCBP/761266180/Commands%20for%20selecting%20inputs"
format: markdown
---
> Macro (prevnextnav-macro)

---

In the device documentation, we can find that for input selection, we have to send following ByteString through the serial channel.

![image](media://1501b395-ee9b-4f86-9127-dcd68db0c24b)

---

We can send constant strings directly or generate them by using input number as a parameter.

---

- Let us to start with sending Byte strings directly and prepare the commands to select first four inputs. Press the tab "Source Code".

![image](media://bca755d5-140a-4125-bd67-2a3617cdbeb0)

- Create Global functions for selecting each input. The "Global" scope makes these functions to be accessible from each module in each CUEunit in the whole project.

![image](media://8acc2f0d-3cd9-40e3-9ce7-8ac6a358b9f1)

- Place the command Serial connector dot Send and type required bytestring as a parameter of this function.

![image](media://d2784870-639e-4fab-87b9-a3c8e361cf05)

- Copy the function created for input 1

![image](media://7c8ba695-4732-4431-985b-c2fcc3dfb2e4)

- Create functions for inputs 2, 3 and 4 ( use Copy + Paste and renamed )

![image](media://434a920b-00d6-443d-95c8-ac2e998cb632)

- Add the newly created Switcher driver into the configuration and connect it to the Controller Serial port.

![image](media://3ed6c394-93bf-4c9f-a996-53940b910f0d)

- You can change the name of the device in the properties window

![image](media://550e63c0-a122-4d33-ada0-a1180680c697)

In our project we have prepared page with 4 PushButtons to control our switcher. We will use it for testing.

- Press the TouchPanel1 in MyProject Instances

![image](media://d48a089f-9cb6-4576-b71f-84aee3b1aa5e)

- Select folder Windows and then WindowPresentation

![image](media://13400262-b16e-4c49-a476-a412c55a5cc6)

- Link the Switcher functions to appropriate PushButtons - Right click on the button, then select events - OnPush.

- It will create a process, where you can place all commands executed, when button is pushed.

![image](media://c4b4484f-dde2-4be5-abe5-ef29c04a28da)

- Drag and drop the command for switching input 1 into this process.

![image](media://58644f7c-91d4-48ef-8f7e-8cc630188523)

![image](media://086ae697-ac2a-4a50-899a-39d25ac7fc2f)

![image](media://7a806a7d-1db4-4818-8fe9-07f9ff1683ae)

- Do the same for the inputs 2, 3 and 4.

![image](media://c3c79ef5-c396-4285-8875-9b737bbe8f13)


---

> Macro (prevnextnav-macro)