.jpg?sfvrsn=3ad09b0a_1)
How to fix the problem in filtering the signals in PC SDK application?
Answers
-
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.SignalCollection Signals = MainController.IOSystem.GetSignals(IOFilterTypes.All); foreach(Signal signal in Signals) { if (signal.Type == SignalType.DigitalInput) { // Do something here to inputs } }
0 -
Hello,
I think you have to use a binary OR (|) instead of a binary AND (&) to be able to use several filter settings.var Signals = <span>MainController.</span>IOSystem.GetSignals(<b>IOFilterTypes.Digital | IOFilterTypes.Input</b>);
Best regards
Micly0
Categories
- 10.4K All Categories
- 5.3K RobotStudio
- 346 UpFeed
- 15 Tutorials
- 8 RobotApps
- 281 PowerPacs
- 404 RobotStudio S4
- 1.7K Developer Tools
- 238 ScreenMaker
- 2.6K Robot Controller
- 246 IRC5
- 36 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 689 RAPID Programming
- 14 Wizard Easy Programming
- 101 Collaborative Robots
- 3 Job listings