RobotStudio event

Add Signals to Controller

Hello All,

Is it possible to Add signals to the controller using PCSDK ?
Also how to add an instance to the RS Signal editor.

regards,
sudarshan

Comments

  • Hi Sudarshan,

    signals are defined in the configuration database, often abbreviated CFG.

    Unfortunately it is not possible to create new entries in the configuration database using PC or FlexPendant SDK. 

    There are a few constraints and rules that defines how information can be added and updated in the configuration database. In the RobotStudio user interface for manipulating the CFG database, the Configuration Editor, this logic is implemented.

    The core definition of the rules are done in XML files retrieved from the robot controller and interpreted in the Configuration Editor.

    If we exposed the methods to simply add/remove signals or other CFG instances, in general, without taking those rules into account, it would be easy to write code that does "bad" things and brings the controller into sys fail.

    If you know what you are doing that may be fine.

    But let's say you want to create some UI that create signals or does other stuff with CFG, you would sooner or later need to write code that needs to know some of the rules.

    That could be done if the XML I mentioned before was part of the public API, or even better some class in the API took care of the validation and even made it possible to make queries to determin e if a certain modification was possible, before it was actually done, thus allowing you to implement a responsive UI.

    I would need to check with our system architects which implication it may have to let developers simply add or remove instances (signals) without providing the possibility to validate, if that at all makes sense. Could we expose the XML files and promise them to be backwards compatible, etc.


    Over to the question on the Configuration Editor (?)

    Now I do not have RobotStudio available, but using the Config Editor or actually some Ribbon button close to it, there is a dialog to create new signals.

    To learn more I would like to suggest to read the System Parameters manual which can be launched from the help menu in RobotStudio.

    It will tell you in which topic and which type in CFG where signals are defined.

    Basically where you would have made the changes if it was possible.

    That was a long way to sa "no it is not possible", but I wanted to explain why it is not as simple as just expose two methods.

    I advise you to make a post in UpFeed and propose that this feature shall be implemented.

    A workaround is to create a CFG file and load it to the controller... There is CFG DOM, like an XML DOM, internally in PC SDK that can be used to programmatically create a CFG file. But it is not in the API currently, so I would actually advice to use a template CFG file stored as resource in yor assembly, where you simp,y inserts lines that corresponds to one or more signals, over using the DOM.

    The chances that CFG file syntax will remain a while is pretty high.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog