If porttest passes at the PLC output of the CNC, then the issue is downstream, toward the PLC.
If mini-DIN loop-back connector is not available, the cables can be rung out (‘beeped’) with a continuity tester or ohmmeter.
The illustration shows the wires that run between the 14 pin circular connector that connects to the CNC, and the 8 pin DIN connector that connects to the PLC.