On Sat, 2010-11-06 at 08:43 -0700, Kirk Wallace wrote: > Hello. I need to write a base thread component that does something based > on the start of the servo thread (strobe AVR data lines). For example, I > could have a base thread component that increments a counter. On the > third count, do foobar, reset the counter and wait for the next servo > thread start. I was thinking I could use the charge_pump component, but > it toggles the output, so I would reset on every other servo period. I > would also need to remember that charge_pump would need to be loaded. Is > there a cleaner way to do this? Would having two functions, one in each > thread, within the component add anything, compared to using > charge_pump? Thanks. >
I looked at the source for the edge component. It has a variable called period that isn't declared in the top portion of the component. Does that mean that it is a global variable? If so, is there a convenient source for a list of global variables? By the way, for those new to EMC2, the way I get to the source files is: Go to http://www.linuxcnc.org/ Click on "how to get it" (near the top of the body of the page) Click on "gitweb" (near the bottom of the body of the page) Click on the version number of the EMC2 you are interested in, or in my case, click on "v2.4.5" (just under the "tags" bar) Click on the word "tree" at the end of the line "summary | shortlog | log | commit | commitdiff | tree" Click on "src" (near the bottom of the listing) for omponent source files, click "hal", then "components" or use this link: http://git.linuxcnc.org/gitweb?p=emc2.git;a=tree;f=src/hal/components;h=180ce8ab8eddfe35a0aee53d66438703638797bf;hb=b5bb7beec1b342eefad29d112f3ab5d77129845f (Short URL) http://alturl.com/i3zi7 -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users