About WIZ550S2E-Modbus project on github

Dear all
On github this WIZ550S2E-Modbus project, there is no function code processing function?

Hello @Bohu-Tang

What does function code processing function mean?

Do you mean the function code processing function to find the function as shown in the picture below?

Hi austin
Thanks for your answer.I am looking for a Modbus-TCP protocol function code handler, such as function code 03,04,06,10, but I can’t find it in this project. Am I find in the wrong place?

Hi austin
I came up with a way to use the mbtcpcpppackage function to write a switch() function after the if(usPID==MB_TCP_PROTOCOL_ID) function to determine the corresponding function code, and then enter the corresponding function code. I don’t know if that’s possible, because this function is static bool.

Such as this. This function is to judge the function code of Modbus-RTU.But I think it should be the same for Modbus-TCP.if(usPID==MB_TCP_PROTOCOL_ID), it indicates that Modbus-TCP has been identified, and you can check the function code. I don’t know if my logic is right. If you have any questions, please give me your suggestions.

Hi austin
Can you help me with the question?

Hi @Bohu-Tang

If you need any functions, you can add them and use them.

If you need the function code processing function I think it would be okay to add it after the ‘if( usPID == MB_TCP_PROTOCOL_ID )’ conditional statement as mentioned above.

Thanks a lot for your answer.