General Category > OpenLase Discussion

LaserShark / Openlase / Raspberry Pi ?

<< < (3/3)

maxem:
Thank you  for the quick reply.  I have been looking into this more and see that I can even control the Rasp Pi from a windows computer through something like Tight VNC.  The cnc machine is controlled by a windows pc and would be great to control both laser projector and machine from one computer screen. 

From what I understand about the sample code format  x,y,a,b,c,intl_a

X and Y are positions
A and B are only used if you have a laser that is power controlled via analogue
C is only used if you have a ttl power controlled laser
and  intl_a  is like a  safety thing that is either on or off ?

If its really this simple I would imagine that I can take my CAD files and output them as a CSV file and convert the XY data into this format for the laser shark with the proper header and footer added to the file.

Even if the laser would be constantly on causing connecting lines between the different shapes I think it would still be very easy to discern the boundaries of shapes.

This is very interesting, even though I know nothing about coding I think this could be done in a way that makes it worth while to help speed up machine loading times.   I just have to find the fastest/least effort way to make it worth while.  The alternative is using a home theater projector and setting up a fixed camera view in the modeling program I use 3D Studio Max and projecting the camera view rendered image. But of course ambient light and focus are a problem.

  Perhaps a Script can be written in 3DS Max that can take the selected objects and create the lasershark file directly. 
That would be amazing.  I will be looking into this some more...
Thanks for all your help!
-Max

Macpod:
Yes, you are correct on your assumption for the sample format for the lasershark_stdin. Requirements like yours are exactly why I made this app :)

I'm not sure if I would recommend running a VNC server on the PI, instead what I would do is either setup a web server that you can upload your designs to to or alternatively use ssh and scp.


If you are new to programming I would suggest having a look at python. It is often taught as a starter language and due to the availability of pre-written libraries can be surprisingly powerful.

 

maxem:
Sorry for the long delays between posts, been busy with multiple projects.

I know this is way off topic, not sure if I should start a new thread about this...
I have been thinking about using the lasershark to help with alignment of material and hold down supports on a cnc machine. 
This year I will be building a large cnc machine from scratch for simple cutting out of sheet goods with a spindle and also a tangential razor blade for cutting veneers.  I need to make this machine idiot proof because I will not be the only one running it. 

I think lasershark would help an operator see where the toolpaths are going to go before hitting the Start button so that crashes with hold down screws/fixturing does not happen.  Also it would help with alignment of veneers and odd shaped materials.  Or to tweak placement to avoid knots in wood etc.

I don't know how much experience you have with cnc machines but I have been thinking maybe its possible to use a CAM program to output the lasershark program.  Normally in CNC operations you create your G-code in a CAM program that has a post processor that matches your machine or you make your own custom post processor to work how you want it.  Maybe its possible to make a post processor that will output the format that the lasershark wants to see for X & Y movements and then the Z axis height output is used to vary the intensity of the laser.  Where the lowest Z height equals the highest laser intensity and the highest Z height equals the lowest laser intensity.  So that transfer moves, where the cutter picks up out of the material and moves to a new location and continues cutting, would either be of lower intensity or not appear visible at all.

This way you could output the toolpaths for the machine to cut with one CAM post processor and then switch to a lasershark post processor and output the lasershark file.

One problem with this is when using a cnc machine you usually have two different positions for home or X0,Y0,Z0  One is the machine coordinates that the machine homes or zeros itself to and then there are work offset coordinates that the operator sets to where the material is placed on the machine bed and the gcode is run from there (typically a G54,G55,G56 etc.).
  The problem with running the lasershark is that it would essentially always be aligned to the machine coordinates and getting it to change on the fly when the work coordinates that are changed by the operator would put the displayed pattern off of alignment from the cut.

It makes me think that the best way to go about this is to build a plugin to Mach4 that after you have loaded/opened the toolpath gcode file for the cnc machine, you could press a button to display the toolpath via the lasershark and the plugin would look at the machine gcode and subtract the current work offset coordinate from the machine coordinate and then output a file to the lasershark by saving it in a network folder for display for the lasershark.  And have the Rasp Pi or whatever always watching that folder and display that file automatically.  Every time you press the display via LaserShark button in Mach4 it would overwrite the file that the lasershark is looking for.

I still use Mach3 for one of my cnc machines and WinCNC for another.  The new machine I will build will be run by the new Mach4 controller.  I know writing a plugin for a CNC controller program might seem a little crazy but Mach has a huge diy cnc user base and just came out with the long awaited Mach4: http://www.machsupport.com/

I would like to explore this more when the new machine is built.  I really don't know anything about programming at all, I've built several arduino projects and understand that code but I know that's total beginner stuff. I'm really just a cnc guy that's good at 3D modeling. 


***OK this is embarrassing I just rechecked your youtube video before posting this and see you have your own cnc milling machine.  Where's that emote? oh yeah :-[  :-[  :-[

Please ignore the cnc explanation stuff I'm sure you know it all already, I could rewrite this post but maybe it will give someone else an idea or something.  Also it looks like you use linuxCNC so would you would not be interested in a Mach plugin, ugh.  Anyway the lasershark would be for a flatbed machine like this one I currently own (a video from 2 years ago:http://youtu.be/jeUpjhqeiHE ) but with an even larger bed for cutting thin sheet materials.
I know it wouldn't be useful on a milling machine like yours but on cnc routers like mine where the material is usually a 4'x8' sheet of plywood it could be useful because the easy way to hold down a plywood is to screw it down to your table in strategic places but avoiding hitting the screws is crucial and I think the lasershark could help a noob operator avoid hold downs and feel confident running the machine.
Sorry for the epic post.

Macpod:
Hi maxem

Yes, this sounds like an interesting idea if you could affix a mount atop of your router in a permanent manner.

It would require you to add an f-theta lens or account for the non-linear projection surface intrinsic to laser displays but that should be trivial to do in software with whatever software is developed to convert from g-code to something the laser can display. You would also need to perform some per-machine tuning based on the dimensions of the machine and the machine home.

Having a script to show the next cut does sound like an ok way to go... no, I probably wouldn't be interested in making this because I'm using a mill vs a router and also because I'm not operating a production shop.

If you elect to continue forwards with this effort you should remember that in all you have a 4095x4095 grid of possible points this laser can be aimed at. As such it certainly won't be as accurate/precise as your cnc router's precision but may still be good enough to verify you won't hit any work-holding components/fixtures.

Navigation

[0] Message Index

[*] Previous page

Go to full version