# Z commanded over soft limit Help!

**URL:** <https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053>\
**Category:** Everything Plasma\
**Created:** [May 11, 2023, 3:10am UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053 "2023-05-11T03:10:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ROTM](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@ROTM](https://forum.avidcnc.com/u/ROTM)\
**Post date:** [May 11, 2023, 3:10am UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/1 "2023-05-11T03:10:53Z")

</div>

Good day.  
So I got my machine up and running again…out of the blue I get Z commanded over soft limit…restart Mach 4 pierced a hole get it again. check the soft limit setting I had -8.6 to 0.  
I did lower the plasma head just below the plate and the measurement from the sensor to this is 6". so I change this in the soft limit settings …pierced 3 holes and get the error again.

In Mach4 the Gcode N170 G31.0 Z-100 F500.0

I using sheetcam to generate the gcode…any fix to this?

Thank you!

---

<div class="post-metadata">

**Author:** ![da-kengineer-meister](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@da-kengineer-meister](https://forum.avidcnc.com/u/da-kengineer-meister)\
**Post date:** [May 11, 2023, 7:35pm UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/2 "2023-05-11T19:35:02Z")

</div>

Can you provide a tiny bit more G-code? There is typically a G92 or other such that is assocaited wtih the G31 almost immediately after, although there are other ways to do it.

Maybe share enough g-code that is cutting 2x full holes and we can look at it.

---

<div class="post-metadata">

**Author:** ![pketcham](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pketcham](https://forum.avidcnc.com/u/pketcham)\
**Post date:** [May 11, 2023, 8:02pm UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/3 "2023-05-11T20:02:08Z")

</div>

Z-100?? This may be your problem. Your programmed Z position in below your established soft limit I believe. Your machine see that in the look ahead and errors out….unless your in metric.

Try jogging Z to your desired position and ‘zero your Z.’ Now edit your program line to be Z 0.0?

---

<div class="post-metadata">

**Author:** ![ROTM](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@ROTM](https://forum.avidcnc.com/u/ROTM)\
**Post date:** [May 11, 2023, 11:56pm UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/4 "2023-05-11T23:56:20Z")

</div>

Good day.  
Below the gcode.  
Funny it seems for the same file sometimes I get the error…sometimes not.

On the "Z-100?? This may be your problem. "  
This line is from the post processor in sheetcam from Avid it self.  
I have allot items to cut so it is a big problem for me 😕

– Post processor version  
local postVersion = “1.7”

–Torch on and off codes. CHANGE THE P# to match your OUTPUT#!!! P3 is for Output#3, P27 is for Output#27, etc…  
torchOnCode = " M62P3"  
torchOffCode = " M63P3"

–Code to use when referencing  
refCode=" G31.0 Z-100"

## This is the GCODE for the circle cutting

N0010 (Filename: 10mm circle test 2.tap)  
N0020 (Post processor: Avid CNC Mach4.scpost v1.7)  
N0030 (Date: 17/02/2020)  
N0040 G21 (Units: Metric)  
N0050 G53 G90 G91.1 G40  
N0060 G64 (Constant Velocity Mode - normally used with Plasma)  
N0070 (Part: 10mm circle test)  
N0080 (Operation: Inside Offset, Default, T1: Mild Steel, 16 GA, 45A, Powermax 45XP, Duramax, Shielded)  
N0090 m2020 (TARGET\_TIP\_VOLTS=115.1)  
N0100 m2020 (ESS\_DELAY\_AFTER\_ARC\_OKAY=0.1)  
N0110 G4 P0.1  
N0120 G00 X1.9404 Y8.0596  
N0130 G91 Z-0.1000  
N0140 G90  
N0150 (\<\<\<\<\<\<RESTART POINT #1\>\>\>\>\>\>)  
N0160 G31.0 Z-100 F500.0  
N0170 M3002 (Zero Z Axis - Ohmic)  
N0180 M3001 (Clear work shift)  
N0190 m2020 (HC\_WORK\_Z\_ZEROED=1)  
N0200 G4 P0.1  
N0210 G00 Z3.8100  
N0220 G4 P0.002  
N0230 M62P3  
N0240 Z3.8090  
N0250 G01 Z1.5240 F2540.0  
N0260 F99.9998  
N0270 M63P4 (_ **THC Inhibited, AD2** _)  
N0280 G02 I3.0596 J-3.0596 F69.9999  
N0290 M62P4 (+++THC Allowed, AD2+++)  
N0300 G01 F99.9998  
N0310 M63P3  
N0320 G91 G00 Z0.5000  
N0330 G90  
N0340 M3000 (Set work shift)  
N0350 G00 Z10.0000  
N0360 Z10.1000  
N0370 M30  
%

---

<div class="post-metadata">

**Author:** ![da-kengineer-meister](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@da-kengineer-meister](https://forum.avidcnc.com/u/da-kengineer-meister)\
**Post date:** [May 12, 2023, 12:30am UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/5 "2023-05-12T00:30:07Z")

</div>

That is hugely different from what I use here, although I’m using Mach-3.

The system here does the G31 to command the ohmic touch-off, but then does a G92 to set the local Z0 and then a G0 to lift up to the pierce height.

So that code is just a ton different. I bought a copy of sheet CAM but have never used it and I’m still on Mach-3 so I may not be of any help here.

I can confirm that that I use G31 with a ‘Z’ value of -10, but again that is not Mach-4.

---

<div class="post-metadata">

**Author:** ![ROTM](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@ROTM](https://forum.avidcnc.com/u/ROTM)\
**Post date:** [May 14, 2023, 4:57am UTC](https://forum.avidcnc.com/t/z-commanded-over-soft-limit-help/2053/6 "2023-05-14T04:57:04Z")

</div>

This seems to affectting the plasma side…in the past I had a similar issue with the router.  
seems to be gone…I ran the router today about 4hrs went good, laser attached to the router head good. as soon as I tried to run the plasma the first time it dropped I got the error…so in the meantime I have to run the plasma with the soft limits disabled otherwise I cannot get nothing done 😕
