script for know ngc program loaded??

More
9 years 10 months ago #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

Please Log in to join the conversation.

More
9 years 10 months ago #84509 by newbynobi
python Interface

should solve the problem

Norbert

Please Log in to join the conversation.

More
9 years 10 months ago #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 to join the conversation.

More
9 years 10 months ago #84560 by newbynobi
Code:
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

Please Log in to join the conversation.

More
9 years 8 months ago #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 to join the conversation.

More
9 years 8 months ago #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

Please Log in to join the conversation.

Time to create page: 0.276 seconds
Powered by Kunena Forum