Hi Carlos,
What type of 3.3V to 5V TTL Level shifter are you using?
The Level shifter is 9 feet away from KFLOP at the Leadshine drive end of the cable?
Shielded cable?
Do you have a KFLOP GND Connection?
It seems your Level shifter is very sensitive to noise with floating inputs.
You shouldn't normally need a Level Shifter. KFLOP can normally drive 5V Opto inputs using its Open Collector output mode. What Leadshine drive do you have?
Regards