[PC SDK] Sorting signals by unit no longer possible.
I recently encountered a problem when upgrading our application from version 5.61 of the PC SDK to version 6.01. Our application wants to get all signals connected to a given device automatically. I did this using the following statement after discovering the controller and gaining mastership over the RAPID domain:
SignalCollection digitalInputs = this.controller.IOSystem.GetSignals( IOFilterTypes.Input | IOFilterTypes.Digital | IOFilterTypes.Unit, this.ioUnit);
where this.controller is of type ABB.Robotics.Controllers.Controller and this.ioUnit is a string. This worked perfectly with version 5.61 but now gives an exception. Here is the relevant part of the stack trace:
EXCEPTION: ABB.Robotics.GenericControllerException: Attribute does not exist in type.
at Adapters.Data.Get()
at ABB.Robotics.Controllers.Internal.DAL.DataAccessObject.GetStringValue(String instance, String attribute)
at ABB.Robotics.Controllers.Internal.IOSignal.get_Unit()
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.TypeEnumerator.IsMatch(IOSignal signal)
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.SignalEnumerator.OnMoveNext(Int32& index, IOSignalCollection signals)
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.SignalEnumerator.MoveNext()
at ABB.Robotics.Controllers.IOSystemDomain.SignalFactory.Create(IEnumerable signals)
at ABB.Robotics.Controllers.IOSystemDomain.IOSystem.GetSignals(IOFilterTypes filter, String unit)<
The same exception occurs when I just got all the signals and then in a loop tried using the Signal.Unit property to filter out the correct ones. An ABB representative who was present during the upgrade told me that in Robotware 6 signal units have been renamed to devices. However the documentation and property names in the PC SDK still refer to everything as unit rather than device. This might be related to the source of the problem.
I build a workaround by filtering the signals by name rather than by unit, which solves our problem for now. But it's more clunky than the old method. It would help me a lot if you could find a way to fix this issue.
SignalCollection digitalInputs = this.controller.IOSystem.GetSignals( IOFilterTypes.Input | IOFilterTypes.Digital | IOFilterTypes.Unit, this.ioUnit);
where this.controller is of type ABB.Robotics.Controllers.Controller and this.ioUnit is a string. This worked perfectly with version 5.61 but now gives an exception. Here is the relevant part of the stack trace:
EXCEPTION: ABB.Robotics.GenericControllerException: Attribute does not exist in type.
at Adapters.Data.Get()
at ABB.Robotics.Controllers.Internal.DAL.DataAccessObject.GetStringValue(String instance, String attribute)
at ABB.Robotics.Controllers.Internal.IOSignal.get_Unit()
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.TypeEnumerator.IsMatch(IOSignal signal)
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.SignalEnumerator.OnMoveNext(Int32& index, IOSignalCollection signals)
at ABB.Robotics.Controllers.Internal.IOSignalEnumerators.SignalEnumerator.MoveNext()
at ABB.Robotics.Controllers.IOSystemDomain.SignalFactory.Create(IEnumerable signals)
at ABB.Robotics.Controllers.IOSystemDomain.IOSystem.GetSignals(IOFilterTypes filter, String unit)<
The same exception occurs when I just got all the signals and then in a loop tried using the Signal.Unit property to filter out the correct ones. An ABB representative who was present during the upgrade told me that in Robotware 6 signal units have been renamed to devices. However the documentation and property names in the PC SDK still refer to everything as unit rather than device. This might be related to the source of the problem.
I build a workaround by filtering the signals by name rather than by unit, which solves our problem for now. But it's more clunky than the old method. It would help me a lot if you could find a way to fix this issue.
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings