This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C1292NCPDT: Modbus TCP ACK packets

Part Number: TM4C1292NCPDT

Tool/software: TI-RTOS

Hi,

i am using third party Modbus TCP stack along with TI RTOS and TI NDK for my Modbus Slave Device. it uses TM4C1292NCPDT controller. i have captured modbus tranactions in wireshark and found always TCP ACK packets between Modbus TCP query and response. but typically there should not be TCP ACK packet between modbus transactions. 

please find the log for Slave device designed with some other stuff having no ACK packtes between Modbus transactions.

find the below capture for Slave device designed with TI stuff having ACK packtes between Modbus transactions.

Modbus TCP Query.

TCP ACK packets for previous Modbus TCP query sequence number.

 

Modbus TCP response with ACK packets for previous Modbus TCP query sequence number.


 

i want to know why separate TCP ACK packets is transmitted from my device between Modbus TCP transactions. i want to optimize the speed of modbus transactions, need to avoid the seperate TCP Ack packets. How do we do that in Ti NDK?

 

i have attached both .pcap and .csv file of wireshark log for your better understanding.

wireshar_log.zip

 

Regards

Bala

  • Hi Bala,
    I'm not an Modbus expert and neither a NDK expert. You are saying that there are ACK packets in between the Modbus packets and you are trying to avoid the ACK packets. Is this correct? I guess these ACK packets are generated by the the MCU, correct? Do you know to which server requests are the MCU ACK packets acknowledging to? I think this is the first part you want to look as to what these ACK packets are responding to? If the ACK packets are responding to certain requests on the network then I don't think you can remove/avoid them. In the NDK User's guide section 2.2.7.2 it talks about configuring Network Scheduler Task priority. Perhaps this is something you can look into to see if you can raise the Modbus task priority over other network tasks.
  • Charles Tsai said:
    I'm not an Modbus expert and neither a NDK expert. You are saying that there are ACK packets in between the Modbus packets and you are trying to avoid the ACK packets. Is this correct?

    - Yes

    Charles Tsai said:
    I guess these ACK packets are generated by the the MCU, correct?

    - Yes

    Charles Tsai said:
    Do you know to which server requests are the MCU ACK packets acknowledging to? I think this is the first part you want to look as to what these ACK packets are responding to? If the ACK packets are responding to certain requests on the network then I don't think you can remove/avoid them.

    - Actually Modbus Response itself having ACK information for the Query which is sent from PC. But here NDK is responding ACK packet for Query as per standard TCP protocol and Modbus TCP application also inserting ACK information along with response. so i thought TCP ACK packet can be removed or avoided to make use of processor bandwidth for Modbus TCP packet processing.

    is there any way to stop ACK packet in NDK stack for Modbus TCP Protocol?

    Charles Tsai said:
    In the NDK User's guide section 2.2.7.2 it talks about configuring Network Scheduler Task priority. Perhaps this is something you can look into to see if you can raise the Modbus task priority over other network tasks.

    - Ok. I will try change the priority of the task and observe the performance.

    Regards

    Bala

  • Bala,
    Again, I'm not an NDK expert. But to me, the NDK is just a TCP/IP stack. It does not know what the upper layer application wants as to send or not send the ACK packet. I tend to think that is to be controlled/instructed by the application layer. Perhaps I'm wrong. I will suggest you also post the question to your third party Modbus stack vendor for suggestions. Also try to change the priority of the network tasks and see if they help.
  • Hi Charles,

    Thanks for the update. i have checked with Modbus slave stack vendor and confirmed that stack didnt process the any ACK packet and it will process the pocket and reply with response. typically the TCP layer is processing the ACK packet and it should be in NDK only.

    Regards
    Bala