- Posts: 1111
- Thank you received: 0
script for know ngc program loaded??
9 years 10 months ago #84505
by bkt
script for know ngc program loaded?? was created 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
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.
9 years 10 months ago #84509
by newbynobi
Replied by newbynobi on topic script for know ngc program loaded??
Please Log in to join the conversation.
9 years 10 months ago #84531
by bkt
Replied by bkt on topic script for know ngc program loaded??
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....
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.
9 years 10 months ago #84560
by newbynobi
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
Replied by newbynobi on topic script for know ngc program loaded??
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.
9 years 8 months ago #87771
by bkt
Replied by bkt on topic script for know ngc program loaded??
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.
9 years 8 months ago #87807
by newbynobi
Replied by newbynobi on topic script for know ngc program loaded??
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
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
