CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > CAM Software > Mastercam > Post Processors for MC



This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-22-2011, 03:47 PM
 
Join Date: Oct 2011
Location: US
Posts: 18
Avsfan135 is on a distinguished road
outputting program number to NCI maybe a post issue??

Ive been working on getting my post exactly how I want it Im starting with mplfan.pst for fanuc lathe

Its all good except that I cant get it to post the program number that I enter in the files page of my machine group properties

I looked at the NCI and didnt see it outputted anywhere but that doesnt mean much because I cant make sense of most of the NCI

any help would be greatly appreciated

Thanks
Nick
Reply With Quote

  #2   Ban this user!
Old 11-22-2011, 04:32 PM
WallyL7's Avatar  
Join Date: Dec 2008
Location: USA
Posts: 488
WallyL7 is on a distinguished road

I've never done it that way - mainly because I usually only have a group or 2 but will almost always have more than one operation group within the machine group...so


The way I do it is highlight all toolpaths (that are included in the operation), then right click, then "edit selected operations" then "change program #

Each of my operation groups has a program number this way - as well as a different name (operation 1, 2, etc...)
__________________
Tim
Reply With Quote

  #3   Ban this user!
Old 11-23-2011, 05:33 AM
Superman's Avatar  
Join Date: Dec 2008
Location: Krypton
Age: 51
Posts: 1,556
Superman is on a distinguished road
Buy me a Beer?

Originally Posted by Avsfan135 View Post
Ive been working on getting my post exactly how I want it Im starting with mplfan.pst for fanuc lathe

Its all good except that I cant get it to post the program number that I enter in the files page of my machine group properties

I looked at the NCI and didnt see it outputted anywhere but that doesnt mean much because I cant make sense of most of the NCI

any help would be greatly appreciated

Thanks
Nick
Mastercam can use the toolpath group name as the NCI & NC filenames, settngs are in the System config file. You may have to customise your post to have it read the comment, parse it, & place the O#### correctly...but then you are locked into programming in this fashion for this post, call in another MCX file programmed for a different control or by someone else, and your customised post may output a few name &/or O#### errors

But it is easier to leave all that alone, let the machine & toolpath group names be the descriptive comment zones that they are.
Then select the operations you want posting as a group to 1 file,
--> R-click "Change NC file name" ( this is the name of the NC file that you want ),
--> R-click "Change program #" ....(this is the O#### on the first line of that NC file ).
Reply With Quote

  #4   Ban this user!
Old 11-23-2011, 07:09 AM
 
Join Date: Oct 2011
Location: US
Posts: 18
Avsfan135 is on a distinguished road

Thanks guys! I'll give that a try and report back

Superman the program name and time and date codes are all correct and its posting with no errors the only problem I'm having is with the number.

Thanks again
Nick
Reply With Quote

  #5   Ban this user!
Old 11-23-2011, 07:32 AM
 
Join Date: Oct 2011
Location: US
Posts: 18
Avsfan135 is on a distinguished road

unfortunately that didnt work..

i can show the example of my NCI and post and see if you guys see anything

NCI first section...


1050
14 42 22 11 2011 12 24 11 H:\NICKS STUFF\LUBRICATOR\LB-D24NSLT- OP 2.MCX-5
999
66 0 1
1051
Lathe Default
1053
Machine Group-1
1008
FACE
1011
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
1012
1 0 0 0 0 0 0 0 0 0
1013
0 0.03125 0. 0 5 0. 0. 0. 102 OD ROUGH RIGHT - 80 DEG.
1014
0. 1. 0. 0. 0. 1. 1. 0. 0.
1016
1 0 66 1 0. 0. 0. 41 0 0 0 0 0. 4 1 52 1 13
1017
1. 0. 0. 0. 1. 0. 0. 0. 1.
950
0 0 0 46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1025
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1027
1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.
1020
1.8125 2.64 2.64 -0.84375 0. 0. 0 0. 0. 0. 0. 0 10000 STEEL inch - 1030 - 200 BHN
20010
TOP
20011


that is the first section thru the first tool



Here is the part of my post that sets up the format for the program number


# --------------------------------------------------------------------------
#Move comment (pound) to output colon with program numbers
fmt O 7 progno$ #Program number
#fmt ":" 7 progno$ #Program number
fmt O 7 main_prg_no$ #Program number
#fmt ":" 7 main_prg_no$ #Program number
fmt O 7 sub_prg_no$ #Program number
#fmt ":" 7 sub_prg_no$ #Program number


and the part that sets up the header

pheader$ #Start of file
if miscopflag = zero,
[
"%", e$
sav_spc = spaces$
spaces$ = 0
#*progno$, " (", sprogname$, ")", e$
*main_prg_no$, e$
"(", sprogname$, ")", e$
#"(", "DATE=DD-MM-YY - ", date$, time$, ")", e$ #Date and time output Ex. 12-02-05 15:52
#"(", month$, "-", day$, "-", year$, ")", e$ #Date output as month,day,year - Ex. 02-12-05
"(", *smonth, " ", day$, " ", *year2, ")", e$ #Date output as month,day,year - Ex. Feb. 12 2005
#"(", "TIME - ", time$, ")", e$ #24 hour time output - Ex. 15:52
"(", ptime ")", e$ #12 hour time output 3:52 PM




and here is an example of a program posted

%
O0000
(T)
(NOV. 23 2011)
(6.09 AM)
G20
( FACE )
G0 X10. Z10.
G0 T0404
G97 S726 M03
G0 X2.84 Z0. M8
G50 S2500
G96 S540
G99 G1 X1.5625 F.006
G0 Z.1
( ROUGH OD )
G96 S450
X2.5935
Z.2092
G1 Z.1092 F.01
Z-1.1759
X2.7664 Z-1.2624
X2.9078 Z-1.1917
G0 Z.21
X2.4205
G1 Z.11
Z-1.0894
X2.6135 Z-1.1859
X2.7549 Z-1.1152
G0 Z.21
X2.2476
G1 Z.11
Z-.1473
G3 X2.27 Z-.1756 I-.03 K-.0283
G1 Z-1.0142
X2.4405 Z-1.0994
X2.582 Z-1.0287
G0 Z.21
X2.0746
G1 Z.11
Z-.0954
X2.2287 Z-.1399
G3 X2.2676 Z-.1657 I-.0206 K-.0358
G1 X2.409 Z-.095
G0 Z.21
X1.9017
G1 Z.11
Z-.0455
X2.0946 Z-.1011
X2.2361 Z-.0304
G0 Z.21
X1.7288
G1 Z.11
Z.0045
X1.9217 Z-.0512
X2.0631 Z.0195
( FINISH )
G96 S550
G0 Z.0958
X1.7188
G1 Z-.0042 F.006
X2.2188 Z-.1485
G3 X2.25 Z-.1756 I-.0156 K-.0271
G1 Z-1.0183
X2.741 Z-1.2638
X2.8825 Z-1.1931
M9
G0 X10. Z10. T0400
M05
M01



I know that is a lot of info but if you see anything that would be great.

I cant find anything else in the post about the program number and I dont see it posted in the NCI it should be #3520
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-23-2011, 07:35 AM
 
Join Date: Oct 2011
Location: US
Posts: 18
Avsfan135 is on a distinguished road

I did just find this at the bottom of the NCI...

C:\USERS\PUBLIC\DOCUMENTS\SHARED MCAMX5\LATHE\TOOLS\NONE
20800
0.
1002
3520 100 10 2 2 10000 8 -450 -0.006 1 0.83207792 0. 0.09542208 5. 0. 10. 1 0.
0
0 0.83207792 0. 0.09542208 1000. 90000
1
0 0.83207792 0. -0.00457792 -0.006 52000
1
0 0.78172258 0. -0.05493326 -0.006 1100
1
0 0.7110119 0. 0.01577742 -0.006 50200
0
0 0.7110119 0. 0.03 1000. 10000
1003
5. 0. 10.

So that is obviously where is outputting the program number I was expecting it at the beginning
Reply With Quote

  #7   Ban this user!
Old 11-23-2011, 08:04 AM
 
Join Date: Oct 2011
Location: US
Posts: 18
Avsfan135 is on a distinguished road

OK I fixed it the original suggestion that both of you had was correct but in trying to fix it I had altered my post and never put it back when it didnt work...DOH

thanks again for all of your help!

Nick


it was here


pheader$ #Start of file
if miscopflag = zero,
[
"%", e$
sav_spc = spaces$
spaces$ = 0
#*progno$, " (", sprogname$, ")", e$
*main_prg_no$, e$ ( I had changed that to main_prg_no and should have left it at progno and just changed my # in mastercam like you suggested)
"(", sprogname$, ")", e$
#"(", "DATE=DD-MM-YY - ", date$, time$, ")", e$ #Date and time output Ex. 12-02-05 15:52
#"(", month$, "-", day$, "-", year$, ")", e$ #Date output as month,day,year - Ex. 02-12-05
"(", *smonth, " ", day$, " ", *year2, ")", e$ #Date output as month,day,year - Ex. Feb. 12 2005
#"(", "TIME - ", time$, ")", e$ #24 hour time output - Ex. 15:52
"(", ptime ")", e$ #12 hour time output 3:52 PM
Reply With Quote

  #8   Ban this user!
Old 11-23-2011, 05:18 PM
Superman's Avatar  
Join Date: Dec 2008
Location: Krypton
Age: 51
Posts: 1,556
Superman is on a distinguished road
Buy me a Beer?

Originally Posted by Avsfan135 View Post
Code:
# --------------------------------------------------------------------------
#Move comment (pound) to output colon with program numbers
fmt O 7 progno$ #Program number
#fmt ":" 7 progno$ #Program number
fmt O 7 main_prg_no$ #Program number
#fmt ":" 7 main_prg_no$ #Program number
fmt O 7 sub_prg_no$ #Program number
#fmt ":" 7 sub_prg_no$ #Program number
the progno$ is the O#### for the NC file you are creating
the main_prg_no$ & sub_prg_no$ relate to the subprogram & subroutine area of the newly created NC file, & are created automatically. My post makes the sub numbers +1 to the progno$ so it keeps them together in the control
( highlighted blue are my changes )

Code:
psub_call_trans #Translate level calls from toolchange, user
      if mi1$ <= one, result = mprint(shomeserror)
      sav_absinc = absinc$
      #Mirror or Rotate Coord's
      if sub_trnstyp$ = zero | (sub_trnstyp$ = one & mr_rt_actv),
        [
        #The original pattern is not mirrored or rotated
        if sub_sec_no$,
          [
          absinc$ = zero
          if sub_trnstyp$, psub_rotate
          else, psub_mirror
          ]
        mr_rt_actv = three
        ]
      else, #Translate
        [
        if sub_mny_t$,
          [
          if mi1$ > one, absinc$ = zero
          pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, pfzout, e$
          pe_inc_calc
          ps_inc_calc
          ]
        ]
      absinc$ = sav_absinc
      result = nwadrs(strp, main_prg_no$)
    main_prg_no$ = main_prg_no$ + progno$
    if progno$ = main_prg_no$, result = mprint(sprgnerror)
      pbld, n$, "M98", *main_prg_no$, e$
      prv_feed = c9k #Force feed in sub
psub_mirror     #Mirror start code, user
      #Mirror Y axis
      if sub_trnmthd$, pbld, n$, *sgabsinc, strns_mir_on, *sub_trnsx$, e$
      #Mirror X axis
      else, pbld, n$, *sgabsinc, strns_mir_on, *sub_trnsy$, e$
psub_rotate     #Rotate start code, user
      pbld, n$, *sgcode, *sgabsinc, strns_rot_on, *sub_trnsx$, *sub_trnsy$,
        [absinc$ = one], *sgabsinc, e$
psub_st_m$       #Header in main level
      result = nwadrs(stro, main_prg_no$)
    "()", e$
      *main_prg_no$, "(SUB USED IN", *progno$, ")", e$
      #G51/G68 requires absolute position on first move
      if mr_rt_actv & absinc$ = one,
        [
        sav_absinc = absinc$
        absinc$ = zero
        prv_absinc$ = m_one
        prv_xabs = m_one
        prv_yabs = m_one
        ]
      else, pbld, n$, sgabsinc, e$
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!- Outputting Common variable values into a program yaji63 Fanuc 20 11-14-2011 07:41 AM
Outputting Common variable values into a program (with automated program number) yaji63 Fanuc 0 12-27-2010 02:55 AM
outputting variables to a program bob in windsor Fanuc 4 03-21-2010 10:43 AM
How do i get my program number not theirs robertbair Fanuc 4 12-06-2007 11:13 AM
(Brackets) after Program Number (O) alanblackwell G-Code Programing 9 08-09-2005 05:27 PM




All times are GMT -5. The time now is 05:32 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361