Re: [Emc-users] parameters passed to hal comps

2018-12-29 Thread Nicklas Karlsson
I am on my way to add have added a driver that works but are not ready for use 
yet so I might be able to help you but have very limited time right now.

On Sat, 29 Dec 2018 12:36:45 +0700
TJoseph Powderly  wrote:

> I read in several comp.c sources that functions in the comps get passed 
> (void *arg, long period).
> 
> I have not found docs explaining this,
> 
> but guess *arg is the 'config string',
> 
> and that period is the period of the thread the comp is attached to.
> 
> is this correct?
> 
> Thanks TomP
> 
> examples:
> 
> boss_plc.c             Plc_Refresh(void *arg, long period)
> 
> counter.c             static void capture(void *arg, long period)
> 
> debounce.c         static void debounce(void *arg, long period)
> 
> etc
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] parameters passed to hal comps

2018-12-29 Thread Dewey Garrett


> I read in several comp.c sources that functions in the comps
> get passed (void *arg, long period). 

These are typically functions setup with hal_export_funct().
The interface is described in hal.h:

https://github.com/LinuxCNC/linuxcnc/blob/2.7-hm2-encoder-raw-position/src/hal/hal.h


"hal_export_funct() makes a realtime function provided by a
component available to the system.  A subsequent call to
hal_add_funct_to_thread() can be used to schedule the
execution of the function as needed by the system.
'name' is the name of the new function.  It must be no longer
than HAL_NAME_LEN.  This is the name as it would appear in an ini
file, which does not need to be the same as the C function name.
'funct' is a pointer to the function code.  'funct' must be
the address of a function that accepts a void pointer and
a long int.  The pointer will be set to the value 'arg' below,
and the long will be set to the thread period in nanoseconds.
'arg' is a void pointer that will be passed to the function
each time it is called. ..."
-- 
Dewey Garrett



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] parameters

2011-12-13 Thread Michael Haberler
for master, I've expanded the parameters section quite a bit, and I did it in 
'G-Code Overview' for numbered and named parameters

http://www.linuxcnc.org/docs/devel/html/gcode/overview.html#_a_id_sec_parameters_a_parameters_variables_in_g_code_programs

note the named parameter stuff is applicable to master, not earlier branches

-m, 


Am 12.12.2011 um 18:43 schrieb andy pugh:

 On 12 December 2011 17:34, Ralph Stirling ralph.stirl...@wallawalla.edu 
 wrote:
 I've been studying the documentation and the source code for information on
 G-code readable/writeable parameters.  I have yet to find a good summary of
 all the defined parameters in a single place.  So far, I've found #5161-#5390
 and #5400-#5428 defined in interp_array.cc.  #5061-5070 are defined in
 interp_internal.cc, and rs274ngc_pre.cc defines #5599 to #5601 and #5399 to
 #5413.  Some of these are mentioned in the G Code Reference manual.
 Have I missed any?
 
 I think most of them are here:
 http://www.linuxcnc.org/docview/2.5/html/common/machining_center.html#_parameters_a_id_sub_parameters_a
 
 Though I agree that isn't the most obvious place to look.
 
 -- 
 atp
 The idea that there is no such thing as objective truth is, quite simply, 
 wrong.
 
 --
 Learn Windows Azure Live!  Tuesday, Dec 13, 2011
 Microsoft is holding a special Learn Windows Azure training event for 
 developers. It will provide a great way to learn Windows Azure and what it 
 provides. You can attend the event by watching it streamed LIVE online.  
 Learn more at http://p.sf.net/sfu/ms-windowsazure
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] parameters

2011-12-12 Thread andy pugh
On 12 December 2011 17:34, Ralph Stirling ralph.stirl...@wallawalla.edu wrote:
 I've been studying the documentation and the source code for information on
 G-code readable/writeable parameters.  I have yet to find a good summary of
 all the defined parameters in a single place.  So far, I've found #5161-#5390
 and #5400-#5428 defined in interp_array.cc.  #5061-5070 are defined in
 interp_internal.cc, and rs274ngc_pre.cc defines #5599 to #5601 and #5399 to
 #5413.  Some of these are mentioned in the G Code Reference manual.
 Have I missed any?

I think most of them are here:
http://www.linuxcnc.org/docview/2.5/html/common/machining_center.html#_parameters_a_id_sub_parameters_a

Though I agree that isn't the most obvious place to look.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] parameters

2011-12-12 Thread gene heskett
On Monday, December 12, 2011 12:52:25 PM andy pugh did opine:

 On 12 December 2011 17:34, Ralph Stirling ralph.stirl...@wallawalla.edu 
wrote:
  I've been studying the documentation and the source code for
  information on G-code readable/writeable parameters.  I have yet to
  find a good summary of all the defined parameters in a single place.
   So far, I've found #5161-#5390 and #5400-#5428 defined in
  interp_array.cc.  #5061-5070 are defined in interp_internal.cc, and
  rs274ngc_pre.cc defines #5599 to #5601 and #5399 to #5413.  Some of
  these are mentioned in the G Code Reference manual. Have I missed
  any?
 
 I think most of them are here:
 http://www.linuxcnc.org/docview/2.5/html/common/machining_center.html#_p
 arameters_a_id_sub_parameters_a
 
 Though I agree that isn't the most obvious place to look.

Thank you for that link Andy, I found when I scrolled up by accident to the 
previous entry, what may be the reason I have been doing my own tool 
diameter offsets in my gcode I have written.  I have never been able to get 
consistent results from a tool change operation.  The problem that may be 
the cause of the inconsistency?  I do not have
TOOL_TABLE = tooltable.tbl
such a line in my current .ini file, and may not have one in any of them!

The save operation that allows a new profile, like my-mill-test, to be 
written, apparently does not define that, ever.

Could this be construed as a bug?

I certainly was not aware that a tool could be described in that much 
detail so it will take me a bit to wrap my remaining wet ram around it, and 
to get something entered that might make sense to emc.

Unforch, my toolholders are #2 morse collets in that teeny mill, so the 
working lengths, unless measured after tightening the draw bolt each time, 
are completely random.

And that brings up a question?:  Do we have a function that could be 
written into the gcode after a tool change command that would probe the 
tool like G38.2 does and record that length offset and use it till the next 
run restart, or till the next tool change?  That would open the door to my 
being able to switch cutting mills mid-job, and would expand the view of 
what I can do considerably.

Is there a link that allows this whole thing to be downloaded as a pdf? 
Ahh, I think I found them, but broken into user, hal etc.  My dead tree 
'manual' stuff in the shop is about a year old  likely out of date as I 
have been letting the package manager update my emc install each time a new 
release is built.

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: http://coyoteden.dyndns-free.com:85/gene
If God wanted us to have a President, He would have sent us a candidate.
-- Jerry Dreshfield

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users