Hello Guest it is July 19, 2019, 01:18:18 PM

Author Topic: Displaying Loop Number  (Read 1680 times)

0 Members and 1 Guest are viewing this topic.

Displaying Loop Number
« on: April 18, 2015, 09:16:21 PM »
Hi guys,
Just a simple query, is it possible to display to loop number as you work?
The reason I ask is I sometimes do work that en-tales loops upto 25 times and it would be good to know how far along the program is.

Offline BR549

*
  •  6,874 6,874
    • View Profile
Re: Displaying Loop Number
« Reply #1 on: April 19, 2015, 01:49:05 PM »
Yes there is a DRO that shows loops. You will have to look it up in one of the manuals or reference guides.

(;-) TP
Re: Displaying Loop Number
« Reply #2 on: April 19, 2015, 05:31:11 PM »
Thanks , I'll see if I can find it.
Re: Displaying Loop Number
« Reply #3 on: April 20, 2015, 04:42:40 AM »
Well I have had a look on the Wiki and couple of other places and I can't see any DRO that will display the loop number. Any one have any idea's?

Offline RICH

*
  • *
  •  7,342 7,342
    • View Profile
Re: Displaying Loop Number
« Reply #4 on: April 20, 2015, 07:55:14 AM »
OEM DRO 78 REPETITIONS

RICH
Re: Displaying Loop Number
« Reply #5 on: April 20, 2015, 08:28:12 AM »
Thanks Rich, I was looking for loops!
Re: Displaying Loop Number
« Reply #6 on: April 20, 2015, 04:27:07 PM »
I also wanted to see how many loops remained in a running program. However, I used OEM 222. Here is my setup.

1. Make a tiny DRO, about half the size of the G-code button  that is next to the Reset button, on the standard 1024 screen. I used MachScreen. There is some space just level with the top of the Reset button, to the right.
2. Click on the DRO after you have it to the right size and place, and a window will open up on the right for setting the parameters.
3. Click on the "Format" line, and the OEM functions open up.
4. Scroll down until you get to "Sub program depth".
5. Double click, and all the info is entered into the window.
6. Edit the format line, dbl click and a new window opens up for formatting the number output. I used; 2 leading digits, 0 trailing digits, Type (radio buttons) double.
The format should now show %2.Of
7. Save file and exit MachScreen.
Run a test program with L10, and the numbers in the new DRO will start at 10, and count down with each pass through the loop.

John
Re: Displaying Loop Number
« Reply #7 on: April 20, 2015, 07:04:49 PM »
Thanks John, I'll give it a try today.
Re: Displaying Loop Number
« Reply #8 on: April 20, 2015, 08:56:47 PM »
Well guys John is the winner.
The 78 OEMDro doesn't give any repetitions Rich.

My VBscript (Gives a nice Message in the Status area)
Message "Loop number is " & GetOEMDro(222) 

Saved as M1043.m1s in my Macros folder(under profile name)

My Code (XYZ Movement test or warm-up)

%Feed Rate
F3000
% House Keeping
G21 G90
% Do the loops
M98 P1234 L10
%M1043 Placed here the macro doesnt work
%Reset
M30
%The actual Program - Comment out what you dont need
O1234
%Macro placed here inside the loop works
M1043
G1 Y-20 X20 Z3
G1 Y20 X-20
g1 Z-10
G1 Y0 X0 Z0
g1 Z0
M99