Re: [Emc-users] Fixed Dwell

2012-04-23 Thread gene heskett
On Monday, April 23, 2012 01:54:59 PM dave did opine:
> > >> 
> > >> Viesturs
> 
> G4 P 
> 
> is meant to delay movement while the spindle gets up to speed.
> 
> Dave

Which works fine Dave, BUT must be written into every piece of code that 
will be executed.  Far better IMO to configure linuxcnc, in the hal file, 
to do it automatically so there aren't any "I forgot" surprises.  And some 
snippets posted here in the last days would appear to handle that nicely, 
either with a fixed delay, or even by a spindle_at_speed signal if a valid 
one can be derived from the hardware itself.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: 
An American's a person who isn't afraid to criticize the president but is
always polite to traffic cops.

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-23 Thread dave
On Sun, 22 Apr 2012 07:25:26 +0100
Mike Bennett  wrote:

> Hi
> 
> I'm nearing the end of building a DIY gantry router.  The router I'm
> using has soft start, so takes several seconds to come up to speed.
> I realise I could add dwell commands to the G-Code, but is it
> possible to add a fixed dwell to Linux CNC after spindle start.
> 
> From reading other posts I see that HAL has a spindle-at-speed input
> that is intended to be used with encoders, but could it be used with
> a timer?
> 
> Mike
> 
> 
> 
> On 22 Apr 2012, at 00:12, charles green  wrote:
> 
> > optimum value for planning ahead for a possible stop or maximum
> > acceleration change:  take current feed for current block and
> > maximum possible accel of machine to get distance required for
> > stop.  then next N blocks that cover that distance, and apply
> > appropriately modified feeds to them.
> > 
> > think of a gcode file as a matrix, each row would correspond to a
> > block, the first several columns are all the various gcodes, the
> > next several are all the various x1..xn axes, then several columns
> > covering offset vectors, feeds, spindle, various Ms, etc.  then
> > just tack on another column that is the achievable feed.  when file
> > is loaded to controller, it gets scanned to fill in the values in
> > the actual feetrate column.  maybe there is another similar column
> > for actual spindle speed that gets filled in similarly, in case
> > it's being used like a c axis to get coordinated revolution.
> > 
> > at program execution, the calculated realistic values columns are
> > used to generate motion. soft program stops during execution may
> > run out a few blocks.  estops are an emergency situation, so who
> > knows..  single stepping is usual one line check based on stop at
> > end of block.
> > 
> > are there not already some 'hidden' columns x1'..xn' that result
> > from cutter radius compensation?
> > 
> > i guess i'm thinking of linear programs, so in the case of loops
> > and subroutine calls, the end result is a much longer list of
> > actually executed blocks.  maybe it never ends (= bad gcode).
> > probing would also not fit the scheme very well - maybe consider
> > probing blocks to be bounded in the code by stops?  or, what if
> > there were choices between more flavors of operation:  advanced
> > lookahead flavor would not allow nuts in it like conditional loops
> > or surprise probings; crazy probe scanner routine mode wouldnt have
> > the texture advantage of nice feedrate smoothness.
> > 
> > 
> > 
> > --- On Sat, 4/21/12, Viesturs Lācis 
> > wrote:
> > 
> >> From: Viesturs Lācis 
> >> Subject: Re: [Emc-users] Trajectory planning and other topics from
> >> a EMC(LinuxCNC) newbie (TheNewbie) To: "Enhanced Machine
> >> Controller (EMC)"  Date:
> >> Saturday, April 21, 2012, 12:58 PM 2012/4/21 Jon Elson
> >> :
> >>> 
> >>> The real problem I see is that RATIONAL G-code that was
> >> correctly written to
> >>> perform a particular operation cannot be executed as
> >> fast as the machine and
> >>> drives COULD allow it to go, due to the stop on next
> >> block requirement.
> >> 
> >> I agree.
> >> What I see the big issue for solving this in trajectory
> >> planner or
> >> whatever _inside_ LinuxCNC is that I do not see, how to
> >> determine by
> >> some hard facts, what is the best way to determine the
> >> lookup amount.
> >> Certain number of lines or a certain travel distance? Ok,
> >> when the
> >> method is chosen, how to determine, what is the optimum
> >> value?
> >> 
> >> That is why I am in favor of adding a separate filter, which
> >> would
> >> take the code and rephrase it to what is really in there -
> >> either arcs
> >> or splines/nurbs. In this case the file would be processed,
> >> when
> >> loaded (I have not really understood, when it would be
> >> processed in
> >> the first variant - also on loading or on the fly, when it
> >> is
> >> executed), so it definitely would not affect realtime
> >> performance,
> >> because the file would not be executed at that time. I think
> >> that
> >> waiting 10-20 seconds for the PC to recalculate the path and
> >> find,
> >> what curves would fit the existing profile, defined by tiny
> >> G1s.
> >> 
> >> Viesturs
> >> 

