- Posts: 30
- Thank you received: 1
Python linuxcnc.stat() showing no result.
8 years 5 months ago #110172
by kpj10
Python linuxcnc.stat() showing no result. was created by kpj10
Short:
The other day i was making a python script to see currently opend ngc file, in case if I'm running a global LinuxCNC installation i can read the current file, but for a local installation of LinuxCNC I'm getting an empty string. What could be the problem.
Long:
On my laptop i have a simulation package of LinuxCNC installed. The installation was done pulling the LinuxCNC from GitHub and making a deb package, as i wanted to make a system wide installation.
Often there are other branches of LinuxCNC that solves my problem, hence I download them and make a local installation on my laptop.
To start a global installed file i directly type linuxcnc in my shell script.
Whereas for a local installation i have to cd to the location and then to script folder then i type ./linuxcnc. Everytime things work fine.
The other day i was making a python script to see currently opend ngc file, in case if I'm running a global LinuxCNC installation i can read the current file, but for a local installation of LinuxCNC I'm getting an empty string. What could be the problem.
Any help will be appreciated.
Thanks,
Kunal.
The other day i was making a python script to see currently opend ngc file, in case if I'm running a global LinuxCNC installation i can read the current file, but for a local installation of LinuxCNC I'm getting an empty string. What could be the problem.
Long:
On my laptop i have a simulation package of LinuxCNC installed. The installation was done pulling the LinuxCNC from GitHub and making a deb package, as i wanted to make a system wide installation.
Often there are other branches of LinuxCNC that solves my problem, hence I download them and make a local installation on my laptop.
To start a global installed file i directly type linuxcnc in my shell script.
Whereas for a local installation i have to cd to the location and then to script folder then i type ./linuxcnc. Everytime things work fine.
The other day i was making a python script to see currently opend ngc file, in case if I'm running a global LinuxCNC installation i can read the current file, but for a local installation of LinuxCNC I'm getting an empty string. What could be the problem.
Any help will be appreciated.
Thanks,
Kunal.
Please Log in or Create an account to join the conversation.
8 years 5 months ago #110431
by andypugh
Replied by andypugh on topic Python linuxcnc.stat() showing no result.
Can you explain what you mean by "global" and "local"?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4737
- Thank you received: 1480
8 years 5 months ago #110433
by Todd Zuercher
Replied by Todd Zuercher on topic Python linuxcnc.stat() showing no result.
Just a guess from the context, "global"=standard full installation of Linuxcnc, "local"=RIP (run in place).
Is that what you mean Kunal?
Is that what you mean Kunal?
Please Log in or Create an account to join the conversation.
8 years 5 months ago #110436
by kpj10
Replied by kpj10 on topic Python linuxcnc.stat() showing no result.
Yep. Global is standard installation, and local is RIP.
Please Log in or Create an account to join the conversation.
8 years 5 months ago #110757
by andypugh
Replied by andypugh on topic Python linuxcnc.stat() showing no result.
Are you starting your Python code from the same environment (ie command line terminal) as LinuxCNC?
Please Log in or Create an account to join the conversation.
8 years 5 months ago #110762
by kpj10
Replied by kpj10 on topic Python linuxcnc.stat() showing no result.
I start LinuxCNC from a terminal window, then again i open a new terminal window type python there i import the linuxcnc python module and do what I want to do.
For the timing i have made a glade app which i start with my LinuxCNC configuration.
In that app when I try to check current position just after homing, i'm getting 3.58... for x and y though its x and y are at 0. But when i make a move i get correct position.
For the timing i have made a glade app which i start with my LinuxCNC configuration.
In that app when I try to check current position just after homing, i'm getting 3.58... for x and y though its x and y are at 0. But when i make a move i get correct position.
Please Log in or Create an account to join the conversation.
Time to create page: 0.131 seconds