Welcome! Log In Create A New Profile

Advanced

Modifying Firmware for different printing methods

Posted by piscosour00 
Modifying Firmware for different printing methods
September 01, 2014 12:03AM
Hi everyone,

This is my first post. I hope I am posting this question in the right forum.

I have just completed building a Mini Kossel delta printer as well as an Ultimaker. I am using RAMPS 1.4 boards on Arduino Mega 256. For both, instead of using an extrusion system, I am using a valve that pushes out pressurized material controlled by the microcontroller. The valve is pre-programmed. All it needs is 5 volts to open and it does its thing.

I have been tinkering with the Marlin firmware to control both my printers, and have decided to use it for the time being. I have been studying the code to try and decide how best to modify it to use my desired printing method.

I made a very crude change to the code (namely to the get_coordinates() function in the Marlin_main.cpp file) in the hopes of manipulating the G-code instructions sent to my printer to work for my valve. Basically, since I do not use the E-axis commands, I programmed my printers to respond to an E by just sending 5 volts to my valve to open and close if the next line in the G-code does not include an E.

It sort of works. However, after homing, the gantry starts moving to the first point in space where it should start pushing out material, but material starts coming out even before it makes it there.

I believe this is happening because the printer sees the command from the g-code before its able to execute it.

Does anyone have any ideas for another way to accomplish this through manipulating the firmware? I only want the printer to print when it has reach the right destination. My programming skills are at best intermediate, but I am studying hard to improve. Any nudge in the right direction would be greatly appreciated. I am thinking maybe changing the way the printer uses the command buffer function is the next thing to look at.

Thanks
Re: Modifying Firmware for different printing methods
September 01, 2014 03:50AM
Quote
piscosour00
I hope I am posting this question in the right forum.

We have subforums for firmwares: [forums.reprap.org]

Quote
piscosour00
It sort of works. However, after homing, the gantry starts moving to the first point in space where it should start pushing out material, but material starts coming out even before it makes it there.

Let me guess: you open the valve when G-code with an E comes in. That's the wrong place, then.

There's a movement queue, neccessary for uninterrupted movements and also for lookahead. Incoming G-code gets stuffed into the backend of the queue, movements are executed as they appear on the front end.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Modifying Firmware for different printing methods
September 01, 2014 01:43PM
Thank you, Traumflug!

I will repost this question into that subforum.
Sorry, only registered users may post in this forum.

Click here to login