12-26-2022 11:13 AM - edited 12-26-2022 11:17 AM
Hello.
I am working on building an interface for a custom 3d printer. I use an Arduino mega with ramps 1.4 (marlin firmware installed), stepper motors for the x & y-axis, and an SMC100CC motion controller for the Z-axis to achieve that. There are two tabs in the vi file attached: one for manually giving commands to Arduino and the other for automatic movement of the stage according to the gcode file uploaded. The former is working perfectly alright but not the latter. My main aim is to make an interface that can run any gcode file automatically in the following fashion:
And so on..
Basically, I want the servo motor to rotate up and down with custom time delays after executing each line in the gcode file that I upload. The problem that I am facing currently is that when I execute the code, the arduino restarts after executed few lines in the gcode and then starts doing the same thing from beginning.
Please help me solve this. Also, please suggest a better code if you can think of any.
Thank you.
P.S: To install the user library, extract the zip file and place the unzipped folder titled "Machine Control Toolkit" in your National Instruments user.lib folder