Thank you for your help. It turned out to be the wiring of the cable.
The reason it worked in the test environment and not the actuall is a different ports were used. In the test environment a convertor from RS232 was used. The converter required a one wiring which was re-created for a RS485 card which required a different wiring.
Basically there was contention on the liine.