Back
[00:02:48] -!- sumpfralle1 has quit [Read error: Connection reset by peer]
[00:07:23] -!- adb [adb!~IonMoldom@178.211.237.94] has joined #linuxcnc-devel
[00:07:24] -!- tjb1 has quit [Ping timeout: 256 seconds]
[00:07:24] tjb1_ is now known as tjb1
[00:07:47] -!- RagingComputer has quit [Ping timeout: 246 seconds]
[00:10:22] Guest92366 is now known as frewsxcv
[00:10:26] -!- frewsxcv has quit [Changing host]
[00:10:43] -!- hashfail has quit [Ping timeout: 264 seconds]
[00:12:17] -!- tjb1 has quit [Ping timeout: 252 seconds]
[00:14:55] -!- stsydow has quit [Quit: Leaving]
[00:19:25] -!- Keknom has quit [Quit: Leaving.]
[00:24:31] -!- tjb1 has quit [Ping timeout: 252 seconds]
[00:24:31] tjb1_ is now known as tjb1
[00:28:55] -!- tjb1 has quit [Ping timeout: 252 seconds]
[00:38:40] -!- sumpfralle has quit [Read error: Connection reset by peer]
[00:39:43] -!- sumpfralle1 has quit [Read error: Connection reset by peer]
[00:42:31] -!- asdfasd has quit [Ping timeout: 264 seconds]
[00:47:02] -!- ravenlock has quit [Read error: Connection reset by peer]
[00:47:37] -!- tjb1 has quit [Ping timeout: 252 seconds]
[00:48:10] -!- tjb1 has quit [Client Quit]
[00:52:52] -!- adb has quit [Remote host closed the connection]
[01:16:55] -!- andypugh has quit [Quit: andypugh]
[01:22:07] -!- c-bob has quit [Ping timeout: 264 seconds]
[01:26:16] -!- BJfreeman has quit [Quit: had a good time]
[02:09:40] -!- Tecan has quit [Quit: Live Long And Phosphor!]
[02:33:24] -!- fiesh_ has quit [Ping timeout: 245 seconds]
[03:27:00] -!- tjb1 has quit [Quit: tjb1]
[03:36:05] -!- tjb1 has quit [Client Quit]
[03:39:14] -!- RagingComputer has quit [Ping timeout: 245 seconds]
[04:27:07] -!- sumpfralle has quit [Ping timeout: 246 seconds]
[04:48:31] -!- Loetmichel has quit [Ping timeout: 252 seconds]
[04:49:42] -!- grandixximo has quit [Ping timeout: 256 seconds]
[04:55:51] -!- Tecan has quit [Changing host]
[05:02:10] -!- Fox_Muldr has quit [Ping timeout: 256 seconds]
[05:30:27] -!- ve7it has quit [Remote host closed the connection]
[05:33:36] -!- KimK has quit [Quit: Leaving]
[05:47:41] _BJfreeman is now known as BJfreeman
[05:47:59] -!- mal`` has quit [Ping timeout: 246 seconds]
[05:49:26] -!- mal`` [mal``!~mal``@li125-242.members.linode.com] has joined #linuxcnc-devel
[05:53:21] -!- jepler_ [jepler_!~jepler@emc/developer/pdpc.professional.jepler] has joined #linuxcnc-devel
[05:54:42] -!- jepler has quit [Remote host closed the connection]
[05:54:42] -!- Spida has quit [Write error: Broken pipe]
[05:54:42] -!- ssi has quit [Write error: Broken pipe]
[05:54:49] Spida_ is now known as Spida
[05:54:57] -!- ybon has quit [Ping timeout: 361 seconds]
[06:00:09] -!- GJdan has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
[06:13:50] -!- jfire has quit [Quit: Leaving.]
[06:23:18] -!- jpk has quit [Ping timeout: 252 seconds]
[06:34:12] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[06:41:17] -!- evokanevo [evokanevo!~evokanevo@c-67-165-114-108.hsd1.wa.comcast.net] has joined #linuxcnc-devel
[06:44:08] <evokanevo> I hope this is the right place to ask - anyway, I'm trying to write a custom M-code in C and not finding any examples. I only see examples of how to do this in bash. I want to issue a simple command like "M64 P0" for example.
[06:46:05] <evokanevo> In the AXIS gui I can run the M-code with "M102 P... Q..." but I don't know how to get the MOTION or IO task to do anything as a result of what I'm doing in my M102 executable.
[06:52:28] -!- FinboySlick has quit [Quit: Leaving.]
[06:53:22] -!- shurshur has quit [Ping timeout: 252 seconds]
[07:33:17] <mhaberler> eovkaneva: please explain what you are trying to do - are you trying to redefine 'M64 P0' to look like 'M102'?
[07:39:28] -!- BJfreeman has quit [Quit: had a good time]
[07:54:59] -!- stsydow has quit [Remote host closed the connection]
[08:02:40] <evokanevo> hey mhaberler
[08:02:49] <mhaberler> hey
[08:03:01] <evokanevo> i wrote a c-file M102.c, compiled it to M102
[08:03:18] <mhaberler> pastebin code
[08:03:20] <evokanevo> I would like this executable to generate further M-commands
[08:06:03] <mhaberler> please pastebin your M102.c to say hastebin.com, I cannot guess it
[08:06:22] <evokanevo> yes i'm doing that now
[08:06:25] <mhaberler> ok
[08:07:47] <evokanevo> http://pastebin.com/pbe07wE9
[08:08:41] <evokanevo> I am trying to manipulate digital IO signals using M-codes M64 and M65 from my M102 executable.
[08:08:43] <mhaberler> ok, so thats a program which prings M6x Py on stdout
[08:09:02] <evokanevo> yes. initially i thought that the output was piped back to the interpreter.
[08:09:09] <mhaberler> no
[08:09:43] <mhaberler> whats the point in doing that instead of doing it in the interp, say a mxxxx subroutine? I dont understand it
[08:10:34] <mhaberler> external shell scripts are for something which you need to do at the shell level, using it as a G-code subroutine isnt part of that use case
[08:11:28] <evokanevo> fair enough
[08:11:44] <mhaberler> what is it what you are trying to do?
[08:12:23] <evokanevo> in general, i would like to know how I can get this executable to make *anything* happen
[08:12:36] <mhaberler> 'anything' being gcode?
[08:12:50] <evokanevo> i'm new to this - either gcode or modify parameters/signals
[08:13:13] <evokanevo> do i just have to run "halcmd setp ..." or is there an API by which i do this
[08:13:35] <mhaberler> if you call an M1xx you are _outside_ the interpreter, and you cannot pass back gcode to have it executed that way
[08:13:43] <evokanevo> ok
[08:14:18] <mhaberler> yes, halcmd setp is one way to use it, but why dont you just define an oword subroutine and wiggle the HAL pins there?
[08:14:22] <mhaberler> M1xx is the wrong instrument for gcode subs
[08:15:00] <evokanevo> yeah but eventually i'll probably do more complicated stuff. i just want to know how i can have my own code interact with the system.
[08:15:11] <mhaberler> use oword subroutines
[08:15:48] <evokanevo> ok - that's still all in g-code land though right?
[08:16:01] <mhaberler> well thats what you are trying to achieve, isnt it?
[08:16:46] <mhaberler> you print 'M6x Py' - that is supposed to be gcode, so why dont you stay in the gcode environmemt to start with and use a subroutine?
[08:17:00] <evokanevo> yes, this is a simple example that i hope to move past
[08:17:00] <mhaberler> a M1xx is for stuff which you _cannot_ do with gcode
[08:17:33] <evokanevo> i would like to write programs in C that modify pins and, if possible, issue further gcodes
[08:17:53] <evokanevo> so i would like to know 1) do i modify pins in M-codes via "halcmd" or is there an API?
[08:18:05] <mhaberler> there is no point in using C for this
[08:18:36] <evokanevo> i do appreciate your help, but i think that's besides the point
[08:19:10] <mhaberler> if you are trying to extend the language, you need to stay within the language; your options are a) oword subroutines and call them with 'o<subname> call' b) wrap them up in a remapped code
[08:20:08] <evokanevo> if i understand correctly, the remapped code is what i'm doing. i just want to know what the methods are that allow remapped code to interact with back with the system
[08:20:18] <mhaberler> no it is no
[08:20:19] <mhaberler> not
[08:20:46] <mhaberler> there is a whole manual section on this, and M1xx is a completely different mechanism
[08:21:37] <mhaberler> but then a remapped code is just a polished way of calling a oword subroutine
[08:22:30] <mhaberler> M1xx is a shell escape and nothing else, it doesnt have anything to do with language extension, and you cant generate gcode in there and hope to have it executed
[08:22:48] <mhaberler> suggestion: wrap what your trying to do in a oword sub
[08:23:16] <mhaberler> when that works, read
http://www.linuxcnc.org/docs/devel/html/remap/structure.html and work through the example here:
[08:23:29] <evokanevo> everything there suggests python
[08:24:07] <evokanevo> and python APIs. is there a C/C++ alternative?
[08:24:17] <mhaberler> http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=tree;f=configs/sim/remap/getting-started;h=f636b1c8c25dc574ca1c3541b952aab5ecf1e4e7;hb=refs/heads/master
[08:24:32] <mhaberler> that is not the case
[08:25:00] <mhaberler> it suggests calling oword procedures, and to do so, in complicated cases you might need a Python fragment
[08:25:29] <mhaberler> work the examples and you will find you can define a new M code without any Python
[08:25:56] <evokanevo> lol. that's exactly what i've been lookin for this whole time.
[08:26:14] <mhaberler> in case the rs274ngc language isnt strong enough to do what you want, you can fall back to Python, but you dont need that in simple cases
[08:26:50] <evokanevo> i have the git source but I don't understand the overall system structure well enough to know whether there are example M-code or O-subs that call into C-code
[08:27:09] <mhaberler> there is no C/C++ alternative because the intent is to make the interp extensible without the need to fiddle at the C/C++ level which impacts everybody
[08:28:12] <mhaberler> read the 'Getting started' section, and try the example which is in the example config I linked above
[08:28:36] <mhaberler> read my lips: no C hacking for language extensions ;)
[08:29:05] <evokanevo> Yah, gotcha. So if I want to have my custom O-code generate further G-code and say, interact with a user via some GUI, python is my best bet.
[08:29:32] <mhaberler> there is no python in that example
[08:29:48] <mhaberler> do you understand how subroutines in gcode work?
[08:30:10] <evokanevo> The basics.
[08:30:22] <evokanevo> I mean I've written a few, nothing complicated.
[08:30:43] <mhaberler> you dont 'generate further code', you executed canned sequences in a oword procedure
[08:31:22] <evokanevo> try:
[08:31:22] <evokanevo> #self.execute("G3456") # would raise InterpreterException
[08:31:23] <evokanevo> self.execute("G21",lineno())
[08:31:23] <evokanevo> self.execute("G64 P0.001",lineno())
[08:31:32] <evokanevo> those are a few lines from a remapped O-code
[08:31:40] <mhaberler> jeesh, that is _python_, forget this at that stage please
[08:31:57] <mhaberler> you really need to read that manual from the start, not jump into the middle
[08:32:13] <evokanevo> i'm trying to get a lay of the land, not just do this 1 basic example of toggling bits. i realize i can toggle these bits via o-codes.
[08:32:39] <evokanevo> and do the comparison logic that is currently done in my C-file, via comparisons in ngc
[08:32:49] <evokanevo> and the same goes for the usleep()
[08:32:56] <mhaberler> all I can say at this point is:
[08:33:08] <mhaberler> you need to understand how subroutines in ngc work
[08:33:19] <mhaberler> there is _zero_ use for C/C++ here
[08:33:24] <evokanevo> fair enough, thanks for your time.
[08:33:40] <mhaberler> please work through the examples step by step, not from the heavy lifting section
[08:34:58] <mhaberler> sure - try the getting started examle, paste your M6x into the remap procedure body, study parameter passing and you'll have a go with 0 C and 0 Python
[08:39:41] <evokanevo> not really trying to reopen this convo, but i have in fact done simple o-codes remapping (
http://pastebin.com/WjkCVLT2 for example).
[08:41:12] Cylly is now known as Loetmichel
[08:46:59] -!- mhaberler has quit [Quit: mhaberler]
[09:05:10] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[09:05:48] <mhaberler> well, all prerequisites in place then
[09:19:00] s1dev is now known as s1dev|away
[09:24:12] -!- |1li has quit [Read error: Connection reset by peer]
[09:24:35] jd is now known as Guest53111
[09:29:02] -!- Guest53111 has quit [Read error: Connection reset by peer]
[09:42:06] -!- Keknom has quit [Quit: Leaving.]
[09:57:42] -!- andypugh [andypugh!~andy2@cpc16-basl9-2-0-cust685.20-1.cable.virginmedia.com] has joined #linuxcnc-devel
[10:01:43] -!- mhaberler has quit [Quit: mhaberler]
[10:23:51] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[10:35:07] -!- b_b has quit [Changing host]
[10:44:43] -!- LeelooMinai has quit [Ping timeout: 252 seconds]
[10:48:58] -!- OhmEye has quit [Ping timeout: 256 seconds]
[10:59:48] -!- shurshur has quit [Remote host closed the connection]
[11:02:26] -!- Err has quit [Ping timeout: 240 seconds]
[11:18:34] -!- aitalmac has quit [Quit: Leaving]
[11:34:44] -!- ler_hydra has quit [Remote host closed the connection]
[11:38:24] -!- RagingComputer has quit [Ping timeout: 245 seconds]
[11:47:29] -!- psha [psha!~psha@213.208.162.67] has joined #linuxcnc-devel
[11:56:20] -!- maximilian_h [maximilian_h!~bonsai@130.255.104.21] has joined #linuxcnc-devel
[12:08:12] -!- maximilian_h has quit [Quit: Leaving.]
[12:14:09] -!- maximilian_h [maximilian_h!~bonsai@130.255.104.21] has joined #linuxcnc-devel
[12:14:19] -!- maximilian_h [maximilian_h!~bonsai@130.255.104.21] has parted #linuxcnc-devel
[12:19:18] -!- maximilian_h [maximilian_h!~bonsai@130.255.104.21] has joined #linuxcnc-devel
[12:24:51] -!- maximilian_h has quit [Quit: Leaving.]
[12:25:20] -!- maximilian_h [maximilian_h!~bonsai@130.255.104.21] has joined #linuxcnc-devel
[12:29:57] -!- maximilian_h has quit [Ping timeout: 248 seconds]
[13:50:16] -!- mhaberler has quit [Quit: mhaberler]
[14:08:27] _BJfreeman is now known as BJfreeman
[14:36:32] -!- Eric__ has quit [Quit: Page closed]
[15:00:28] ybon- is now known as ybon
[15:19:17] -!- IchGuckLive has quit [Quit: ChatZilla 0.9.87 [Firefox 20.0/20130329043827]]
[15:22:16] -!- Simooon has quit [Quit: Leaving]
[15:50:45] -!- adb [adb!~IonMoldom@178.211.237.94] has joined #linuxcnc-devel
[15:51:49] -!- syyl has quit [Ping timeout: 252 seconds]
[15:56:55] -!- Bojangles has quit [Ping timeout: 264 seconds]
[16:04:22] -!- vladimirek [vladimirek!~vladimire@95.105.250.72] has joined #linuxcnc-devel
[16:06:59] -!- skunkworks [skunkworks!~chatzilla@72-36-57-77.actaccess.net] has joined #linuxcnc-devel
[16:12:29] <skunkworks> can't believe she fell asleep...
http://www.electronicsam.com/images/house/Stella.JPG
[16:12:55] <skunkworks> (hiking in Montana...)
[16:17:17] -!- BJfreeman has quit [*.net *.split]
[16:17:26] -!- uwe_mobile has quit [*.net *.split]
[16:17:35] -!- SadMan has quit [*.net *.split]
[16:17:46] -!- Aero-Tec has quit [Read error: Connection reset by peer]
[16:20:12] _BJfreeman is now known as BJfreeman
[16:26:19] -!- skunkworks has quit [Ping timeout: 245 seconds]
[16:32:42] -!- SadMan [SadMan!sadman@sadman.net] has joined #linuxcnc-devel
[16:45:28] s1dev|away is now known as s1dev
[16:50:18] -!- jfire has quit [Quit: Leaving.]
[17:11:27] -!- skunkworks [skunkworks!~chatzilla@72-36-57-77.actaccess.net] has joined #linuxcnc-devel
[17:11:40] -!- b_b has quit [Changing host]
[17:17:41] -!- tjb1 has quit [Ping timeout: 240 seconds]
[17:22:21] -!- jfire has quit [Quit: Leaving.]
[17:26:19] -!- sumpfralle has quit [Ping timeout: 264 seconds]
[17:30:49] -!- firephoto has quit [Quit: ZNC - http://znc.in]
[17:35:41] firephoto_ is now known as firephoto
[17:45:16] -!- tjb1 has quit [Quit: tjb1]
[17:49:19] -!- IchGuckLive has quit [Quit: ChatZilla 0.9.87 [Firefox 20.0/20130329043827]]
[17:59:10] -!- skunkworks has quit [Remote host closed the connection]
[18:17:09] -!- phantoxeD has quit [Ping timeout: 248 seconds]
[18:27:07] -!- RagingComputer has quit [Ping timeout: 246 seconds]
[18:39:02] -!- micges [micges!~micges@dgt142.neoplus.adsl.tpnet.pl] has joined #linuxcnc-devel
[18:47:23] -!- nikola_ has quit [Ping timeout: 250 seconds]
[19:16:52] -!- hashfail has quit [Client Quit]
[19:24:06] -!- Crashdemon has quit [Read error: Connection reset by peer]
[19:27:37] -!- stsydow has quit [Remote host closed the connection]
[19:28:55] -!- mhaberler [mhaberler!~mhaberler@macbook.stiwoll.mah.priv.at] has joined #linuxcnc-devel
[19:31:40] -!- vladimirek has quit [Remote host closed the connection]
[19:50:05] -!- a-l-e has quit [Ping timeout: 246 seconds]
[19:55:43] -!- jerryitt has quit [Ping timeout: 256 seconds]
[19:57:57] -!- skroon has quit [Ping timeout: 252 seconds]
[20:11:44] -!- GammaX has quit [Quit: Leaving]
[20:16:30] -!- phantoneD has quit []
[20:28:02] -!- tgary_ has quit [Remote host closed the connection]
[20:31:20] Guest53111 is now known as tar-nation
[20:59:46] -!- ve7it [ve7it!~LawrenceG@S01060014d19d0b68.pk.shawcable.net] has joined #linuxcnc-devel
[21:05:40] -!- DJ9DJ has quit [Quit: bye]
[21:08:21] -!- skroon has quit [Ping timeout: 252 seconds]
[21:08:24] -!- hdokes has quit [Ping timeout: 245 seconds]
[21:19:16] -!- odiug has quit [Ping timeout: 276 seconds]
[21:36:12] -!- karavanjo has quit [Read error: Connection reset by peer]
[21:36:43] -!- psha has quit [Quit: Lost terminal]
[21:37:08] ssi_ is now known as ssi
[22:00:52] -!- ve7it has quit [Remote host closed the connection]
[22:27:54] -!- micges has quit [Quit: Leaving]
[22:29:39] -!- evokanevo has quit [Read error: Connection reset by peer]
[23:25:04] -!- Aero-Tec has quit [Ping timeout: 245 seconds]
[23:38:21] -!- tjb1 has quit [Ping timeout: 240 seconds]
[23:40:04] -!- tjb1_ has quit [Ping timeout: 245 seconds]
[23:50:23] -!- stsydow has quit [Quit: Leaving]
[23:52:34] -!- tjb1 has quit [Ping timeout: 245 seconds]