Hi! Could somebody please help me to make this program work :drowning:
Machine Okuma LT10-M/U100L
Okay... here's the problem, I'm a complete noob when it comes to these twin spindle/turret machines and lathes in general.
We had a guy here to help us make a basic program. Then I made a new program and added everything that is on the
G14 side. The program works fine until bar change. I've tried to put P codes all over the place and tried M100 and many other
things but It's impossible to know what to do since my instructions don't tell. So the program works until it's supposed to start the bar change.
Theres a comparison sentence, that checks if the bar change signal is on. (FMB bar feeder) The program stops at >>G140(see program
below). I've had S M sync error and also no error at all, machine just stops depending where P or M100 codes are. I've also had an error that
says something about the other side of the program waiting M2 and simultaneusly the other side changed spindle mode.
Yeah, it's a problem but how to fix it. I could move the entire bar change program to the beginning of the program,
but then I'd have a unnecessary turning operation(G14) at the beginning of each bar. Please help!
here's the program: (I know it's messy)
G14
G141
G50 S2500
VZSHZ=89.5
T0101 G95 G97 S1600 M3 M42
G0 X17.8 Z2 M8
G1 X22.3 Z-0.25 F0.3
Z-3.7
X24.5
X25 Z-3.95
Z-5
X27 M9
G0 X999 Z999 M5
G145
G144
G145
G144
G141
P10
G13 Drill a hole trough the bar(these are not actual comments on the program)
G140
G50 S2500
M216
M93
VZSHZ=60
T0909 M5 G94
G0 Z-19 X999
X27
M110
G0 C0
M147
SB=900 M13 M8
VLMON[1]=1
G1 X21 F=SB*0.12
X-30 F=SB*0.15
VLMON[1]=0
G0 X999 M9
M12
M146
M109
G145 Bring the part to the parts catcher
G0 W250
M77
M249
G4 F1
M76
G0 W999
G144
VZSHZ=182
T1111 M5 Feed the bar against a ???(don't know the word)
G0 Z5 X999
X0 Z0
M84 M103
G4 F1
M83 M104
G0 Z5
X999 Z5
T0101 G95 G97 S1500 M3 M42 Remove chip after side drill
G0 X25.3 Z3
G1 Z-29 F0.4
G0 X999 Z-119
NHAKU G145 sub spindle advance
G0 W220
G94
M141 M247
VLMON[2]=32
G1 W152 F2000 G94 M288
VLMON[2]=0
M248
M246
T0101 G97 S1500 M3 Parting of
G95
G0 Z-119 X999
X27 M8
G1 X22.9 F0.12
G0 X27
Z-121
G1 X23 Z-119
G0 X27
Z-117
G1 X23 Z-119
X15
G0 X15.2
G97 S2200 M3
G1 X5
G0 5.2
G97 S2500 M3
G1 X0 F0.06
VLMON[4]=32
G1W157 F0.1
VLMON[4]=0
G0 X999 W999 M9
M150
G144
M5
G0 X999 Z50
G13
G141
VZSHZ=-89.5
G50 S2500
G95
M42
T0808 G97 S2700 M3 M66 U drill
G0 X250 Z200
G0 X0 Z4 M8
VLMON[5]=2
G1 Z-5.5 F0.08
G0 Z2
G0 X-8.2
G1 X2.7 Z-0.75
X-4
X0 Z-5.35
Z-42.5
G0 Z4
VLMON[5]=0
X150 Z200 M9
T0505 G97 S100 M3 M66 M41 thread
G0 X0 Z5 M8
VLMON[6]=64
G1 Z-37.5 F2.5
M5
G1 Z5 F 2.5 M4 S100
VLMON[6]=0
M215
G0 Z200 X999 M9
Z500 X999 M5
M42
IF [VIRD[0266]EQ 1] NALKU Compare bar end signal, if "ON" change bar and top cut, if not, go to end
GOTO NLOPP
NALKU
G13
G140 <-----------------------------Stops here!
VZSHZ=182
M185
T0101 G97 S100 M3 M42 Bar change
M84 M103
M101
M83 M104
G97 S1500 M3
G0 Z-119 X999
X27 M8
G1 X22.9 F0.1
G0 X27
Z-117
G1X23 Z-119
G0X27
Z-121
G1X23 Z-119
X0
G0 X999 Z-119 M5
NLOPP
M42P10
M2