Axis Position Logger

More
2 years 8 months ago #294364 by Aciera
Replied by Aciera on topic Axis Position Logger

Can someone explain to me how to edit this project or create something similar?

If you mean to modify the source code then you would need to do run-in-place installation and build linuxcnc on your local PC.

linuxcnc.org/docs/html/code/building-linuxcnc.html

Please Log in to join the conversation.

More
2 years 8 months ago #294369 by tommylight
Replied by tommylight on topic Axis Position Logger
Position logger is a separate project by JT, so i do not know/think building LinuxCNC would help.
The issue is with old python used by it, so editing it to use python3 should be enough, although no idea how much work would that entail.

Please Log in to join the conversation.

More
2 years 8 months ago #294390 by Aciera
Replied by Aciera on topic Axis Position Logger
Ah yes thanks, sometimes I get confused going from one thread to another.

Please Log in to join the conversation.

More
2 years 8 months ago #294394 by Aciera
Replied by Aciera on topic Axis Position Logger
So, to get the source you would download the .deb folder using the wget command as described here:
jethornton.github.io/emclog/install.html
Then right click on the downloaded 'emclog_1.0.0_all.deb' and choose 'Extract Here'
In the extracted folder extract the folder 'data.tar.xz'
You will find the pyhton file 'emclog' in the extracted 'usr/bin' folder.
This file you will need to update to python3.


[edit]
You will also need the gui file 'emclog.ui' from the folder 'emclog_1.0.0_all/usr/lib/python3/dist-packages/libemclog'

[edit2]
Just found the GitHub page for these two files:
github.com/jethornton/emclog/blob/master/emclog/src/emclog.ui

Please Log in to join the conversation.

More
2 years 8 months ago #294402 by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
Hello
I am very new to Python programming
Would it be possible for you to give me a more complete explanation of how you did what you did or send me the files you edited?
forum.linuxcnc.org/21-axis/30986-axis-po...gger?start=30#247082

Please Log in to join the conversation.

More
2 years 8 months ago #294406 by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
So, to get the source you would download the .deb folder using the wget command as described here:
jethornton.github.io/emclog/install.html
Then right click on the downloaded 'emclog_1.0.0_all.deb' and choose 'Extract Here'
In the extracted folder extract the folder 'data.tar.xz'
You will find the pyhton file 'emclog' in the extracted 'usr/bin' folder.
This file you will need to update to python3.
[edit]
You will also need the gui file 'emclog.ui' from the folder 'emclog_1.0.0_all/usr/lib/python3/dist-packages/libemclog'


I applied these changes
How do I create the installable file after that?
 

Please Log in to join the conversation.

More
2 years 8 months ago #294409 by Aciera
Replied by Aciera on topic Axis Position Logger
you can run it from a terminal with (make sure the file 'emclog.py' is marked as executable):

$ python3 <your_path_here>/emclog.py

Please Log in to join the conversation.

More
2 years 8 months ago #294414 by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
Code:
#!/usr/bin/python3 import os, sys, math if sys.version_info[0] > 3:     raise Exception("Python 3 is required.")
I changed these program lines like this
Code:
ehsan@debian:~/Desktop$ python3 emclog.py Traceback (most recent call last):   File "/home/ehsan/Desktop/emclog.py", line 16, in <module>     IN_AXIS = os.environ.has_key("AXIS_PROGRESS_BAR")               ^^^^^^^^^^^^^^^^^^ AttributeError: '_Environ' object has no attribute 'has_key' ehsan@debian:~/Desktop$
I got this error
How do I fix it?

Please Log in to join the conversation.

More
2 years 8 months ago #294415 by Aciera
Replied by Aciera on topic Axis Position Logger
Just a few things to get you started, I copied 'emclog.ui' into my home directory and  I got the gui started with the following code (start Linuxcnc first):

Warning: Spoiler!


 

Please Log in to join the conversation.

More
2 years 8 months ago #294416 by Aciera
Replied by Aciera on topic Axis Position Logger
Note that this modification is not correct
Code:
[i]    def sendToAxis(self):         sys.stdout.write(self.gcodeLW(0, 1))[/i]

but the original is also not working:
Code:
    def sendToAxis(self):         sys.stdout.write(self.g_code.get(0.0, END))

Please Log in to join the conversation.

Time to create page: 0.126 seconds
Powered by Kunena Forum