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 10-05-2011, 03:46 PM
 
Join Date: Oct 2011
Location: USA
Posts: 4
agrimsontool is on a distinguished road
Trying to use mi5 to turn on HSM

Hello all,

I am trying to use mi5 to turn on AINano (similar to HSM on my Bridgeport 760XP3) and am running into problems. I am running Mcam 8.1 and I have it almost working I just need to tweak it a little.

AI Nano is called out like this:

Code:
N200
(1/2 FLAT ENDMILL )
G49
G5.1Q1R4            
T2M6
And it's turned of by using:
Code:
G5.1Q0
G5.1 is the code for the AI Nano mode, Q turns it either on or off, and R is a number 0-9 to tell it how much to fudge the corners.

I have mi6 set up as that R value, and that works fine. I put the following code in to my post:

Code:
phsm		#High speed machining on
      
      if mi5 = one, 
	[
	*"G49", e
	*"G5.1Q1R",*shsms, e
	]
	
	
phsmoff		#High speed machining off

      if mi5 = one, 
	[
	*"G5.1Q0", e
	]
I then put a phsm callout between ptoolcomment and the toolchange line in both the ptlchg and psof sections of the post. Like so:
Code:
ptoolcomment
      comment
      pbld, phsm, e
      pcan
      pbld, *t, "M6", e
      pindex
I also put phsmoff in the pretract section of the post. Like so:
Code:
gcode = zero
      pbld, phsmoff
      pbld, sccomp, scoolant, psub_end_mny, e
Now the problem I have is that it doesn't always associate turning AI Nano off with the correct tool. Say I have T1 a drill (Misc Values box unchecked), T2 an endmill(Misc Values box checked and mi5 as 1), and T3 a tap(Misc Values box unchecked also). What happens is I will get the G5.1Q0 line at the end of T1 instead of the end of T2. It will however turn AI Nano on correctly for T2, but it won't turn it off for T2.

After turning the debugging lines on I see that the command to turn AI Nano off in T1 comes from pretract even though the Misc Values for that tool are off. My guess is that it is reading ahead. I just don't know how to limit it from doing that.

Any help would be appreciated,
Thanks,
Jerry
Reply With Quote

  #2   Ban this user!
Old 10-06-2011, 03:56 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?

You may be setting the feature in the wrong areas
- you seem to want to have it switch ON / OFF at the toolchanges, but you may want to have it switch at the start/finish of an operation.
ie say T1 that may rough out a part and then go straight in to Finish it.


Or what about
- use MI#5 as the decider and holder of the actual value, & totally forget about using MI#6
Code:
phsm        #High speed machining on
      if mi5 > 10, mprint "ERROR - Misc Int #5 greater than 10",  exitpost$  <-- this will stop the posting until you fix it( it may be exitpost without the $) V8 is so old)
      if mi5 > zero
             [
             pbld, n, "G49", e 
             pbld, n, "G5.1 Q1 R", mi5, "( HSM -ON- )", e
             ]
      if mi5 <= zero,
            [
             pbld, n, "G5.1 Q0 ( HSM -OFF- )", e
            ]
the actual callup (phsm) may be better after the coolant callup line in BOTH the ptlchg & ptlchg0 areas
-this means it will be looked at and changed for each operation

plus
in the pretract & peof, try hard coding the OFF sequence
Code:
      pbld, "G5.1 Q0", e
PS --- looked up a later post (X2) and have attached it ( change extension to .PST to make it work )
----they are using Misc Real#1 & MR#2 , it may give some pointers
& MI#5 is used for switching outputs between feed/REV or feed/MIN.. so you may want to stay away from this interger
Attached Files
File Type: txt mpmaster.txt‎ (166.6 KB, 6 views)

Last edited by Superman; 10-06-2011 at 05:51 AM.
Reply With Quote

  #3   Ban this user!
Old 10-06-2011, 09:44 AM
 
Join Date: Oct 2011
Location: USA
Posts: 4
agrimsontool is on a distinguished road

Thanks for the info. I could hard code the phsmoff coding into the end of every tool, I was just trying to keep the code neat and clean.

I will definitely look hard at that X2 post and see if I can come up with something from that. The only other guide I have is the post processor guide from MC5.5, and I'm self taught, so I am sure I am not as proficient as I could be. But since I can't foresee us upgrading software or hardware anytime soon, it will have to do.

Thanks again.
Reply With Quote

  #4   Ban this user!
Old 10-06-2011, 12:19 PM
 
Join Date: Oct 2011
Location: USA
Posts: 4
agrimsontool is on a distinguished road

Ok, so I looked through the post you attached, and it looks like I am not doing anything different than what is shown there. I put phsmoff in pretract just like it's written in the other post.

So it seems that when I look up mi5 in phsmoff under pretract, it is reading mi5 from the next tool. If I switch to mr5 it does the same thing. It reads it from the next tool.

Any other ideas?
Reply With Quote

  #5   Ban this user!
Old 10-11-2011, 08:03 AM
 
Join Date: Oct 2011
Location: USA
Posts: 4
agrimsontool is on a distinguished road

Ok, I got it figured out. I changed my code to this:

Code:
phsm		#High speed machining on
      
      if mi5 = 1 & hsm_flag = 0, 
	[
	*"G49", e
	*"G5.1Q1R",*shsms, e
	hsm_flag = 1
	]
	
	
phsmoff		#High speed machining off
       
      if hsm_flag = 1, 
	[
	*"G5.1Q0"
	hsm_flag = 0
	]
Now it works like a champ!
Reply With Quote

Sponsored Links
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
not sure where to turn for help ArtMaybee PCB milling 6 01-26-2011 06:56 AM
mill/turn on a cin turn Robert Timby General Metal Working Machines 4 01-31-2007 10:33 PM
Which to Turn on First or Not Mr.Chips General Electronics Discussion 10 01-31-2007 08:02 PM
Cin Turn turn/mill Robert Timby General CNC (Mill and Lathe) Control Software (NC) 0 01-24-2007 07:12 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