cancel
Showing results for 
Search instead for 
Did you mean: 

hi, Is it possible to write a code for modbus read and write registers without using modbus libraries.

Lchal.1
Associate II

Actually i got the project on modbus but i am trying to code without using libraries but i am not getting expected result. can anyone help me with this and what extra line i need to add in my code please.

Thank you

5 REPLIES 5

Who's project is this?

The code could be written in many ways, you'll need to debug and trace your code and see how it deviates from those of the working libraries..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Lchal.1
Associate II

i have attached my code below can you please say me what is wrong with my code and what should i need to add still to it please.

Thank you

i have attached my code below can you please say me what is wrong with my code and what should i need to add still to it please.

Ozone
Lead II

Download the modbus specs from modbus.org, and implement it the way you feel fit.

Especially the ASCII protocol is quite simple.

Check the specs of the clients (or master ?) you want to use. Many device on the market deviate in some aspects, you probably want to account for that.

But i am using modbus RTU. I searched in modbus.org but i am not getting any data releated to modbus RTU. can you please help me with

Thank you