NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum HAL HAL Components HAL Power Laser

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: HAL Power Laser

HAL Power Laser 28 Juil 2012 19:03 #22572

  • diegoroman17
  • diegoroman17's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 126
  • Thank you received: 2
  • Karma: 0
Hi,
I have linuxcnc installed in a laser machine. I am developing a plugin to CorelDraw that permit configure the power min and power max of cut for each color in the drawing. I am using the algorithm of post processor for EMC2 to create the GCode file. With respect to Power Laser I not have a decision yet. I have think create a file with power mins and power max of each layer and give this information to hal for interpolate the power with the velocity Eg. if velocity is 0 -> P is Pmin if velocity is max -> P is Pmax. It is my idea but I dont know if this is possible in HAL. I dont know if is possible read other files of power laser with HAL. I dont know if is possible write any flag in the GCODE for indicate to HAL that read the next line of power laser file. I dont know if can exist a better option for my purpose. Please help me.

I actually control the power laser with Spindle commands with PWM output.
XY axis is with stepper motors.
Z axis dont move.

Dont exist any feedback (encoders,resolvers,etc).
The administrator has disabled public write access.

Re:HAL Power Laser 29 Juil 2012 03:47 #22582

  • cncbasher
  • cncbasher's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 685
  • Thank you received: 30
  • Karma: 53
i presume this is for laser etching , rather than for cutting purposes ..
it's usual to use the spindle speed command to control the pwm to control a laser power output .

perhaps altering the feedrate velocity ,combined with as you suggest the spindle pwm level may work as you suggest .
the problem you may find is that gcode is read one line at a time , and therfore previous settings , may or may not be held

i'd be interested to know the outcome also
The administrator has disabled public write access.

Re:HAL Power Laser 31 Juil 2012 05:13 #22628

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4136
  • Thank you received: 141
  • Karma: 130
diegoroman17 wrote:
hal for interpolate the power with the velocity.
There is some information on a scheme (Graster) to do this here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser
But it doesn't seem very elegant to me.

I made a start on a HAL component that imported bitmap files directly, but didn't get very far with it.
The administrator has disabled public write access.

Re:HAL Power Laser 31 Juil 2012 16:52 #22647

  • diegoroman17
  • diegoroman17's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 126
  • Thank you received: 2
  • Karma: 0
There is some information on a scheme (Graster) to do this here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser

This info is very interesting. I am checking the code but this HAL don't interpolate the PWM output spindle. It can do that exist differences of engraver in the zones of acceleration and desceleration its because the laser is held longer in these areas until the desired velocity. However this code can serve as a basis for something more elaborate
The administrator has disabled public write access.

Re:HAL Power Laser 31 Juil 2012 17:11 #22648

  • diegoroman17
  • diegoroman17's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 126
  • Thank you received: 2
  • Karma: 0
perhaps altering the feedrate velocity ,combined with as you suggest the spindle pwm level may work as you suggest .

Is not necessary altering the feedrate velocity. I plan obtain the actual velocity in hal with sqrt(dx^2+dy^2). With stream component in HAL read the power laser file and with this information interpolate the PWM to control the spindle (power laser).
The administrator has disabled public write access.

Re:HAL Power Laser 01 Auo 2012 15:31 #22658

  • diegoroman17
  • diegoroman17's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 126
  • Thank you received: 2
  • Karma: 0
Andy I saw a post between Zig and you in:
http://www.linuxcnc.org/index.php/russian/component/kunena/?func=view&catid=10&id=19386&limit=6&start=6

and it give me any ideas.

It is possible generate G code to make straight lines (G0 and G1 combination) and combine its with M64/M65 for enable or disable laser(my source power laser have a Enable Pin) along the line. I think that it is possible because LinuxCNC have lookahead. At the begin I should set power of laser with S command. The period of acceleration and deceleration can be compensated with extra space in the axis of move. Its avoid that laser burn more this zones.

I think that with this idea is possible have a better solution. Its avoid to have that create a new hal component and read external mask file.
The administrator has disabled public write access.

Re:HAL Power Laser 01 Auo 2012 15:37 #22659

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4136
  • Thank you received: 141
  • Karma: 130
diegoroman17 wrote:
It is possible generate G code to make straight lines (G0 and G1 combination)

Its avoid to have that create a new hal component and read external mask file.

Would you be interested in helping develop an idea I have for a HAL component that loads image files and laser-rasters them? All without G-code or Axis or the rest of LinuxCNC?
The administrator has disabled public write access.

Re:HAL Power Laser 01 Auo 2012 15:58 #22661

  • diegoroman17
  • diegoroman17's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 126
  • Thank you received: 2
  • Karma: 0
Would you be interested in helping develop an idea I have for a HAL component that loads image files and laser-rasters them? All without G-code or Axis or the rest of LinuxCNC?

Sure. I am disposed to help in anything that I can contribute.

I have that can the same idea but with CorelDraw evaluating the vector information and generate G-code for raster. it is a part for my thesis.
The administrator has disabled public write access.

Re:HAL Power Laser 07 Auo 2012 17:36 #22961

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4136
  • Thank you received: 141
  • Karma: 130
diegoroman17 wrote:
Sure. I am disposed to help in anything that I can contribute..

Well, I have run out of time on this (I spend most of the next month abroad away from my LinuxCNC machines) so here is a taster of what there is so far (not a lot, to be honest)

If you extract the attached file into the configs directory and then navigate into the directory in a terminal window and
halrun -I -f laser.hal
Then it will load up the UI, realtime component and halscope.

Then, if you set the halscope going and
setp laser_rt.start 1
at the command prompt you ought to be able to see the x and y command positions changing to generate a raster.

What isn't there yet:
A button to start
The stepgens in the HAL file (easy to add). It actually ought to be capable of generating a raster if connected to hardware.
homing
jogging
scaling
(The big one) any link to the actual image data. The GUI will load a file though, and does put it in to shared memory, and the realtime component can see it.

I will get back to it when I am back at home. Feel free to ignore it, or develop it, as you prefer. I was hoping to provide something a little more useful. This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.241 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.