How to get Gcode in matlab ?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
显示 更早的评论
i want to run my laser machine over a particular path for that i need gcode. so how it can be done in matlab ?
0 个评论
采纳的回答
13 个评论
I want for line not text ! Is there any code for line ?
All of the 'lent' entries in that file are indicating straight line cuts. All of the 'tourHoraire' and 'tourAntihoraire' are indicating arc cuts. All of the 'rapide' entries in that file indicate movement.
In summary: Emit a G0 to move to a position. Emit a G01 to draw straight. Emit a G02 to turn clockwise, and G03 to turn counter-clockwise.
You need to decide whether you want to cut your shapes into the sheet, or if you want to cut everything away except your shapes.
i have a gcode for this line ... now how can use that gcode in matlab to move my machine attached with arduino.

How is your arduino attached to your MATLAB host? How is your CNC attached to your arduino? Do you have two serial ports on your arduino, one to talk to MATLAB and the other to talk to the CNC?
Arduino is attached using the matlab ad-ons ...and my laser machine is connected to arduino.
Are you using:
- a very old PC with a DB25 parallel connector and parallel to serial adapter to connect to the arduino
- an old PC with a DB25 RS232 connector to connect to the arduino
- a less-old PC with a DB9 connector to connect to the arduino
- a PS/2 DIN-6 port with a PS/2 to DB9 adapter to connect to the arduino
- a USB port with a USB to serial adapter to connect to the arduino
- a USB port to a USB port on the arduino
- a USB port with a USB to TTL adapter connecting to a TTL port on the arduino
- a pair of zigbees connecting the PC to the arduino
- regular wifi on the PC connecting to a zigbee connected to the arduino
- ethernet connecting the PC to the arduino directly
- PC and arduino are both connected by ethernet by way of a hub or switch
- something else?
a USB port to a Usb port in the arduino.
I cannot tell which model of arduino you are using. You appear to have some kind of red DC Shield on top but I do not seem to find a match for it (the ones I can find do not say "DC Shield" in the same position.)
Based upon what I can make out from the picture, it looks to me as if you are not using USB to connect from the arduino to that white device: the connection appears to on some kind of DIN connector.
that white wire is a USB connector. i am using arduino uno and above that a cnc shield is used.
any help ?
Walter Roberson
2018-4-29
编辑:Walter Roberson
2018-4-29
You could probably use serial() to open a serial port connection to the COM port that the arduino is on, and then send it the gcode strings. It looked to me as if that software would accept the strings and act on them.
更多回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