G4 P 

is meant to delay movement while the spindle gets up to speed. 

Dave
> >> --
> >> For Developers, A Lot Can Happen In A Second.
> >> Boundary is the first to Know...and Tell You.
> >> Monitor Your Applications in Ultra-Fine Resolution. Try it
> >> FREE!
> >> http://p.sf.net/sfu/Boundary-d2dvs2
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >> 
> > 
> > --
> > For Developers, A Lot Can Happen In A Second.
> > Boundary is the first to Know...and Tell You.
> 

Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Erik Friesen
I use an M0, or optional pause, because I want to make sure the router is
running, at a known position before heading into main body of code.  Its
too easy to leave the switch off.

On Sun, Apr 22, 2012 at 6:11 AM, Mike Bennett  wrote:

> I chose to put the lines in the custom HAL file as I still want to use the
> stepconfig wizard for tuning max speed and acceleration.
>
> I take your point about the comments.
>
> Mike
>
> On 22 Apr 2012, at 11:00, Viesturs Lācis  wrote:
>
> > 2012/4/22 Mike Bennett :
> >> Brilliant
> >>
> >> I've added the following to my custom.hal file and it works
> >
> > You can safely put these lines in Your main HAL file as well. I
> > usually have everything in one HAL file. They can be up to 400 lines
> > long...
> > Putting comments is very recommended, otherwise few months or even
> > years later it might be difficult remembering, what does each line
> > exactly mean, especially, if some complicated arrangements are
> > created.
> >
> >> You've made my first venture into HAL very easy
> >
> > Because HAL _is_ easy :)
> > Your situation is easy to solve, but there are many situations, when
> > lots of different HAL components need to be used together to perform
> > particular function. And writing Your own custom HAL component is an
> > alternative, which I find more difficult, because it actually requires
> > some programming skills.
> >
> > Viesturs
> >
> >
> --
> > For Developers, A Lot Can Happen In A Second.
> > Boundary is the first to Know...and Tell You.
> > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> > http://p.sf.net/sfu/Boundary-d2dvs2
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Mark Wendt (Contractor)
The comments also help when you're having problems and you post your 
files so other folks can more easily figger out what's going on.  ;-)

Mark

On 4/22/2012 6:11 AM, Mike Bennett wrote:
> I chose to put the lines in the custom HAL file as I still want to use the 
> stepconfig wizard for tuning max speed and acceleration.
>
> I take your point about the comments.
>
> Mike
>
> On 22 Apr 2012, at 11:00, Viesturs Lācis  wrote:
>
>
>> 2012/4/22 Mike Bennett:
>>  
>>> Brilliant
>>>
>>> I've added the following to my custom.hal file and it works
>>>
>> You can safely put these lines in Your main HAL file as well. I
>> usually have everything in one HAL file. They can be up to 400 lines
>> long...
>> Putting comments is very recommended, otherwise few months or even
>> years later it might be difficult remembering, what does each line
>> exactly mean, especially, if some complicated arrangements are
>> created.
>>
>>  
>>> You've made my first venture into HAL very easy
>>>
>> Because HAL _is_ easy :)
>> Your situation is easy to solve, but there are many situations, when
>> lots of different HAL components need to be used together to perform
>> particular function. And writing Your own custom HAL component is an
>> alternative, which I find more difficult, because it actually requires
>> some programming skills.
>>
>> Viesturs
>>
>> --
>> For Developers, A Lot Can Happen In A Second.
>> Boundary is the first to Know...and Tell You.
>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>> http://p.sf.net/sfu/Boundary-d2dvs2
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>  
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Mike Bennett
I chose to put the lines in the custom HAL file as I still want to use the 
stepconfig wizard for tuning max speed and acceleration.

I take your point about the comments.

Mike

On 22 Apr 2012, at 11:00, Viesturs Lācis  wrote:

