Alter default safe height in Denford post processor files

Anything to do with configuring CAM systems and Post Processors to run on different CNC machines

Moderators: Martin, Steve, Mr Magoo

Post Reply
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:

Alter default safe height in Denford post processor files

Post by Denford Admin » Fri 16 Apr , 2010 15:53 pm

Customer question:
I was wondering if it is possible to modify the post files "parameters" in QuickCAM3D. For example, when I create the NCD file using QuickCAM3D and open the NCD files for my Formula One car, the Z value keeps sending my motor/bit too high on the Z axis, hitting a limit switch. I usually have to modify the NCD file (set the Z to 0.0000 rather than Z=0.1969). Is this possible? I have a Techno Isel Davinci stepper motor mill. Thanks.

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: Alter default safe height in Denford post processor files

Post by Denford Admin » Fri 16 Apr , 2010 16:01 pm

Yes it's possible.

Locate the appropriate post file, usually in this directory:
C:\Documents and Settings\All Users\Application Data\Denford\Posts
(You may need to turn on hidden files/folders to see it)

In this case, the file will be Techno-G-Code.ppl (nb the filename is exactly the same as it appears in the software)
Open the file in a basic text editor like Notepad

Look down the file for Safe2=5.08
Safe2 is the safe height position for the Z axis (ie 0=X 1=Y 2=Z)

The post setting file is fairly easy to work out, and there is also a file called posthelp.txt which explains some of the features should you wish to make your own post file...

Code: Select all

Comments on the standard Denford post file:
_________________________________________________

any numbers in here are in mm - whether a metric machine or not

; the Options section:
_______________________
[Options]
Comment=Milling
; this comment appears in the post selection drop down after the files' name

File Extension=fnc
; simply the file extension given to the created file

Line Numbers=False
Line Number Start=10
Line Number Step=10
Line Number Char=N
; Line numbering options (not normally used)

