Hello Guest it is April 21, 2021, 11:07:24 PM

Author Topic: make automated sequences from g-code and then launch the code from localhost  (Read 2842 times)

0 Members and 1 Guest are viewing this topic.

I wonder if I can make custom automated sequences of G code and then copy that code and use it without the program ( I only need to move back and forward 3 axis, or while I'm moving forward one axis I move the other back and so on) , I do not need cnc drilling or routing , I  Only need movement , so,is it possible to make ?
then I will be  putting that files of  g-code on the arduino memory and then execute that different sequences from local host?  I will do that with php or other server side client , but my principal question is if can I be able to make custom G-code with the program and then execute that without the program and with with php on local host with an web interface made by html and javascript.

I think i was very clear with what i want.

The pokeys ethernet version I/O board can be controlled via a web interface. Check out www.poscope.com, and read up on their software "PoBlocks."
However, it is not at all clear why you want to eliminate Mach3 from the equation. It would be fairly simple to write a short program to move all the axis in any sequence, and repeat with a loop function.
Also, there is a ModBus arduino sketch available in the ModBus section of the forum making the arduino a PLC via the serial port. Also, as you must know, there are versions of the arduino that are ethernet capable. The arduino ModBus still has to comm with Mach3 via brains.

Perhaps a little more explanation would be of interest to the forum. Also, you might expand on this issue in the pokeys forum section. Pokeys is introducing a new software version later this month. Neo discusses it in the pokeys section.

It sounds interesting.

Hi! thank you John i didn't know all that !

But my idea is to give a set of coordinates to the axis with the program (mach3) using a picture maybe if it is not possible with the program itself ,then converting the g code and then copy and paste on the arduino sketch , only that

it was only an idea to cut time on writing all the code in the arduino , like if i'm going to make like 50 different sequences with 3 axis only linear motion (maybe it's the fastest way) and then linking them with localhost(i will be using ethernet shield or raspberry for this)

so i have to know is it possible?
It may be possible.

I am still unclear on the reasoning to use an arduino, ethernet shield, writing arduino code, etc.

Mach3 will drive 3 axis simultaneously, or one axis singly, in any direction (or Vector in the case of 2 or 3 axis), and rate you decide upon. CAD programs, some even free (Draftsight is a superb freebie) can produce dxf files from a line drawing, which can be converted into a G-code by a CAM program (I like CamBam), loaded and run.

There are topics in this forum describing how to package multiple programs and run them automatically in a "batch file" manner.

Much (maybe even most) of what is now done with Mach3 doesn't involve "hand writing" of G-code, except some specific scripts like running multiple programs as above.

the reason for using arduino is for the web interface and for put buttons on web interface( local host) imagine.. like 50 buttons numbered , a little css to make it cute and when I press in any button I will have another different sequences , then the axis will move differently everytime I click a number on the interface

DraftSight  is good, because i draw and take and convert to g code and then comes the part that I am interested.
and that is having the g-code now and integrating with arduino code , can I do that? that's all I want.

Yes, I know I can write all the code on arduino maybe , but if i have like we were talking about , like 50 3 axis sequences meaning there will be 50 separated files containing different axis movements on each file. maybe it's faster if it  can be done..  

« Last Edit: December 13, 2013, 10:53:37 AM by john foster »