Help for repetitions counter

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

Help for repetitions counter

Postby dasvar » Thu Dec 14, 2017 4:27 pm

Hello,
I am using a subroutine to repeat a set of motions N times and I want to have a textfield on my screen that shows how many repetitions have already been done. How can I do this?

Harry
dasvar
 
Posts: 2
Joined: Thu Nov 30, 2017 7:24 pm

Re: Help for repetitions counter

Postby Robertspark » Thu Dec 14, 2017 7:56 pm

Edit your screen using the screen editor tool on the configuration tab

Add a text box, give it a unique number say 5000.

You may need to add a button to clear / reset the textbox value (it depends how your macros run)

Then edit your macro such that it stores the current cycle number and increments it by one every time it is run

And a line of code that passes this count to your textbox that you cleated.

At the end of the macro you can create some code that will reset the count to zero and clears the field
Rob

Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
UC400eth, UC300eth, UCCNC v1.2105, Neuron Lite.
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 726
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Help for repetitions counter

Postby Vmax549 » Fri Dec 15, 2017 12:20 am

What I did in the past was to create a M30 macro and add in a line of code to reset teh Rep Counter Dro at teh end of each program run . The M30 macro will run when it sees teh M30 line in teh Gcode.

(;-) TP
Vmax549
 
Posts: 982
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Help for repetitions counter

Postby dasvar » Fri Dec 15, 2017 8:43 am

Thank you both for your help, I think that I can handle it now.
Harry
dasvar
 
Posts: 2
Joined: Thu Nov 30, 2017 7:24 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 1 guest