Fusion 360 post processor modification
Close
Login to Your Account
Results 1 to 16 of 16
  1. #1
    Join Date
    Nov 2016
    Country
    FINLAND
    Posts
    272
    Post Thanks / Like
    Likes (Given)
    23
    Likes (Received)
    17

    Default Fusion 360 post processor modification

    Hello!

    I am a total newbie and been trying to look for some information to my problem with no success.

    I have a deckel fp4a with grunding contour 3 control which is similar with Dialog 4.

    I would need to add m07 code to the post. Its for way lubrication. The lubrication pulse is only released if it does a rapid move or a dwell with all axis stopped.

    What and where i should add to the post to get this working?
    The m07 needs to be before a rapid move.

    Is it possible to get a m07 lube pulse and a dwell after that, example for every 50 axis moves?

    I made a code line under "onrapid" "writeBlock(mformat.format(7));" and it made m07 to the code but its in unlogical places and tried to add to several places and it doesnt work how i want it.

    Javascript is all new to me...

    Thank you

  2. #2
    Join Date
    Sep 2017
    Country
    UNITED STATES
    State/Province
    Wisconsin
    Posts
    719
    Post Thanks / Like
    Likes (Given)
    106
    Likes (Received)
    378

    Default

    If you ask over on the Autodesk post processor forums you can usually get help very quickly.

  3. Likes gerritv liked this post
  4. #3
    Join Date
    Feb 2007
    Location
    Aberdeen, UK
    Posts
    3,614
    Post Thanks / Like
    Likes (Given)
    1250
    Likes (Received)
    1382

    Default

    Are you sure you actually need to do this?

    Lots of (usually older) controls have an m code for lube, but it's rarely required to use it - it's usually just an override for the normally timer driven lube cycle, like to force a lube pulse before a long surfacing operation etc.

  5. #4
    Join Date
    Nov 2016
    Country
    FINLAND
    Posts
    272
    Post Thanks / Like
    Likes (Given)
    23
    Likes (Received)
    17

    Default

    There is a timer but it takes quite long to relube. In manual is mentioned to do a lube cycle every 50 moves (cant remember exact amount) and if they are short it should be moved certain amount to spread the oil to the ways.

  6. #5
    Join Date
    Mar 2015
    Country
    UNITED STATES
    State/Province
    Michigan
    Posts
    373
    Post Thanks / Like
    Likes (Given)
    74
    Likes (Received)
    116

    Default

    It doesn't seem like there'd be a comprehensive way of getting this to work. Depending on what kind of work you do anyways. Sure, make it so that your post outputs M7 for every 50 moves. Then you output a program with 30 moves, one with 45 moves, one with 20 moves...all the sudden you're above 50 moves without an M7 because your post isn't keeping a rolling tally, it's only going to know what you have in one program.

  7. #6
    Join Date
    Sep 2002
    Location
    People's Republic
    Posts
    3,338
    Post Thanks / Like
    Likes (Given)
    275
    Likes (Received)
    2188

    Default

    The posts are in javascript, and can be edited in notepad++

    I have done it mainly to rip out a bunch of extraneous stuff, so my knowledge is limited on how to add things in

  8. #7
    Join Date
    Feb 2007
    Location
    Aberdeen, UK
    Posts
    3,614
    Post Thanks / Like
    Likes (Given)
    1250
    Likes (Received)
    1382

    Default

    Quote Originally Posted by Harri89 View Post
    There is a timer but it takes quite long to relube. In manual is mentioned to do a lube cycle every 50 moves (cant remember exact amount) and if they are short it should be moved certain amount to spread the oil to the ways.
    Find out how to alter the lube cycle frequency/duration to your satisfaction on the control/machine. It could be a software parameter or it could be a timer built in to the pump, or even a mechanical timer that turns the pump on - there will be a way.

    It's not a job for the post.

  9. #8
    Join Date
    Feb 2001
    Location
    Redwood City, CA USA
    Posts
    4,990
    Post Thanks / Like
    Likes (Given)
    184
    Likes (Received)
    917

    Default

    On the Dialog controls, the timing is coded in the firmware and totally inaccessible to be modified. The post could probably be edited to do what you want. On the other hand, you can just hit the manual lube button once in a while, and as soon as the code hits a G00, the lube will be applied. If you run donkey's years at G01 with no G00, then, hypothetically, you could starve the ways of lube. I have not run into that situation. Considering that my machine has no toolchanger besides by arm, I usually have to be near the machine anyway, and can hit the lube button.

  10. Likes Harri89 liked this post
  11. #9
    Join Date
    Feb 2007
    Location
    Aberdeen, UK
    Posts
    3,614
    Post Thanks / Like
    Likes (Given)
    1250
    Likes (Received)
    1382

    Default

    Quote Originally Posted by rklopp View Post
    On the Dialog controls, the timing is coded in the firmware and totally inaccessible to be modified. The post could probably be edited to do what you want. On the other hand, you can just hit the manual lube button once in a while, and as soon as the code hits a G00, the lube will be applied. If you run donkey's years at G01 with no G00, then, hypothetically, you could starve the ways of lube. I have not run into that situation. Considering that my machine has no toolchanger besides by arm, I usually have to be near the machine anyway, and can hit the lube button.
    Does the control look for feedback from the lube system, besides oil level, like a pressure switch or such?

    If not, I'd be very tempted to just bypass the control altogether and fit a timer relay (like a nice multifunction unit from Finder or the like) to control the lube pump, then you can configure it to run however you want.

    Even if the control does look for feedback it should be simple enough to bypass that too...

  12. Likes Dan from Oakland liked this post
  13. #10
    Join Date
    Mar 2017
    Country
    LATVIA
    Posts
    360
    Post Thanks / Like
    Likes (Given)
    82
    Likes (Received)
    182

    Default

    Fusion does calculate total feed distance for an op, you can see it one of the info windows for an operation, but I did very quick search in the https://cam.autodesk.com/posts/posts...ng%20Guide.pdf , and there doesn't seem to a variable for it, but it might be possible to create your own variable in the post processor, something like "tempDistanceTraveled" and then a variable you set yourself, like "DistanceTraveledLubeInterval=1000", and when each block is processed by the post processor, extract the distance and add it to your tempDistanceTraveled, then compare it to DistanceTraveledLubeInterval, if tempDistance is bigger than the LubeInterval - post your custom lube code and reset the tempDistance=0

    could even add correction values to each axis (when you add current block movement to your tempDistance variable), like Z axis might need more frequent lubrication, so when the Z move is added to the tempDistance, you could multiply it by 1.5 for instance before adding, and the opposite for X/Y moves for instance

  14. #11
    Join Date
    Feb 2001
    Location
    Redwood City, CA USA
    Posts
    4,990
    Post Thanks / Like
    Likes (Given)
    184
    Likes (Received)
    917

    Default

    Quote Originally Posted by gregormarwick View Post
    Does the control look for feedback from the lube system, besides oil level, like a pressure switch or such?

    If not, I'd be very tempted to just bypass the control altogether and fit a timer relay (like a nice multifunction unit from Finder or the like) to control the lube pump, then you can configure it to run however you want.

    Even if the control does look for feedback it should be simple enough to bypass that too...
    That approach might affect accuracy, because the machine has box ways that will float when the lube pressure comes on. That is why the Dialog control waits for a rapid move before applying a lube pulse, and pauses until the lube pulse is finished.

  15. #12
    Join Date
    Feb 2007
    Location
    Aberdeen, UK
    Posts
    3,614
    Post Thanks / Like
    Likes (Given)
    1250
    Likes (Received)
    1382

    Default

    Quote Originally Posted by rklopp View Post
    That approach might affect accuracy, because the machine has box ways that will float when the lube pressure comes on. That is why the Dialog control waits for a rapid move before applying a lube pulse, and pauses until the lube pulse is finished.
    I used to have an old Hurco with big box ways, and this was specifically mentioned in the manual, although I forget what logic was used to determine when to pulse the lube pump. That machine always put plenty of oil on the ways in any case, but what I do remember very clearly was testing it out one day, and finding that table lift when the lube pump activated was barely measurable using a 2μm indicator...

  16. #13
    Join Date
    Mar 2017
    Country
    LATVIA
    Posts
    360
    Post Thanks / Like
    Likes (Given)
    82
    Likes (Received)
    182

    Default

    as an exercise, I gave this modification a try, used Dialog 4 post available from Autodesk as a base,

    what it does:
    calculates G0 and G1,2,3 moves for X, Y and Z axis and keeps adding them up in a variable, if variable exceeds the set value (defined as user parameter - distance trigger), it triggers the manual pulse function

    it also counts the number of linear moves done, if that exceeds the number set in user parameters dialog - triggers a lube pulse function again

    you can also set dwell time after pulse, and you can switch on and off a comment in the .nc file which contains the condition that was triggered and the value it triggered at

    what it doesn't do:
    calculate arc lengths during circular motion, so that is not currently included in the distance traveled calculation, can be added later if it will turn out to be necessary

    I'm not 100% sure if the syntax is correct for the pulse/dwell command, and if the machine control will actually execute this, since there are no G0 moves there, so might need some adjustments at there at the very end of the post, where the pulse function is defined

    link to a post and a picture showing user parameters:
    capture.jpg
    deckel dialog 4 with extra lube cycles.cps

  17. Likes Harri89 liked this post
  18. #14
    Join Date
    Nov 2016
    Country
    FINLAND
    Posts
    272
    Post Thanks / Like
    Likes (Given)
    23
    Likes (Received)
    17

    Default

    Quote Originally Posted by jz79 View Post
    as an exercise, I gave this modification a try, used Dialog 4 post available from Autodesk as a base,

    what it does:
    calculates G0 and G1,2,3 moves for X, Y and Z axis and keeps adding them up in a variable, if variable exceeds the set value (defined as user parameter - distance trigger), it triggers the manual pulse function

    it also counts the number of linear moves done, if that exceeds the number set in user parameters dialog - triggers a lube pulse function again

    you can also set dwell time after pulse, and you can switch on and off a comment in the .nc file which contains the condition that was triggered and the value it triggered at

    what it doesn't do:
    calculate arc lengths during circular motion, so that is not currently included in the distance traveled calculation, can be added later if it will turn out to be necessary

    I'm not 100% sure if the syntax is correct for the pulse/dwell command, and if the machine control will actually execute this, since there are no G0 moves there, so might need some adjustments at there at the very end of the post, where the pulse function is defined

    link to a post and a picture showing user parameters:
    capture.jpg
    deckel dialog 4 with extra lube cycles.cps

    Big thanks for doing this!!

    That looked really complicated!
    This is a really good example of javascript coding, how it looks in post and how it works.

    I need to give this a try and load a program made with this post to my deckel and see what it says.

    Cant thank you enough for your effort!

    Did any deckel pro give this a look, if its all how it should be?

  19. #15
    Join Date
    Nov 2016
    Country
    FINLAND
    Posts
    272
    Post Thanks / Like
    Likes (Given)
    23
    Likes (Received)
    17

    Default

    I dont resist if you can edit it so that it counts circular moves travel distance also

  20. #16
    Join Date
    May 2005
    Location
    AZ
    Posts
    2,354
    Post Thanks / Like
    Likes (Given)
    215
    Likes (Received)
    802

    Default

    Quote Originally Posted by jz79 View Post
    Fusion does calculate total feed distance for an op, you can see it one of the info windows for an operation, but I did very quick search in the https://cam.autodesk.com/posts/posts...ng%20Guide.pdf , and there doesn't seem to a variable for it, but it might be possible to create your own variable in the post processor, something like "tempDistanceTraveled" and then a variable you set yourself, like "DistanceTraveledLubeInterval=1000", and when each block is processed by the post processor, extract the distance and add it to your tempDistanceTraveled, then compare it to DistanceTraveledLubeInterval, if tempDistance is bigger than the LubeInterval - post your custom lube code and reset the tempDistance=0

    could even add correction values to each axis (when you add current block movement to your tempDistance variable), like Z axis might need more frequent lubrication, so when the Z move is added to the tempDistance, you could multiply it by 1.5 for instance before adding, and the opposite for X/Y moves for instance
    This just makes me want to go take a nap.;-)


Tags for this Thread

Bookmarks

Posting Permissions

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