Remapping: Was: Stand Alone Interpe r ter

More
29 May 2019 17:02 #135300 by bevins
Replied by bevins on topic Stand Alone Interpe r ter

@Bevins,

I am curious wich command's are ignored and what the bug's in remap are in your vision?
Maybe i can tell you some tip's after your info, maybe not :woohoo:


Oh, it is long and complicated but the short story is, after four or five running of the same file and cutting, the interpreter just stops executing commands. IT just stops, the spindle still running, and no more commands are executed. The queue is empty, there are no errors, just stops.

Its been a long haul;, but, it is a known issue if you dig back into the threads and mailing list. IT is a pure python remap, and I cant get help on it because no one really understands the inner workings I guess I can say, except one person that just doesn't respond to questions. They do say you are on your own when you go this route.

but I would like to play with the stand alone interpreter, and I may get some kind of direction.

This is my config. Sorry, didnt mean to hijack this thread.

Please Log in or Create an account to join the conversation.

More
29 May 2019 18:16 - 29 May 2019 18:22 #135311 by Grotius
Replied by Grotius on topic Stand Alone Interpe r ter
@Bevins,

Oh, it is long and complicated but the short story is, after four or five running of the same file and cutting, the interpreter just stops executing commands. IT just stops, the spindle still running, and no more commands are executed. The queue is empty, there are no errors, just stops.

I never had this issue. Linux is stable as hell in my case. Is your machine pc at internet? In worst case you are hacked.

They do say you are on your own when you go this route.
Hmm. Why that? It can be monitored on several way's.

If you need some hijacked contact adresses. Please visit : darknetleaks.ru/archive/leaked/Dumps/FBI.txt
Last edit: 29 May 2019 18:22 by Grotius.

Please Log in or Create an account to join the conversation.

More
29 May 2019 19:05 #135315 by bevins
Replied by bevins on topic Stand Alone Interpe r ter

@Bevins,

Oh, it is long and complicated but the short story is, after four or five running of the same file and cutting, the interpreter just stops executing commands. IT just stops, the spindle still running, and no more commands are executed. The queue is empty, there are no errors, just stops.

I never had this issue. Linux is stable as hell in my case. Is your machine pc at internet? In worst case you are hacked.

They do say you are on your own when you go this route.
Hmm. Why that? It can be monitored on several way's.

If you need some hijacked contact adresses. Please visit : darknetleaks.ru/archive/leaked/Dumps/FBI.txt


I am not quite understanding your comments but....

I know Linuxcnc is stable. I have done many machine retrofits and building from scratch.
Pure Python remaps are very tedious and unpredictable. That is coming from the fellow that wrote the remap part of Linuxcnc.
This issue is documented in mailing lists. My machine is not hacked, it cannot be cause it is not connected to the internet.

Please Log in or Create an account to join the conversation.

More
29 May 2019 19:47 #135318 by Todd Zuercher
Maybe the problem isn't the interpreter, but the way the python remaps interact with it. (from the sound of it, the developer who created it is suspicious of that.)

Can you make your remaps work without using python?

Please Log in or Create an account to join the conversation.

More
30 May 2019 01:58 - 30 May 2019 01:59 #135341 by bevins
Replied by bevins on topic Stand Alone Interpe r ter

Maybe the problem isn't the interpreter, but the way the python remaps interact with it. (from the sound of it, the developer who created it is suspicious of that.)

Can you make your remaps work without using python?


That's pretty much it. From what I understand the interpreter is not the master of its domain so it needs input from task before it can process commands. Or it's dependent on other processes or a combination , it just cannot execute by itself. Plus there is an issue of python not being able to process a sequence of functions, that's why you cannot use Standard glue with a remap in pure python. You have to put the functions standard glue has in the remap function, which is what I did and it works.

I am pretty sure it would work with oword ngc, but I know nothing about that and I guess it is not documented in one place where I can read and understand. I know of a guy that did the same type of machine with remapping M codes to fire all the relays but he didnt need to move the axis as he had no tool changer just 30 some odd number of gang drills.

I got everything working tool changes drill gangs but after a certain number of times processing the program, it just stops dead in it's tracks.
Last edit: 30 May 2019 01:59 by bevins.

Please Log in or Create an account to join the conversation.

More
30 May 2019 09:48 #135372 by andypugh

