您好,希望您在G代码程序中提供帮助. [英] hi want your help in g code program..

查看:64
本文介绍了您好,希望您在G代码程序中提供帮助.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我叫Arsalan,我是电子学士学位的学生,将CNC机床作为大学项目.我的硬件快要准备好了,令我困扰的是该程序.我的任务是制作一个使用字母数字字符并生成其g代码的程序.最初,我是在考虑使用一些现成的程序,这很容易.

在与老师的最后一次会面中,他们为我们提供了学习开发自己的可以生成g代码的程序的条件..

我对VB有所了解,但是我可以学习.如果您告诉我,我们可能可以在VB中为G代码编写程序.

请给我一些建议,我真的需要您的帮助.
您可以通过[电子邮件已删除]给我发邮件

[edit]电子邮件地址已删除[/edit]

Hi
My name is Arsalan and I''m a BSc student in electronics, making a CNC machine as a university project. My hardware is almost ready, what bothers me is the program. My task is to make a program which takes alphanumeric characters and generate its g code. Initially I was thinking of using some ready made program, which are quite easy.

In the last meeting with my teachers they give us a condition to learn to develop your own program which can generate g code..

I know a little bit of VB, but I can learn. If you tell me that it is possible that we can write a program in VB for G-Code.

Please give me some advice i really need your help..

u can mail me at [Email Deleted]

[edit]Email address deleted[/edit]

推荐答案

我以前从未做过任何事情,希望有人会拥有CNC的经验.
无论如何,我在G-Code上查看了Wikipedia页面.

G代码

看起来确实有可能写出解释器来接受一些输入并将其转换为g代码.您面临两个问题:
I''ve never done any of this before, hopefully someone will have experience of CNC.
Anyway, I took a look at the Wikipedia page on G-Code.

G-code

It does look possible to write an interpreter to take some input and translate it into g-code. You face two problems:

  1. 您能写出比g代码更清晰的语言吗?-几乎可以肯定的是,答案是肯定的.维基百科甚至为您提供了一个良好的开端,例如,您可以简单地将M07替换为CoolantOnMist,将M08替换为CoolantOnFlood,然后进行替换.
  2. 您可以对称地检查该程序.例如如果程序启动了冷却剂,程序是否结束了冷却剂.程序完成之前,车床主轴是否停止了?程序是否会做任何会损坏车床或阻止车床工作的事情?


您几乎可以创建一个友好名称与G代码代码的数据库(或XML定义??).这将立即解决第1点.第2点比较困难,这取决于您愿意投入多少时间和精力.

我找到了一些免费的CNC模拟器,但我不知道它们有多好,但是它们应该可以帮助您在生成代码接触硬件之前对其进行测试:
http://www.cncsimulator.com/ [ ^ ]


You could almost create a database (or XML definition???) of friendly names versus G-Code codes. This would immediately resolve point 1. Point 2 is more difficult, it depends how much time and effort you are willing to put in.

I found some free CNC simulators, I don''t know how good they are, but they should help you test your generate code before it touches the hardware:
http://www.cncsimulator.com/[^]


thx以表示您的评论

bt我的任务是开发可以生成g代码的软件..
像该软件的jst

http://www.cnc.yertiz.com/text2.htm
thx for ur comment

bt my task to develop a software which can generate g code..
jst like that software

http://www.cnc.yertiz.com/text2.htm


我认为您想使g代码更易于编写.
可以编写示例程序(网站上的人员可以管理!),但是我必须花相当长的时间解决问题才能提供帮助.

一般来说,我会说:
1.创建一个标准的启动g代码脚本,该脚本开始移动工具的起始位置,开始冷却等.
2.根据需要将钻头移到作业上,您可以使用图形的x-y坐标(缩放为实际大小)来引导工具(或此处假定的钻头).我不知道g代码是否可以绘制几何形状(例如直接绘制圆形).如果是这样,您需要通过使用圆形工具等在VB程序中表示出来.
3.当钻头位于工作上方或切割表面时,可以通过使用不同的颜色来增加程序的复杂性.
4.创建一个标准的开始g代码脚本,该脚本停止冷却,停止钻头旋转并将其移离作业.


我父亲是一个长期服务的工具制造商BTW. (尽管他现在正在教授科学).
I thought you wanted to make g-Code simpler to write.
The example program is possible to write (the people at the website managed!), but I''d have to work through the problem for quite some time to be able to help.

In general I''d say:
1. Create a standard start g-code script that starts moves the tool start position, starts cooling etc.
2. Move the bit over the job as required, you can use the the x-y cordinates of the graph (scaled to real size) to guide the tool (or bit I''m assuming here). I don''t know if the g-code can draw geometric shapes (such as circles directly). If so, you need to represent this in you VB program by having a circle tool etc.
3. You can increase the sophistication of the program by having different colors when the bit is above the job, or when it is cutting the surface.
4. Create a standard start g-code script that stops cooling, stops the bit spinning and moves it away from the job.


My dad was a time-served toolmaker BTW. (Though he teaches science now).


这篇关于您好,希望您在G代码程序中提供帮助.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