# How to fix the problem in filtering the signals in PC SDK application?

**URL:** <https://tech-community.robotics.abb.com/t/how-to-fix-the-problem-in-filtering-the-signals-in-pc-sdk-application/8754>\
**Category:** Developer Tools\
**Tags:** c, pc-sdk, io, virtual-signals\
**Created:** [March 25, 2019, 3:21pm UTC](https://tech-community.robotics.abb.com/t/how-to-fix-the-problem-in-filtering-the-signals-in-pc-sdk-application/8754 "2019-03-25T15:21:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikram6892](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/vikram6892/32/1103_2.png) [@vikram6892](https://tech-community.robotics.abb.com/u/vikram6892)\
**Post date:** [March 25, 2019, 3:21pm UTC](https://tech-community.robotics.abb.com/t/how-to-fix-the-problem-in-filtering-the-signals-in-pc-sdk-application/8754/1 "2019-03-25T15:21:27Z")

</div>

I would like to filter out some set of signals (e.g. Digital Input) from a profinet device using signal Filter enum IOFilterTypes. But I am not getting the correct signal from the correct unit.

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/c/c299d67a1f1f8435796a35503b89a9a1bd39f416.png)

---

<div class="post-metadata">

**Author:** ![scottMHA](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@scottMHA](https://tech-community.robotics.abb.com/u/scottMHA)\
**Post date:** [April 12, 2019, 1:15pm UTC](https://tech-community.robotics.abb.com/t/how-to-fix-the-problem-in-filtering-the-signals-in-pc-sdk-application/8754/2 "2019-04-12T13:15:08Z")

</div>

```auto
SignalCollection Signals = MainController.IOSystem.GetSignals(IOFilterTypes.Digital).Where(o => o.Type == SignalType.DigitalInput) as SignalCollection;

```

Should be able to use linq to filter these out. Not sure if it works with a collection, you may have to parse through signals individually. Alternatively use the code below.

```auto
SignalCollection Signals = MainController.IOSystem.GetSignals(IOFilterTypes.All);

            foreach(Signal signal in Signals)
            {
                if (signal.Type == SignalType.DigitalInput)
                {
                 // Do something here to inputs
                }
            }

```

---

<div class="post-metadata">

**Author:** ![Micky](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Micky](https://tech-community.robotics.abb.com/u/Micky)\
**Post date:** [April 12, 2019, 4:26pm UTC](https://tech-community.robotics.abb.com/t/how-to-fix-the-problem-in-filtering-the-signals-in-pc-sdk-application/8754/3 "2019-04-12T16:26:23Z")

</div>

Hello,  
I think you have to use a binary OR (|) instead of a binary AND (&) to be able to use several filter settings.

```auto
var Signals = MainController.IOSystem.GetSignals( **IOFilterTypes.Digital | IOFilterTypes.Input** );

```

Best regards  
Micly
