Rodney Posted June 2, 2018 Share Posted June 2, 2018 Hi The manual for a piece of equipment I have states the registers use Modbus Function code 3 to read the register and function code 10 to set the register I can read the registers no problem In the channel table i/o type I can see set register with either function code 6 or function code 16 but no code 10 I tried using code 16 but no luck How do I set the registers that require function code 10 ? Regards Rodney Link to comment Share on other sites More sharing options...
AzeoTech Posted June 2, 2018 Share Posted June 2, 2018 My guess is that they are specifying the function codes in hex, as 10 hex is 16 decimal. Especially since there is no function 10 in standard Modbus. So you should be able to use code 16. If it isn't working it may be an alignment issue. What error are you getting? Link to comment Share on other sites More sharing options...
Rodney Posted June 2, 2018 Author Share Posted June 2, 2018 Tthat makes sense - looks like it was working using code 16 - it's a solar controller that I am trying to configure and looks like I have killed the power to the wifi antenna at my friends cattle station (1300km away!!!) luckily we have a spare onsite to swap out (and I have one here at home which I will now test configure.....) Thanks for the quick response Link to comment Share on other sites More sharing options...
Rodney Posted June 3, 2018 Author Share Posted June 3, 2018 I have now successfully been able to set a number of registers using function code 16 however on one specific register I get the following error when trying to set it P-ModbusRTU 0004: Slave Device Failure what causes this error and what do I need to d to correct it? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 6, 2018 Share Posted June 6, 2018 That's a Modbus specific error returned by your device. You'd have to check your device docs as the meaning of that really depends on the device. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.