Sign in to follow this  
Rodney

I/O Type - Set Register type 10?

Recommended Posts

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

 

 

 

 

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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?

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this