LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

JPG to G-Code

Hi. I'm a student and I have to implement a project for my career. We have to attach a black and white image (jpg) to Labview and after the program automatically will convert the pixels of the image to G-Code. After, using Arduino, this code will be sent to a CNC Machine that we implemented in the past course. So, Can you give an idea how to implement this program? I would thank you your support. Thanks!!

0 Kudos
Message 1 of 7
(3,918 Views)

I'm no expert in this field, but maybe if you gave more information, someone who is can help.

 

What does the jpg represent, for instance?

What should the CNC machine do?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 7
(3,909 Views)

Thanks for the support. The procedure that the program should have is:

 

1. We will specify the path of the image in Labview (black and white image).

2. Image will be loaded and Labview will convert this image in pixels.

3. Pixels will be readed. Like image is black and white, we will have points.

4. This points will be converted to G-Code.

5. The G-Code will be sent to an Arduino.

6. Arduino wil control de X-Y-Z axis of a CNC Machine.

7. We actually have a 3 axis CNC Machine.

8. The CNC Machine have a marker in the Z axis and a blackboard in the X-Y plane.

9. The CNC Machine will draw the same image that we introduce, but it'll be only the points. That's enoguh to visualize the image.

 

I will aprecciate the support. Thanks community!!

0 Kudos
Message 3 of 7
(3,896 Views)

Hi Victor,

 

Can you give an idea how to implement this program?

So you already gave the steps you need to implement in code. Where exactly do you have problems with?

 

I'm a student and I have to implement a project for my career.

You don't want to start your career as engineer by having other people provide you with ideas and implementations, don't you?

Please do your work "for your career"! We will still help for specific problems…

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,878 Views)

@victor_valdez wrote:

Hi. I'm a student and I have to implement a project for my career. ... Can you give an idea how to implement this program? I would thank you your support. Thanks!!


On the first page of this LabVIEW Forum, there is a box called "Getting Started with LabVIEW".  Spend time with the tutorials referenced there and learn LabVIEW.  Start developing your LabVIEW code yourself.  Come to us, attaching your code to the Post, if you have specific questions or problems.

I'm assuming you are working with other students as a team.  You should all spend some time with the Tutorials, and then you can help each other -- I'm sure one of you will "get it" quickly ...

 

What do you mean by "G-Code"?  This has a particular meaning for LabVIEW enthusiasts, but I don't understand why LabVIEW G-Code has any relevance for this Project (so I'm assuming you mean something else -- please clarify).

 

Bob Schor

0 Kudos
Message 5 of 7
(3,850 Views)

Someone proposed a Right-Click Framework plugin to do what you're looking for.  That was almost eight years ago, so I'm sure they finished it.

 

On ‎7‎/‎30‎/‎2009 at 3:48 AM, unicorn said:

Since ages I am missing the context menu entry "Finish this VI". It should simply finish programming the code for the selected VI according to my ideas and the requirements. Does anyone has such a function?. Any idea how to make it?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 6 of 7
(3,845 Views)

@jcarmody wrote:

Someone proposed a Right-Click Framework plugin to do what you're looking for.  That was almost eight years ago, so I'm sure they finished it.

 

On ‎7‎/‎30‎/‎2009 at 3:48 AM, unicorn said:

Since ages I am missing the context menu entry "Finish this VI". It should simply finish programming the code for the selected VI according to my ideas and the requirements. Does anyone has such a function?. Any idea how to make it?


Very easy to implement: via the right click menu LV would activate the mic. The user explains what he wants. The record is automatically sent to a randomly chosen NI Alliance Partner. The user only needs to give his/her credit card details in the end. Solution to be provided ASAP... Smiley Very Happy

 

EDIT: by the way, the OP referred to this thing: https://en.wikipedia.org/wiki/G-code

EDIT2: OP, did you google for this topic? -->

https://forums.ni.com/t5/LabVIEW/How-to-use-CNC-G-CODES-and-M-CODES-in-LabVIEW/td-p/239996

http://forums.ni.com/t5/LabVIEW/How-to-we-use-CNC-G-CODES-in-LabVIEW/td-p/2688083

 

Message 7 of 7
(3,824 Views)