resume not working

More
19 Oct 2019 04:14 #148283 by Reinhard
Replied by Reinhard on topic resume not working
Hi Chris,

looks pretty easy, doesn't it?

Here's my variant (java):
First the buttons action code:
public void actionPerformed(ActionEvent ae) {
  if (((int) status.getModel("interpstate").getValue()) < 3)
     cmdWriter.setTaskModeAuto();
  cmdWriter.execGCode();
}
cmdWriter is my replacement for axis emcmodule.cc
... and execGCode looks like this:
public void execGCode() {
  if (LCStatus.getStatus().getModel("interpState").getValue().equals(3)) {
     log.add(new SystemMessage("continue gcode execution"));
     setAuto(TaskAutoMode.AutoResume.ordinal());
  } else {
    log.add(new SystemMessage("start gcode execution"));
    setAuto(TaskAutoMode.AutoRun.ordinal());
  }
}
... and setAuto is quite the same as in axis emcmodule.cc

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

More
19 Oct 2019 04:28 #148284 by cmorley
Replied by cmorley on topic resume not working
Ya well that looks like it should work (not that I know Java)
Are you sure that 3 is the right state?
in python, 3 would be INTERP_WAITING rather then INTERP PAUSED
Then again I assume you are getting the proper log message to confirm..

Have you set the debug level in the INI so you can see the internal messages send to maybe get a clue whats going on?

Chris

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

More
19 Oct 2019 04:38 #148285 by Reinhard
Replied by Reinhard on topic resume not working
Hi Chris,

thanks for your support!

Yes, I logged different states from my app and I get the right log message from cmdWriter.

Have you set the debug level in the INI so you can see the internal messages send to maybe get a clue whats going on?

No. I tried to experiment with debug settings, but I never got the messages I was looking for ...
So I patched emcmodule.cc and added the logs I want to see.
Nearly everything as expected.
I'm sure, the bug is something stupid in my code, but I don't like to continue bothering on that item.
There's so much work outstanding with higher priority ...
... and the highest one is most probably to get into hal ...

Reinhard

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

More
19 Oct 2019 04:58 #148286 by cmorley
Replied by cmorley on topic resume not working
one more thought - in python you need to poll() the status before checking states.
my example hides that detail in another class.
Not sure how your code works in that way.

Chris

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

More
19 Oct 2019 05:14 #148287 by Reinhard
Replied by Reinhard on topic resume not working

one more thought - in python you need to poll() the status before checking states.

Hm, any idea for the reason of that requirement?

I'm not doing that. Definitely!

My counterpart to emcmodule is a very thin and stateless layer.
StatusReader is a separate class that handles cyclic status reads and CommandWriter only gets active on user interaction. They are unrelated. They only share the error log.

From emcmodule I saw, that pyStatChannel is unrelated to Status-part of pyCommandChannel, so I did it the same way - no relation between status reading and command sending in my code.

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

More
06 Aug 2020 12:37 - 08 Aug 2020 08:04 #177504 by owentrue
Replied by owentrue on topic resume not working
Try using a different resume framework. You may need to use good logging in the future. By the way, I also have a question, I hope someone can help me. I graduated from University this year and I want to get a job. The first thing I was told to do was write a good, memorable resume, but I don't want to pay $ 200 to a writer. I'm thinking of doing it myself especially since I found the site copymyresume.com/ , where you can find many guides and resume samples for free. I read the information on this site for more than 2 hours yesterday. Everything is written very easily, so I think it will be difficult to make a mistake. Did you write your resume by yourself or did you pay a writer to do the job for you?
Last edit: 08 Aug 2020 08:04 by owentrue.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum