New UCCNC function

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

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 3:11 am

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");} ")





Oh, ok I was trying to do what you first posted. :?
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 2:42 pm

Yes, UCCNC don't like YOU messing with axis positions when Gcode running.

Use the format shown below, in brackets is condition and number after L is the UCCNC line number it will go to. Make sure to use Macro in zip.
You will get a Press Cycle start status message, this can easily be removed.

G90
G0 X0 Y0 Z0
M65 ( [6<=7]L4 )
G1 X10 F50
o2
G1 Y10 F50
G0 X0 Y0
M30

EXPERIMENTAL PURPOSE ONLY!!!!

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

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 5:39 pm

Terry it does work. I see in your status message that it’s being sent twice. This means you didn’t use the new macro inside the zip file like I said to make sure to do in instructions

Btw it does not run in a loop
Last edited by Dan911 on Fri Oct 26, 2018 5:49 pm, edited 1 time in total.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby dezsoe » Fri Oct 26, 2018 5:41 pm

Terry, 6 is usually less than 7, so it will jump to line 4 and check it again. Don't forget: the line numbering begins with zero. :)
dezsoe
 
Posts: 2055
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 6:10 pm

Line number is not the problem, the older macro is. Had same problem, take look and older and will see sending string twice.
Tested xp32 and 8.1 64
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 7:05 pm

No I haven’t tried it, you posted it didn’t work or removed. I will try when home, not in front of comp now.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 8:25 pm

Not familiar with M98 P2 at all. Is it in manuaul?
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Fri Oct 26, 2018 8:36 pm

Dan911 wrote:Not familiar with M98 P2 at all. Is it in manual?



I see...cool

I wish I tested this before, may take a different approach using with condition. Can eliminate a lot of code if can get it to work.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: New UCCNC function

Postby Dan911 » Sun Oct 28, 2018 1:57 pm

Hi Terry,
The M98P works much better than the method I conjured up.

Playing around with this again this morning and starting to come into focus to me of what's possible and what's not. The conditional side of plugin I sort of slapped together and had some issues, I fixed and now works well, it will also read the #variables as there value.

The jump to line works great with the M98P?, problem is I know nothing about parametric programing and what's expected of this jump. Is it up to parametric programmer to be in correct XY position before jump in code like your sample Gcode?, or is a safeZ retract expected and redirect to this new xy position if not there.

One thing is for sure I see, it's not possible to redirect/insert code in running Gcode, a Stop() is needed. With this stop brings a cycle start press.

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

Re: New UCCNC function

Postby Dan911 » Sun Oct 28, 2018 5:54 pm

Hi Terry, this is what I did.

Will read condition and if true z will go to safeZ and Gcode pointer will jump to o#, a Cycle Start press is required to continue with Gcode. All settings will remain on as before M65 call.
Make sure the P value matches the o-value or Gcode will remain idle.

Format as follows.... M65([8<10]P1) only the condition in brackets, right now the condition is only capable of 2 variables but can read the #0 - #999 in Gcode. 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.

The attachment Capture.JPG is no longer available


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

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 17 guests

cron