VERICUT Users' Forum

Due to relentless spammers, we are no longer automatically accepting new forum registrations. If you wish to register for this forum, please send an e-mail to: info@cgtech.com

You are not logged in.

#1 2015-09-22 21:40:38

Alone3
Member
Registered: 2015-01-01
Posts: 3

Variable macro B

Hello Everyone, why not read this variables in fan0m.ctl or how add these variables? Related topics encountered in the network but without answers.
#12001-#12400  or  [#_OFSDW[n]]   Tool compensation value (D code, wear) Subscript n represents a compensation number (1 to 400)
#13001-#13400  or  [#_OFSDG[n]]    Tool compensation value (D code, geometry - tool radius) Subscript n represents a compensation number (1 to 400)

O0001(CIRCLE POCKET)
G00 G17 G80 G40 G90
M06 T04(ENDMILL 10MM)
G00 G90 G54 X50 Y50
G43 H04 Z20.
S1500 M03
M8
G66 P2222 A0. D60. Z-30. R5. Q2. F500.
X50 Y50
X-50 Y50
X50 Y-50
X-50 Y-50
X0 Y0
G67
G00 Z50.
M5
M9
G91 G28 Z0.
G28 Y0.
M30
%
O2222(ROUGHT CIRCLE POCKET MACRO)
(#1 - A Z-START)
(#26 -Z Z-FINISH)
(#17 - Q STEP Z)
(#7 - D DIA HOLE)
(#9 - F FEED)
(#18 - R RETRACT)
(***WORK***)
#550=#5001(X COORD)
#551=#5002(Y COORD)
#552=#4311(H OFFSET)
#553=#[13000+#552](READ GEOMETRY)
#554=#[12000+#552](READ WEAR)
#555=#553+#554(CALC.)
#556=#555*1.6(STEP XY )
G00 X#550 Y#551
Z#18
#100=[#7/2]-[#555]
#17=ABS[#17]
#30=#1
#31=FIX[#100/#556]+1
#32=#100/#31
N9#30=#30-#17
IF[#30LT#26]THEN#30=#26
G01Z#30F#9
#33=#32
WHILE[[#33-#100]LT0.001]DO1
G01X[#550+#33]
G03X[#550+#33]I-#33J0
#33=#33+#32
END1
G00 Z#18
X#550 Y#551
IF [#30GT#26] GOTO 9
N24 M99
%

Last edited by Alone3 (2015-09-22 21:43:37)

Offline

#2 2018-02-06 18:38:51

vhubbard
Beta User
From: Dallas, TX
Registered: 2004-11-11
Posts: 220
Website

Re: Variable macro B

For about 20 years we have been asking CGTech for a true "C" type tool offset table in Vericut.  One that supports Len, Len W, D, DW. for each table entry.  No luck yet.  Maybe if more people ask...
We add 800 variable entries to our control to support  "C" type offset 1-199.   (I wrote a script to generate the code when needed).  Example

For the first entry 10001:
<Group Name="10001" Type="variable" Description="TL Value" Field="0">
      <ConditionMacro>
        <Macro Name="TableIndex" Scan="no" AfterMotion="no">
          <Override  Type="value"  Value="1"  Units="0"/>
        </Macro>
        <Macro Name="TableValues" Scan="no" AfterMotion="no">
          <Override  Type="expression"  Value="#10001"  Units="0"/>
        </Macro>
        <Macro Name="SetTableValues" Scan="no" AfterMotion="no">
          <Override  Type="text"  Value="Tool Length Compensation"/>
        </Macro>
      </ConditionMacro>
    </Group>
For the second 11001  Notice the TableValues definition:

    <Group Name="11001" Type="variable" Description="TL Value" Field="0">
      <ConditionMacro>
        <Macro Name="TableIndex" Scan="no" AfterMotion="no">
          <Override  Type="value"  Value="1001"  Units="0"/>
        </Macro>
        <Macro Name="TableValues" Scan="no" AfterMotion="no">
          <Override  Type="expression"  Value="#11001"  Units="0"/>
        </Macro>
        <Macro Name="SetTableValues" Scan="no" AfterMotion="no">
          <Override  Type="text"  Value="Tool Length Compensation"/>
        </Macro>
      </ConditionMacro>
    </Group>
For D:
<Group Name="16001" Type="variable" Description="CC Value" Field="0">
      <ConditionMacro>
        <Macro Name="TableIndex" Scan="no" AfterMotion="no">
          <Override  Type="value"  Value="1"  Units="0"/>
        </Macro>
        <Macro Name="TableValues" Scan="no" AfterMotion="no">
          <Override  Type="expression"  Value="#16001"  Units="0"/>
        </Macro>
        <Macro Name="SetTableValues" Scan="no" AfterMotion="no">
          <Override  Type="text"  Value="Cutter Compensation"/>
        </Macro>
      </ConditionMacro>
    </Group>

    <Group Name="17001" Type="variable" Description="CC Value" Field="0">
      <ConditionMacro>
        <Macro Name="TableIndex" Scan="no" AfterMotion="no">
          <Override  Type="value"  Value="1001"  Units="0"/>
        </Macro>
        <Macro Name="TableValues" Scan="no" AfterMotion="no">
          <Override  Type="expression"  Value="#17001"  Units="0"/>
        </Macro>
        <Macro Name="SetTableValues" Scan="no" AfterMotion="no">
          <Override  Type="text"  Value="Cutter Compensation"/>
        </Macro>
      </ConditionMacro>
    </Group>

Offline

Board footer