Assuming that you are using a fanuc control and the metric system
Here is the code
G76 P020060 Q100
G76 X18.526 Z-0.000 P.737 F1.5
As far as the RPM goes Im sure you have that part cover
There are some missing/incorrect parameters in this program. First of all, the depth of a metric thread for 1.5 pitch is 0.9202 mm. So, core dia would be equal to 20-2x0.9202 = 18.1596. The correct code would be: G76 P020060 Q100 R.1
(no. of finishing passes=02, chamfer distance=00, angle of thread=60 deg, minimum depth of cut= 100 microns=0.1 mm, finishing allowance on dia=0.1 mm) G76 X18.1596 Z(as required) P920 Q200 F1.5
(X=core dia, Z=axial end of thread, P=depth of threads in microns, Q=first depth of cut in microns, F=lead of the thread)
The first depth of cut is chosen to be 0.2 mm. The subsequent depth of cuts would gradually decrease automatically to ensure equal volume removal in every pass. When the calculated depth of cut comes out to be smaller than the specified minimum depth of cut (0.1 mm), the depth of cut in the remaining roughing passes would remain fixed at 0.1 mm.
Choose any RPM. The machine will automatically adjust the feed to suit your thread lead (lead = pitch x no. of starts of the thread), provided the required feed is not higher than the maximum possible feed on your machine. If this is indeed the case, reduce RPM suitably.
If you want to make a taper thread or a multi-start thread, something more would be required to be done.
And, do give a minimum axial clearance of about 6 mm (about 4 pitch distances); otherwise the initial few threads may have incorrect pitch due to a possible lag in the servo system.