1. Data communication error: There may be an error in data communication between PLC and other devices (such as upper computer or sensor), resulting in incorrect returned length. In this case, check the communication settings, protocols and transmission modes between PLC and other devices to ensure normal data transmission between them.
2. Network problem: If PLC communicates through the network, the stability and speed of the network may affect the returned data length. Check whether the network connection is stable and ensure that the network bandwidth is sufficient to support data transmission.
3. Program error: There may be errors or bugs in the PLC program, resulting in incorrect returned length. Check whether the PLC program follows the correct logic and correctly handles the data length.
4. Wrong data type: The returned length may be different from expected, because the wrong data type or data format is used. Ensure that the same data type is used between the PLC program and other devices, and that the data is formatted and interpreted correctly.
5. Hardware problem: Hardware failure of PLC itself may lead to incorrect return length. Check whether the hardware components of PLC (such as communication module and I/O module) work normally, and eliminate the possibility of hardware failure.
If the above methods can't solve the problem, you may need to contact PLC suppliers or system integrators for further technical support, and they may provide more specific solutions or suggestions.