Comment Char={40}
; tells post what character is used to denote comment lines
; this could be entered as ( or {40} which signifies use ASCII character number 40 which is a (
Add Comments=YES
; output comments to the file or not

Inch Mode=No
; will output the file in metric or inch units, and also output the correct G code from the next two options
Metric Code=G21
Inch Code=G20

[Axes]
Number of axes=3
Axis Letter0=X
Axis Letter1=Y
Axis Letter2=Z
; self explanatory ?

Modal Positions=True
; in other words, should the post output every axis position on each move, whether changed or not

Axis Seperator={32}
; the character(s) which seperate each axis position (32 is the space character)
Safe2=2
; sets the safe position for axis 2 (the Z axis) - other axes will default to 0 - but are not used by the post outputs anyway 


[Linear Moves]
Rapid=G00 {POSITION}
; format for a fast (rapid) move - something MUST be entered for this even if machine does not allow rapid commands

Initial Feed=G01 {POSITION} F{FEEDRATE}
; the format for the very first feed move
; note that the words inside {} are constants used by the post, see further on for a list of these expressions

Initial Feed No Feed=G01 {POSITION}
;the format for the next feed move after a toolchange or rapid move - if not specified will be the same as Initial Feed setting above

Feed={POSITION}
; the format for any feed moves after a change in feed has occured - if feedrate is not modal, then you should enter something like: {POSITION} F{FEEDRATE}

[Arc Moves]
Expand Arcs=False
Arc Step Size=0.1
Min Arc Radius=0.2
; these parameters are to do with outputting arcs as a series of short linear moves

Plane Switching=True
Plane01 Code=G17
Plane02 Code=G18
Plane12 Code=G19
;if plane switching is not available on the machine, then any arcs in different planes will be expanded into short moves by the post processor


Centre Letter0=I
Centre Letter1=J
Centre Letter2=K
Radius Letter=R
Output Centre=True
; if true, then the post will output circle centres using the Centre Letter definitions (eg IJK),
; if false , then the post will output the circle radius using the Radius Letter (eg R)
Absolute Centre=False
; if this is true then centre positions will be output as absolute positions, not incremental
; eg - X100 Y100 I50 J0 in incremental is the same as X100 Y100 I150 J100 in absolute mode
Single Quadrant Arcs=False
;if you set this true, then the post will split arcs into quadrants 0,90,180 and 270 degs.
;so a full circle will actually output 4 seperate 90 deg arcs



CW Move=G2 {POSITION} {CENTREPOSITION}
CCW Move=G3 {POSITION} {CENTREPOSITION}
Initial CW Move=G2 {POSITION} {CENTREPOSITION} F{FEEDRATE}
Initial CW Move No Feed=G2 {POSITION} {CENTREPOSITION}
Initial CCW Move=G3 {POSITION} {CENTREPOSITION} F{FEEDRATE}
Initial CCW Move No Feed=G3 {POSITION} {CENTREPOSITION}
; defines how circular movements are output


[Header]
{MMINCHCODE}
G90
{40}Denford Post Output - {APPLICATION}
{40}Date: {DATE}
{40}Time: {TIME}
{40}Source File: {SOURCEFILE}
{91}BILLET X{BILLET0} Y{BILLET1} Z{BILLET2}
{91}EDGEMOVE X0 Y0
G91 G28 X0 Y0 Z0 M05
; this whole block of strings will be filled in and output by the post processor at the START of the output file


[Footer]
G00 Z{safe2}
G91 G28 X0 Y0 Z0 M05
G90
M30
; this whole block of strings will be filled in and output by the post processor at the END of the output file


[Tool Change]
{91}TOOLDEF T{TOOL} D{TOOLDIAM}
;G90 G00 Z{SAFE2}
;G91 G28 X0 Y0 Z0 M05
G90 M6 T{TOOL}
M03 S{SPINDLERPM}
; these strings will be output whenever a tool change is required by the CAM program


[Scaling]
Axis0=1
Axis1=1
Axis2=1
Spindle=1
Feedrate=1
; each axis, spindle and feed command can be scaled to suit a particular machine


[Format Strings]
Tool=%0:0.2d%0:0.2d
Axis0=%1.3f
Feedrate=%1.1f
Spindle=%1.0f
; sepcifies how numbers are output - see the next section for more details on number formats



Number format strings:
_____________________________

In simple terms, each data formatting substring starts with a % and ends with a data type indicator :

d 	= Decimal (integer)
e 	= Scientific
f 	= Fixed
g 	= General
m 	= Money
n 	= Number (floating)
p 	= Pointer
s 	= String
u 	= Unsigned decimal
x 	= Hexadecimal
The general format of each formatting substring is as follows: 
%[Index:][-][Width][.Precision]Type 
where the square brackets refer to optional parameters, and the : . - characters are literals, the first 2 of which are used to identify two of the optional arguments. 

Eg,
%.3d with 7 gives: 007 (or %0.3d may look more readable)

%1.4f with 12.45 gives 12.4500

N%0.4d with 12 gives N0012

%-5d with 12 gives 12_ _ _ Ie, puts padding to the right hand of number
%5d will give _ _ _12       (where _ is a space character)

T%0:0.2d%0:0.2d will give T0303 with  the value 3 
 because the index is given by 0: then it uses the first number each time



Constant expressions
______________________


'POSITION' - the post will fill this in with the current axis positions

'CENTREPOSITION' - will be changed to read the centre position of an arc move

'TOOL' - will be changed to read the current tool number

'SPINDLERPM' - will be changed to read the current spindle speed in RPM

'FEEDRATE' - will be changed to read the current feedrate value

'BILLET0' - will be changed to read the current billet size for axis 0 - same for all other axes

'SAFE0' - will be filled in with the current safe height for that axis (0) - may be overwritten by the CAM software

'DATE' - the current date will be filled in here

'TIME' _ the current time will be filled in here

'APPLICATION' - will enter the name of the CAM application that is outputting via the post processor

'SOURCEFILE' - will enter the original filename used by the CAM application (eg, dxf,stl etc..)

'MMINCHCODE' - will substitute the previously defined code for inch or metric mode - depending upon whether the post is in inch or metric mode

'TOOLDIAM' - will enter the diameter of the current tool

'LINENUM' - will enter the current linenumber string

'FIRSTAXISLETTER' - put in the first axis letter of the current move, eg if the move is to be G01 Z100 Y20 F350, then FIRSTAXISLETTER will insert 'Z'


Attachments
postfilenotepad.gif
postfilenotepad.gif (19.32 KiB) Viewed 12530 times

JamZ00
Posts: 10
Joined: Fri 13 Apr , 2012 15:50 pm
Hardware/Software: CNC Vertical Router

Re: Alter default safe height in Denford post processor file

Post by JamZ00 » Fri 12 Apr , 2013 15:12 pm

Thanks for that, I checked the z position across the 25mm sacrificial board and there is a discrepancy! must be because the cut surface of the MDF has alowed the atmospheric moisture to enter from that side.

I have been into the post file and altered the Safe2 from 5.08 to 10mm and saved. However now I have come to do a test run the macxhine says that the z axis is in motion when I try to home the axes and it's definately not in motion - the z axis displays right up through 1000mm!

Is this likeley to be related to me fiddling with the safe height or is it another fault and pureley coincidental?

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: Alter default safe height in Denford post processor file

Post by Denford Admin » Sat 13 Apr , 2013 7:44 am

Sounds like something else.
altering the z height only changes the numbers in the nc programme.
hopefully a reboot of everything has fixed it?

JamZ00
Posts: 10
Joined: Fri 13 Apr , 2012 15:50 pm
Hardware/Software: CNC Vertical Router

Re: Alter default safe height in Denford post processor file

Post by JamZ00 » Mon 15 Apr , 2013 10:41 am

We have identified the issue with the Z axis not physically moving, it turned out to be a loose pulley wheel on the drive screw..tightened the grub screw and all sorted!

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: Alter default safe height in Denford post processor file

Post by Denford Admin » Mon 15 Apr , 2013 10:54 am

Hi,
That's great, I have seen that before on a vertical router...short rapid moves will cause the shaft to slip in the clamp if it's not tightened properly.
Maybe you should lock the grub screw in place with some thread lock (Loctite) and/or another screw on top of it.

Post Reply