Turning laser on and off- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + - - -论坛:一般问题bout RoboDK (//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: Turning laser on and off (/Thread-Turning-laser-on-and-off) |
Turning laser on and off-JBA-09-18-2019 I have created a example where at laser needs to cut a dashed line. The laser need to be turned on and off before and after each dash. I thought that the program events "path start" and "part finish" would do the job put I guess a path includes everything and not just the actual cutting. Having set Part start to "laserOn" and Path Finish to "laserOFF" this is what I get: The laser just turns on and cuts while moving between each dash. It turns of at the very last dash. MOVJ C00000 VJ=50.00 MOVL C00001 V=200.0 CALL JOB:LaserOn MOVL C00002 V=200.0 MOVL C00003 V = 15.0 MOVL C00004 V=40.0 MOVL C00005 V=15.0 MOVL C00006 V=200.0 MOVL C00007 V=200.0 MOVL C00008 V=200.0 MOVL C00009 V=15.0 MOVL C00010 V=40.0 .. CALL JOB:LaserOFF This is what I expected: The laser is only turned on when the actual cutting is preformed. MOVJ C00000 VJ=50.00 MOVL C00001 V=200.0 MOVL C00002 V=200.0 Moving down MOVL C00003 V = 15.0Moving down CALL JOB:laserON MOVL C00004 V=40.0 cutting dash CALL JOB:laserOFF MOVL C00005 V=15.0 moving up MOVL C00006 V=200.0 moving up MOVL C00007 V=200.0 moving to next dash MOVL C00008 V=200.0 moving down MOVL C00009 V=15.0 moving down CALL JOB:laserON MOVL C00010 V=40.0 cutting dash CALL JOB:laserOFF MOVL C00011 V=15.0 moving up ... is there any easy way to achive this? I'm importing a DXF and creating a "robot machining project" to create the program. RE: Turning laser on and off-Albert-09-18-2019 I recommend you to use M codes for this purpose (assuming you use DXF2Gcode to import DXF files). Behind the scenes, a G-code program is generated and imported in RoboDK. RoboDK will automatically create a program call given any M code. DXF2Gcode automatically creates M codes M3 and M9 when approaching and retracting each path respectively. You can view or modify this in the post processor configuration when you open DXF2Gcode. However, this default M code is triggered before the approach and after the retract. Therefore, a workaround to have another M code that represents the weld area could be to output an M code at the same time you change the speed (see Feed rate change option above). Note that feed is in inch/min but you'll see it in mm/s in RoboDK. This does not apply to the M code in this example. The fastest way to solve this would be to define a new JBI program named M5 and M15 to call LaserOn and LaserOff respectively. Other ways to customize this output would be to modify the post processor to trigger specific programs given an M code or given a change in the Z coordinate of your target. Albert RE: Turning laser on and off-Appie-04-26-2021 How to achieve this with an APT file? I have a trajectory with a set of layers and want to turn laserOn/Off between layers, but I can add a subprogram at just the start and end of the program. The trajectory is considered as one path. Is there a way to achieve this in RoboDK? the other parameters in the program event such as call M code and set IO don't add anything to the program. RE: Turning laser on and off-Jeremy-04-26-2021 It's possible to achieve that with the APT file, but to do so, your CAM system needs to add the trigger at each layer. We generally use M Code for that purpose. This way you can catch the Run Code with your Program Events and transfer them to the robot controller. (There's a few good forum threads on that specific topic if you need more info.) Jeremy RE: Turning laser on and off-Appie-04-26-2021 Thank you. I will search for those threads. |