Results 1 to 5 of 5

Thread: Trying to use mi5 to turn on HSM

  1. #1
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    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


  2. #2
    Flies Superman's Avatar
    Join Date
    Dec 2008
    Location
    Krypton
    Posts
    1772
    Downloads
    0
    Uploads
    0
    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 Attached Files
    Last edited by Superman; 10-06-2011 at 06:51 AM.


  3. #3
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0
    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.


  4. #4
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0
    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?


  • #5
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0
    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!


  • Similar Threads

    1. not sure where to turn for help
      By ArtMaybee in forum PCB milling
      Replies: 6
      Last Post: 01-26-2011, 07:56 AM
    2. mill/turn on a cin turn
      By Robert Timby in forum General Metal Working Machines
      Replies: 4
      Last Post: 01-31-2007, 11:33 PM
    3. Which to Turn on First or Not
      By Mr.Chips in forum General Electronics Discussion
      Replies: 10
      Last Post: 01-31-2007, 09:02 PM
    4. Cin Turn turn/mill
      By Robert Timby in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 0
      Last Post: 01-24-2007, 08:12 PM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.