Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 03:18:41 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  counting iterations of macro
Pages: 1   Go Down
Print
Author Topic: counting iterations of macro  (Read 663 times)
0 Members and 1 Guest are viewing this topic.
rayscott
Active Member

Offline Offline

Posts: 6


View Profile
« on: June 16, 2008, 01:22:36 PM »

Hello all,

I am running programs that need to load a part, do movements, other stuff, move...etc... unload part, .. restart.  For now, the operator watches the machine run for several hours as it loads and unloads from a magazine.  I don't have a "part in magazine" detector and just want to tell the program to run 16 cycles.  I am pretty good at writing macros.. How would I recall values of variables to count through 16 cycles?

Thank You,
Ray Scott
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Online Online

Posts: 770


Briceville, TN, USA



View Profile WWW
« Reply #1 on: June 16, 2008, 01:31:11 PM »

you can run a "G code sub routine", or if you want you can use "Vars" to hold your counts.

SetVar(100, 16) will set the # 16 in the VAR 100,
GetVar(100) will get the value in VAR 100

scott
Logged

All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
vmax549
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #2 on: June 25, 2008, 10:14:55 AM »

Ray I believe that mach has a built in loop counter that runs with subloop.

DRO# 222



Hope that helps, (;-) TP
« Last Edit: June 25, 2008, 10:20:11 AM by vmax549 » Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!