TwinCAT 3 ADS Error 1798 (0x706) on EtherCAT master, what to check?
I'm getting a TwinCAT ADS Error 1798 (0x706) on my Beckhoff TwinCAT 3 runtime with an EtherCAT master. This happens during ADS writes from a client. What should I check first?
ADS Error 1798 (0x706), also known as ADSERR_DEVICE_INVALIDDATA, indicates that the server received a request with the correct size but rejected its content because the data values were invalid. This typically occurs during ADS write or read-write operations from a client or the PLC. It's important to distinguish this from ADS 1797, which is a size problem, or ADS 1803, which relates to invalid service parameters.
Likely causes and checks
1Value written is outside the accepted range
- Points to it
- The most common reason for this error is that the value being written to the server is outside the range that the server is configured to accept for that specific index group or parameter. This is often indicated if the error only occurs with certain values, while other values for the same write operation succeed.
- Check
- Check the documented value range for the index group or parameter that is being written to. Ensure the client is sending values within this specified range.
2Request structure filled wrongly by the client
- Points to it
- If every write operation for a particular service fails, or if there have been recent changes to the client library or code, the client might be incorrectly structuring the request. The server receives the request but cannot process the content due to this structural issue.
- Check
- Capture the ADS request using a tool like ADS Monitor or Wireshark. Compare the captured request structure with the official service specification to identify any discrepancies.
Next check: Start by verifying the range of values being written to the specific index group or parameter. If the values are within the documented range, then investigate the client's request structure.
Related questions
Describe the fault or upload a photo, and InduQT checks it against the manufacturer manuals. Share the result here when it helps someone else.