Ok I have done some more research.
Found out that EDM_GetPassIsGlueStop() outputs only if current pas is glue stop.
The problem I have is that I do not know how to write script that it will output the same result for cutpas 1? (I always get S1D1 for cutpas 1 and S0 D0 for cutpas 2)
My script now:
Code:
2008. Program Block #8 (program_block_8)
Dim noconture
Dim glu
noconture = EDM_GetNumberOfContours()
glu = EDM_GetPassIsGlueStop()
If noconture = 1 Then
EDM_ProcessPostLine("n,'S0 D0'")
End If
If noconture = 2 Then
If glu = 1 Then
EDM_ProcessPostLine("n,'S0 D0'")
Else
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
End If
If noconture = 3 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
If noconture = 4 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
If noconture = 5 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
If noconture = 6 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
If noconture = 7 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
If noconture = 8 Then
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
Which outputs correct cutting conditions for all combinations except rough cut + glue stop. For that it outputs:
Code:
(MACHINE FANUC ALPHA-0B )
(MAIN PROGRAM, 06:51PM SUN. 09/18/2011 )
N1 G00 G21 G90
N2 G92 X23.3879 Y.2874
(FEATURE 1 CNT2X ROUGH CUT FORWARD)
N3 S1 D1
N4 M37 M89
N5 G01 X29.7379 G41
N6 G03 X0. Y30.0253 I-29.7379 J0.
N7 X-29.7379 Y.2874 I0. J-29.7379
N8 X0. Y-29.4505 I29.7379 J0.
N9 X29.6295 Y-2.2495 I0. J29.7379
N10 G01 X23.3026 Y-1.7078 G40
N11 M00
(FEATURE 1 CNT2X TAB CUT FORWARD)
N12 S0 D0
N13 M37 M89
N14 G01 X29.6295 Y-2.2495 G41
N15 M00
N16 G03 X29.7379 Y.2874 I-29.6295 J2.5369
N17 M00
N18 G01 X23.3879 Y.2874 G40
N19 M30
As mentioned above this is because EDM_GetPassIsGlueStop() checks only if glue stop is in current pass.
I have tried to implement cupas = EDM_GetCuttingPassNumber() which outputs current pass number and then check for glue stop. But I was unable to get any useful script out of it.
Not working idea:
Code:
If noconture = 2 Then
If cupas = 1 Then
If glue = 1 Then
EDM_ProcessPostLine("n,'S0 D0'")
Else
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
End If
If cupas = 2 Then
If glue = 1 Then
EDM_ProcessPostLine("n,'S0 D0'")
Else
EDM_ProcessPostLine("n, cutting_cond,wire_offset,wire_speed,wire_tension")
End If
End If
End If
The code from second post is the same as above for first one.
If anyone have an Idea, how to make script, which first check if second pass cut is glue stop, and then determine cutting condition for first pass cut please speak up.