I am pretty sure it would work with oword ngc, but I know nothing about that and I guess it is not documented in one place where I can read and understand. I know of a guy that did the same type of machine with remapping M codes to fire all the relays but he didnt need to move the axis as he had no tool changer just 30 some odd number of gang drills.


I would say that if you need to move axes then it is a much better idea to use an O-word sub than to use pure Python. (I imagine that your Python uses MDI commands to move axes? Though you can do it with canonical movement commands too.)

You don't need M-codes to operate relays, G-code can toggle HAL pins directly, and has built-in codes to wait for HAL pin inputs to change.

Look at this G-code tool change sub, it sets HAL pins using M64 / M65 and uses M66 to wait for inputs confirming that the mechanisms are in position.
github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc

Please Log in or Create an account to join the conversation.

More
30 May 2019 11:04 - 30 May 2019 11:05 #135374 by bevins

I am pretty sure it would work with oword ngc, but I know nothing about that and I guess it is not documented in one place where I can read and understand. I know of a guy that did the same type of machine with remapping M codes to fire all the relays but he didnt need to move the axis as he had no tool changer just 30 some odd number of gang drills.


I would say that if you need to move axes then it is a much better idea to use an O-word sub than to use pure Python. (I imagine that your Python uses MDI commands to move axes? Though you can do it with canonical movement commands too.)

You don't need M-codes to operate relays, G-code can toggle HAL pins directly, and has built-in codes to wait for HAL pin inputs to change.

Look at this G-code tool change sub, it sets HAL pins using M64 / M65 and uses M66 to wait for inputs confirming that the mechanisms are in position.
github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc


Here is my main remap file. You think ngc oword could do this?

There is alot of code I am not using in there.

Warning: Spoiler!
Last edit: 30 May 2019 11:05 by bevins.

Please Log in or Create an account to join the conversation.

More
30 May 2019 11:23 #135375 by andypugh

Here is my main remap file. You think ngc oword could do this?


Well, in theory, yes, as any Turing-complete language can do anything that any other one can do.
I grant it might be difficult.

One thing that I am curious about is whether self.execute("G code here") is the best approach.
(Those bits would probably be _better_ done from a g-code sub).
The Python interface offers the command.mdi() way to run G-code. I wonder if that works better, worse or the same? It would be a simple search-and-replace job to try it.
Another option is the canonical command interface. That does not seem to be particularly well documented, but it is what I used in my G71 Python remaps:
github.com/LinuxCNC/linuxcnc/blob/andypu...python/remap.py#L443
Though I think it only uses emccanon.STRAIGHT_TRAVERSE and STRAIGHT_FEED
The canon commands are defined (and quite well described) in this file:
github.com/LinuxCNC/linuxcnc/blob/master...mc/nml_intf/canon.hh

Please Log in or Create an account to join the conversation.

More
30 May 2019 11:50 - 30 May 2019 11:56 #135376 by bevins

Here is my main remap file. You think ngc oword could do this?


Well, in theory, yes, as any Turing-complete language can do anything that any other one can do.
I grant it might be difficult.

One thing that I am curious about is whether self.execute("G code here") is the best approach.
(Those bits would probably be _better_ done from a g-code sub).
The Python interface offers the command.mdi() way to run G-code. I wonder if that works better, worse or the same? It would be a simple search-and-replace job to try it.
Another option is the canonical command interface. That does not seem to be particularly well documented, but it is what I used in my G71 Python remaps:
github.com/LinuxCNC/linuxcnc/blob/andypu...python/remap.py#L443
Though I think it only uses emccanon.STRAIGHT_TRAVERSE and STRAIGHT_FEED
The canon commands are defined (and quite well described) in this file:
github.com/LinuxCNC/linuxcnc/blob/master...mc/nml_intf/canon.hh


I used those commands because it was the only way I could get it to work in python. The problem was when I got into a few functions deep, I couldn't get it to respond to canon commands.

/EDIT Granted, I may not have done it correctly.... whether that was causing it to ignore commands or not, I am not sure.
Last edit: 30 May 2019 11:56 by bevins.

Please Log in or Create an account to join the conversation.

More
30 May 2019 11:52 #135377 by andypugh

I used those commands because it was the only way I could get it to work in python. The problem was when I got into a few functions deep, it wouldn't respond to commands.


Did you try the canonical commands?

Please Log in or Create an account to join the conversation.

Moderators: HansU
Time to create page: 0.198 seconds
Powered by Kunena Forum