For rs 232c communication is 1200 m max.
If you change it to rs422 or rs485 then a few Km more is no problem.