วันจันทร์ที่ 30 พฤศจิกายน พ.ศ. 2558

ShapeOko Grbl settings calculator

http://homepage.ntlworld.com/r.j.noble/ShapeOko/grblcalc/

ป้ายกำกับ:

การติดตั้ง ชุดควบคุม GRBL Web Interface CNC Controller

ข้อดี ของ Web Interface คือ เราสามารถ ควบคุม CNC ผ่านระบบ เครือข่าย รวมถึง wifi ได้โดยใช้ Web Browser ได้ โปรแกรมนี้ สามารถใช้ได้ หลาย Plate Form และ ข้อดีคือ มี CAD CAM (JSCUT.ORG) ในตัวเอง สามารถใช้ File SVG Format ซึ่งเป็นที่นิยมกันมาก ในหมู่ OPEN Source เรา จะได้นำมาเสนอในโอกาสต่อไปครับ 


โปรแกรมนี้ใช้ได้กับทุก OS ที่สามารถ RUN NODEJS ได้
linux 
Mac os 
หรือ PC ทั้ง win xp และ win7 
สิ่งที่คุณต้องเตรียมการ
1.Hardware 

GRBL CONTROLLER

PC หรือ Embeded Linux เช่น Raspberry Pi ใน Raspberry Pi สามรถใช้ กล้อง Webcam ได้

2.Software

สำหรับการติดตั้งทั่วไปบน Windows XP หรือ win7
1.ติดตั้ง GIT
2.ติดตั้ง Node JS
3.ติดตั้ง GRBL web ตาม Link นี้ https://github.com/andrewhodel/grblweb
4.Run Program GRBL web

หากคุณต้องการ RUN บน Raspberry Pi สามารถ Download Image ได้จากที่นี่เลยครับ
และ ดูข้มูล UPdate ได้จากที่นี่ครับ
อ่านข้อแนะนำเบี้องต้นได้จากที่นี่ครับ

การติดตั้ง

ใช้ Command Line ใน windows
git clone https://github.com/andrewhodel/grblweb.git
cd grblweb
npm install

Config

edit config.js to change serial baud rate and web port

Running

แบบ Stanalone
node server.js
กรณีที่ต้องการ Run บนเครือข่ายคุณจะต้องติดตั้ง  forever ตามนี้ก่อนครับ
npm install -g forever
forever start server.js

การเข้าใช้งาน หากใช้ควรแก้เป็น Port 80

The default port in config.js is 8000, you can change it by editing the file.

http://ipadress:8000/

ภาพรวมการใช้งาน




JCUT CAM



ป้ายกำกับ: ,

GRBL CNC WEB Interface กับการใช้งาน

GRBL CNC WEB Interface 

alt


การใช้ Web Interface สำหรับการควบคุม CNC หรือ เครื่องจักรอัตโนมัติ มีแนวโน้ม ที่จำเป็นจะต้องใช้ มากขึ้น

ได้มีผู้พัฒนาระบบนี้ หลายราย ในส่วนที่เป็น Open Source เราสามารถนำมาพัฒนาต่อเนื่องได้มากมาย จะขอยกตัวอย่างที่ได้ทำการทดสอบแล้ว เช่น andrewhodel.github.io/grblweb คุณสามารถ Download และทำการติดตั้ง ตาม ข้อแนะนำ มันก็ใช้งานได้เลย จะหมดข้อจำกัดของชุดควบคุม คุณสามารถ ใช้ Web Browser อะไรก็ได้ เพื่อควบคุม CNC ของคุณ


alt

  
ทดลองโดยใช้ Raspberry PI





การ Review เราจะพยายามนำมาเสนอต่อไป
หากคุณมีข้อสงสัย คุณสามารถสอบถามตาม Comment ข้างล่าง ได้


ป้ายกำกับ: ,

การใช้ GRBL G Code Sender ด้วย USB Port

การใช้ GRBL CNC แบบ USB 

Grbl Controller 

