Modern Machine Shop

AUG 2017

Modern Machine Shop is focused on all aspects of metalworking technology - Providing the new product technologies; process solutions; supplier listings; business management; networking; and event information that companies need to be competitive.

Issue link: https://mms.epubxp.com/i/850702

Contents of this Issue

Navigation

Page 66 of 172

64 MMS August 2017 mmsonline.com CNC TECH TALK Columnist (Determine largest X value of #101-#140) #32 = #101 (Starting largest X position) # 3 3 = 10 2 (Curr ent common variable number to test) N10 W H I L E [# 3 3 L E 14 0 ] D O 1 (S t a r t o f l o o p, testing through #140) IF [#[# 3 3] GT # 32] THEN # 32 = #[# 3 3] (Retain larger value, #[#33] or keep #32) #33 = #33 + 1 (Step second-referencing value) END 1 (End of loop; #32 is the largest X position in the group) These six custom macro commands test 39 common variables. When the loop is finished, local variable #32 will contain the largest X value in the group of probed positions. This value then can be compared to the X position of the finished X surface to determine how much raw material must be removed and how many passes to take. Second-referencing variables can also be used with tool of fsets. System variables from #2001 on, for example, are commonly used with machining center CNCs to provide access to tool-length geometr y of fsets: #2001 for of fset one, #2002 for offset two and so on. Consider this series of commands that tests offset registers from 1 through 20. If any are set to zero, an alarm is sounded (possibly indicating that the operator forgot to set one of them). (Test offsets 1-20) #100 = 2001 (Current offset number to test) N10 WHILE [#100 LE 2020] DO 1 (Star t of loop, testing through offset 20) IF [#[#100] NE 0] GOTO 11 #3000 = 100 (Offset set to zero) N11#100 = #100 + 1 (Step second-referencing value) E N D 1 ( E n d o f l o o p ; i f l o o p e n d s , a l l o f f s e t registers have a value) These examples show how second-referenc- ing variables can come in handy whenever you have a series of consecutively numbered custom macro variables to query. DEBURR ANY CROSSHOLE www.jwdone.com

Articles in this issue

Links on this page

Archives of this issue

view archives of Modern Machine Shop - AUG 2017