Hello Guest it is September 17, 2019, 08:16:13 PM

Author Topic: Probably simple but...(G-Code help)  (Read 11552 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #30 on: January 12, 2016, 03:31:41 AM »
Brilliant, thats going in for sure :)

BTW, what do these lines do?

post.Text (" X")
post.Number (Sline1,"0.0000")
post.Text(" Y")
post.Number (Sline2,"0.0000")

Obviously they are for X & Y but ??

My guess is that they tell it to run form the current X/Y location??
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #31 on: January 12, 2016, 10:03:00 AM »
Hmm, if i paste this into my post, i get an error and the post fails???

 if  (string.find(operationName, _("Outside Offset") )) then
     post.TextDirect("o549 \n")
     post.Text (" X")
     post.Number (Sline1,"0.0000")
     post.Text(" Y")
     post.Number (Sline2,"0.0000")
     post.Eol()
   end

Are you running SheetCamTNG ???
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #32 on: January 12, 2016, 10:31:55 AM »
Ok, did a search and found your original Sheetcam thread :)

You need to add this too...

ADD TO  OnRapid()

   Sline1 =  (endX * scale)
   Sline2 =  (endY * scale)

Trouble I have now is that it does not recognise the outside offset and just pastes the sub number after every M03

Do you have to manually select the operations in sheet cam as inside and outside ops - it normal does this for me.
Any ideas

Edit...

Yes you do or sheet cam makes all op an outside offset. :(

Means remembering to move the outside cut to a new layer I guess :(
« Last Edit: January 12, 2016, 10:38:36 AM by Davek0974 »
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline BR549

*
  •  6,887 6,887
    • View Profile
Re: Probably simple but...(G-Code help)
« Reply #33 on: January 12, 2016, 11:02:36 AM »
I never let Scam assign layers I do that part myself.  Scam is a bit weird in some aspects and to me auto layer assignments is one of those things.  OF course it could just be me BUT I never have problems if I do that part (;-)

That MAY be some of your weird pig tailing on cuts ???????   IF Scam starts on 1 side then ends on the other ??

(;-) TP

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #34 on: January 12, 2016, 11:55:50 AM »
Hmm, good points I guess, its a toss-up then of your cool preview method and doing the layering myself OR letting scam do the layering and having to run the full code just for a preview.

I think I might opt for your version.

I need to sort out my probe trigger logic now to stop it firing when it loads code.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline BR549

*
  •  6,887 6,887
    • View Profile
Re: Probably simple but...(G-Code help)
« Reply #35 on: January 12, 2016, 12:07:43 PM »
Scam is suppose to do a good job of auto selecting inside from outside. You may want to have a chat with Les over at Sheetcam about it.  I am very much old school and do 99% of layering in teh cad stage (Like one should be doing (;-) ) The I do not have to worry about what Scam will do with it.  I only really have 4 layers with artsy stuff.

Inside1 (0)
Inside2 (0b)
No offset (2)
Outer (1)

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #36 on: January 12, 2016, 12:51:01 PM »
Yes, that would work, i'm not so old-school and tend to go with the software ;)

I have the code in the files now, is this all that goes in the Mach screen button -
Code"M98 P549"
End

Also, back with my control logic....

I tried ANDing the trigger variable from the subroutine with the RUN led - this works fine when you run code, BUT when you load a file or do a regen it STILL triggers the probe - this seems to indicate the logic does not work as the RUN led is most definitely off when loading code.

Any ideas how i can brain logic this into working????
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline BR549

*
  •  6,887 6,887
    • View Profile
Re: Probably simple but...(G-Code help)
« Reply #37 on: January 12, 2016, 01:16:26 PM »
You may want to try the opposite of the isloading()  >>>   File loaded (led) Or figure out WHY your logic does not work.  It would seem that it should.

Yes that is all that goes into the button script. 

(;-) TP

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Probably simple but...(G-Code help)
« Reply #38 on: January 12, 2016, 01:20:40 PM »
isloading will not go in a brain AFIK, I have no macros, just g-code triggering a #var and brain monitoring it and switching an output IF two values are met - the #var being=1 AND the RUN led being on.

Unfortunately it does not work for some unknown reason, it defies logic which makes it all a nonsense.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline BR549

*
  •  6,887 6,887
    • View Profile
Re: Probably simple but...(G-Code help)
« Reply #39 on: January 12, 2016, 01:28:47 PM »
Here is a thought as wth Arts logic when you mix a true/false with a number it does not always go as one would think. Try it by adding teh two values and using that logic  1+1 = 2  so try IF =2 then run . IF you post your brain I can test it here.

(;-) TP