st-one-io / node-open-protocol

This node is an implementation of the Atlas Copco's Open Protocol. This node was created by Smart-Tech as part of the ST-One project.
GNU General Public License v3.0
39 stars 38 forks source link

MID0064 #29

Closed jazzubai closed 2 years ago

jazzubai commented 2 years ago

Hi,

Thank you very much for this NodeJS library. I am trying to get the response for MID0064 oldTighteningResultUpload. But not getting reponse from controller. Below is the code: Is it correct?.

`const openProtocol = require('node-open-protocol');

let op = openProtocol.createClient(4545, "127.0.0.1", () => { console.log("Connected!");

tighteningID=""
let opts = {
    tighteningID
};

op.request("oldTighteningResultUpload", opts, (err, data) => {
    //onCallback("Request", "oldTighteningResultUpload", err, data);
    if (err) {
        console.log("Error getting old tightening request from the controller", err);
        return;
    }
    console.log("Old Tightening Response", data.payload);
});

});

op.on("error", (error) => { console.log("Error on OpenProtocol", error); }); `

jazzubai commented 2 years ago

it is working fine. wrong parameters was sent.