Axis Position Logger

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?
[url] forum.linuxcnc.org/21-axis/30986-axis-po...gger?start=30#247082 [/url]

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

More
2 years 8 months ago - 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?
 
Last edit: 2 years 8 months ago by Ehsan_R.

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

  • Aciera
  • Away
  • Administrator
  • Administrator
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
The following user(s) said Thank You: Ehsan_R

Please Log in or Create an account 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 or Create an account to join the conversation.

  • Aciera
  • Away
  • Administrator
  • Administrator
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!


 
The following user(s) said Thank You: Ehsan_R

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

  • Aciera
  • Away
  • Administrator
  • Administrator
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 or Create an account to join the conversation.

Time to create page: 0.168 seconds
Powered by Kunena Forum