586,911 active members*
4,149 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > BobCad-Cam > Help with V24 Post Processor - Associating Work Coordinates with Multi-heads
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2012
    Posts
    1195

    Help with V24 Post Processor - Associating Work Coordinates with Multi-heads

    After retrofitting my CNC router with a new Mach 3 controller, I'm now trying to get a V24 post processor to match up. The router can be seen here, with a video of how it operates on the second page:

    http://www.cnczone.com/forums/csmio_...csmio_ip-.html

    The machine is an industrial machine with multiple heads. It originally had a pair of piggy back drills, but I found they were not very useful due to a limited stroke (router they are on may interfere more often than not), so they have been omitted and there are now just two router heads. The heads are labeled "1" and "2", with corresponding M commands to lower each (M31 for head 1, M32 for head 2). Both heads can be used synchronized if they have the same tool and are calibrated to each other, in which case I call for tool three (as if one tool is in use) which generates command M33 that lowers both heads. M5 cancels all head (by raising them) in addition to stopping the spindle. Since it's not really a tool changer, I modified the post processor to use the tool number to determine which head is in use by the following entry in the post processor:

    Tool change
    n,spindle_off
    n,"G0 Z0."
    n_forced,"M3",list_tool_number
    n,spindle_on,s
    n,absolute_coord
    n,rapid_move,force_x,xr,force_y,yr,rotary_xyr_angl e
    n,rapid_move

    This works well, though the one problem I haven't solved is how to add a work coordinate specific to the head. The bolded line just adds the tool number (1 ,2, or 3) to the text "M3" create M31, M32, and M33, but the work coordinates are different in that they would be G54, G55, and G56. If there is a way to add 3 to each tool number, and add that to the end of "G5" in a similar manner to the M codes, it would be perfect. Is that possible? If so, what is the correct format for something like "list_tool_number+3"?

    What is the difference between tool_number and tool register value? Can I use the option to add 3 to the tool number to create a tool register value? If so, can I then make a call to list the tool register value? I'm open to other ideas as to how to do this as well, these are just some thoughts on direction that seem like they might work if I know the format.

    The other hurdle I've found is that there is a persistent Z "clearance plane" value set that I can't change when profiling or drilling, etc. It always is set at "2.540" (mm in my case), but the top of my Z stroke is "0". Is there a setting in Bobcad that automatically populates that field? If so, how do you change it?

    Thanks for any help!

  2. #2
    Join Date
    Mar 2012
    Posts
    1570
    Here is a post I wrote for a 4 head router were you can choose which heads are active. Check it out maybe it will help.

    If you need a scripted post made for you we do offer a scripting service. Use this link to learn more: http://bobcad.com/wp-content/media/p...ng-request.pdf
    Al DePoalo
    Partner Product Manager BobCAD CAM, Inc. 866-408-3226 X147

  3. #3
    Join Date
    Sep 2012
    Posts
    1195
    Thanks Al, I'll take a look at that post. Do you happen to know how to change the "Clearance Plane" value shown in the image below? It is never a selectable variable for me, but it always shows up in the code where I have to change it to "0" instead of 2.540 to prevent the Z axis from tripping the limit switch.


  4. #4
    Join Date
    Mar 2012
    Posts
    1570
    in the cam tree edit your stock and change your clearance plane.
    Al DePoalo
    Partner Product Manager BobCAD CAM, Inc. 866-408-3226 X147

  5. #5
    Join Date
    Sep 2012
    Posts
    1195
    Ah, that did it, thanks again! I've never entered stock before, so it was just some random stock size in there.

    I figured out a work around on the post processor. It isn't pretty, but it does the job. What I did, was I changed the below variable. As near as I can tell, t1 variable does nothing for my post processor anyways, so I'm just utilizing what appears to a superfluous code/variable. YMMV, I suspect it depends on the machine.

    240. Amount to add to t to obtain t1? 3 (normal value is "0")

    My assumption was the "t" is the current tool and that t1 must serve some sort of purpose for locating the tool in a tool changer? At any rate, it seemed that by changing the number to 3, I would have my corrected variable based on the tool in use to add to a "G5". With that theory in mind, I added the following line to my various tool change and spindle segments of code:

    n,"G5",t1

    This returns a value based on the chose tool, plus 3, but also presented a slight oddity. If tool 2 is chosen, which automatically adds the M32 call for head #2, the resulting code is "N(x) G5 5". The space is added by the t1 variable, and initially I thought it was a fail. It worked in every other way needed though, in that it matches the G54 with M31, G55 with M32 and G56 with M33. After many attempts to change the outcome, I came upon the idea that perhaps it didn't matter anyways. Sure enough, Mach 3 does not really care if you give it "G55" or "G5 5". It changes the work coordinates either way.

    This is basically the code I've come up with, which allows me to switch between multiple heads or use all heads with a specific work coordinate system for each. Again, it's a bit ugly, but working perfectly as far as the code generated goes on my machine. Also, I've reduced the amount of informational text as I find it both useful to have and annoyingly long as it is normally (kind of like my writing, at least the latter part):

    1. Start of file programmed zero
    "(",prog_name,")"
    "(",output_date,")"
    "(",output_time,")"
    n,metric_mode,"G40","G49","G53",absolute_coord
    n,"G5",t1
    n_forced,"M3",list_tool_number
    n,spindle_on,s
    n,absolute_coord
    n,rapid_move,force_x,xr,force_y,yr,rotary_xyr_angl e,
    n,rapid_move


    2. Start of file Standard
    "(",prog_name,")"
    "(",output_date,")"
    "(",output_time,")"
    n,metric_mode,"G40","G49","G53",absolute_coord
    n,"G5",t1
    n_forced,"M3",list_tool_number
    n,spindle_on,s
    n,absolute_coord
    n,rapid_move,force_x,xr,force_y,yr,rotary_xyr_angl e
    n,rapid_move


    3. Tool change
    n,spindle_off
    n,"G0 Z0."
    n,"G5",t1
    n_forced,"M3",list_tool_number
    n,spindle_on,s
    n,absolute_coord
    n,rapid_move,force_x,xr,force_y,yr,rotary_xyr_angl e
    n,rapid_move

    If anyone knows a way to eliminate the space, it would look better, but otherwise I'd say I'm all good now.

    Thanks Al for the example, though it was quite a different directions than where I was already at!

  6. #6
    Join Date
    Sep 2012
    Posts
    1195
    I've tested the code used above on several multi-head sample programs and it's worked beautifully and repeatably. I haven't had to edit anything in the code on any of the programs, so all appears to be good. I've tried several 3d (2.5d) programs where I use one tool to rough and one tool to finish with excellent success, and 2d programs where one tool has a drill and one has a router bit, also with great success. Programming synchronized cutting with both heads also works perfectly. Again, my machine doesn't seem to have issues with this approach, but YMMV.

  7. #7
    Join Date
    Jan 2012
    Posts
    41
    Generally white space isn't figured into code. you could have " " many spaces or no spaces at all (which makes it terribly hard to read) and the computer still reads the code the same

Similar Threads

  1. Work Planes / Work Coordinates
    By MICFDI in forum Esprit
    Replies: 11
    Last Post: 10-04-2014, 02:41 PM
  2. How to use work coordinates
    By desellers in forum Haas Lathes
    Replies: 3
    Last Post: 06-24-2013, 02:28 AM
  3. Our multi-heads cnc router
    By cherry.CC in forum News Announcements
    Replies: 0
    Last Post: 02-05-2013, 03:26 AM
  4. Multi heads wood CNC router MT-CR2502
    By mornjinfeng in forum News Announcements
    Replies: 1
    Last Post: 10-27-2012, 07:01 AM
  5. Multi-spindle heads?
    By Tekuno in forum Post Processors
    Replies: 0
    Last Post: 07-14-2011, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •