-----Original Message-----
From: Lauzus, Frederick [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 10:38 AM
To: Michael Senack; '[EMAIL PROTECTED]'
Subject: RE: Passing values from macro variables to template variables
Mike,
Questions:
1. What method are you using to assign the value of #S1?
I'm assigning the #S1 via user input from the CUT2.mcl
The format is as follows HS????A REV.?? DWG # DIE #
2. What method are you using to attempt to pass the value
of #PROGA and #PROGB to the template file?
All I'm trying to pass to the template file is #S1 and #PROGB
string variables. The #PROGB variable is the first six
charactors of #S1 variable.
ie: #S1 = HS9999A REV.A 244898-003 DIE 222 PUNCH
#PROGB = HS9999
3. The template variable #S1 is a pre-declared user string variable
while #PROGA and #PROGB are not. Have they been declared in the
@DECLARE section of the template file?
@DECLARE
#STR #PROGA
#STR #PROGB
I've done the following for #PROGB
@DECLARE
#STR #PROGB
4. I believe you have a syntax error in the following line (#PROBA?):
GEO D:\\JOB\\#PROBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001
TO
Yes there is a syntax error. I fixed it but no go.
----------------------------------------------------------------------------
-
Technical Mumbo Jumbo:
The value of Macro variables are not automatically shared with the
template file. you can transfer variables to the code generator by
several methods:
1. Inserting a user command with a variable assignment into the
database with an active step. The values will be in effect at
the point in database where they are inserted and will remain
in effect unless re-evaluated.
UEVENT[XS=0, YS=0, LV=0, TX=STRTMP("#PROGA=%PROGA,#PROGB=%PROGB")]
2. Placing the variables in the Job Notes section of the planner.
These values will be in effect at the beginning of coding and
will remain in effect unless re-evaluated.
JOS_CONTEXT_OPEN[BASEITEM=16, USERNAME=""]
JOS_FIELD_EDIT[FLDNAME="job_note", EXPR=STRTMP("#PROGA=%PROGA\n
#PROGB=%PROGB")]
JOS_CHANGES_PROMOTE[]
JOS_CONTEXT_CLOSE[]
NOTE: This macro command will overwrite your Job Notes section.
If you wish to append the variables to the current
information you must save it to a variable first, then
concatenate the string.
STRING:#JobNotes
JOS_CONTEXT_OPEN[BASEITEM=16, USERNAME=""]
#JobNotes=jos_str(job_note)
JOS_CONTEXT_CLOSE[]
JOS_CONTEXT_OPEN[BASEITEM=16, USERNAME=""]
JOS_FIELD_EDIT[FLDNAME="job_note", EXPR=STRTMP("%JobNotes\n
#PROGA=%PROGA\n
#PROGB=%PROGB")]
JOS_CHANGES_PROMOTE[]
JOS_CONTEXT_CLOSE[]
3. Placing the variables in the Step Notes section of a step in
the planner. These values will be in effect when the step
becomes active and will remain in effect unless re-evaluated.
This example uses step 10.
JOS_CONTEXT_OPEN[BASEITEM=1, USERNAME="10"]
JOS_FIELD_EDIT[FLDNAME="st_notes", EXPR=STRTMP("#PROGA=%PROGA\n
#PROGB=%PROGB")]
JOS_CHANGES_PROMOTE[]
JOS_CONTEXT_CLOSE[]
NOTE: This macro command will overwrite your Step Notes section.
If you wish to append the variables to the current
information you must save it to a variable first, then
concatenate the string.
STRING:#StepNotes
JOS_CONTEXT_OPEN[BASEITEM=1, USERNAME="10"]
#StepNotes=jos_str(st_notes)
JOS_CONTEXT_CLOSE[]
JOS_CONTEXT_OPEN[BASEITEM=1, USERNAME="10"]
JOS_FIELD_EDIT[FLDNAME="st_notes", EXPR=STRTMP("%StepNotes\n
#PROGA=%PROGA\n
#PROGB=%PROGB")]
JOS_CHANGES_PROMOTE[]
JOS_CONTEXT_CLOSE[]
BUG: There seems to be a problem with this method in that it
only recognizes the first variable of a multiple list.
This was not always the case. Does anyone in the group have
any experience with this problem?
=============================================
Fred Lauzus, CAM Programming Coordinator
High Steel Structures, Incorporated
mailto:[EMAIL PROTECTED] http://www.highsteel.com
=============================================
-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 8:48 AM
To: '[EMAIL PROTECTED]'
Subject:
1) This is the TMP file
@START
CUT100 COMPLETE MM
! #S1
!
! BLOUNT CANADA 5 CUT CARBIDE 80 MM HIGH WORKPIECES
!
CNC RES
CNC SAV RETRY FROM : 9 TIMES WITH PRG TECH SKIP STP IF NOT THREAD STOP
TEC D:\\TECH\\5C_80
CNC SCA 01.000:1
CNC ROT +000.00000
!
DDR D01, P16, S01, T01
GEO D:\\JOB\\#PROBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO
999
DDR D02, P16, S02, T02
GEO D:\\JOB\\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO
999
DDR D03, P16, S03, T03
GEO D:\\JOB\\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO
999
DDR D04, P16, S04, T04
GEO D:\\JOB\\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO
999
DDR D05, P16, S05, T05
GEO D:\\JOB\\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO
999
!
CNC OFS D10=+0.250 ! MAIN CUT OFFSET FROM 5C_80.TED
!
DDR D10, P16, S96, T96 ! CUTS OFF PUNCH
GEO D:\\JOB\\#PROGBB EXEC STP SKIP WIE EXEC T01 EXEC S01 FROM 001 TO
999
FIN
2) this is part of the MCL for #PROGB string variable that I'm
trying to pass to the above template file...
AUTO_ANSWER[AA="OK"]
STRING: #PROGB
STRING: #B
#PROGB = STRSUB(#S1, 1, 6)
#B = B
SAVE[FN=STRTMP("%PATH%PROGB%B"), FT=3, GS=0, WP="XY_PLANE"]
CODE[FN=STRTMP("%PATH%PROGB%B%END"), MS1="W:\\SM4\\SMF\\HS.SMF",
MT1="W:\\SM4\\SMF\\HS.TMP",SH=1, DC=1, ST=1, DT=1, SP=9]
AUTO_ANSWER[AA="OFF"]
3) this is what I get when I code using step 1 template file
CUT100 COMPLETE MM
! HS9999B CUTS OFF TW0 PUNCHES <----- #S1 is okay!
!
! BLOUNT CANADA 5 CUT CARBIDE 80 MM HIGH WORKPIECES
!
CNC RES
CNC SAV RETRY FROM : 9 TIMES WITH PRG TECH SKIP STP IF NOT THREAD STOP
TEC D:\TECH\5C_80
CNC SCA 01.000:1
CNC ROT +000.00000
!
DDR D01, P16, S01, T01
GEO D:\JOB\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
<---- #PROGB does not work!
DDR D02, P16, S02, T02
GEO D:\JOB\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D03, P16, S03, T03
GEO D:\JOB\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D04, P16, S04, T04
GEO D:\JOB\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D05, P16, S05, T05
GEO D:\JOB\#PROGBA SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
!
CNC OFS D10=+0.250 ! MAIN CUT OFFSET FROM 5C_80.TED
!
DDR D10, P16, S96, T96 ! CUTS OFF PUNCH
GEO D:\JOB\#PROGBB EXEC STP SKIP WIE EXEC T01 EXEC S01 FROM 001 TO 999
FIN
4) this is what I want the template file to output
CUT100 COMPLETE MM
! HS9999B CUTS OFF TW0 PUNCHES
!
! BLOUNT CANADA 5 CUT CARBIDE 80 MM HIGH WORKPIECES
!
CNC RES
CNC SAV RETRY FROM : 9 TIMES WITH PRG TECH SKIP STP IF NOT THREAD STOP
TEC D:\TECH\5C_80
CNC SCA 01.000:1
CNC ROT +000.00000
!
DDR D01, P16, S01, T01
GEO D:\JOB\HS9999A SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D02, P16, S02, T02
GEO D:\JOB\HS9999A SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D03, P16, S03, T03
GEO D:\JOB\HS9999A SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D04, P16, S04, T04
GEO D:\JOB\HS9999A SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
DDR D05, P16, S05, T05
GEO D:\JOB\HS9999A SKIP STP EXEC WIE EXEC T01 EXEC S01 FROM 001 TO 999
!
CNC OFS D10=+0.250 ! MAIN CUT OFFSET FROM 5C_80.TED
!
DDR D10, P16, S96, T96 ! CUTS OFF PUNCH
GEO D:\JOB\HS9999B EXEC STP SKIP WIE EXEC T01 EXEC S01 FROM 001 TO 999
FIN
After running the MCL file, I checked my variables and they are as
follows...
PROGB = HS9999 = STRING
S1 = HS9999A REV.AA TEST = STRING
My question is how come I cannot get PROGB to code HS9999 in
the template file?
Regards,
Michael Senack, X354
Your local friendly neighborhood CNC Programmer
======================================================================
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]
======================================================================