New UCCNC function

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

Re: New UCCNC function

Postby Dan911 » Sun Oct 28, 2018 7:33 pm

Dan911 wrote: The plugin returns the true or false condition to macro so If you choose you can remove the P and plugin will do nothing except return condition and do what you like with it in macro.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Sun Oct 28, 2018 9:00 pm

Vmax549 wrote:I tried that but when it returned teh value it also shut down teh Gcode program (CycleStop) I thought that it may have been part of teh plugin issuing teh CycleStop.

HUM, (;-) TP


Tried on 2 files no problem, the third it happened. Searching for the P, adding a break fixed it.

terry6.zip
(4.18 KiB) Downloaded 592 times
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Mon Oct 29, 2018 1:54 am

Vmax549 wrote:Hi Dan, Running it with NO P# this line in teh macro shuts teh Gcode program down (CycleStop) and I cannot restart it from script.

object Returnvalue = exec.Informplugin("Conditional Gcode.dll", (object)m65);

(;-) TP


Hey Terry, I tried several Gcode programs and I now cannot reproduce this. What I originally thought what could be causing the issue and made change was not. Went back to the Terry5 upload and still can't reproduce now, so I know some sort of random problem is there. Just back from dinner and late, to tired to play with this.

Try changing all "Returnvalue" to Returnstr and see if this helps.
Code: Select all
string m65 = exec.Getcurrgcodelinetext();


object Returnstr = exec.Informplugin("Conditional Gcode.dll", (object)m65);

 if (Returnstr is string)
 {
  string str = Returnstr as string;
 
 if(str == "True")
 {
 
  //MessageBox.Show(exec.mainform, "Bool = " + str);
  exec.AddStatusmessage("Press Cycle Start to Continue");
 
  }
 
}
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Mon Oct 29, 2018 2:31 am

There is no cycle Stop() being called or jump with the P parameter eliminated. Did you try changing the Returnvalue to Returnstr? I wriiten this... so I'm certain I will see the problem if any quicker than you can.

These are the last lines sending return back to macro where you suspect the trouble is.

Code: Select all
if (result == true) { string returnstr = "True";  return (object)returnstr; }
            else { string returnstr = "False"; return (object)returnstr; }
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Mon Oct 29, 2018 3:43 am

Vmax549 wrote:Hi Dan, Yes I did try your code and it returns EMPTY, Null, " ", nothing.

Like I said earlier your true/false value WAS being return correctly. The "ONLY" problem was SOMETHING is shutting teh Gcode program down like you pressed CycleStop.

(;-) TP


Are you referring to M65 macro I posted???? Not possible, I been using. If it was true you wouldn't know the conditions were returning correct. I know a problem exist because it to happen to me, I suspect it was hanging in one of the Foreach loops. I'll find it but not tonight.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Mon Oct 29, 2018 10:42 pm

Vmax549 wrote:Hi Dan , It is not teh plugin that is shutting down teh Gcode program it is teh macro (M65).

(;-) TP

Your post seems like you found a problem to be so sure, are you going to enlighten me of the problem in the macro?
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Tue Oct 30, 2018 12:42 am

For the past hour I been going from gcode file to gcode file with jumps/no jumps different conditions and can not reproduce this problem. The plugin/macro I posted will read condition and jump to oword if true, UCCNC will continue with next line of code with spindle coolent as before M65 call.

If I find a issue I will report back.

Close but no cigar to what????

Vmax549 wrote: :twisted: I am stating a new function project. Teh object is to Make this line of Gcode work.

M65 (" if(6<=7){exec.Code("M98P2");} ")


Where's my cigar????????? :(
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby dezsoe » Tue Oct 30, 2018 7:55 am

I did find a glitch in teh MacroLoop side where IT would skip teh next line after a exec.Code() line. I simply did teh next line twice to work around it

Macros are compiled with the .Net compiler. They cannot skip any lines. Could you, please, show an example where you think it skips a line?
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: New UCCNC function

Postby Dan911 » Tue Oct 30, 2018 11:03 am

Hi Terry,
I am able to reproduce this problem at will now...and determined it's not a problem with the plugin/macro or UCCNC, the problem is with the M98 and with the M99(Return from subroutine) being called after the M30, I don't think it's being read.

Once a M65([8<9]P1) >>>>>>>>>>>>>This calls a M98

Than try to use a condition without a P >>>>>>>>>>>>>>>No M98 call

The Gcode program will hang on line until a stop/rewind.... Off to work, when home I will look at possible solutions.

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

Re: New UCCNC function

Postby dezsoe » Tue Oct 30, 2018 3:54 pm

Thanks, Terry, I'll test it.

(Before any test I think it's because the stop call that sets Ismacrostopped to true and only the first start call will clear the flag. So, all lines execute, just you don't see their results.)
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 30 guests