exec.actualmodal

If you have a question about the software please ask it here.

exec.actualmodal

Postby Dan911 » Tue Nov 20, 2018 3:18 am

Is this not available in a plugin?

Thanks,
Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: exec.actualmodal

Postby Robertspark » Tue Nov 20, 2018 6:22 am

It is available, how are you trying to use it (example line of code). It's a variable
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: exec.actualmodal

Postby dezsoe » Tue Nov 20, 2018 8:36 am

Now you can read the field 877 and split by "|" to get modals. In the next test release there will be a more powerful function, but the current technique works with the older versions too.
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: exec.actualmodal

Postby Dan911 » Tue Nov 20, 2018 11:40 am

Hi Robert, I tried every way imaginable. I am able to use in a macro but not in a plugin.

int originalmodalmode = exec.actualmodal;
int originaldistancemode = exec.actualdistmode;

Thanks Dezsoe, using the 877 field is what I been using.

Thanks,
Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: exec.actualmodal

Postby Dan911 » Tue Nov 20, 2018 12:47 pm

Hi Deszoe, was hoping for a function that gives the modal, the field in some cases don't update quick enough, hoping you possibly have a solution.

I been working on my FHP plugin and in some scenarios/conditions it has problems, not being able to retrieve the correct modal makes this task impossible to fix.

I put a messagebox with line number and modals after a Stop() to see problem and are not accurate. Messagebox shows line 30 and modal G3. If you look at X,Y dro's UCCNC is in line 31 in G1 modal.

FHP1.JPG



Line 31

FHP2.JPG


Thanks.
Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: exec.actualmodal

Postby dezsoe » Tue Nov 20, 2018 1:54 pm

Well, I see the problem, but don't know the solution. I hope that the new modal related function will help. Where do you get the line number? Is it from Getcurrentgcodelinenumber() or the field on the screen?
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: exec.actualmodal

Postby Robertspark » Tue Nov 20, 2018 4:53 pm

Dan

suggestion.... as you're a plugin man.

instead of trying
int originalmodalmode = exec.actualmodal;
int originaldistancemode = exec.actualdistmode;


how about trying

int originalmodalmode = UC.actualmodal;
int originaldistancemode = UC.actualdistmode;
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: exec.actualmodal

Postby Dan911 » Tue Nov 20, 2018 5:11 pm

Hi Robert, that was my first attempt.

Dezsoe, I use the Getcurrgcodeline, it’s more accurate than field but as you can see from pic not 100%.

Terry, all’s that’s really needed is the Modal when Stop() called.

Thanks for the reply’s
Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: exec.actualmodal

Postby Dan911 » Tue Nov 20, 2018 11:34 pm

Script, would clicking onscreen stop() bring different result?
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: exec.actualmodal

Postby Dan911 » Wed Nov 21, 2018 1:01 am

I have this issue fixed!!! Came up with some idea's to try at work today and been testing for the last 45 min and no longer can reproduce this problem.
The Gcode program pic I posted I was able to reproduce this 1 out of 3 try's.

After tweaking some code in plugin helped but what made problem disappear was replacing Stop() with StopWithDeccel(). The modal field still don't update correctly but I can work around this getting correct line it was stopped in.

Thanks,
Dan
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: Bing [Bot] and 13 guests