# Modbus Digital Input

**URL:** <https://forum.universal-robots.com/t/modbus-digital-input/13933>\
**Category:** Robot Communication\
**Created:** [April 26, 2021, 7:24pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933 "2021-04-26T19:24:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dscherzinger](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dscherzinger](https://forum.universal-robots.com/u/dscherzinger)\
**Post date:** [April 26, 2021, 7:24pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/1 "2021-04-26T19:24:34Z")

</div>

I’m trying to use a Phoenix Contact Ethernet (Modbus) module for additional I/O. The outputs work as digital outputs, but the inputs always seam to be HIGH/True. I have changed the Frequency from 1 to 500 and the best I can get is the “Value” will change from Light blue to white for less then 1 second. A simple program that assigns the Modbus values to a variable shows that the value stays True most of the time, unless the input (connected to a proximity sensor) is triggered high. With no sensor connected to the module, the Digital Input value stays mostly true.  
What needs to change for this to work correctly?

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [April 27, 2021, 11:53am UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/2 "2021-04-27T11:53:41Z")

</div>

Does the Modbus master declare those inputs as coils? The IFM masters forces me to use register inputs instead. Can you share a datasheet for that one?

---

<div class="post-metadata">

**Author:** ![dscherzinger](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dscherzinger](https://forum.universal-robots.com/u/dscherzinger)\
**Post date:** [April 27, 2021, 12:10pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/3 "2021-04-27T12:10:25Z")

</div>

Here is the datasheet for the Phoenix Contact AXL E ETH DI8 DO8 M12 6P module

[ah\_en\_axl\_e\_eth\_modscan32\_105959\_en\_01.pdf](https://forum.universal-robots.com/uploads/short-url/4ABnVFSe5EhTgpUxsyfJkxCicDz.pdf) (690 KB)

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [April 27, 2021, 1:22pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/4 "2021-04-27T13:22:00Z")

</div>

What are you putting in for register values for, let’s say, Port 1 and Port 2?

---

<div class="post-metadata">

**Author:** ![dscherzinger](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dscherzinger](https://forum.universal-robots.com/u/dscherzinger)\
**Post date:** [April 27, 2021, 2:45pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/5 "2021-04-27T14:45:57Z")

</div>

Hello Terry;

Here is the Modbus client IO setup I have (from the simulator):

 ![image001.png](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/e/ea698d9d21a5bc17d9af78c91d72283fc1f6fe84.png)

The digital outputs work as expected, but the digital inputs do not. I Wireshark capture of the TCP/IP message shows that the module is sending the information as expected, but Polyscope does not seem to interpret it correctly. It shows true with occasional false for an input that is not connected (and the Wireshark capture shows as false). I have changed the frequency and there is very little change in response. If I set the module to have a sensor and it is true, then the value in Polyscope stays true, but when I change the sensor to a false, the value in Polyscope does not change to indicate a false.

_Please note, **Potential Shipping Disruptions:** In light of the **ongoing pandemic** there may be **possible delays** related to our **quoted lead times.** _  
_Stay informed, for our Covid-19 operational updates [click here](http://www.advancedmotion.com/covid-19/)_

**Duane Scherzinger**  
_Sr. Application Specialist_

[![Advanced Motion & Controls Ltd.](http://www.advancedmotion.com/images/signature/amc.jpg)](http://www.advancedmotion.com/)

**T.** 705.726.2260 x2292 | **F.** 705.726.5829 | **C.** 249.288.4866  
**A.** 26 Saunders Road, Barrie, ON L4N 9A8  
**W.** [www.AdvancedMotion.com](http://www.advancedmotion.com/)| [www.QuickSolutions.ca](http://www.quicksolutions.ca/)

**ISO 9001:2015 Certified**

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [April 27, 2021, 7:33pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/6 "2021-04-27T19:33:18Z")

</div>

These are always hard to read, but looking at this:

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

It looks like 8001 is a 16 bit register with bits 0-7 representing each digital input. Try reading it as a register and see what comes through and convert to binary perhaps?

```auto
integer_to_binary_list(x)

```

might help

---

<div class="post-metadata">

**Author:** ![dscherzinger](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dscherzinger](https://forum.universal-robots.com/u/dscherzinger)\
**Post date:** [April 27, 2021, 8:01pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/7 "2021-04-27T20:01:09Z")

</div>

Hello Terry;

Two things. First that portion of the datasheet is for the IO-Link master. We could use the register method and then extract the bits out, but we are trying to find something for those customers who do not want a lot of additional programming and would like to simplify the ability to add addition inputs and outputs to the robot system without having to add an additional control system.

_Please note, **Potential Shipping Disruptions:** In light of the **ongoing pandemic** there may be **possible delays** related to our **quoted lead times.** _  
_Stay informed, for our Covid-19 operational updates [click here](http://www.advancedmotion.com/covid-19/)_

**Duane Scherzinger**  
_Sr. Application Specialist_

[![Advanced Motion & Controls Ltd.](http://www.advancedmotion.com/images/signature/amc.jpg)](http://www.advancedmotion.com/)

**T.** 705.726.2260 x2292 | **F.** 705.726.5829 | **C.** 249.288.4866  
**A.** 26 Saunders Road, Barrie, ON L4N 9A8  
**W.** [www.AdvancedMotion.com](http://www.advancedmotion.com/)| [www.QuickSolutions.ca](http://www.quicksolutions.ca/)

**ISO 9001:2015 Certified**

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [April 27, 2021, 8:49pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/8 "2021-04-27T20:49:54Z")

</div>

Sounds like you need a different device that has a register for each port DI/DO. For example, the IFM ones I use dedicate modbus register n000 for the digital input, and n100 (n being IO port 1-8). The only difference is that the value is a 1 or 0 instead of True or False.

---

<div class="post-metadata">

**Author:** ![ronny.buch](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@ronny.buch](https://forum.universal-robots.com/u/ronny.buch)\
**Post date:** [December 17, 2021, 6:06am UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/9 "2021-12-17T06:06:45Z")

</div>

Hello, we have the same problems. Already since the CB series. To work around it, we have so far also only used the option with the bytelist. I think I had even tried to communicate that here.

---

<div class="post-metadata">

**Author:** ![beskar](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@beskar](https://forum.universal-robots.com/u/beskar)\
**Post date:** [October 23, 2023, 7:46pm UTC](https://forum.universal-robots.com/t/modbus-digital-input/13933/10 "2023-10-23T19:46:19Z")

</div>

Hello, I’m running into similar issues. Trying to find out if author’s issue has been resolved.
