RobotStudio event

Read Access Level on Signal

Hello,

We are programming a driver to talk with a RobotController and in this driver we want to get/set IO Signals defined on the RobotController.

We would like to filter on Access Level so that only Signals that can be set are shown in our UI.

It is only possible to write Signal.Value when the Access Level on that signal has the Remote Client (Auto Mode or Manual Mode) set to "Write Enabled".

We are now struggling to read this Access Level property on the Signal that is returned after calling IOSystem.GetSignal(string signalName)

Is it possible to read the Access Level on a Signal at all?

Comments

  • Micky
    Micky ✭✭✭
    edited November 2015
    Hi,

    i think you have to get the acess data from the system paramters.

    That means you read the parameter name which is used for the access level of the signal:

    string strAccess = _controller.Configuration.Read("EIO", "EIO_SIGNAL", signal.Name, "Access");

    If you know the parameter name you will read the data of this acess level:

       bool bLevelManual = Boolean.Parse(_controller.Configuration.Read("EIO", "EIO_ACCESS", accessName, "RemoteManual"));
       bool bLevelAuto = Boolean.Parse(_controller.Configuration.Read("EIO", "EIO_ACCESS", accessName, "RemoteAuto"));

    Depending of the current operation mode you could set or reset the signal if it is allowed.

    /BR
    Micky
  • Thanks Micky!

    We just tested your suggestion and it is exactly what we needed. :smile: 

    Cheers,
    Martijn