RobotStudio event

Problems with the PCSDK

Hi,

I'll begin my post by apologizing for sounding harsh, but I've struggled with the PCSDK for quite some time now.

I'm writing a Web-based UI running under IIS which communicates state changes to connected browsers using SignalR and AJAX calls in real-time.
Currently my main problem is that subscriptions stops unexpectedly. I.e. all off a sudden the registered callbacks are not called anymore, and for no apparent reason at all at seemingly random times (i.e. typically after around ~30 minutes).

However, I can't tell if I'm the one that is using the SDK in the wrong way or if the bugs reside in the SDK itself because of the fact that the documentation is severely lacking.
There seems to be two ways of subscribing to changes in the values of rapid variables (according to the .chm file), that is, by using either one of the two following members of the RapidData class:

  • ValueChanged: Raised when the value of the data has changed
  • Subscribe():Subscribes to changes of persistent RAPID data.
However, the documentation here is next to meaningless, it's impossible to learn if there is a difference between the two functions and what the constraints of their usages are.
As far as I remember neither of these functions are guaranteed to fire if the underlying variable changes quickly enough (this took me several days to figure out and I had to draw that conclusion by looking at a disassembly of the actual PCSDK dll)

I've also found an "Application Manual" for the PCSDK, which contains some additional information, but the intended audience of this document seems to be someone who really doesn't know programming but wants to write a Windows UI application that uses the PCSDK. It teaches you how "try-catch-finally"-blocks works for instance (!!!) but leaves you non the wiser about the technical limitations / intended usage of the SDK itself,

My questions are (amongs others)
How are subscriptions intended to be handled?
What's the difference between the two functions?
Is there a public list of known bugs?

Comments

  • Hi there!

    I have been having a similar issue with this. When subscribing to a variable, it would only fire events when I first execute the program, but following runs of the same program don't trigger events. It seems pretty random. Anyone has found a workaround for this?