# External I/O's in Wait command

**URL:** <https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085>\
**Category:** Technical Questions\
**Created:** [February 7, 2022, 10:40am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085 "2022-02-07T10:40:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [February 7, 2022, 10:40am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/1 "2022-02-07T10:40:25Z")

</div>

Hello everyone,  
Currently I’m working in URSim - UR10. I want to program the robot according to the external I/O’s, thus, robot to wait to external Input1 to run program1, wait to Input 2 to run program2, etc. Is there any way to program the robot this way? As, in the program tree, in wait command there are only internal inputs shown.  
Thanks in advance.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/1f32eb154c49397c8611b19fa65075efc2b16823.png)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [February 7, 2022, 11:11am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/2 "2022-02-07T11:11:33Z")

</div>

giorgigedaminski,

I’d use a Switch command  
Switch External\_Input\_1 or External\_Input\_2 etc  
then in each case  
Case 1  
Call Prog\_1  
Case 2  
Call Prog\_2  
Etc  
It makes your program more readable  
and easier to understand.

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [February 9, 2022, 9:34am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/3 "2022-02-09T09:34:43Z")

</div>

Thanks a lot. One more question please, are external I/O’s limited?

---

<div class="post-metadata">

**Author:** ![bba](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/bba/32/555_2.png) [@bba](https://forum.universal-robots.com/u/bba)\
**Post date:** [February 9, 2022, 3:41pm UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/4 "2022-02-09T15:41:16Z")

</div>

The physical IO of the robot cannot be expanded. However, you can expand via fieldbus. The options are EthernetIP or ProfiNet and in these cases an external PLC is required so the PLC is the master (scanner) and the robot is the adapter (slave) and the IO would have to be wired to the PLC. THe other method is modbus/tcp. The UR robot is capable of being a modbus tcp client so if you chose some IO (example - WAGO, Beckhoff, Phoenix Contact) that behaved as a modbus/tcp server you could expand that way too.

This article explains the modbus/tcp client interface of the robot (robot is client/master, IO is server/slave) :  
[Modbus TCP Client Setup - 16363](https://www.universal-robots.com/articles/ur/interface-communication/modbus-tcp-client-setup/)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [February 10, 2022, 7:35am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/5 "2022-02-10T07:35:24Z")

</div>

giorgigedaminski,

> [@bba](#):
>
> THe other method is modbus/tcp. The UR robot is capable of being a modbus tcp client so if you chose some IO (example - WAGO, Beckhoff, Phoenix Contact) that behaved as a modbus/tcp server you could expand that way too.

If you go down the Modbus route, be careful when selecting a Modbus unit as the Robot doesn’t support all of the Modbus function codes!

I’ve been caught out by that in the past.

1. Modbus functions available  
The Modbus client interface supports Function Codes 0x01 through 0x06. The function code is a low level code that  
is embedded within the protocol and sent to a server. Below is a description of what these function codes mean and  
do within the Modbus protocol.  
a. 0x01: READ\_COILS (read output bits)  
b. 0x02: READ\_DISCRETE\_INPUTS (read input bits)  
c. 0x03: READ\_HOLDING\_REGISTERS (read output registers)  
d. 0x04: READ\_INPUT\_REGISTERS (read input registers)  
e. 0x05: WRITE\_SINGLE\_COIL (write output bit)  
f. 0x06: WRITE\_SINGLE\_REGISTER(write output register)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [February 10, 2022, 10:43am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/6 "2022-02-10T10:43:31Z")

</div>

giorgigedaminski,

There is also this which is available on UR+ Partners.

I’ve never used it but it might be a simpler solution than integrating to a PLC etc.

> **[UR+ | IOFIREBUG | High scalability and reliability](https://www.universal-robots.com/plus/products/4each/iofirebug/)**
>
> IOFireBug | A modular I/O system for your UR applications. The main advantage of the IOFireBug product range is high scalability and reliability.

---

<div class="post-metadata">

**Author:** ![giorgigedaminski](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@giorgigedaminski](https://forum.universal-robots.com/u/giorgigedaminski)\
**Post date:** [February 10, 2022, 11:24am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/7 "2022-02-10T11:24:07Z")

</div>

Thanks for help. We will choose the one which is able to send most I/O’s. But you are right, IOFireBug looks easier to use.

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [February 11, 2022, 7:27am UTC](https://forum.universal-robots.com/t/external-i-os-in-wait-command/19085/8 "2022-02-11T07:27:00Z")

</div>

A PLC with Field bus will most definitely give you the most I/O
