Reading object values in hardware interface

Greetings

me and @alessiocamillo are working on a particular scenario

We have 2 iopoints (first object with iopoint input and second object with iopoint output ) and a link between them
when i write the first one i find the correct value in the second
here is the problem
i need to evaluate a function depending on the value of the first iopoint (input)
and i am doing this inside the hardware interface ( at given timeouts )
so, in this particular hardware interface i need to read the value of the second iopoint

i would like to know if it possible to access the IoPoint real value via hardware interface

thank you everyone

Steve

Hi guys,
we found a solution by implementing the following function in HybridObjectsHardwareInterfaces.js

  exports.readIOFromServer = function (objName,ioName) {
      var objKey = HybridObjectsUtilities.readObject(objectLookup, objName); 
      if (objectExp.hasOwnProperty(objKey)) {
            if (objectExp[objKey].objectValues.hasOwnProperty(ioName)) {
              return  objectExp[objKey].objectValues[ioName].value;
            }
       }
       return 0;
 };

and then in our HWInterfarce we call server.readIOFromServer(, );

Thanks a lot,

Alessio

1 Like