# IF function with signalDI

**URL:** <https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226>\
**Category:** RAPID Programming\
**Created:** [June 3, 2021, 8:00am UTC](https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226 "2021-06-03T08:00:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iuliaam](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@iuliaam](https://tech-community.robotics.abb.com/u/iuliaam)\
**Post date:** [June 3, 2021, 8:00am UTC](https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226/1 "2021-06-03T08:00:46Z")

</div>

Hi,

I am currently working on the communication between an Allen-Bradley PLC and an ABB teach pendant. I am activating the digital input (Ri\_09) of the abb from the plc using device net communication. The Ri\_09 becomes 1 in ABB so all good. But then I am try ing to say : if Ri\_09 equals 1 then call that routine. My problem is that the IF function doesn’t let me put the ‘’=1’’ after ‘‘Ri\_09’’ and it says that the data type should be a bool … From there, I am lost and I need help to find a way so that the Digital inputs work with the IF functions.

Thank you !

---

<div class="post-metadata">

**Author:** ![xerim](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@xerim](https://tech-community.robotics.abb.com/u/xerim)\
**Post date:** [June 3, 2021, 12:12pm UTC](https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226/2 "2021-06-03T12:12:47Z")

</div>

Not sure why you need to post this again as @lemster68 already provided the solution to your problem on robot-forum.

"TestDI(RI\_09) will return TRUE if the DI is on.

IF TestDI(RI\_09) THEN

ENDIF"

[https://www.robot-forum.com/robotforum/thread/38419-if-function-in-abb-teach-pendant/](https://www.robot-forum.com/robotforum/thread/38419-if-function-in-abb-teach-pendant/)

---

<div class="post-metadata">

**Author:** ![lemster68](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/lemster68/32/1945_2.png) [@lemster68](https://tech-community.robotics.abb.com/u/lemster68)\
**Post date:** [June 3, 2021, 1:13pm UTC](https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226/3 "2021-06-03T13:13:52Z")

</div>

Probably their post was delayed for approval.

---

<div class="post-metadata">

**Author:** ![liuchenme](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@liuchenme](https://tech-community.robotics.abb.com/u/liuchenme)\
**Post date:** [December 10, 2024, 11:52am UTC](https://tech-community.robotics.abb.com/t/if-function-with-signaldi/10226/4 "2024-12-10T11:52:24Z")

</div>

I have the same problem. The query manual has been resolved.You can refer to the manual numbered “3HAC050917-001”.This can be achieced using the “DIntput”.

IF DInput(RI\_09) = 1THEN

ENDIF
