The RS-232 interface is not designed for long data cables (no differential signals). The cable length depends mainly on the data rates of the RS-232 interface.
See the following guidelines:
- 19’200 Baud → up to 15m
- 115’200 Baud → up to 2m
The cable length is also influenced positively / negatively by other factors:
- Quality of the cable (shielding, cross-section, wire resistance, etc.)
- Environmental conditions (Disturbance sources like motors, etc.)