AliBahar
Member level 2
Hi
I have created C code which performs modbus request and response. the functions that perform these tasks are wrapped in the header file and they can be called by main program on microcontroller. I want to use simple modbus software which creates modbus request on PC then the created stream must be sent to uC using rs232.
so far I have used ModbusMat software. it is simple software and it can communicate with uc based on rs232. but some problems exist.
the first: finding the ending character of sent frame from software is challenging in my c code. because the length of frame varies in different requests.
the second problem: for same data array the crc bytes of my code is different from software's.
do you know the simple modbus software which the end character of it's frame can be determined certainly?
there are different methods for crc bytes generation. which of them is most common?
I have created C code which performs modbus request and response. the functions that perform these tasks are wrapped in the header file and they can be called by main program on microcontroller. I want to use simple modbus software which creates modbus request on PC then the created stream must be sent to uC using rs232.
so far I have used ModbusMat software. it is simple software and it can communicate with uc based on rs232. but some problems exist.
the first: finding the ending character of sent frame from software is challenging in my c code. because the length of frame varies in different requests.
the second problem: for same data array the crc bytes of my code is different from software's.
do you know the simple modbus software which the end character of it's frame can be determined certainly?
there are different methods for crc bytes generation. which of them is most common?