2
votes

I'm using node-red-contrib-ab to read PLC data, Whenever the plc is off, this node throws a message in debug window

Failure (Bad values)

  • I want to catch this error so that i can send a signal to database.
  • I have used the catch node but no luck, Is there any way i can catch the error and store it into msg.payload
1

1 Answers

1
votes

For the Catch node to work, the node needs to be reporting the errors using the proper API. If you are only getting a log message and nothing from the Catch node, that means the node needs fixing.

However, the node you mention, node-red-contrib-ab has not been updated for 2 years and has no github link associated with it for reporting issues. You would have to contact the author directly to ask if they can make the change.

Alternatively, I see that node is actually an old fork of https://www.npmjs.com/package/node-red-contrib-s7 which is more widely used and actively maintained. You may want to see if you can switch to that module for your particular PLC.