Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: rubes on November 26, 2017, 06:23:25 PM

Title: G4 P0...Parameter number out of range
Post by: rubes on November 26, 2017, 06:23:25 PM
I'm using the J tech Laser post tool with inkscape...and it inserts G4 Px delays to let the laser startup before moves, etc.
However, they are also inserting G4 P0 for some reason, and Mach says that is a "Parameter number out of range".
It does seem silliy to insert a delay with 0 time, so I dont know why they are doing it (I have a separate email in to them on that), but shouldn't it still work?
I found this Mach g-code reference, that states there will be an error if the number is negative...but 0 is not negative :-)
https://machmotion.com/cnc-info/g-code.html#G4_Dwell_ (https://machmotion.com/cnc-info/g-code.html#G4_Dwell_)
So other than post processing my post processed file and changeing all the P0 to P10 (P1 still gives the error, but 10 or higher dont), is there some setting I'm missing?
Title: Re: G4 P0...Parameter number out of range
Post by: smurph on November 26, 2017, 06:57:21 PM
G4 can only output a dwell that is at least as long as your motion controller's time slice.  Most are 1 millisecond.  Giving a P word WITHOUT a decimal states milliseconds.  e.g. G04P1 would be 1 millisecond with G04P1. (decimal at end) would be 1 second.  So it sounds like your motion controller has a time slice larger than 1 millisecond. 

Yeah, G04P0 isn't valid.  The docs should mention it has to be a positive number above 0.

Steve
Title: Re: G4 P0...Parameter number out of range
Post by: rubes on November 26, 2017, 07:19:00 PM
OK...thanx!
when all the references I found said must be positive number, I ass u me 'd 0 should be ok.
we'll see what J tech has to say, as they seem to have alot of happy users.
I think maybe grbl ignores the error.