# Change modbus-I/O client from RTDE

**URL:** <https://forum.universal-robots.com/t/change-modbus-i-o-client-from-rtde/2585>\
**Category:** Robot Communication\
**Created:** [August 24, 2018, 2:44pm UTC](https://forum.universal-robots.com/t/change-modbus-i-o-client-from-rtde/2585 "2018-08-24T14:44:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niclas.akesson](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@niclas.akesson](https://forum.universal-robots.com/u/niclas.akesson)\
**Post date:** [August 24, 2018, 2:44pm UTC](https://forum.universal-robots.com/t/change-modbus-i-o-client-from-rtde/2585/1 "2018-08-24T14:44:22Z")

</div>

Is there any possible way to read or write to the modbus I/O client from RTDE?

In the scriptlanguage I could read “iInput1 = modbus\_get\_signal\_status(“input1”, False)” , and  
change the status on an output by “modbus\_set\_output\_signal(“output1”, True, False)”

---

<div class="post-metadata">

**Author:** ![niclas.akesson](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@niclas.akesson](https://forum.universal-robots.com/u/niclas.akesson)\
**Post date:** [August 26, 2018, 11:04am UTC](https://forum.universal-robots.com/t/change-modbus-i-o-client-from-rtde/2585/2 "2018-08-26T11:04:22Z")

</div>

What would happen if I send a script instruction to secondary client like this:

> [@](#):
>
> **_theModbusInput = “inputModbus1”  
> theInstruction = “modbus\_get\_signal\_status(”+theModbusInput+“,False)”  
> message = “sec prog():\n “+theInstruction+”\nend\n”  
> bTmp = WriteSock(‘localhost’,30002,message)_**

I haven’t tested this yet…  
Will this work (or any modbus script instructions)?  
If this works how would the answer/recieve look like?