( เนื่องจาก ใช้ Open source Compiler ในการทำงาน ) หากคุณสนใจต้นฉบับ โปรแกรม สามารถศึกษา และ Download ได้จาก Link นี้ หรือสนใจ G code Sender แบบอื่นๆ ที่มีผู้เขียนจำนวนมาก เราได้นำมารวบรวมไว้ ท่านสามารถ อ่านเพิ่มเติมได้จากที่ Link นี้
1.Download  USB CNC Controller ที่นี่ โปรแกรมที่คุณ Download อาจแตกต่างจากเราบ้างเนื่องจากได้ทำการปรับปรุง โปรแกรมบางส่วนให้เหมาะสมกับการทำงาน ของเรา ดังนั้นอาจจะมีข้อแตกต่างจากต้นฉบับ บ้างตามความเหมาะสม
2.ทำการ Unzip Program
alt
3.นำไปใช้งานโดยไม่ต้อง Setup Program
4.ก่อน run Program แนะนำให้เสียบชุด Grbl cnc controller เข้าที่ช่องใช้งาน USB ก่อน จากนั้น windows จะทำการ detect อุปกรณ์ USB คุณจะต้องบอกตำแหน่งของ USB Driver เพื่อให้ windows ทำการติดตั้งอุปกรณ์ นี้ต่อไป

alt

5.ภายหลังขั้นตอนการติดตั้ง Driver เรียบร้อยแล้ว คุณต้องทำการสำรวจดู Com Port ที่ติดตั้งแล้วว่า เป็น Com No. อะไร เนื่องจาก com port อาจมีการเปลี่ยนแปลงได้

alt

6.ทำการ RUN Program

alt
7.ติดต่อกับ GRBL Controller โดยการติดต่อผ่าน Communication Port ที่ได้ทำการตรวจสอบไว้แล้ว 

alt

