Here is the button script
c=Timer()
totaltime=(c-getuserdro(1002))
setuserdro(1000,totaltime)
dooembutton(1000) 1002 userDRO is the time from the beginning of the preheat. I use M18 to fill 1002 up.
b=Timer()
setuserdro(1002,b)
preheat=getuserdro(1000)
ActivateSignal(Output4)
code ("G4 P" & preheat) totaltime is the the xx (G4 Pxx) time
dooembutton(1000)=dobutton(0) I think. I tried them both.
As I have described when I use the normal Run button it stops waiting and continue with next line. When I use this button the calculations in the first 3 lines are done correctly but then the feedrate gets equal to Xposition and it moves to a no sense place. When it reaches that place it continues as if it has done next line.
Appart from the fact that if I have open the script editor and I "play" the script from within the editor, it works fine, it works fine the for the second or third curve.
For example:
N0000 (Filename: Drawing1.tap)
N0010 (Post processor: Copy of Mach2.post)
N0020 (Date: 24/7/2006)
N0030 G21 (Units: Metric)
N0040 G40 G90
N0050 F1
N0060 (Part: Drawing1)
N0070 (Process: No offset 0, Mill/Router, 0,1 mm diameter, 0 mm Deep)
N0080 M6 T0 (Mill/Router, 0,1 mm diameter)
N0090 G43 H0
N0100 G00
N0110 M04
N0120 X180.3516 Y119.7404
N0130 (Part: Drawing1 Duplicate 1)
N0140 M18
N0150 G02 X180.3516 Y119.7404 I-67.4337 J0.0000 F3000.0
N0160 (Process: No offset 0, Mill/Router, 0,1 mm diameter, 0 mm Deep)
N0170 M17
N0180 G00 X170.1790 Y266.9916
N0190 (Part: Drawing1 Duplicate 2)
N0200 M18
N0210 G02 X170.1790 Y266.9916 I-67.4337 J0.0000
N0220 (Process: No offset 0, Mill/Router, 0,1 mm diameter, 0 mm Deep)
N0230 M17
N0240 G00 X306.6313 Y199.9025
N0250 (Part: Drawing1 Duplicate 3)
N0260 M18
N0270 G02 X306.6313 Y199.9025 I-67.4337 J0.0000
N0280 (Process: No offset 0, Mill/Router, 0,1 mm diameter, 0 mm Deep)
N0290 M17
N0300 G00 X388.5027 Y82.7810
N0310 M18
N0320 G02 X388.5027 Y82.7810 I-67.4337 J0.0000
N0330 M05
N0340 G00
N0350 G00 X0 Y0
N0360 G49
N0370 M05 M30
If I push the button while waiting in N0140

If I push it during N0200, N0260 or N0310 it works well

Thanx