If you watch this video, you can see the cnctch.mac Tool Change Request Macro.

https://www.youtube.com/watch?v=7XxCzerDKGU

Ive paused it and written (copied) the code.

IF #50001 ;Prevent lookahead
IF #4202 || #4201 THEN GOTO 1000
IF #4120 == #90014 THEN GOTO 1000

N100

G10 P1906 R1
G4 P.5
M94 /6
M101 / 70001
M95 /6

N1000

The actual logic of movement is:-

Code "G0 A" & total_move '& "F" & CW_Feed
Code "G0 A" & "-" & CCW_Move '& "F" & CCW_Feed

I assume this is the logic you need to do in the PLC?