What does canon do?

More
09 Jun 2024 01:41 #302653 by mungkie
Replied by mungkie on topic What does canon do?
I am not sure what the python does as I don't use py.

I guess that the 'canon' is reference to 'canonical machining functions', but I don't know how python is linking into the rs274 interp.

A few years back I wrote a gles2(and gles1 before) backplot (actually with full machine sim for genserial robots) for the rpi zero but I guess it was even worse than the python stuff, I never really got further than a proof of concept.

I actually removed all the python code from linuxcnc and was going to add a dlopen call so modular code(any language python or not) could be used for handling external offsets or whatever it was(I forget what it was as its so long ago).

Anyways I think that what happens is the rs274 interpreter is called and handles the gcode (lcnc has variables scales offsets etc. blah) and spits out the interpreted gcode as  line, move, or arc with xyzabcuvw coords and feedrate. that is what is used for plotting.

From what I remember doing I hacked the rs274 interpreter to output to a file, but had to run the program, that interpreted the gcode program, which was then used to create a backplot.

I did not really finish but the backplot seemed to be roughly the same as the realtime plot, although I think there may have been some error due to accessing c++ classes as c structs(I was planning to remove c++ libs from the system).

I think that the whole backplot is probably inaccurate as it does not simulate what may occur on a realtime machining operation with latency?

I had some idea about what could be done to make an accurate simulation but it was too much effort to bother trying to code.

What I thought should have been done was show a backplot with possible error margins due to realtime latency found by the latency test (although I guess in reality this is probably so small it makes no difference for most machining as there are much larger errors due to the machine?).

I got bored and too busy so never got further than a very basic athena based display program.

I think xemc maybe could have some information on how to get backplot data, but I think that is written in TK and I never had more than a quick lookm at it and it seemed easier to check the code in rs274.

I think everything I am saying maybe irrelevant to python backplots, and its so long ago I have forgotten most of it.

 
The following user(s) said Thank You: JT

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

More
30 Jun 2024 17:44 #304094 by hydroid7
Replied by hydroid7 on topic What does canon do?
I was researching the same topic before and asked some questions, which nobody knew the answer unfortunately.
Based on my research, the GLCanon python files are in the folder "/lib/python/rs274/glcanon.py"

The basic idea is that you extend this class and you class have certain methods, that are called on each gcode line, like: comment, straight traverse, etc.
I'd also interested in developing a new visualizer, that can be used in a more flexible way, e. g. json output, etc.


 

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

Time to create page: 0.061 seconds
Powered by Kunena Forum