NetworkWatcher Exception
 
            Hi,
I'm tryig to use the NetworkWatcher (using RAB 5.09)
I copied exactly the same example on the manual.
I got this Exception:
System.ArgumentException was caught
  Message="
Parameter name: url"
  ParamName="url"
  Source="ABB.Robotics.Controllers"
  StackTrace:
       at ABB.Robotics.Controllers.Internal.Event`2.Unsubscribe(Url url, EventHandler`1 handler, Boolean internal)
       at  ABB.Robotics.Controllers.Internal.Event`2.Unsubscribe(IUrlBo undObject urlObject, EventHandler`1 handler, Boolean internal)
       at  ABB.Robotics.Controllers.Internal.NetworkScanner.remove_Chan ged(EventHandler`1 value)
       at  ABB.Robotics.Controllers.Discovery.NetworkWatcher.set_Enable RaisingEvents(Boolean value)
       at  ABB.Robotics.Controllers.Discovery.NetworkWatcher..ctor(Bool ean enableRaisingEvents, IEnumerable controllers)
       at  ABB.Robotics.Controllers.Discovery.NetworkWatcher..ctor(Cont rollerInfoCollection controllers, Boolean enableRaisingEvents)
       at ABB.Robotics.SchiappaIF.C_OnLineStatus.Connect(Object RobotIPAddress)
Here my code:
Public Function Connect(ByVal RobotIPAddress) As Boolean
Try
IPAddress = RobotIPAddress
ABBScan = New NetworkScanner
ABBScan.Scan()
'
Me.ABBNetworkWatcher = New NetworkWatcher(Me.ABBScan.Controllers, False)
AddHandler Me.ABBNetworkWatcher.Found, AddressOf Me.NetworkAddController
AddHandler Me.ABBNetworkWatcher.Lost, AddressOf Me.NetworkRemoveController
Me.ABBNetworkWatcher.EnableRaisingEvents = True
Catch ex As Exception
Parent.DebugLog.Add(1, 0, "Function C_OnLineStatus.Connect: " + ex.Message)
Throw New Exception("Exception:C_OnLineStatus.Connect:NetworkWatcher:" + ex.Message)
End Try
'....
Any suggestion?
Oscar
Oscar Ferrrato
Comments
- 
            Additional Information: I tested it in Virtual controller and in the real controller. I got the same behaviour. Someone is using the networkwatcher with RAB 5.09 with success? can attach the code used? BR
 Oscar Ferrrato0
- 
            Hello, it seems that I have the same problem. Do you already have a solution to this? BR Rene 0
- 
            Hi! There is a bug when creating a NetworkWatcher object with the enableRaisingEvents paramater set to false (which also is the case when using the default constructor). The problem is solved in RAB 5.10. A workaround that should work is this (in c#), if you want the EnableRaisingEvents disabled: 
 _watcher = new NetworkWatcher(true); _watcher.EnableRaisingEvents = false;0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 30 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings

