# Reading inputs from modbus

**URL:** <https://forum.universal-robots.com/t/reading-inputs-from-modbus/42834>\
**Category:** Robot Communication\
**Created:** [May 28, 2026, 5:33pm UTC](https://forum.universal-robots.com/t/reading-inputs-from-modbus/42834 "2026-05-28T17:33:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.pocock1](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@chris.pocock1](https://forum.universal-robots.com/u/chris.pocock1)\
**Post date:** [May 28, 2026, 5:33pm UTC](https://forum.universal-robots.com/t/reading-inputs-from-modbus/42834/1 "2026-05-28T17:33:31Z")

</div>

HI, I have a UR3e on Polyscope X connected to a Festo CPX-AP-A remote i/o.

I can read and write the inputs / outputs ok, but I can’t use the inputs in an ‘IF’ command. I presume you need to move them into a variable first? But I can’t work this out!  
Thanks!

---

<div class="post-metadata">

**Author:** ![jacobsmith](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@jacobsmith](https://forum.universal-robots.com/u/jacobsmith)\
**Post date:** [May 29, 2026, 12:44pm UTC](https://forum.universal-robots.com/t/reading-inputs-from-modbus/42834/2 "2026-05-29T12:44:00Z")

</div>

If you share a snippet of code I may be able to help out.

Also, a sample of the inputs/outputs may help.
