Fagor Programming

General support, help and advice for Denford CNC machines (old and new)

Moderators: Martin, Steve, Mr Magoo

Post Reply
User avatar
bradders
CNC Guru
CNC Guru
Posts: 1251
Joined: Mon 13 Feb , 2006 12:35 pm
Location: Brighouse, England
Contact:

Fagor Programming

Post by bradders » Mon 04 Jul , 2011 8:03 am

Customer enquires...........

Machine program
N0 G71 G90 G40
N10 P22=K-436.6 F1 K34.4 ( 436.6 DISTANCE FROM CHUCK DOGS TO HOME POSITION 34.4 DISTANCE FROM DOGS TO Z ZERO OF JOB )
N20 G20 N01.1 (SUB PROGRAM TO READ JOB OFFSET AND TOOL OFFSETS)
N30 T3.3 TOOL CHANGE
Etc

SUB PROGRAM
G22 N01
P21=K-21.578 F1 K92 (X OFFSET)
P23 =K-145.451
G53=X0.0 ZP22
G50 T1 XP21 Z8.5 F3 R0.000 I0.000 K0.000 TURN TOOL H09

It is not reading the P22 when I go to the home position it should go 34.4 from the dogs for the Z zero but it take it from the home zero 436.6mm from the dog face.

User avatar
bradders
CNC Guru
CNC Guru
Posts: 1251
Joined: Mon 13 Feb , 2006 12:35 pm
Location: Brighouse, England
Contact:

Re: Fagor Programming

Post by bradders » Mon 04 Jul , 2011 8:05 am

Admin replies......

N10 P22=K-436.6 F1 K34.4
This means
Set Parameter(or variable) #22 to -436.6+34.4 (which = -402.2)
F1 is the Add command
K just means read this as a constant number
So doing G0 ZP22 should move the Z axis to -402.2

If that’s not the front face of the billet, then either -436.6 is wrong, or the machine home position has moved.
I doubt that the axes display will change to reflect the value of P22 as it’s only a variable that can be used for any purpose.
So, the only way to be sure is to try “G0 ZP22” and see if it’s going to the correct place (Z should read -402.2 as long as there are no other offsets active)

User avatar
bradders
CNC Guru
CNC Guru
Posts: 1251
Joined: Mon 13 Feb , 2006 12:35 pm
Location: Brighouse, England
Contact:

Re: Fagor Programming

Post by bradders » Mon 04 Jul , 2011 8:06 am

Customer replies........

I have put line 35 in the program G0 P22 I have ran the machine in single block when it reads line 35 it goes 34.4 from the dogs but when it reads line 40 it goes 9.5 from the machine datum which is 427.1 from the dogs.

Machine program
N0 G71 G90 G40
N10 P22=K-436.6 F1 K34.4 ( 436.6 DISTANCE FROM CHUCK DOGS TO HOME POSITION 34.4 DISTANCE FROM DOGS TO Z ZERO OF JOB )
N20 G20 N01.1 (SUB PROGRAM TO READ JOB OFFSET AND TOOL OFFSETS)
N30 T3.3 (TOOL CHANGE)
N35 G0 Z P22 (TOOL MOVES TO 34.4mm FROM THE FRONT OF THE DOGS)
N40 G0 X10 Z-9.5 M03 M08 (TOOL MOVES TO -9.5 FROM MACHINE DATUM NOT JOB DATUM 24.9 FROM DOG FACE BUT MOVES 427.1 FROM DOG FACE)
Etc

SUB PROGRAM
G22 N01
P21=K-21.578 F1 K92 (X OFFSET)
P23 =K-145.451
G53 X0.0 ZP22
G50 T1 XP21 Z8.5 F3 R0.000 I0.000 K0.000 TURN TOOL H09
Etc
LAST LINES OF SUB ROUTINE ARE
N110 G90 G71 G40 G95
N120 G92 S2200
N130 G96 S150 M41
N140 G24

User avatar
Denford Admin
Site Admin
Posts: 3632
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Re: Fagor Programming

Post by Denford Admin » Mon 04 Jul , 2011 9:04 am

P22 is just a variable so if P22 is set to -400 then commanding G0 ZP22 is exactly the same as G0 Z-400

So if you want to shift the datum position using this P22 then maybe you should be using G92 to set the datum position.
eg,
G0 ZP22 - move to front of job.
G92 Z0 - set this position to be Z0
Then any Z values will be relative to the front of the billet

User avatar
bradders
CNC Guru
CNC Guru
Posts: 1251
Joined: Mon 13 Feb , 2006 12:35 pm
Location: Brighouse, England
Contact:

Re: Fagor Programming

Post by bradders » Wed 06 Jul , 2011 14:32 pm

Customer replies ..............

Yippee it works
Thanks very much for your help much appreciated

Post Reply