Hello Guest it is April 26, 2024, 07:22:09 AM

Author Topic: LIcznik  (Read 8938 times)

0 Members and 1 Guest are viewing this topic.

Offline ZASto

*
  •  423 423
    • View Profile
Re: LIcznik
« Reply #10 on: September 28, 2019, 03:11:53 PM »
T1M6
G17

G0X09.048Y08.090Z0
G0X0.000Z0.000
#1200=#1200+1
M30

Do you see where you made a mistake?

In the other topic of yours Graham wrote:

Quote
Then on the end of every g-code file just before the M30 enter

#1200 = #1200 +1
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #11 on: September 28, 2019, 05:08:38 PM »
But a g-code error pops up

Offline ZASto

*
  •  423 423
    • View Profile
Re: LIcznik
« Reply #12 on: September 29, 2019, 03:41:13 AM »
But a g-code error pops up

Code: [Select]
T1M6
G17

G0X09.048Y08.090Z0
G0X0.000Z0.000
#1200=[#1200+1]
M30
%

This one does not throw error :)

When you have math operations, they have to be enclosed in square brackets. Notice the percent (%) sign at the end of the program. If your program does not have CRLF after M30, this is the way to be on the safe side, % is anyway ignored.

HTH
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #13 on: September 29, 2019, 05:00:50 AM »
Thank you very much but I still don't count the number of completed items

Offline ZASto

*
  •  423 423
    • View Profile
Re: LIcznik
« Reply #14 on: September 29, 2019, 02:34:51 PM »
Thank you very much but I still don't count the number of completed items
Not incrementing DRO, user variable incrementing.
But, you can write a macro and add it to your macro folder and it works perfectly:

Code: [Select]
count = getuserdro(1200)
count = count + 1
detuserdro(1200, count)

Save it as M900.m1s

then add it to your GCode program:

Code: [Select]
T1M6
G17

G0X09.048Y08.090Z0
G0X0.000Z0.000
M900
M30
%

It increments DRO 1200 every time before rewinding program.
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #15 on: September 29, 2019, 02:58:48 PM »
Thank you very much for help .
And how do I add a macro?

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #16 on: September 29, 2019, 03:31:46 PM »
Is that how I was supposed to do it?
Because it still doesn't work

Offline ZASto

*
  •  423 423
    • View Profile
Re: LIcznik
« Reply #17 on: September 30, 2019, 02:38:57 AM »
Ok, typing error :(
last line in macro should be setuserdro...

I realy don't like when people do blind copy/paste.
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #18 on: September 30, 2019, 03:18:17 PM »
Hello
Thank you very much, everything works beautifully, I am very grateful. Again thank you very much  :) :) :) :) :) :) :) :) :) :)

Offline Seba

*
  •  23 23
    • View Profile
Re: LIcznik
« Reply #19 on: September 30, 2019, 03:21:00 PM »
Tomorrow I will insert a screenshot of how it all looks