Hello Guest it is November 30, 2021, 08:11:13 AM

### Author Topic: Probably simple but...(G-Code help)  (Read 17534 times)

0 Members and 1 Guest are viewing this topic.

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #10 on: January 11, 2016, 06:41:16 AM »
Here's how i see it working, this version is untested yet.

G28.1 finds the surface

I know that at the point the probe switch trips, there is a fixed gap between my torch and the metal of whatever I set in the offset box so lets just tell the DRO what the gap is i.e. it's current position, no need to be zeroing and going up and down, just tell it where it is.

The double inc/abs changes are because i have no idea what will happen if i probe when in incremental mode as i only ever run in abs mode, may work, may not.
I figured if it does no harm then just switch back and forth.

The G04's are dubious, without the first one it makes my Z motor screech for some unknown reason, maybe trying to move the Z at the current rapid speed which it cannot do??? Is there a "F" parameter for the probing, maybe throwing in a F1000 would cure it?

#### robertspark

• 596
##### Re: Probably simple but...(G-Code help)
« Reply #11 on: January 11, 2016, 07:26:15 AM »
the g28.1 home co-ords are set by the lower highlighted box on the left hand side and the approach speed is done by the boxes on the right hand size main table.

Go >>> config (top line) >>> Homing & Limits
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #12 on: January 11, 2016, 07:46:38 AM »
Thanks but,

The speed I can see and understand but what effect / purpose does "G28 Home Location Coordinates" have or do ??

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #13 on: January 11, 2016, 08:04:38 AM »
Found it, not applicable as its a plasma and Z home is always referenced to the top of the metal at the point of cut not a fixed homing location.

#### robertspark

• 596
##### Re: Probably simple but...(G-Code help)
« Reply #14 on: January 11, 2016, 08:10:48 AM »
You are using G28.1
G28 is slightly different.

G28 I believe goes back to the home position (which are the home offset co-ordinates you enter into the boxes)

G28.1 goes in the direction of the home position and and zero's the axis.  (zero is not quite right as it inputs the offset once tripping the home switch ... but you get the idea).

So... G28 just goes there, (slows down at the "slow zone" and moves at the jog speed) ...
G28.1 finds the home position using the home switches (at the jog speed).

Official definition here:

A home position is defined (by parameters 5161-5166). The parameter values are in terms of the absolute coordinate system, but are in unspecified length units.

To return to home position by way of the programmed position, program
G28 X~ Y~ Z~ A~ B~ C~ (or use G30). All axis words are optional. The path is made by a traverse move from the current position to the programmed position, followed by a traverse move to the home position. If no axis words are programmed, the intermediate point is the current point, so only one move is made.

G28.1 Reference Axis
Program G28.1 X~ Y~ Z~ A~ B~ C~ to reference the given axes. The axes will move at the current feed rate towards the home switch(es), as defined by the Configuration. When the absolute machine coordinate reaches the value given by an axis word then the feed rate is set to that defined by Configure>Config Referencing. Provided the current absolute position is approximately correct, then this will give a soft stop onto the reference switch(es).

Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #15 on: January 11, 2016, 08:54:38 AM »
This might be the clue for the Z motor screech...

"The axes will move at the current feed rate towards the home switch(es)"

My current F rates are way higher than the Z can handle, maybe i should pull the G04 P0 out and put an F1000 in there??
Z is limited to 1300mm/min max

#### robertspark

• 596
##### Re: Probably simple but...(G-Code help)
« Reply #16 on: January 11, 2016, 09:08:41 AM »
The problem with plasma cutters and torch height control, is the THCUP and THCDN commands shunt the z up and down at the maximum z axis velocity * THC Correction Speed (%) [DRO25]

The best (neatest) button / LED / DRO guide or table I found is this one:

(hope the link works).
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #17 on: January 11, 2016, 09:39:32 AM »
Thanks for the link, got that one

Yes the THC is a bit aggressive but needs to be really. In my case though the screech was when doing a G28.1 so could well be just the wrong the feed rate somewhere and flushing the buffer with the G04 P0 cures it?

I will try F1000 and no G04 see what happens

#### BR549

• 6,952
##### Re: Probably simple but...(G-Code help)
« Reply #18 on: January 11, 2016, 12:08:29 PM »
Robert you are missing teh point with plasma on accelleration and the speed of teh Z.  With a plasma mcahine that cuts in the range of 200 IPM you MUST set the axis acceleration values as high as possible to help prevent rounding of teh corners. Cutting at low speed 20-30ipm it is not a probl;em but at 200+ is is a big problem.

The Z HAS to use a slap and go method because with an acceleration curve the event would be over before teh Z could move far enough faste enough to envoke a change.   The process would lag way behind the events.

The is NOTHING wrong with it and is only limited by what speed can be used without loss of steps OR you run it fast enough to create an overrun in each direction which causes a sewing machine effect in teh Z axis. THAT would depend on how fast teh THC can react to make corrections.

NOW as to the Z homing speed there is no way to run the Z faster than the Axis parameter values using the G28.1 Ref Home.  The machine will only run as fast as the max vel and acceleration will let it in both G0 and G1. You can set G1 as fast as you like BUT it will not use over the Max setting for G0.

G28.1 can play a dual roll. It simply sends the machine back to the switches, trips it then backs off the switch and CAN set an offset position or simply leave it at Zero.  OR simply use a predefined position.  The G30 will always send it back to the switch position.  Those 2 processes are backwards to a normal Fanuc based CNC where G30 would be the variable position and G28 the exact home switch position.

With THC control ON there is no such thing as max Z vel. THere is only a settable  base speed based on a percent of Rapid speed.  The Z in THC mode can not even get close to teh Max Vel setting as defined in setup  Normally it is about 25% as the fastest useable speed and that is because of teh slap and go event. In that motion the Acceleration is the KEY value not Vel. Most moves are only going to be a micro move anyway so there is really no way to reach MAX vel on each commanded move.

THe CNC plasma cutting process is ALL about constant velocities when cutting  and acceleration is KING.

Just a thought, (;-) TP

« Last Edit: January 11, 2016, 12:23:29 PM by BR549 »

#### Davek0974

• 2,607
##### Re: Probably simple but...(G-Code help)
« Reply #19 on: January 11, 2016, 02:32:23 PM »
Thanks TP but it only confuses my issue more - I have a subroutine that calls G28.1 as listed below, if I remove the G04 P.0 line I get a short screech from the Z motor like its being told to move fast with no acceleration - the same as setting the Z rate way too high and slapping the motor with a move.

WITH the G04 P.0 line in there it works perfectly.

G91 (switch to incremental mode)
G01 X28.00 Y4.00 F6000 (position probe switch)
G90 (switch to absolute mode)
#15239=1 (this var is monitored by a brain and triggers the probe cylinder)
G04 P0
G28.1 Z5.000 (probe the surface)
G92 Z#15045 (apply the probe switch offset from settings screen DRO)
#15239=0 (raise the probe)
G04 P0.4 (allow the probe to retract before moving or we drag it along the plate)
G91 (switch to incremental mode)
G01 X-28.00 Y-4.00 F6000 (put the axes back to where we came from)
G90 (switch to absolute mode)
M99
%
« Last Edit: January 11, 2016, 02:34:48 PM by Davek0974 »