Tailoring LinuxCNC for mechatronic painting table
Let me preface this with the fact that I'm new to Linux and LinuxCNC, most of the programming I've done is geared toward calculation (with some experience linking microprocessors to mechanical systems, i.e. arduino boards), and in general I'm in way over my head. My project involves creating a table to read g-code that's been rendered from a dxf file; it needs to pick up brushes and dip in multiple colors of ink depending on the layers in the original dxf, controlled by linuxcnc. Because the environment and the implementation is very new to me, I'm basically swimming in information and I don't really know where to start. The basic problems (that I see with my limited understanding) come from using the "tool change" function in g-code to change brushes, but also having a separate function that will dip the brush in ink after it picks it up (and between layers/colors), then can interrupt a line its painting (based on a time or distance delay) to go redip in more ink (if necessary the brush is running low), and resume painting. First of all, does this sound plausible to you guys? If this sort of functionality were to be inserted, is it something that needs to be put in at a source code level, or are there options/configuration settings that have this sort of thing? Like I said, I'm way over my head here, so my apologies for any stupid questions - and while specific help is obviously very much welcome, even someone helping narrow down the material I should look at would be awesome.
Thanks in advance all.
Please Log in or Create an account to join the conversation.
The basic problems (that I see with my limited understanding) come from using the "tool change" function in g-code to change brushes, but also having a separate function that will dip the brush in ink after it picks it up (and between layers/colors), then can interrupt a line its painting (based on a time or distance delay) to go redip in more ink
I think that you might find it easier to call a subroutine to grab a brush, and a similar but different one to re-dip the same brush.
Tool change does nothing if the new tool is the current tool, so would be no good for dipping.
You don't say if you want to re-dip automatically, or as part of the program.
Please Log in or Create an account to join the conversation.
JB
Please Log in or Create an account to join the conversation.
is this type of interrupt/subroutine feasible (and would it take place at the source code level)? Or is it something we'll need to program into our g-code manually?
The re-dipping would have to be programmed in to the G-code. It should be possible to write a pre-processor to add the re-dip code.
G-code runs from start to finish, with no provision for anything to automatically interrupt it.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thanks andy; that still leaves the tool change function (to switch brushes), is this able to be configured in the program after the installation? And do you think I can tack on the initial dipping in this routine?
It should be possible to write a routine to perform a brush-change like a tool-change, using M6. However to make M6 run a G-code subroutine you have to re-define M6.
The sample here is close, but relies on features not in the 2.5 release (so you would have to use the development branch)
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...fab5a3b4ce26a1d1954f
It is probably easier to call an O-word subroutine to change tools and to dip.
Please Log in or Create an account to join the conversation.