I'm guessing you're trying to thread on a lathe.
You might try the second 2 digits in your first P command to be 00, and
add your Q and R to the first line as well.
Check where your start is in X and make sure the X is advanced in the correct direction.
To amke a 1/2 x 13 thread you might do it this way as an example
g76 p030060 q.03 r.02
g76 x .421 z-1.0 r0. p.0395 q.1 f.0769