Axis Position Logger
25 Feb 2024 18:08 - 25 Feb 2024 18:12 #294417
by Mecanix
Replied by Mecanix on topic Axis Position Logger
Last edit: 25 Feb 2024 18:12 by Mecanix.
The following user(s) said Thank You: Ehsan_R
Please Log in or Create an account to join the conversation.
25 Feb 2024 18:29 #294424
by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
ehsan@debian:~/Desktop$ python3 emclog.py
File "/home/ehsan/Desktop/emclog.py", line 193
if moveType in :
^
SyntaxError: invalid syntax
Please Log in or Create an account to join the conversation.
25 Feb 2024 18:33 - 26 Feb 2024 10:35 #294425
by Aciera
Replied by Aciera on topic Axis Position Logger
Not sure why that got lost, should be:
[edit]
seems the editor doesn't like the square brackets.
if moveType in ['G1', 'G2', 'G3']
[edit]
seems the editor doesn't like the square brackets.
Last edit: 26 Feb 2024 10:35 by Aciera.
Please Log in or Create an account to join the conversation.
25 Feb 2024 18:34 #294426
by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
Thanks a lot it works
Please Log in or Create an account to join the conversation.
25 Feb 2024 18:55 - 25 Feb 2024 18:58 #294428
by Ehsan_R
Replied by Ehsan_R on topic Axis Position Logger
How can I create a button in the graphical interface of AXIS to run the program by pressing it?
Or add it as a tab to the GUI
Or add it as a tab to the GUI
Last edit: 25 Feb 2024 18:58 by Ehsan_R.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 18726
- Thank you received: 6296
25 Feb 2024 19:48 #294441
by tommylight
Replied by tommylight on topic Axis Position Logger
Probably using VCP panels
linuxcnc.org/docs/html/gui/pyvcp.html
linuxcnc.org/docs/html/gui/pyvcp.html
Please Log in or Create an account to join the conversation.
26 Feb 2024 00:02 #294471
by Mecanix
Replied by Mecanix on topic Axis Position Logger
Aren't those GTK ui Axis Tabs friendly? I could be wrong, and much like Tommy recommended (pyvcp), I think you can also have it all running from inside linuxcnc e.g AXISTAB: [Preview] | [DRO] | [EMCLOG]
Search for GladeVCP if interested in learning new tricks. Something like below, not far off anyway...
INI file
Search for GladeVCP if interested in learning new tricks. Something like below, not far off anyway...
INI file
[DISPLAY]
EMBED_TAB_NAME = EMCLOG
MBED_TAB_LOCATION = ntb_user_tabs1
EMBED_TAB_COMMAND = halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -x {XID} -u ./emclog/emclog.py ./emclog/emclog.ui
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
26 Feb 2024 00:25 #294476
by phillc54
Replied by phillc54 on topic Axis Position Logger
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
26 Feb 2024 10:47 #294497
by Aciera
Replied by Aciera on topic Axis Position Logger
The logger ui uses pyqt not gtk (ie it's not a glade panel).
The following user(s) said Thank You: Ehsan_R
Please Log in or Create an account to join the conversation.
26 Feb 2024 13:19 #294514
by Aciera
Replied by Aciera on topic Axis Position Logger
You can execute a python script using a custom M-code:
1. I have the folders 'libemclog' and 'mcodes' in my config folder
2. the [RS274NGC] section of the ini file must contain the path to the 'mcodes' folder:
3. Executing 'm129' opens the loggerui window.
I have modified emclog.py so the file handling (Open, Save, SaveAs) is a bit more user friendly.
Note: I'm on a rip installation so I'm not sure the paths are correct for a deb install.
1. I have the folders 'libemclog' and 'mcodes' in my config folder
2. the [RS274NGC] section of the ini file must contain the path to the 'mcodes' folder:
USER_M_PATH = ./mcodes
3. Executing 'm129' opens the loggerui window.
I have modified emclog.py so the file handling (Open, Save, SaveAs) is a bit more user friendly.
Note: I'm on a rip installation so I'm not sure the paths are correct for a deb install.
Attachments:
The following user(s) said Thank You: Ehsan_R
Please Log in or Create an account to join the conversation.
Time to create page: 0.108 seconds