Showing results for 
Search instead for 
Did you mean: 

How can i convert a jpg file to gcode(CNC) or can i use a gcode in labview? is it possible?

Hello,  I'm doing a xy plotter ( like a CNC but only 2 axes) for my scholar project, and i acquired a picture with labview and i need convert to the g code to use it in the plotter, if anyone has some samples code about how to pass the gcode would greatly appreciate it, or if anyone  knows any other way to obtain this also i would appreciate it,  exist other forms  by other  software  or with arduino but  i have to use labview 

thank you very much
Marco Carrillo

pd. excuse my English,  is not my native language Smiley Frustrated

0 Kudos
Message 1 of 3

@mark_ayp wrote:

[..] and i acquired a picture with labview and i need convert to the g code[..]

You have the NI Vision module? How does such an image look like?


LabVIEW is the environment which enables you to program 'G'. So when talking about 'g code', you want to create a LV VI?


quite puzzled,


CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3

I think they mean this Norbert:



To try and answer the original question:

I don't think there are any pre-built tools in the Vision library to do this, so you would need to manually go about the calculations.


I would approach the problem like this:

1. Aquire image

2. Use some edge detection (there are inbuilt tools for this)

3. Use your edge data to generate your G-code. 


I would be tempted to start with 'chain code', then maybe work it out from there? 

0 Kudos
Message 3 of 3