CNC machines are usually used for moving a tool using multiple axes in a coordinated way. If you want to do the same with a PLC, the program gets very complicated and that's why it does not make sense to use a PLC instead of a CNC machine.
PLCs are usually used BEHIND the CNC for controlling more PLC like functions for the machine such as hydraulics, clamps,...
You need inverse kinematics. Which refers to calculating the joint angles so that the robot will reach a particular pose.
You can not simply move from point A to point B..
You will need to use inverse kinematics to calculate all the positions the arm will pass thru to form a straight line.