node-modbus-serial
node-modbus-serial copied to clipboard
writeCoil doesn't work while not giving any error
This code block doesn't work while it is not giving any error. I am able to write to this coil with the same IP adress, port and coil adress on QModMaster Application. What would be causing not to write to this coil?
I have put time interval between steps related to this topic #457
HI, thank you for the question,
if you want to catch an error, you need to use .catch
see: https://github.com/yaacov/node-modbus-serial/blob/master/examples/write.js#L27
This isn't working either. I can see the light blinking right next to ethernet port when I run the script. I think it means that program can connect succesfully. Unfortunately writeCoil function didn't work. I believe this program should work. What do you think might be the problem?
I successfully write to coil when I changed the adress with 2049. I should have write 2049 to address in order to change the value stored in the coil addressed 2050.