Create variable in Kepserver with Node-OPCUA

You cannot create variables in KEPServerEx from node-opcua client.

But you do not even have to create them. You can use feature of KEPServerEx to tunneling variables right into PLC. That mean if u try to read variable that is not defines in server variable list, KEPServerEx will try to find them within PLC. So then you do not have to create or even maintain the variable list in KEPServerEx. Just read it by client with right variable address:

session.readVariableValue("ns=2;s=Channel1.Device1.MB0", function(err,dataValue) {
   if (!err) {
      console.log("value=", dataValue.toString());
   }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)