- Configuring LinuxCNC
- HAL
- What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
24 Jul 2020 21:43 #175681
by alank1951
What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68 was created by alank1951
What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68 for J-Tech laser control. I currently have the laser functioning on spindle PWM on pin 16 and utilize M3 S50 for laser on at 50% & M5 to shut it off.. I use a router so do not use any of the spindle commands for spindle use, just laser. The M3 S## works fine for vector burning in VCarve Pro, but I would like to get to doing more raster work, and it seems like the only way to accomplish this would be switching to the M67/M68 command set.
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19125
- Thank you received: 6406
24 Jul 2020 21:55 - 24 Jul 2020 21:57 #175684
by tommylight
Replied by tommylight on topic What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
Here is what i have:And here is a bit of gcode for that:Also, this makes very nice gcode from pictures:
www.scorchworks.com/Dmap2gcode/dmap2gcode.html
loadrt pwmgen output_type=0
addf pwmgen.make-pulses base-thread
addf pwmgen.update servo-thread
setp pwmgen.0.enable TRUE
net analogout motion.analog-out-00 => pwmgen.0.value
net laserpwm pwmgen.0.pwm => parport.0.pin-02-out
G0 X110.6756 Y100.0000
F3000.0000
G1 M67 E0 Q5.1358
X110.2585 M67 E0 Q5.3874
X110.1751 M67 E0 Q7.5314
X109.9249 M67 E0 Q7.2956
X109.6747 M67 E0 Q1.4156
X109.1743 M67 E0 Q0.8609
X108.8407 M67 E0 Q0.7998
X108.3403 M67 E0 Q1.0228
X107.8399 M67 E0 Q0.7998
X107.5897 M67 E0 Q0.9227
X107.4229 M67 E0 Q1.2791
X107.2560 M67 E0 Q0.9527
X106.9224 M67 E0 Q0.8144
X105.6714 M67 E0 Q1.4027
X105.4212 M67 E0 Q1.2072
www.scorchworks.com/Dmap2gcode/dmap2gcode.html
Last edit: 24 Jul 2020 21:57 by tommylight. Reason: added link
The following user(s) said Thank You: Doogie
Please Log in or Create an account to join the conversation.
13 Jun 2021 19:56 #211966
by Doogie
Is there any optimization from putting the M6x commands on the same line as the motion command? I'm asking because my CAM software can generate GCode with the Sxxxx command on the motion line or I can change to the LinuxCNC post processor and generate M106 Sxxx commands on new lines after each motion command. I am processing this GCode files to create M67/M68 commands so was wondering if there's any performance issues to consider between the two because raster engraving can create huge file sizes when the standard DPI is 254 for 0.1mm movements. A test file with a 70mm x 45mm image is over 5MB of GCode.
Replied by Doogie on topic What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
Here is what i have:
And here is a bit of gcode for that:loadrt pwmgen output_type=0 addf pwmgen.make-pulses base-thread addf pwmgen.update servo-thread setp pwmgen.0.enable TRUE net analogout motion.analog-out-00 => pwmgen.0.value net laserpwm pwmgen.0.pwm => parport.0.pin-02-outAlso, this makes very nice gcode from pictures:G0 X110.6756 Y100.0000 F3000.0000 G1 M67 E0 Q5.1358 X110.2585 M67 E0 Q5.3874 X110.1751 M67 E0 Q7.5314 X109.9249 M67 E0 Q7.2956 X109.6747 M67 E0 Q1.4156 X109.1743 M67 E0 Q0.8609 X108.8407 M67 E0 Q0.7998 X108.3403 M67 E0 Q1.0228 X107.8399 M67 E0 Q0.7998 X107.5897 M67 E0 Q0.9227 X107.4229 M67 E0 Q1.2791 X107.2560 M67 E0 Q0.9527 X106.9224 M67 E0 Q0.8144 X105.6714 M67 E0 Q1.4027 X105.4212 M67 E0 Q1.2072
www.scorchworks.com/Dmap2gcode/dmap2gcode.html
Is there any optimization from putting the M6x commands on the same line as the motion command? I'm asking because my CAM software can generate GCode with the Sxxxx command on the motion line or I can change to the LinuxCNC post processor and generate M106 Sxxx commands on new lines after each motion command. I am processing this GCode files to create M67/M68 commands so was wondering if there's any performance issues to consider between the two because raster engraving can create huge file sizes when the standard DPI is 254 for 0.1mm movements. A test file with a 70mm x 45mm image is over 5MB of GCode.
Please Log in or Create an account to join the conversation.
14 Jun 2021 02:07 #211989
by phillc54
Replied by phillc54 on topic What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
The docs for M67 state:I am not sure how a single line is interpreted, but it may be that you need to place the M67 before the motion move.
The actual change of the specified outputs will happen at the beginning of the next motion command. If there is no subsequent motion command, the queued output changes won’t happen
Please Log in or Create an account to join the conversation.
14 Jun 2021 03:11 #211993
by Doogie
Replied by Doogie on topic What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
That comment/documentation through me off when I first read it and I kept looking for how to make standard Spindle.0.speed.out work. I was thinking that the laser needed to fire with the move because the Sxxxx was on the same line as the movement.
Then I looked at it again and realized it could be the move happens and then the fire of the laser, rinse and repeat.
That's when it dawned on me this M106 or M67/M68 could be at the end of the line or on the next line as they will happen after the move and before the next move.
I guess the whole image could be off by one pixel if the intent of the GCode was to fire and then move on the same line but the standard is to put the Sxxx command after the movement.
But I'm currently interested in processing/parsing since I have choices and until someone says either way I will just take the easier route and use the CAM setup to generate M106 commands on new lines.
Then I looked at it again and realized it could be the move happens and then the fire of the laser, rinse and repeat.
That's when it dawned on me this M106 or M67/M68 could be at the end of the line or on the next line as they will happen after the move and before the next move.
I guess the whole image could be off by one pixel if the intent of the GCode was to fire and then move on the same line but the standard is to put the Sxxx command after the movement.
But I'm currently interested in processing/parsing since I have choices and until someone says either way I will just take the easier route and use the CAM setup to generate M106 commands on new lines.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- HAL
- What changes to 2.8 LinuxCNC .hal file would need to be made to utilize M67/M68
Time to create page: 0.076 seconds