> 2012/4/22 Mike Bennett :
>> Brilliant
>> 
>> I've added the following to my custom.hal file and it works
> 
> You can safely put these lines in Your main HAL file as well. I
> usually have everything in one HAL file. They can be up to 400 lines
> long...
> Putting comments is very recommended, otherwise few months or even
> years later it might be difficult remembering, what does each line
> exactly mean, especially, if some complicated arrangements are
> created.
> 
>> You've made my first venture into HAL very easy
> 
> Because HAL _is_ easy :)
> Your situation is easy to solve, but there are many situations, when
> lots of different HAL components need to be used together to perform
> particular function. And writing Your own custom HAL component is an
> alternative, which I find more difficult, because it actually requires
> some programming skills.
> 
> Viesturs
> 
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Viesturs Lācis
2012/4/22 Mike Bennett :
> Brilliant
>
> I've added the following to my custom.hal file and it works

You can safely put these lines in Your main HAL file as well. I
usually have everything in one HAL file. They can be up to 400 lines
long...
Putting comments is very recommended, otherwise few months or even
years later it might be difficult remembering, what does each line
exactly mean, especially, if some complicated arrangements are
created.

> You've made my first venture into HAL very easy

Because HAL _is_ easy :)
Your situation is easy to solve, but there are many situations, when
lots of different HAL components need to be used together to perform
particular function. And writing Your own custom HAL component is an
alternative, which I find more difficult, because it actually requires
some programming skills.

Viesturs

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Mike Bennett
Brilliant

I've added the following to my custom.hal file and it works

loadrt timedelay count=1
addf timedelay.0 servo-thread

setp timedelay.0.on-delay 10
setp timedelay.0.off-delay 0

net spindle-on => timedelay.0.in
net spindle-ready <= timedelay.0.out
net spindle-ready => motion.spindle-at-speed

You've made my first venture into HAL very easy

Mike



On 22 Apr 2012, at 09:22, Viesturs Lācis  wrote:

> 2012/4/22 Mike Bennett :
>> Is "timedelay" a Linux CNC module that can be triggered by a spindle start 
>> command?
> 
> It can be triggered by whatever You need.
> IMHO motion.spindle-on is most appropriate for Your situation.
> 
>> Where should I look for documentation on this?
> 
> http://www.linuxcnc.org/docs/devel/html/man/man9/timedelay.9.html
> 
> load the module:
> loadrt timedelay [count = 1]
> 
> attach it to servo thread
> addf timedelay.0 servo-thread
> 
> connect to spindle pins:
> timedelay.0.in -> motion.spindle-on
> timedelay.0.out -> motion.spindle-at-speed
> 
> set on and/or off delays (set it to zero, if not needed):
> setp timedelay.0.on-delay 3(or whatever time in seconds You need)
> setp timedelay.0.off-delay 0
> 
> Viesturs
> 
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Viesturs Lācis
2012/4/22 Mike Bennett :
> Is "timedelay" a Linux CNC module that can be triggered by a spindle start 
> command?

It can be triggered by whatever You need.
IMHO motion.spindle-on is most appropriate for Your situation.

> Where should I look for documentation on this?

http://www.linuxcnc.org/docs/devel/html/man/man9/timedelay.9.html

load the module:
loadrt timedelay [count = 1]

attach it to servo thread
addf timedelay.0 servo-thread

connect to spindle pins:
timedelay.0.in -> motion.spindle-on
timedelay.0.out -> motion.spindle-at-speed

set on and/or off delays (set it to zero, if not needed):
setp timedelay.0.on-delay 3(or whatever time in seconds You need)
setp timedelay.0.off-delay 0

Viesturs

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Mike Bennett
Is "timedelay" a Linux CNC module that can be triggered by a spindle start 
command?

Where should I look for documentation on this?

Mike



On 22 Apr 2012, at 08:22, Viesturs Lācis  wrote:

> 2012/4/22 Mike Bennett :
>> 
>> From reading other posts I see that HAL has a spindle-at-speed input that is 
>> intended to be used with encoders, but could it be used with a timer?
> 
> Exactly! It may be intended for encoders, but You are the one to
> adjust this point...
> You can link it to whatever You need, which tells LinuxCNC that
> machine is ready for work - it can be timer, it can be external button
> for You to press, it can be whatever You need. In one of my machines I
> have several inputs (from VFD , when VFD thinks that spindle is at
> speed, from air pressure sensor - pneumatics hold the workpiece at
> place and I think that there were one or two more) through "and2"
> modules linked to spindle-at-speed.
> 
> I think that "timedelay" module is the one for this situation.
> 
> Viesturs
> 
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fixed Dwell

2012-04-22 Thread Viesturs Lācis
2012/4/22 Mike Bennett :
>
> From reading other posts I see that HAL has a spindle-at-speed input that is 
> intended to be used with encoders, but could it be used with a timer?

