GetSignal filter by unit not working

Tompanhuhu
✭✭✭
Hi I'm trying to get all signals belonging to a specific unit, but it returns all signals in the system.
Am I doing something wrong?
Latest RW and PCSDK.
IOFilterTypes aSigFilter = IOFilterTypes.Digital & IOFilterTypes.Unit; foreach (Signal sig in unit.Controller.IOSystem.GetSignals(aSigFilter, unit.Name)) { Console.WriteLine(sig.Name + " = " + sig.Value); }
Am I doing something wrong?
Latest RW and PCSDK.
Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group
If I helped, please press Vote Up

☑️2024 - RobotStudio® User Group
0
Comments
-
Hi, this filtering feature still dosent work.
It feel's like the performance would have been alot better in my app if I didn't get all the signals in the system.Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group0 -
Hi,
When adding two filters together, you should use the bitwise or flag (|).
If you use bitwise and (&) it will in this case result in 0, which I suppose means no filter, and that is why you get all signals.
Try this insteadIOFilterTypes aSigFilter = IOFilterTypes.Digital | IOFilterTypes.Unit; foreach (Signal sig in unit.Controller.IOSystem.GetSignals(aSigFilter, unit.Name)) { Console.WriteLine(sig.Name + " = " + sig.Value); }
//Markus Näslund0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 828 RAPID Programming
- 12 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings