Troubleshooting Node-RED Modbus issues

Can you explain why you are switching nodes?

Did the write not work on the original node when you changed the address? Did you get the error 2 after changing the address or was this before changing the address? Does the device you are communicating with allow you to write to that register?

Edit: @beno, should this be moved into a separate thread so the original poster isn’t getting bothered with all the replies?

Can you explain why you are switching nodes?: because it throws me error 2, which indicates that there is an error in the requested function or the slave device is incompatible with said function (16). If I am wrong I would appreciate information.

Did the write not work on the original node when you changed the address?: no it didn’t work but this time as i reported earlier it says it doesn’t support feature 16

Did you get the error 2 after changing the address or was this before changing the address?: after changing address.

Does the device you are communicating with allow you to write to that register?: yes, it is a write register, try with register 5 and 7, but it doesn’t work either.

Exception code 2 is for an invalid address or quantity of registers. If the function code was not supported it should return with code 1.

If you want to use function code 6 instead of 16, that is an option with the node you were using before, though I don’t think that is the issue.

Are you sure you are trying to write to a single 16 bit register?

Can you share what the modbus device is and have a link to the documentation?

my mistake, if it’s code 1.

msg : error
“Error: Modbus exception 1: Illegal function (device does not support this read/write function)”

Did you try using function code 6?

yes, that’s how it works. it is function 16 that is not compatible with my equipment, use a modbus simulator with function 16 and it writes correctly. the limitation is on my computer and not on the node. thank you very much for your help.

Can you explain why you are switching nodes?: because it throws me error 2, which indicates that there is an error in the requested function or the slave device is incompatible with said function (16). If I am wrong I would appreciate information.

Did the write not work on the original node when you changed the address?: no it didn’t work but this time as i reported earlier it says it doesn’t support feature 16

Did you get the error 2 after changing the address or was this before changing the address?: after changing address.

Does the device you are communicating with allow you to write to that register?: yes, it is a write register, try with register 5 and 7, but it doesn’t work either.