script for know ngc program loaded??

More
21 Dec 2016 17:52 - 21 Dec 2016 17:53 #84505 by bkt
Hello,

I not have any ideas how to bring the name of current ngc program loaded ... I appreciate any link indication to consider how to create this type of script.

regards
giorgio
Last edit: 21 Dec 2016 17:53 by bkt.

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

More
21 Dec 2016 18:04 #84509 by newbynobi
python Interface

should solve the problem

Norbert
The following user(s) said Thank You: bkt

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

More
22 Dec 2016 01:50 #84531 by bkt
mhh ... I knows these...

i bring linuxcnc.stat - error channel -ini file parameter ... I can send linuxcnc command ... but nothing to do about the loaded file.ngc name ....
I just use python script for load a different ngc file remotely .... but I have not idea how I can control if the file just loaded is really the next file that Lcnc go to execute ...

regards
Giorgio....

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

More
22 Dec 2016 15:49 #84560 by newbynobi
linuxcnc.stat.file

returns the currently loaded file with path, and that file will be executed if you send a run command.
Just poll for that information.

Norbert
The following user(s) said Thank You: bkt

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

More
10 Feb 2017 15:35 #87771 by bkt
sorry newbynobi ...

Just poll for that information.[\quote] what is means?? is similar to just a little googling?

Regards
Giorgio

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

More
11 Feb 2017 10:27 - 11 Feb 2017 10:27 #87807 by newbynobi
Linuxcnc does update the information automatically, but if you want to get the most recent information from within python, you will have to poll thet information in before using it.

I do that in gmoccapy with a timer that updates the informations every 100 ms
in gmoccapy.py look at def _periodic(self)

self.stat.poll()

updates the information, after that

self.stat.file

does return the actual loaded file.

Norbert
Last edit: 11 Feb 2017 10:27 by newbynobi.
The following user(s) said Thank You: bkt

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

Time to create page: 0.074 seconds
Powered by Kunena Forum