8. หากมีการติดต่อ สำเร็จ จะมีข้อความตามรูปข้างล่างนี้ครับ (การ Set ค่า ความเร็วในการส่งผ่านข้อมูล ขึ้นอยู่กับ Firmware ที่เรากำหนดใว้ ซึ่งต้องตรงกัน

alt


9.ก่อนการใช้งาน จะต้องมีการ set ค่า parameter ของ cnc controller เช่นเดียวกันกับ cnc controller ทั่วไป ตามข้างล่างนี้ครับ

10. ทำการ set ค่า ความละเอียด และ ความเร็วในแต่ละแกน



11.ทำการทดสอบการควบคุมการเคลื่อนที่ โดยใช้ JOG Mode และ เลือกระยะทางในการ JOG


12.ทดลอง Load G code และ Run CNC 



Supported G-Codes
Linear Motions (G0,G1)
Arc Motions (G2,G3)
Dwell (G4)
Plane Selection (G17,G18,G19)
Units (G20,G21)
Go Home (G28,G30) 
Distance Modes (G90,G91)
Feedrate Modes (G93,G94)
Coordinate Offset (G92)
Spindle Control (M3,M4,M5)
Others (G53,G80).
Work Coordinate Systems (G54,G55,G56,G57,G58,G59)
Set Work Coordinate Offsets (G10 L2, G10 L20)
Go to Pre-Defined Position (G28,G30)
Set Pre-Defined Position (G28.1,G30.1)
Clear Coordinate System Offsets (G92.1)
Program Pause and End (M0,M2,M30)
Coolant Control (M8,M9)
ยังไม่จบ นะครับ ใครมีข้อสงสัยสอบถามได้ ตาม Comment ข้างล่างครับ

ป้ายกำกับ:

SD CARD G CODE SENDER FOR GRBL with Auto Tool Change

SD CARD G CODE SENDER FOR GRBL with Auto Tool Changer (Stand Alone CNC Controller Support M98 M99 G81) 
CNC Controller ที่ไม่ต้องใช้ PC ควบคุม ใช้เพียงการอ่านข้อมูลจาก SD Card หมดปัญหาเรื่อง การติดตั้งโปรแกรม , ระบบ Windows , รวมถึงการป้องกัน Virus ทำให้การทำงานไม่ติดขัดอีกต่อไป. Download และ ใช้งานได้แล้ว รวมถึงการใช้ Auto Tool changer และ Function อื่นๆ ..
GRBL CNC Controller เป็น CNC Controller ที่มีผู้นิยมใช้กันในกลุ่ม OPEN Source แบบ Embedded กันอย่างกว้างขวาง และ มีผู้พัฒนาต่อ เป็นจำนวนมาก แต่มีข้อจำกัด บางประการ ที่ทำให้ ความสามารถบางประการหายไป เมื่อเทียบกับ PC Base cnc controller เช่น KCAM , Mach3 , Linuxcnc , USB CNC แต่เราสามารถ เพิ่มขีดความสามารถเหล่านั้นได้ เนื่องจากผู้พัฒนา GRBL ได้เขียน โปรแกรมรองรับการพัฒนาไว้ให้แล้ว เราคิดว่า การต่อ ยอดความคิด  น่าจะดีกว่าการแข่งขัน จึงได้มีโครงการนี้ขึ้นมา
ความต้องการเบื้องต้นเช่น
1.อ่าน ข้อมูล G code จาก SD Card หรือ media อื่นๆ ได้อย่างอิสระ ไม่ต้อง อาศัย PC เป็นตัวส่ง G Code
2.ทำการควบคุม CNC โดยไม่ต้องใช้ PC 
3.เพิ่มเติม Function พิเศษ เช่นการทำ 2D Scan ,3D Scan, Probe , Auto Zero Z , Auto Profile หรือ Function อื่นๆ อีกมากมาย (Not Complete)
Keyboard Mapping Design
SD Card G Code Sender For GRBL CNC Controller Support Command (13 / 05 / 2015)
Support Item Support G Code Command GRBL 09i SD Card Gcode Sender
 Non-Modal Commands G4, G10L2, G10L20, G28, G30, G28.1, G30.1, G53, G92, G92.1 Support
Motion Modes G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80 Support
Feed Rate Modes G93, G94 Support
Unit Modes G20, G21 Support
Distance Modes G90, G91 Support
Arc IJK Distance Modes G91.1 Support
Plane Select Modes G17, G18, G19 Support
Tool Length Offset Modes G43.1, G49 Support
Cutter Compensation Modes G40 Support
Coordinate System Modes G54, G55, G56, G57, G58, G59 Support
Program Flow  M0, M1, M2, M30* Support
Coolant Control M7*, M8, M9 Support
Spindle Control M3, M4, M5 Support
Valid Non-Command Words F, I, J, K, L, N, P, R, S, T, X, Y, Z Support
Load G code From SD card   Support
PS2 Key Board Control Support
LCD Monitor 16 x 2 LCD Monitor Support
Manual Data Input Mode ( MDI ) Support
Motion Support G81 (Drilling) Support
Auto Tool Changer M6 T(N) Support
Program Flow M98 M99 (Subprogram Call And sub Program End) Upcoming
Auto Zero Z Support
PID Spindle S (Command) Upcoming
Single Block Run Single Block And Continuous Run Support
Feed Rate Control Feed Rate Override 25% 50% 75% 100% 125% 150% Support
Network File Transfer System Wifi File Transfer Support
Start From Specific Line Upcoming
Web Application Controller Upcoming
Real Time Jogging Test Uncomplete
Web Graphic G Code Preview Upcoming
PC  Base cnc controller Key Map Support
Automation System  Upcoming
CNC Communication Network Upcoming
Auto Machine Configuration Upcoming
Internet Service And Fault Report Upcoming
Auto level Upcoming
Center and Edge Finder Upcoming

Firmware Download For Arduino Mega 2560 G code File name on sd card is  o001.cnc,o002.cnc,o003.cnc,o004.cnc,o005.cnc,o006.cnc,o007.cnc,o008.cnc,o009.cnc Software Instruction Not Complete If You Have any Comment Please tell me know  Can List On next version Please Follow US at GITHub 
If you have any comment or bug reports please send to panmaneecnc@outlook.com
alt Credit https://github.com/grbl/grbl/wiki/Connecting-Grbl
  

PS2 Key Mapping

1. F5 M3  
2. F5 Toggle M5 
3. Num Key Pad + - Feed rate overrides On the Fly 25 % to 150% 
4. F6  NOP
5. Home  Goto X0 Y0  
6. left arrow key Jog X-
7. right arrow Key Jog X+
8. front arrow Key Jog Y+
9. back arrow key Jog Y-
10. pg up arrow key Jog Z+ 
11. pg down arrow key Jog Z- 
12. key pad + jog up .01,.1,1,10,20,50,100 For Item 6 - 11 
13. keypad - jog down .01,.1,1,10,20,50,100 
14. Insert Send  parameter file From sd To grbl 
15. shift + x For Set X 0
16. shift +y For Set Y 0
17. shift + z For Set Z 0
18. F12 Zero X Y Z  



ยังมีการปรับแต่งอีก เล็กน้อยครับ และ อยู่ระหว่างการทดสอบ ความถูกต้องของการรับส่งข้อมูล G code
การทดสอบล่าสุด 13 / 07 / 2557 ได้ผลเป็นที่น่าพอใจ


การทดสอบการเปลี่ยน Tool (Auto Tool Changer)
20 /05 /2015
Panmaneecnc Family Team
ความคิดข้างต้น เกิดจาก ประสบการณ์ และ วิสัยทัศน์ ของเรา การทำงานนี้ เป็นการทำงานกัน เป็นทีมงาน มิได้เป็นผลงานของคน ๆ เดียว ดังนั้น บุคลากรในทีมงาน จะมีความสามารถของแต่ละบุคคลต่างกัน  เราจะต้องใช้เวลาในการพัฒนางานของเรา และ ต้องเรียนรู้อีกมากมาย... เนื่องจากเรายังไม่เก่งพอ PANMANEECNC TEAM

ป้ายกำกับ: , ,

รวมปัญหา Gcode Sender สำหรับ GRBL

GRBL G code Sender ที่ชื่อ GRBL Controller จะมีปัญหาคือ การ JOG ครั้งแรก จะมีการ Error เนื่องจาก คำสั่งควบคุมในการ JOG เป็น G01 ซึ่งต้องการ parameter F ดังนั้น เราจะต้องกำหนดค่า Feed สำหรับ G01 เช่น F 200 ที่ช่อง command จะต้องป้อนค่า ก่อนการ Jog ในครั้งแรก สำหรับ GRBL 0.9 ขึ้นไป



สำหรับ การ Alarm อีกประการคือ การตั้งค่า Enable Limit Switch จะทำให้เกิด alarm หากเราไม่ติดตั้ง Limit Switch วิธีการแก้คือ Disable Limit Switch
แนะนำให้ใช้ G Coce Sender อื่น เช่น https://github.com/Denvi/grblControl

ป้ายกำกับ:

รวม โปรแกรม G Code Sender สำหรับ GRBL และการแก้ใข

รวม โปรแกรม G Code Sender สำหรับ GRBL และ Review เล็ก ๆ


ชนิด Link รายละเอียด
SD Card G Code Sender SD Card G Code Sender USE SD Card For Sending Code And Control GRBL Like Mach3 BY Panmaneecnc Team Adding Automatic Tool change (M6) , Drill Function (G81) , Macro Sub Program (M98,M99)
G code sender GcodeSender G-code sender โดย Otto Hermansson
G code sender GCtrl Processing Script to stream Gcode
G code sender and previewer Universal-G-Code-Sender จาวา สคริปโดย Will Winder. Cross-platform (Win32, Win64, Linux, MacOS). มีความสามรถเพิ่มเติม : Truncate decimal point precision to a configurable amount, Remove whitespace, Remove comments, Override speed rates, Arc to line conversion.
G code sender and previewer Grbl Controller Cross-platform graphical Grbl Controller for Mac, Windows and Linux originally written by Kosme, currently maintained by zapmaker. Allows you to jog X, Y, Z, and see the current position. Newer versions include a previewer, v3.4 will trim too-long lines
G code sender grblfeeder Python serial terminal designed for sending gcode files to a microcontroller running grbl.
G code sender PythonCNCGUI HMI/GUI done in Python using Opengl for graphics is used to interface to modified Simen Grbl CNC code on an Arduino over USB. Operating System Notes: Currently runs well in Linux with Ubuntu and Python2.5. Also in process it now runs in Windows XP 32bit with Python2.7 but comms need to be improved to run faster and gcode files only partial
G code sender GCode Step and Alignment Tool Cross-platform GCODE debug/step and alignment tool for Grbl 0.8c or later. with features similar to software debugger. For example usage of breakpoints, change program counter (position), stop and inspection/modification of machine variables, step, run. Especially useful for allowing tool changes during operation.
Web Base G code sender GRBLweb Web based Gcode Sender ใช้ Node JS
Web Base G code sender and remote web interface Octoprint for CNC / Grbl by PxT Web base Gcode Sender
GCode Teleporter GCode Teleporter GCode Viewer/Simulator, GCode Truncater, Gcode Scaler (under dev) and Web Cam support
Steuersoftware JCNC V1.03 Steuersoftware JCNC V1.03


ตัวที่ทดสอบบน PC ที่น่าใช้ทีสุด ตอนนี้สำหรับผู้เขียนเองคืิอ https://github.com/Denvi/grblControl จะมีปํญหาบ้างคือ Computer บางรุ่นหาก Set Video Card ไม่ถูกต้อง อาจไม่แสดงผล Graphics ต้องปรับแต่งเรื่อง OPENGL ครับ





ปัญหาบางส่วน ของ GRBL CNC Controller 



ตามภาพข้างบน ระวังเรื่องการ สั่ง G01 เนื่องจาก F=0 จะทำการกด JOG ไม่ได้ เนื่องจากการ Jog ในโปรแกรมนี้ใช้ G1 การใช้ G1 ต้องมีค่า F เสมอ  วิธีการแก้ใข ต้องสั่ง F ก่อนการใช้งาน ใน MDI Mode ตามภาพข้างล่าง นี้



การใช้คำสั่ง ภายหลังการ Connect GRBL V0.9i จะมี Alarm Lock เนื่องจาก การ Enable Home Limit  การแก้ใข จะต้องส่งคำสั่ง $X เพื่อ Unlock จึงจะทำงานต่อไปใด้







การแก้ Alarm Lock โดยการ Disable Homing $21=0 ยังมี โปรแกรม G code sender อีกหลายตัวนะครับ ที่ไม่สมบูรณ์ ทำให้การใช้งาน ไม่ราบรื่น นะครับ เราเองก็พยามพัฒนา SD Card Gcode sender ให้ทำงานได้คล่องตัวใกล้เคียง Mach3 มากที่สุด

GCode Teleporter   ได้ทำการทดลองใช้ แล้ว มีปัญหาการใช้งานพอสมควรครับ ตามรูปข้างล่าง นี้ครับ



หาก Disconnect แล้ว Connect ใหม่ไม่ได้ ต้องออกจาก โปรแกรมแล้ว เข้ามาใหม่ครับ (win XP)



 

  JOG ครั้ง แรก จะไม่เป็นไปตามค่า ที่ตั้งใว้ จะเดินเท่ากับ 1


  ครั้งต่อไปเดินได้ ตาม Jog


  Status หลังจากการ RUN File ไม่ถูกต้อง


default การเปิด File หาก Cancle จะเกิด เหตุการตามข้างล่าง


  การ set parameter ในโปรแกรมยังทำไม่ได้




ข้างล่างนี้คือความเห็นส่วนบุคคล กรุณาออกความเห็นอย่างสร้างสรรค์

จากปัญหาข้างต้น นี่คือปัญหาหนึ่งของ Open source ตามกระแส ทำให้ ผลงานคุณภาพมีน้อย เนื่องจากขาดแรงจูงใจ ซึ่งปัญหานี้ ได้มีอาจารย์ในมหาวิทยาลัยกล่าวใว้ ก่อนหน้านี้แล้ว จึงอยากให้ Developer ทั้งหลายได้ดูใว้เป็นแง่คิดในการพัฒนาตัวเอง เพื่อให้ได้ผลิตผลงานคุณภาพ ออกสู่สังคม โดยใช้โอกาสของ Open source ดังนั้นก่อนทำการกระจายความรู้ควรพิจารณาให้รอบคอบ มิเช่นนั้น ผู้เรียนรู้ภายหลังอาจได้ข้อมูลที่ผิด ๆไป

ป้ายกำกับ: