A year or two ago, I published a method of marking positions in a string to indicate whether a tool was already used. It took advantage of some of the things added for v11. I don't know if anyone ever tried it, it's kind of complex. If anyone's interested I can see if I still have it.
Basically you initiallize a string with some sort of filler like: "0000000000" Then as you hit each tool, you mark it with an 'x" This is what it would look like after hitting tool 4 and 8: "000x000x00" So for each tool you check the string position for an 'x'. If there isn't one you output the tool and put an 'x' in. --gregg "Lauzus, Frederick" wrote: > Peter, > > There is no easy way to do this, but this is one method I've used. Create > user integer variables, one for each tool station on your machine tool. > These are to be used as flags to indicate if a tool has already been > addressed. These flags are then checked in a conditional expression and will > only output the tool information if still set to zero. Once the tool > information for that station has been output that flag is set to one. > The following example is for a machine with a 16 tool magazine. > > @DECLARE > #INT #T1 > #INT #T2 > #INT #T3 > #INT #T4 > #INT #T5 > #INT #T6 > #INT #T7 > #INT #T8 > #INT #T9 > #INT #T10 > #INT #T11 > #INT #T12 > #INT #T13 > #INT #T14 > #INT #T15 > #INT #T16 > > @START > #CALL(TOOLLIST) > > @TOOLLIST > #IF(#U10=1)<***** THIS IS THE TOOL LIST SECTION *****> > #EVAL(#U17=1) > #EVAL(#U18=0) > #REPEAT(TOTEL())< > #EVAL(#U19=JTOOL(#U17) > #IF(#U19>0,AND#U19<>#U18)<#CALL(TOOLLIST2)> > #EVAL(#U18=#U19) > #EVAL(#U17=#U17+1)> > > @TOOLLIST2 > #IF(#U19=1)<#IF(#T1=1)<#EXITC>#ELSE<#EVAL(#T1=1)>> > #IF(#U19=2)<#IF(#T2=1)<#EXITC>#ELSE<#EVAL(#T2=1)>> > #IF(#U19=3)<#IF(#T3=1)<#EXITC>#ELSE<#EVAL(#T3=1)>> > #IF(#U19=4)<#IF(#T4=1)<#EXITC>#ELSE<#EVAL(#T4=1)>> > #IF(#U19=5)<#IF(#T5=1)<#EXITC>#ELSE<#EVAL(#T5=1)>> > #IF(#U19=6)<#IF(#T6=1)<#EXITC>#ELSE<#EVAL(#T6=1)>> > #IF(#U19=7)<#IF(#T7=1)<#EXITC>#ELSE<#EVAL(#T7=1)>> > #IF(#U19=8)<#IF(#T8=1)<#EXITC>#ELSE<#EVAL(#T8=1)>> > #IF(#U19=9)<#IF(#T9=1)<#EXITC>#ELSE<#EVAL(#T9=1)>> > #IF(#U19=10)<#IF(#T10=1)<#EXITC>#ELSE<#EVAL(#T10=1)>> > #IF(#U19=11)<#IF(#T11=1)<#EXITC>#ELSE<#EVAL(#T11=1)>> > #IF(#U19=12)<#IF(#T12=1)<#EXITC>#ELSE<#EVAL(#T12=1)>> > #IF(#U19=13)<#IF(#T13=1)<#EXITC>#ELSE<#EVAL(#T13=1)>> > #IF(#U19=14)<#IF(#T14=1)<#EXITC>#ELSE<#EVAL(#T14=1)>> > #IF(#U19=15)<#IF(#T15=1)<#EXITC>#ELSE<#EVAL(#T15=1)>> > #IF(#U19=16)<#IF(#T16=1)<#EXITC>#ELSE<#EVAL(#T16=1)>> > #EVAL(#S19=TDESC(#U19)) > #EVAL(#V19=TLDIA(#U19)) > #EVAL(#V18=TLEN(#U19)) > #EVAL(#V17=TLOFF(#U20)) > ( Tool matrix location =#U19 Tool Diameter.=#V19 Tool description = #S19 > Tool Length =#U20) > @ > > ============================================= > Fred Lauzus, CAM Programming Coordinator > High Steel Structures, Incorporated > mailto:[EMAIL PROTECTED] http://www.highsteel.com > ============================================= > > > -----Original Message----- > From: Bui, Peter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 24, 2001 2:15 AM > To: SmartCAM List (E-mail) > Subject: [mfg-smartcam] Tool List > > Hi all, > > I've tried out this Tool List, and found that if there is > more than one occurrences of a tool, the info for that tool will be output > again. How can this be prevented? Please help! > > @START > #CALL(TOOLLIST) > > @TOOLLIST > #IF(#U10=1)<***** THIS IS THE TOOL LIST SECTION *****> > #EVAL(#U17=1) > #EVAL(#U18=0) > #REPEAT(TOTEL())< > #EVAL(#U19=JTOOL(#U17) > #IF(#U19>0,AND#U19<>#U18)< > #EVAL(#S19=TDESC(#U19)) > #EVAL(#V19=TLDIA(#U19)) > #EVAL(#V18=TLEN(#U19)) > #EVAL(#V17=TLOFF(#U20)) > ( Tool matrix location =#U19 Tool Diameter.=#V19 Tool > description = #S19 > Tool Length =#U20)> > #EVAL(#U18=#U19) > #EVAL(#U17=#U17+1)> > @ > > Thanks > > Peter Bui > CRANE ELDEC Corporation > Phone: (425) 743-1313 Ext. 8758 > FAX: (425) 743-8549 > Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > Web Page: www.ELDEC.com <http://www.ELDEC.com> > > ====================================================================== > To find out more about this mailing list including how to unsubscribe, > send the message "info mfg-smartcam" to [EMAIL PROTECTED] > ====================================================================== > ====================================================================== > To find out more about this mailing list including how to unsubscribe, > send the message "info mfg-smartcam" to [EMAIL PROTECTED] > ====================================================================== -- Gregg Olson Development Manager SDRC CAM Products ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
