#linuxcnc-devel | Logs for 2014-02-24

[01:21:10] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 6369c17 06linuxcnc 10(32 files in 3 dirs) pncconf -GTK BUILDER refactor * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=6369c17
[01:21:11] <KGB-linuxcnc> 03Chris S Morley 05pncconf_builder 554332e 06linuxcnc 10src/emc/usr_intf/pncconf/dialogs.glade 10src/emc/usr_intf/pncconf/pages.py 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/tests.py pncconf -fix live test bugs - openloop and stepper tune test * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=554332e
[01:21:11] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 97710ed 06linuxcnc 10src/emc/usr_intf/pncconf/build_HAL.py 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/tests.py pncconf -factor out mesa and parport loading wip * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=97710ed
[01:21:15] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder dc9c274 06linuxcnc 10src/emc/usr_intf/pncconf/pport2.glade pncconf -add pport test panel button * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=dc9c274
[01:21:18] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 613a1fb 06linuxcnc 10src/emc/usr_intf/pncconf/pages.py pncconf -fix parport test for pport2 * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=613a1fb
[01:21:22] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 633a0b7 06linuxcnc 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/tests.py pncconf -fix up tests to use common I/O loading code * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=633a0b7
[01:21:27] <KGB-linuxcnc> 03Chris S Morley 05pncconf_builder cc9ef87 06linuxcnc 10src/emc/usr_intf/pncconf/dialogs.glade 10src/emc/usr_intf/pncconf/pages.py 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/tests.py pncconf -live test WIP * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=cc9ef87
[01:21:31] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 28fcbb3 06linuxcnc 10src/emc/usr_intf/pncconf/private_data.py pncconf -change share/ location definition code * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=28fcbb3
[01:21:35] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 9cdb903 06linuxcnc 10src/emc/usr_intf/pncconf/pages.py 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/private_data.py 10src/emc/usr_intf/pncconf/tests.py pncconf -exculsive check fixed * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=9cdb903
[01:21:40] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 9a4c771 06linuxcnc 10src/emc/usr_intf/pncconf/pages.py 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/screen.glade pncconf -wip * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=9a4c771
[05:40:28] <jthornton> alex_joni, it seems that many are not getting the conformation e-mail. I have to e-mail them manually then manually update their profile to confirm them... can you look at the forum?
[13:00:24] <emcPT> Hello. I need some assistance. I would like to add another column in the tooltable.
[13:00:24] <emcPT> And I think I did most of the stuff so that can happen
[13:00:24] <emcPT> It is present on the editor, and so on
[14:38:58] <emcPT> I went offline after I asked a question about another column on the tooltable. If anybody replyed?
[14:39:39] <Tom_itx> not yet
[14:55:17] <cradek> it wasn't clear what your question was
[15:18:34] <emcPT> Ok. I will try to elaborate... or first I will put my kids to sleep ...
[15:24:38] <emcPT> I use linuxcnc on lathes, and one of the things that could be better is the tool representation
[15:24:49] <emcPT> as the tools are not all the same
[15:24:56] <emcPT> in shape
[15:25:15] <emcPT> So my ideia is to add to the tooltable a column called SHAPE
[15:26:26] <emcPT> so that the user could choose the tool shape. For example a part off with radius 0 will be represented without any width with the current linuxcnc
[15:26:52] <emcPT> I can represent different shapes changing the code in glcannon.py
[15:27:43] <emcPT> What I am not able to do right now is to read correctly the tool table to include another column
[15:28:16] <emcPT> I think that I did most of it, as the tcl stuff is already working
[15:29:46] <emcPT> but I am stuck in a C file (src/emc/rs274ngc/gcodemodule.cc)
[15:30:21] <emcPT> around line 530, in the function CANON_TOOL_TABLE GET_EXTERNAL_TOOL_TABLE(int pocket)
[15:31:00] <emcPT> more exacly in the line PyObject *result = callmethod(callback, "get_tool", "i", pocket);
[15:32:07] <emcPT> where I would like to debug what is being outputed by get_tool into *result
[15:32:32] <emcPT> I think I can manage to sort things out, AFTER I can correctly debug the code
[15:33:11] <emcPT> so my initial question is more: How can I debug things correcly in linux enviorment
[15:33:59] <emcPT> I use VIM for editing the files and just MAKE to compile
[15:34:08] <emcPT> what is poor
[15:35:23] <emcPT> Andy sugested some time ago in the forum the "eclipse", but I do not know if it provides debuging tools.
[15:36:00] <emcPT> My debug method is print messages to the terminal...
[16:16:22] <kwallace2> emcPT: I'm not good with C or Python. I use gedit and 'print' a lot, so I may not have anything of value to offer. I used 'grep -r get_tool * 2>/dev/null' to find any files with get_tool then compared this to the includes at the top of gcodemodule.cc. This seems to point at:
[16:16:25] <kwallace2> def get_tool(self, pocket):
[16:16:25] <kwallace2> if pocket >= 0 and pocket < len(self.tools):
[16:16:25] <kwallace2> return tuple(self.tools[pocket])
[16:16:25] <kwallace2> return -1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0
[16:17:03] <kwallace2> (in interpret.py)
[16:22:26] <kwallace2> My guess is that you could put a 'print "~~> get_tool returns ", tuple(self.tools[pocket]) ' above the first 'return', or I could be way off base.
[16:23:29] <emcPT> Thank you. I will check.
[16:28:04] <emcPT> humm, I already changed all the references to get_tool, but I only looked for them under the src directory
[16:28:14] <emcPT> so I never changed the interperter.py
[16:28:31] <emcPT> maybe it is what I needed
[16:53:01] <Connor> Anyone know anything about emc.halio or halio.so ?
[16:55:41] <emcPT> Narrowed into "return tuple(self.tools[pocket])" of interpret.py
[16:56:13] <emcPT> but I don't know where self.tools array is defined
[16:57:10] <emcPT> looked for "def tools" or "class tools" without result
[17:31:20] <kwallace2> I think this is where self.tools is created in interpret.py:class StatMixin:
[17:31:20] <kwallace2> def __init__(self, s, r):
[17:31:20] <kwallace2> self.s = s
[17:31:20] <kwallace2> self.tools = list(s.tool_table)
[17:33:10] <kwallace2> 's' is often the status python interface
[17:34:00] <kwallace2> http://linuxcnc.org/docs/html/common/python-interface.html
[17:34:39] <kwallace2> tool_table (returns tuple of tool_results) - list of tool entries. Each entry is a sequence of the following fields: id, xoffset, yoffset, zoffset, aoffset, boffset, coffset, uoffset, voffset, woffset, diameter, frontangle, backangle, orientation. The id and orientation are integers and the rest are floats.
[17:40:56] <Tom_itx> my cam uses the industry standard shapes for lathe inserts
[17:41:03] <Tom_itx> that might be a good place to start
[17:41:22] <Tom_itx> ie: TNMG433
[17:42:17] <Tom_itx> the first letter represents the shape: T triangle
[17:42:41] <Tom_itx> the first number represents the inscribed circle diameter
[17:43:29] <Tom_itx> in 1/8" increments
[17:43:38] <Tom_itx> 4 would be 4/8
[17:44:17] <Tom_itx> the last digit represents the nose radius however my cam does not use that
[17:48:42] <emcPT> my ideia is to allow several tool shapes, like squares,.... or something that the user could add their one shape.
[17:48:59] <emcPT> the standard is also nice
[17:49:34] <emcPT> but it is huge the number of shapes available
[17:49:58] <emcPT> and thank you kwallace
[17:52:58] <Tom_itx> my cam allows an angle entry as well
[17:53:07] <Tom_itx> pretty well covers all insert shapes
[17:54:19] <emcPT> Final goal would be to the user be able to draw its one shape. That would be very nice.
[17:54:38] <emcPT> Like shape = 1, is a square
[17:54:42] <Tom_itx> and non standard
[17:55:15] <emcPT> shape = 2 is round, with a long neck
[17:55:28] <Tom_itx> the letter representation of the shapes are as follows
[17:55:35] <Tom_itx> A: parallelogram 85 deg
[17:55:41] <emcPT> I know the representation
[17:55:45] <Tom_itx> B: parallelogram 82 deg
[17:55:49] <Tom_itx> etc
[17:56:06] <Tom_itx> R is round
[17:56:13] <emcPT> or I have the representation documented
[17:56:23] <Tom_itx> ok
[17:56:30] <Tom_itx> it's in any good insert catalog
[17:56:41] <Tom_itx> sanvik for example
[17:57:56] <kwallace2> I'm not involved with the tooling part of my project, but I believe we are using Redis for the tool table or at least to enhance it.
[17:58:04] <kwallace2> http://git.mah.priv.at/gitweb/emc2-dev.git/blob/f7352315a7153166518ffe6efbcd2caaee021780:/src/redis/README
[17:59:12] <Tom_itx> my opinion is that it would be good to use standard descriptions for inserts instead of creating a different one
[18:00:48] <emcPT> @kwallance and do you know where s.tool_table is loaded ?
[18:06:04] <andypugh> Interesting stuff, but not now :-)
[18:07:56] <emcPT> emc/rs274ngc/tool_parse.cc loads the tooltable
[18:08:24] <emcPT> but I miss where its passes that info into the python thing
[18:08:58] <emcPT> because in the emc/rs274ngc/tool_parse.cc, I already can read another column that I called shape
[18:09:11] <emcPT> In fact I changed the files:
[18:09:24] <emcPT> emc/rs274ngc/tool_parse.cc (shape read) emc/nml_intf/emctool.h (added shape) lib/python/rs274/glcanon.py src/emc/rs274ngc/interpmodule.cc src/emc/rs274ngc/interp_internal.hh src/emc/iotask/ioControl_v2.cc tcl/tooledit.tcl src/emc/nml_intf/emc_nml.hh src/emc/rs274ngc/interp_array.cc src/emc/rs274ngc/rs274ngc_pre.cc src/emc/rs274ngc/interp_convert.cc src/emc/nml_intf/canon.hh src/emc/rs274ngc/gcodem
[18:09:36] <emcPT> but still I am missing something
[18:10:17] <kwallace2> This is how I might interpret the above code:
[18:10:21] <kwallace2> class StatMixin:
[18:10:21] <kwallace2> def __init__(self, s, r): # __init__ so do just once, I'm getting 'self' from the calling module, s and r is passed too.
[18:10:21] <kwallace2> self.s = s # copy the s instance to make it local, so I don't have to type so much
[18:10:21] <kwallace2> self.tools = list(s.tool_table) # make a local listing of the tool status
[18:10:21] <kwallace2> The calling module probably has a linuxcnc.status import which is where the status connection might be made
[18:12:38] <kwallace2> The python interface document has this example:
[18:12:47] <kwallace2> 3. Reading LinuxCNC status Here is a Python fragment to explore the contents of the linuxcnc.stat object which contains some 8ß0+ values (run while linuxcnc is running for typical values): import sys import linuxcnc try: s = linuxcnc.stat() # create a connection to the status channel s.poll() # get current values except linuxcnc.error, detail: print "error", detail sys.exit(1) for x in dir(s): if not x.startswith('_'):
[18:24:34] <emcPT> in emc/usr_intf/axis/extensions/emcmodule.cc, it had what I was looking for: static PyStructSequence_Field tool_fields[] = {
[18:24:51] <emcPT> I will continue tomorrow. Thanks
[22:15:23] <KGB-linuxcnc> 03Chris Morley 05pncconf_builder 1176856 06linuxcnc 10src/emc/usr_intf/pncconf/pncconf.py 10src/emc/usr_intf/pncconf/private_data.py pncconf -make the 5i25 default and use internal data * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=1176856