resume not working

More
13 Oct 2019 06:17 #147792 by Reinhard
resume not working was created by Reinhard
Hi,

I work on an UI on NML-basis and til now everything works as expected.
I start axis from linuxcnc script as reference and start my app in parallel to send the commands to linuxcnc. Axis reflects the issued commands from my app so far ...

Now I'm testing with file "gmoccapy_2_tools_with_cutter_radius_compensation.ngc"

Tool change works, but when the M1 arrives and I issue a resume command from my app, interpreter terminates. Same happens, when I change M1 to M0.

When I release the Pause-Button from axis - interpreter continues to work.

So I don't know, what I'm doing wrong. Command-Interface seems to work, as other commands work successfully. I checked states and modes too, my app is in auto mode and interpreter is in pause-state.
From my investigation EMC_TASK_PLAN_RESUME takes no parameters.

I also watch the error channel and no errors did pop up.

Any help is appreciated!

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

More
14 Oct 2019 07:09 #147855 by pl7i92
Replied by pl7i92 on topic resume not working
is the tool table set correct as the nml commands run a othere way as in axis real
seams as of the nml you dont got the presets for all Modal set

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

More
14 Oct 2019 16:27 #147871 by Reinhard
Replied by Reinhard on topic resume not working
Sorry, I don't understand, what you're trying to suggest.

How is resume (gcode processing) related to tool table?
Any other command works as expected and I believe, if I'm able to issue an auto start (processing of gcode file) from my app, the command chain works.
ErrorChannel works as well - I get the messages around optional stop (M1).

So what should I change to issue a resume command?

That command takes no parameters, so how is the tool table related to that command?

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

More
14 Oct 2019 17:02 #147872 by Todd Zuercher
Replied by Todd Zuercher on topic resume not working
My understanding is that standard Linuxcnc does not allow jogging or the insertion of commands (MDI or otherwise) while paused during an automatic procedure (running a program). There was some effort at a work around for this. Try searching for threads relating to "jog while paused". Hopefully you can find something that will help you.

If I remember right (from the conversations I observed with mild disinterest) the work around had something to do with exiting the program execution, doing what ever intervention was required, then resuming program execution from where it left off.

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

More
15 Oct 2019 03:05 #147912 by Reinhard
Replied by Reinhard on topic resume not working

My understanding is that standard Linuxcnc does not allow jogging or the insertion of commands

That's right and it is fine. I don't wonna break that rule!

May be, I was not clear enuf to explain my problem. When you run "gmoccapy_2_tools_with_cutter_radius_compensation.ngc" from axis, axis executes all lines until the M1 (line 61) - it then displays the message from gcode file (comment in line 60). Toolbar changes to Pause-button pressed and Start-Button disabled.
When you then press Pause-Button, execution of gcodes from file continues.

So I wanted to do the same with my app. As I use shared memory for NML-transport, I can run my app in parallel to axis.

Axis on startup shows the axis.ngc demo file. In my app, I load the file named above and start execution.
Axis shows the execution in gremlin - even with the wrong file in textbox.
When M1 happens and I press the Pause-Button in axis - everything works as expected and execution of gcodes continues.
When M1 happens and I send a resume command from my app, the interpreter stops - end of the game.

So what am I doing wrong?

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

More
15 Oct 2019 12:05 #147923 by nkp
Replied by nkp on topic resume not working
maybe you should try loading the code into the interpreter and Axis-preview at the same time
something like(something like!) this
try:
            self.status.poll()
            if self.status.interp_state == linuxcnc.INTERP_IDLE :
                try :
                    Tkinter.Tk().tk.call("send", "axis", ("remote","clear_live_plot"))
                    Tkinter.Tk().tk.call("send", "axis", ("remote", "open_file_name", explicit))
                except Tkinter.TclError as detail:
                    self.cmd.reset_interpreter()
                    time.sleep(0.05)
                    self.cmd.mode(linuxcnc.MODE_AUTO)
                    self.cmd.program_open(explicit)
                    time.sleep(0.05)
            else:
                #self.loadbutton.set_sensitive(False)
                pass
        except Exception as e:
            pass

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

More
15 Oct 2019 13:52 #147930 by Reinhard
Replied by Reinhard on topic resume not working
Hi,

thanks for your attention and reply, but I suspect, that we have a communication problem.

I read your suggestion, but I don't understand, how your codefragment could help me fix the resume command?
My ONLY problem is, that when I send a resume command to linuxcnc, that linuxcnc behaves completely different as when axis sends the same command.

As the resume-command structure has no parameter, I can't figure out, where the problem could be.

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

More
19 Oct 2019 00:53 #148255 by andypugh
Replied by andypugh on topic resume not working
I don't have any experience with any of this, but my first thought would be to look at the Axis code and see what that does when you press resume.

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

More
19 Oct 2019 03:37 #148279 by Reinhard
Replied by Reinhard on topic resume not working
Hi Andy,

thank you very much for your attention.

I gave it up to come behind the misterious resume action. Finallay I don't need pause/resume.
My ideal is Heidenhain controller. On my previous job I was lucky to work on a Heidenhain. For me, its the best controller, I ever got in touch with. The Heidenhain developer understand the workflow of a controllers user :)
Now I have to work with Fanuc and it looks like first IT-project of a primary school boy :(
The list of bugs and not working functions is as long as the feature list. May be even longer.
Some workflows are so stupid, that you can't imagine anything worse ...
I'm very sad, that every hobby controller software takes fanuc as ideal - can't be worse.
So I try to break out to get things better.
But before achieving that, I have to understand, how linuxcnc is working.
My next step will be to realize "run from line", which is how Heidenhain resume works.
The bad side of linuxcnc is, that the current line from status (motion or interpreter - who puts the value in?) is about 8 lines behind what really happens. (I tried to slow down motion, but gap seems to be independant of motion speed)
May be I have to go the Heidenhain way too and ask the user for a line to start from ...

cheers Reinhard

P.S. @andypugh - your attention and reply is big motivation for me to continue work. Thanks!

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

More
19 Oct 2019 03:50 #148282 by cmorley
Replied by cmorley on topic resume not working
here is qtvcp's python code for pause resume:
    def PAUSE(self):
        if not STATUS.stat.paused:
            self.cmd.auto(linuxcnc.AUTO_PAUSE)
        else:
            log.debug('resume')
            self.cmd.auto(linuxcnc.AUTO_RESUME)

What does your code look like?

Chris

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

Time to create page: 0.165 seconds
Powered by Kunena Forum