Exactly! It may be intended for encoders, but You are the one to
adjust this point...
You can link it to whatever You need, which tells LinuxCNC that
machine is ready for work - it can be timer, it can be external button
for You to press, it can be whatever You need. In one of my machines I
have several inputs (from VFD , when VFD thinks that spindle is at
speed, from air pressure sensor - pneumatics hold the workpiece at
place and I think that there were one or two more) through "and2"
modules linked to spindle-at-speed.

I think that "timedelay" module is the one for this situation.

Viesturs

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Fixed Dwell

2012-04-21 Thread Mike Bennett
Hi

I'm nearing the end of building a DIY gantry router.  The router I'm using has 
soft start, so takes several seconds to come up to speed.  I realise I could 
add dwell commands to the G-Code, but is it possible to add a fixed dwell to 
Linux CNC after spindle start.

From reading other posts I see that HAL has a spindle-at-speed input that is 
intended to be used with encoders, but could it be used with a timer?

Mike



On 22 Apr 2012, at 00:12, charles green  wrote:

> optimum value for planning ahead for a possible stop or maximum acceleration 
> change:  take current feed for current block and maximum possible accel of 
> machine to get distance required for stop.  then next N blocks that cover 
> that distance, and apply appropriately modified feeds to them.
> 
> think of a gcode file as a matrix, each row would correspond to a block, the 
> first several columns are all the various gcodes, the next several are all 
> the various x1..xn axes, then several columns covering offset vectors, feeds, 
> spindle, various Ms, etc.  then just tack on another column that is the 
> achievable feed.  when file is loaded to controller, it gets scanned to fill 
> in the values in the actual feetrate column.  maybe there is another similar 
> column for actual spindle speed that gets filled in similarly, in case it's 
> being used like a c axis to get coordinated revolution.
> 
> at program execution, the calculated realistic values columns are used to 
> generate motion. soft program stops during execution may run out a few 
> blocks.  estops are an emergency situation, so who knows..  single stepping 
> is usual one line check based on stop at end of block.
> 
> are there not already some 'hidden' columns x1'..xn' that result from cutter 
> radius compensation?
> 
> i guess i'm thinking of linear programs, so in the case of loops and 
> subroutine calls, the end result is a much longer list of actually executed 
> blocks.  maybe it never ends (= bad gcode).  probing would also not fit the 
> scheme very well - maybe consider probing blocks to be bounded in the code by 
> stops?  or, what if there were choices between more flavors of operation:  
> advanced lookahead flavor would not allow nuts in it like conditional loops 
> or surprise probings; crazy probe scanner routine mode wouldnt have the 
> texture advantage of nice feedrate smoothness.
> 
> 
> 
> --- On Sat, 4/21/12, Viesturs Lācis  wrote:
> 
>> From: Viesturs Lācis 
>> Subject: Re: [Emc-users] Trajectory planning and other topics from a 
>> EMC(LinuxCNC) newbie (TheNewbie)
>> To: "Enhanced Machine Controller (EMC)" 
>> Date: Saturday, April 21, 2012, 12:58 PM
>> 2012/4/21 Jon Elson :
>>> 
>>> The real problem I see is that RATIONAL G-code that was
>> correctly written to
>>> perform a particular operation cannot be executed as
>> fast as the machine and
>>> drives COULD allow it to go, due to the stop on next
>> block requirement.
>> 
>> I agree.
>> What I see the big issue for solving this in trajectory
>> planner or
>> whatever _inside_ LinuxCNC is that I do not see, how to
>> determine by
>> some hard facts, what is the best way to determine the
>> lookup amount.
>> Certain number of lines or a certain travel distance? Ok,
>> when the
>> method is chosen, how to determine, what is the optimum
>> value?
>> 
>> That is why I am in favor of adding a separate filter, which
>> would
>> take the code and rephrase it to what is really in there -
>> either arcs
>> or splines/nurbs. In this case the file would be processed,
>> when
>> loaded (I have not really understood, when it would be
>> processed in
>> the first variant - also on loading or on the fly, when it
>> is
>> executed), so it definitely would not affect realtime
>> performance,
>> because the file would not be executed at that time. I think
>> that
>> waiting 10-20 seconds for the PC to recalculate the path and
>> find,
>> what curves would fit the existing profile, defined by tiny
>> G1s.
>> 
>> Viesturs
>> 
>> --
>> For Developers, A Lot Can Happen In A Second.
>> Boundary is the first to Know...and Tell You.
>> Monitor Your Applications in Ultra-Fine Resolution. Try it
>> FREE!
>> http://p.sf.net/sfu/Boundary-d2dvs2
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>> 
> 
> --
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
For De