Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BadNodeIdUnknown (0x80340000) #744

Open
Kromschu1234 opened this issue Oct 22, 2024 · 2 comments
Open

BadNodeIdUnknown (0x80340000) #744

Kromschu1234 opened this issue Oct 22, 2024 · 2 comments

Comments

@Kromschu1234
Copy link

Kromschu1234 commented Oct 22, 2024

Hello everyone,

I just wanted to give a quick description of an issue we're encountering. We are receiving the error (BadNodeIdUnknown 0x80340000).

What we are trying to achieve is communication with a PLC via UaExpert. So far, the OPC server connection is working perfectly.

The problem started when we tried to connect the OPC server with a MySQL database using Node-RED. Everything works fine till
Function 4, but when the data is sent to the OPC client, we get the error code mentioned above.

In UaExpert (and also with the PLC), we are using an array table. I’m a newbie with this kind of setup. We've double-checked the NodeIDs in UaExpert multiple times, but there might be something we're overlooking.

What function 4 contains:

let result = msg.payload;
let payloadArray = [];

result.forEach((row, index) => {
if (row.position && row.fuseType) {
payloadArray.push({
nodeId: ns=3;s="Position_LAD/FBD"."point[${index}]"."position",
datatype: "Int",
value: row.position
});

    payloadArray.push({
        nodeId: `ns=3;s="Position_LAD/FBD"."point[${index}]"."fuseType"`,
        datatype: "Int",  
        value: row.fuseType
    });
} else {
    node.warn(`Missing data in row at index ${index}. Row data: ${JSON.stringify(row)}`);
}

});

if (payloadArray.length === 0) {
node.error("No valid data to send to OPC UA Client");
return null;
}

node.warn(Generated payload array: ${JSON.stringify(payloadArray)});

msg.payload = payloadArray;
return msg;

Thanks for your advice!
Node-red flow1
image

@mikakaraila
Copy link
Owner

mikakaraila commented Oct 24, 2024

Could it be that special characters must be protected with \

Like:
ns=3;s=\"Position_LAD/FBD\".\"point[\${index}]\".\"fuseType\"

@Kromschu1234
Copy link
Author

Right now everything is a good advice, thanks for it. Tomorrow in work I will try it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants