èªå® ã®ã¯ãŒã¯ã·ã§ããã§å人çãªèªåå¶äœã«ã€ããŠåŠã³ãã¯ãªãšã€ã¿ãŒã®ã¢ã€ãã¢ãã©ã®ããã«å®æåã«å€ããããåŠã³ãŸãã ããã¯ã¹ã«ãªããã®ãèªååããããã«ãJVMãšgroovy / javaããCNCãã·ã³ã«Gã³ãŒãåœä»€ãéä¿¡ããã¢ãããŒããæ€èšããŠãã ããã
ãã®åºçç©ããJVMããã°ã©ããŒãIoTãããã¯ã«èå³ã®ãã人ãããããã«äžæ £ããªäººã3Dããªã³ã¿ãŒã®è³Œå ¥ãèããŠãã人ãä»»æã®ã·ã¹ãã ã®ãããã¿ã€ããäœæããRaspberry PI / Beagleboard Blackã§ãœãããŠã§ã¢ãå®è¡ãã人ã«æçã§ããããšãé¡ã£ãŠããŸãã ç§ãã話ãããããšã¯ããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ãšãªãŒãã³ããŒããŠã§ã¢ãç¹°ãè¿ã䜿çšããããšãã§ããŸãã
å 容
- ãŸããã
- CNCãã·ã³
- ã¢ãã«ããGã³ãŒããž
- ããã°ã©ã 管ç
- JavaãšGroovyãããã·ã³ãå¶åŸ¡ããŸã
- çŸããé ã...
- çµè«
äŒè°ããœãããŠã§ã¢éçºãïŒSECR-2016ïŒã§ã®ç§ã®ããã¬ããŒãã«åºã¥ããŠããŸãã ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äž¡æ¹ã§ã®çµéšãšåæ§ã
ã¬ããŒãã®ãããªé²ç»...
ãŸããã
èŽè¡ã«èšŽããã
ãã¯ããããããŸãã芪æãªããªã¹ããŒã ç®èŠããŠãé±æ«ã®æã«æ¥ãŠãããŠããããšãã ããŒã«ã§ãäŒãã§ããŠããããã§ãïŒ ããªããšç§ã¯å ±åããæéãããŸããªãã®ã§ãããŒã«ã«ã¯è³ªåãšåçã®ã»ã¯ã·ã§ã³ã¯ãããŸããããå ±ååŸã«è³ªåãããããšãã§ããŸãã æåŸã®ã¹ã©ã€ãã«ã¯ãè¿ä¿¡ããã¡ãŒã«ã¢ãã¬ã¹ããããŸãã
ã¬ããŒãã«ã€ããŠã®ããªãã®æèŠã¯ç§ã«ãšã£ãŠéåžžã«éèŠã§ãã è¿ãå°æ¥ãçè«çã«èª¬æããããšãå®è¡ããŠCNCãå¶åŸ¡ããããšãå®éã«å¯èœã«ãªãäŒè°ãéå¬ããäºå®ã§ãã ããã¯ãªãŒãã³/ç¡æã®ã€ãã³ãã§ãããã¢ã¹ã¯ã¯ã«ãã人ã¯èª°ã§ãåå ã§ããŸãã è¿ãå°æ¥ãå ŽæãèŠã€ããŠãmeetup.comã§äŒå Žã®äŸãšå Žæã®æ å ±ãæºåããããšæã£ãŠããŸãã èå³ã®ããæ¹ã¯ãã¡ãŒã«ã¢ãã¬ã¹ã«æžããŠããã ããã°ãã€ãã³ãéç¥ããéãããŸãã èšäºãžã®æ³šïŒãã¡ããããã®äŒè°ã®çµæãhabrahabrã®èªè åãã«å ¬éããŸããåå ããããšãã§ããŸãã
ã¬ããŒãã«ã€ããŠã®ããªãã®æèŠã¯ç§ã«ãšã£ãŠéåžžã«éèŠã§ãã è¿ãå°æ¥ãçè«çã«èª¬æããããšãå®è¡ããŠCNCãå¶åŸ¡ããããšãå®éã«å¯èœã«ãªãäŒè°ãéå¬ããäºå®ã§ãã ããã¯ãªãŒãã³/ç¡æã®ã€ãã³ãã§ãããã¢ã¹ã¯ã¯ã«ãã人ã¯èª°ã§ãåå ã§ããŸãã è¿ãå°æ¥ãå ŽæãèŠã€ããŠãmeetup.comã§äŒå Žã®äŸãšå Žæã®æ å ±ãæºåããããšæã£ãŠããŸãã èå³ã®ããæ¹ã¯ãã¡ãŒã«ã¢ãã¬ã¹ã«æžããŠããã ããã°ãã€ãã³ãéç¥ããéãããŸãã èšäºãžã®æ³šïŒãã¡ããããã®äŒè°ã®çµæãhabrahabrã®èªè åãã«å ¬éããŸããåå ããããšãã§ããŸãã
ãããŒã ã¯ãŒã¯ã·ã§ããã®CNCãã·ã³ã2人ã®casã®ããŒããŒã®æŒ«ç»ã«ãªããªãæ¹æ³ãã«ã€ããŠã®ã¬ããŒããéå§ããŸãã ãã®æŒ«ç»ã®å 容ã誰ãèŠãŠèŠããŠããŸããïŒ
èŽè¡ããã®å£°ïŒãã¿ããªãèŠãã
ãŸããããã¯ããªããç§ã話ãããšã«ã€ããŠç¥ã£ãŠããããšãæå³ããŸãã ãããŠãã¬ããŒãã®æåŸã«ãJavaãšGroovyã§ãã·ã³ãããã°ã©ã ã§å¶åŸ¡ããããšããŸãã
èŽè¡ãžã®å¥ã®è³ªåã ãšã³ãžãã¢ããã¶ã€ããŒãçç£æè¡è ãšããŠåããŠããCNCãã·ã³ãåžžã«äœ¿çšããŠããã®ã¯èª°ã§ããïŒ èŽè¡ããåŠå®çãªçããèãããŸãã ã ãããããã¯ç§ã«ãšã£ãŠã¯ããã«ç°¡åã§ããããããŒã«ããªãã§ãã ããã æ¥çã§ãããã®ãã¯ãããžãŒãæ¯æ¥äœ¿çšããŠãã人ã ã¯ãããŒã«ã®ã³ã¹ãããããã¯ãžã®æ²¡å ¥åºŠãããã³ç§ã®ãã¬ãŒã³ããŒã·ã§ã³ã¹ã¿ã€ã«ããã°ãããŠããŸãã
CNCãã·ã³
ä»äºã«ã€ããŠäœãç¥ã£ãŠããŸããïŒ äººéã®ä»äºãšåŽåã¯åžžã«2ã€ã®æ¹æ³ã§èµ·ãããŸããã
åã人ãã³ã³ãããŒã«ããããèªåèªèº«ã掻çšããŠå šå¡ãšäžç·ã«ä»äºãããããäžç·ã«1ã€ã®ãã¹ãã©ããããåŒããŸãã
ãã®åçã§ã¯ãçºæè ãšãšã³ãžãã¢ããã䟿å©ãªããŒã«ãçºè¡šããããšãèæ ®ããŠããŸããã
åŽåãç°¡çŽ åãããã¯ãããžãŒã¯ãç掻ãããå¿«é©ã«ãã人ã ãç¥çãªããšãããä»äºãè»ã«æ®ãããšãå¯èœã«ããŸãã
ãããã誰ããã挫ç»ãé æ¹ã®ãŽã©ãã«ãã®å°å¹Žãèªåã®é¡ããå¶ãããã£ãã®ãèŠããŠããã ãããã圌ã¯èªåã§äœãããããªããäœãåŠã³ãããªãã£ãã
é ãã®çåœã§ã圌ã¯é¡ããåäžã®2ã€ã®ofã«æ¥ãŸããã 圌ãã¯çµå¶è ã§ããã圌ã®ããã«ãã¹ãŠãããŸãããã圌ãå¿ èŠãšããŠããã®ã§ã¯ãããŸããã§ãã ã
ãŸããããããããã2ã€ãèŠããŠããŸãã
ãã²ã¯ã·ã¯ãããããã®ãããããšããã«åœŒãšããã§ãŠãåŒã³ãŸããã ããã§ãŠãèµ°ã£ããšãããã²ã¿ã«ã¯åœŒãæ¢ããŠããäžæ¥ã倱ã£ãŠãã5åã§é£ã¶æ¹ãããããšèšããŸããã ç¹°ãè¿ãäœæ¥ãé »ç¹ã«è¡ãå Žåãèªååã®ãæ¥ãã倱ãæ¹ãç°¡åãã©ãããèããå¿ èŠããããŸãã
ããããã話ããããã¯ãããžãŒã¯ã20äžçŽã®70幎代ã§ãã ãããã¯ãã¡ã¢ãªã«æ ŒçŽãããŠããããã°ã©ã ã«ãã£ãŠå¶åŸ¡ããããã·ã³ã§ãã 以åã¯ããããã¯ãã³ãã«ãŒãã§ããããæè¿ã¯ãã©ãã·ã¥ãã©ã€ãã§ãã çç£ã§ã¯ãèªåæ©ã«ã¯ããŸããŸãªãµã€ãºãç°ãªãéååŠçã¹ããŒã ããããææåŠçãå®è¡ããããŸããŸãªããŒã«ãè£ åã§ããŸãã
ããŒã ã¯ãŒã¯ã·ã§ããã§ã¯ããã¹ãŠãããå¹³å¡ã§ãã åºæ¬çã«ãæ©æ¢°-AliExpressãŸãã¯äžçåœããã®ãã©ã³ãå€æŽã®ãã¡ãŒã«ãŒãã®èŒžå ¥æ¥è ãšã®åæãã äœã§ãè³Œå ¥ã§ããŸãããã¹ãã¢ããŒããè³Œå ¥ããŠèªåã§çµã¿ç«ãŠãããšãã§ããŸãã
æéãšãéãæ°ã®æ¯ã«æããªãããã¬ãŒã ãšããŒã¿ã«ã補é ããããã®çµéšãšæ©æ¢°ãžã®ã¢ã¯ã»ã¹ããªãã®ã§ãæ¢è£œãè³Œå ¥ããæ¹ãç°¡åã§ãã äžæ¹ãèªåã§åéããããšã¯éåžžã«èå³æ·±ãçµéšã§ãã ShapeokoãMechMate CNCã«ãŒã¿ãŒãZenbot CNCãªã©ã®ãããžã§ã¯ãããããŸãã
CNCãã·ã³ã§äœãã§ããã®ããã¯ãŒã¯ã·ã§ããã§ãããå¿ èŠãªã®ã¯ãªãã§ããïŒ æšå·¥ãè¡ã£ãããä¿®ççšã®è£ 食ããã«ãäœæãããã§ããŸãã ãŸãã¯ãããªãã¯åµé çãªèããæã¡ããã®çµæã¯æ¢è£œã§è²©å£²ãããŠããŸããã ããªãã¯ãŸã 家åºçšæ©åšã®ä¿®çã®ããã®éšåãäœãããšãã§ããŸãã ããšãã°ãéééå±è£œã®ãã£ãŒãããã汜è¹çšã®ã¹ãã¢ããŒããä¿®ççšã®ã¹ãã¢ããŒãã¯ã販売ã»ã³ã¿ãŒããµãŒãã¹ã»ã³ã¿ãŒã§ã¯å©çšã§ããŸããã 3Dããªã³ã¿ãŒã®å Žåã®ããã«ã1å°ã®ãã·ã³ã§å¥ã®CNCã®ã¹ãã¢ããŒããäœæããããšã¯å¯èœã§ãããããŒã補é ã®ææãšããŠãã©ã¹ããã¯ã«éå®ãããŸããã
ãœãããŠã§ã¢ã®èŠ³ç¹ããèŠããšãCNCã3Dããªã³ã¿ãŒããããã¿ãŒã®éã«ã»ãšãã©éãã¯ãããŸããã äœæ¥ããŒã«ã¯ç°ãªããŸãããå€ãã®3Dããªã³ã¿ãŒã¯åãã³ãã³ãèšèªã§å€§åã®ç£æ¥æ©æ¢°ã®ããã«å¶åŸ¡ãããŸãã
ããã§ãŠãèµ°ã£ãŠé£ã¹ãªãã£ã挫ç»ãæãåºããŸãã ãã²ã¯ã·ã¯ç¿ŒãåªããŠãããšèšããããã§ãŠã¯è¶³ãèšããŸãã 挫ç»ã®çµããã«ããã«ã²ãçŸãã äž»ãªãã®ã¯å°Ÿã§ãããšèšããŸãã 圌女ã®å°Ÿã¯æåã«åœŒå¥³ã®åœãæã£ãã CNCã䜿çšããå Žåã¯ãçåœãšå¥åº·ã®å±éºãæãåºãã å®å šäžã®æ³šæäºé ãå®ã£ãŠãã ããã CNCã«ã¯ãååå·¥å ·ã倧èŠæš¡ãªå¯åéšåããã³å転éšåãå«ãŸããŠããŸãã
é»æ°é§åè£ çœ®ã¯ã絶çžãç Žå£ãããå ŽåãããŠãžã³ã°ãšæ¥è§Šããå±éºã«æºã¡ãŠããŸãã äœåããŠããé»æ°ãã©ã€ãã®é»æºãåããã«æ¶ãããšããããªãã§ãã ããã
ã¢ãã«ããGã³ãŒããž
ã»ãšãã©ãã¹ãŠã®CNCãã·ã³ã¯Gã³ãŒãã§å¶åŸ¡ãããŸãã ããã¯ãã³ãã³ãããã³ããŒã¿ã®ããã¹ã圢åŒã§ãããåœéæšæºãšããŠåãå ¥ããããŠããŸãã ãã ããç°ãªãã¡ãŒã«ãŒã®ãã·ã³ã®ç¹å®ã®å®è£ ã«ã¯ãå¶åŸ¡ããã°ã©ã ãå¥ã®ãã·ã³ã«ç§»æ€ã§ããªãããã«ããæ¡åŒµæ©èœãå«ãŸããŠããŸãã
ãã®ã¹ã©ã€ãã®å¶åŸ¡ããã°ã©ã ã¯ãå¹³é¢äžã®äžè§åœ¢ã補ç²ããŸãã
G21ã¯ãããã°ã©ã ã®åäœã¯ããªã¡ãŒãã«åäœã«ãªããšè¿°ã¹ãŠããŸãã
M3èšå®é床Sã§ã¹ãã³ãã«ããªã³ã«ããŸãã
G0ã¯ãçŸåšã®åº§æšããã³ãã³ãã§æå®ããã座æšãžã®ç·åœ¢è£éã§ã¢ã€ãã«æã«äœæ¥ããŒã«ã移åããŸãã
G1ãç·åœ¢è£éã䜿çšããŸãããããã¯Fãéãé床ã瀺ãåŠçã¢ãŒãã§ãã
M5ã¯ã¹ãã³ãã«ãåæ¢ããŸãã
M2ã¯ããã°ã©ã ãå®äºããŸã
ãã®äŸã§ã¯è€éãªããšã¯ãããŸããããå®éã«ã¯Gã³ãŒããæåã§èšè¿°ããããšã¯ã»ãšãã©ãããŸããã éåžžãã¢ãã«ã¯äœããã®åœ¢ã§äœæãããããã«åºã¥ããŠå¶åŸ¡ããã°ã©ã ãäœæãããŸãã
Inkskapeãªã©ã®ãã¯ã¿ãŒãšãã£ã¿ãŒã§èŒªéãäœæããGCodeToolsãªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã䜿çšããŠããã·ã³ã®Gã³ãŒãããã°ã©ã ã«å€æã§ããŸãã ãã®ã¢ãããŒãã¯ãèšèšè ã«ãšã£ãŠäŸ¿å©ã§ãã
Blenderã§ã®äœæ¥ã«æ £ããŠãã人ã¯ããªãŒãã³ãœãŒã¹ã®BlenderCAMã䜿çšããŠ3Dã¢ãã«ã2.5Dã¬ãªãŒãã«å€ããããšãã§ããŸãã
æ°åäžãã«ããæ°åäžãã«ã«çžåœããç£æ¥çšCADã·ã¹ãã ã¯ã趣å³ã§äœ¿çšããããšã¯ã§ããŸããã ãã ãããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã®FreeCADã¯äœ¿çšã§ããŸãã
å©äŸ¿æ§ãšæ©èœã®ç¹ã§ã¯é«äŸ¡ãªCAD / CAMããã±ãŒãžã«å¹æµãããã®ã§ã¯ãããŸããããåçŽãªã¿ã¹ã¯ã§ã¯èšèšã«ã¯ååãããããŸããã
圌ã®ãã©ãŒã¯HeeksCADã¯CAMããŒãã§ãã粟巧ã§ãããã¢ãã«/å³é¢ã«åºã¥ããŠå¶åŸ¡ããã°ã©ã ãäœæã§ããŸãã
ããã°ã©ã 管ç
座æšè¡šããã©ã€ã¹ããŸãã¯æ©æ¢°ã®ä»ã®ããŒã«ãçŽæ¥å¶åŸ¡ãããã®ã¯äœã§ããïŒ
ãããã¯ãUSBãã©ãã·ã¥ãã©ã€ããšãã·ã³ãæ¥ç¶ã§ããå°çšã®DSP CNCã³ã³ãããŒã©ãŒã§ãã ãŸãã¯ããããã¯é»æ°ãã©ã€ããšã¹ãã³ãã«ãå¶åŸ¡ããããã®ã·ã³ã°ã«ããŒãã³ã³ãã¥ãŒã¿ãŒïŒRaspberry PIãBeagleBoardïŒçšã®æ¡åŒµã«ãŒãã§ãã ãŸãã¯ãLPTããŒããåããéåžžã®ããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒããŸãã¯ãã·ã³ãšã¬ã¯ãããã¯ã¹ãšã®ã€ã³ã¿ãŒãã§ã€ã¹çšã®PCI / PCIeæ¡åŒµã«ãŒãã§ãã
ãã®ã¬ããŒãã®äž»äººå ¬ã¯ããœã³ã³ã§ãã ãã·ã³ãå¶åŸ¡ã§ããããããªãŒãã³ãœãŒã¹ããã°ã©ã LinuxCNCã䜿çšããŠgã³ãŒãã解éã§ããŸãã
ãœãããŠã§ã¢ã¯ããªã¢ã«ã¿ã€ã ã®Linuxã«ãŒãã«ã§å®è¡ãããŸãã Raspberry PIã·ã³ã°ã«ããŒãã³ã³ãã¥ãŒã¿ãŒã®å ŽåãBeagleBoard Blackã¯æ¢è£œã®isoã€ã¡ãŒãžãšããŠARMã®ãã©ãŒã¯Machinekitã䜿çšããŸãã 9ãã«ã®ã·ã³ã°ã«ããŒããããçšã®Machinekitãã«ãããããŸãã
LinuxCNCã¯ã³ã³ã¹ãã©ã¯ã¿ãŒã§ããããã®æ§æã«åºã¥ããŠãã»ãŒãã¹ãŠã®æ§æãæ§ç¯ã§ããŸãã ãã®ããã°ã©ã ã¯ããããã·ã³ãšå·šå€§ãªçç£CNCã®äž¡æ¹ã管çããŸãã ç£æ¥çšCNCã®é»åæ©åšã®è¿ä»£åãšãæ°ããèšèšãããæ©æ¢°ã®äž¡æ¹ã§äœ¿çšãããŸãã
äžéšã®ã³ã³ããŒãã³ãã¯ãªã¢ã«ã¿ã€ã ããã»ã¹ã§åäœããããã»ã©éèŠã§ã¯ãªãéšåã¯äºæž¬ã§ããªãé 延ã®ããç°å¢ã§åäœããŸãã LinuxCNCã®ã€ãã³ãã«å¯Ÿããåå¿ã®å éšããžãã¯ãæ¡åŒµããã«ã¯ãLDãã£ãŒããããã«ã¯ã·ã§ã«ã¹ã¯ãªãããŸãã¯ã³ã³ãœãŒã«ããã°ã©ã ã䜿çšã§ããŸãã
JavaãšGroovyãããã·ã³ãå¶åŸ¡ããŸã
GUIã³ã³ããŒãã³ãã®ä»£ããã«ãCNCãå¶åŸ¡ããéåžžã®ãœãããŠã§ã¢éçºãã¯ãããžãŒã䜿çšããŠå€éšAPIçµç±ã§ã€ã³ã¿ãŒããªã¿ãŒã«ã³ãã³ãã転éããããšããŸãã ãã®ã¢ã€ãã¢ã«èå³ããããã¹ãŠã®äººã¯ãgithubã§PoC Apache Camelã³ã³ããŒãã³ããšcamel-gcode JVMã®ã©ã€ãã©ãªãèŠã€ããããšãã§ããŸãã
Javaã«åºã¥ããã¢ãã®ã€ã³ã¿ãŒããããã«ã¯å€ãã®ãœãªã¥ãŒã·ã§ã³ããããå€ãã®å Žåããããã¯IoTã²ãŒããŠã§ã€çšã®ãµãŒããŒã§ãã LinuxCNCäžã®ãã·ã³å¶åŸ¡ããã€ã³ã¿ãŒãããã¢ã¯ã»ã¹ã䜿çšããè€éãªãã¯ã©ãŠããèªååã·ããªãªã«çµ±åã§ããããã«ãªããŸããã Eclipse KuraãApache Camelã䜿çšãããã®ã³ã³ã¹ãã©ã¯ã¿ãŒã䜿çšããŠæ°çŸã®æ¢è£œã³ã³ããŒãã³ãã®å®çšçãªãœãªã¥ãŒã·ã§ã³ãçµã¿ç«ãŠãããšã¯é£ãããããŸããã ã«ã¡ã©ãŸãã¯ãããã¯ãŒã¯çµç±ã§ç»åããã£ããã£ããããŒã«ãããããããã·ã³ããžã§ã³ã©ã€ãã©ãªãçµ±åããèªèã³ã³ããŒãã³ããè¿œå ã§ããŸãã
ãã·ã³ãå¶åŸ¡ããã³ãã³ããéä¿¡ã§ããAPIã䜿çšããå°ããªJavaã®äŸããå§ããŸãããã å éšã§ã¯ãã©ã€ãã©ãªã¯telnetã³ãã³ããLinuxCNC / Machinekitããlinuxcncrshããã»ã¹ã«éä¿¡ããŸãã
//maven dependency com.github.igor-suhorukov:camel-gcode:0.1 import com.github.igorsuhorukov.gcode.GCodeClient; public class Gcode { public static void main(String[] args) throws Exception { String hostname = "beaglebone.local"; int port = 5007; try (GCodeClient gCodeClient = new GCodeClient(hostname, port)) { System.out.println(gCodeClient.login("EMC", "JVM", "1.0")); gCodeClient.sendCommand("set mode manual"); gCodeClient.sendCommand("set estop off"); gCodeClient.sendCommand("set machine on"); for (int axis = 0; axis < 4; axis++) gCodeClient.sendCommand("set home " + axis); System.out.println(gCodeClient.sendCommand("get abs_act_pos")); gCodeClient.sendCommand("set mode mdi"); gCodeClient.sendCommand("set mdi g0 x3 y4"); gCodeClient.sendCommand("set mdi g0 x5 y2"); } } }
ãã®äŸã§ã¯ããã·ã³ã®ããŒã¿ã«ãã¢ã€ãã«æã«æ倧é床ã§ç§»åããæåã«åº§æšïŒ3; 4ïŒã«ç§»åãã次ã«ïŒ5; 2ïŒã«ç§»åããŸãã
次ã®Groovyã®ãµã³ãã«ããã°ã©ã ã¯ãApache Camelãã¬ãŒã ã¯ãŒã¯ãšcom.github.igor-suhorukovãã·ã³ã«ã³ãã³ããéä¿¡ããããã®ã³ã³ããŒãã³ãã«åºã¥ããŠããŸããcamel-gcode
@Grab('com.github.igor-suhorukov:camel-gcode:0.1') @Grab('org.apache.camel:camel-groovy:2.18.0') @Grab('org.apache.camel:camel-core:2.18.0') @Grab('org.apache.camel:camel-jetty:2.18.0') @Grab('org.slf4j:slf4j-simple:1.6.6') import org.apache.camel.builder.RouteBuilder import org.apache.camel.impl.DefaultCamelContext import com.github.igorsuhorukov.smreed.dropship.MavenClassLoader def camelContext = new DefaultCamelContext() camelContext.setName("I'll be back") camelContext.addRoutes(new RouteBuilder() { def void configure() { from('jetty:http://0.0.0.0:9090/moveTo').routeId('CamelCNC') .process{ it.in.body = ("set mdi g0 x${Math.round(Math.random()*10)} y${Math.round(Math.random()*10)} z1") } .to('gcode:?host=beaglebone.local&port=5007&autoHomeAxisCount=4') } }) addShutdownHook{ camelContext.stop() } camelContext.start() def HawtIo = MavenClassLoader.usingCentralRepo() .forMavenCoordinates('io.hawt:hawtio-app:2.0.0').loadClass('io.hawt.app.App') Thread.currentThread().setContextClassLoader(HawtIo.getClassLoader()) HawtIo.main('--port','10090')
java -jar groovy-grape-aether-2.4.5.4.jar CamelCNC.groovyã䜿çšããŠäŸãå®è¡ã§ããŸã
ãã®äŸã§ã¯ãGroovyã¢ããªã±ãŒã·ã§ã³ã¯jettyãgcodeã³ã³ããŒãã³ããæ¥ç¶ããgroovy DSLãã£ã¡ã«äžã«ã«ãŒãã圢æããWebã³ã³ãœãŒã«ãããŠã³ããŒãããŠèµ·åããŠHawtIoãç£èŠããŸãã HOSTïŒ9090 / moveToãžã®åHTTPãªã¯ãšã¹ãã«å¯ŸããŠãXããã³Y軞ã«æ²¿ã£ãã©ã³ãã ãªåº§æšã§æ°ããã³ãã³ããäœæãããLinuxCNCãšãã·ã³ã«éä¿¡ãããçæãããã³ãã³ããHTTPã¬ã¹ãã³ã¹ãšããŠã¯ã©ã€ã¢ã³ãã«è¿ãããŸãã Webã³ã³ãœãŒã«ã¯HOSTã§ãªãã¹ã³ããŠããŸãïŒ10090 / hawtio
Apache CamelãGroovyãããã³HawtIoã®éæ³ã«ãããéåžžã«è€éãªããšã¯ç°¡åã§ãã
çŸããé ã...
ç§ãã¡ã¯æªæ¥ã«ã€ããŠå¹žéãèªãããšãã§ããŸãã
èªååã§ããçµæžçã«å®è¡å¯èœãªãã®ã¯ãã¹ãŠèªååãããåŸåããããŸãã å æ¥ãäžåœã§Foxconnã«ã€ããŠã®ãã¥ãŒã¹ãããã4äžå°ã®èªåæ©æ¢°ãçç£ãããäŒæ¥ã®éçšãæžå°ããŸããã 圌ãã¯èªåæ©æ¢°ã®è©³çŽ°ã®å€§éšåãèªåã§è¡ããé»åæ©åšãå¶åŸ¡ããŸãã
ç§ã¯ãã¹ãã©ãã ã¹ã§ã¯ãããŸããããèªååã«ããå°æ¥ã®ä»äºããªããªãããšã¯æããã§ãã ãŸããèªååã®å¿ èŠæ§ã¯æéãšãšãã«å¢å ããããšãæããã§ãã ãããŠããããã®æè¡ã«ç²ŸéããŠãã人ã ã¯åŽååžå Žã§ããã«éèŠããããŸãããç¹å®ã®æç¹ãŸã§...ãããŠãCNCã§ã®å人çç£ã¯ãã¹ãŠã®ã¯ãŒã¯ã·ã§ããã«æµžéããŸãã
æ£ç¢ºã«å°æ¥ã¯ã©ããªããŸããïŒ
人éã®ããããã¯ç Žå£ãŸãã¯ç Žå£ãããŸããïŒ
ãŸãã¯ã人ã ããããããå¶åŸ¡ããŸãã
ä»æ¥ã¯ãã¹ãŠç§ãã¡ã«ããã£ãŠããŸã!!!
çµè«
ç§ãã¡ãæåã§è¡ãããšã®å€ããããã®ãããªç¹°ãè¿ãäœæ¥ã¯ãå€ãã®å Žåèªååã§ããŸãã ãã®å Žåãã¢ãã«ãäœæããããšããå§ããå¿ èŠããããŸãã 次ã®ã¹ãããã¯ããã®ã¢ãã«ããã·ã³ã®å¶åŸ¡ããã°ã©ã ã«å€ããããšã§ãã ãããã®ã³ãã³ãã¯ç¹å®ã®CNCã¡ã«ããºã ã«ãã£ãŠå®è¡ãããèªååããã®ãçã«ããªã£ãŠããçç£ããã»ã¹ã®ãã¹ãŠãèªååããå¿ èŠããããŸãã ãã·ã³ããžã§ã³æè¡ãšãã£ãŒãããã¯ã»ã³ãµãŒãå«ã䜿çšã ã³ã³ãã¥ãŒã¿ãšãã·ã³ã®éã§USBãã©ãã·ã¥ãã©ã€ãã䜿çšããŠå®è¡ãã䟡å€ã¯ãããŸããããããã¯ãŒã¯çµç±ã§ã³ãã³ãã転éããå¿ èŠããããŸãã ãã·ã³ã«ãã¹ãŠã®ä»äºããããŠãã ããã ããããCNCããã2ã€ã«ãªããªãããã«ããã«ã¯ãæè¡ãåŠã³ãããã»ã¹ã®è©³çŽ°ãç解ããå¿ èŠããããŸãã ãã以å€ã®å Žåã¯ãåžžã«æåã«æãã§ãããã®ãç解ããçµæãšããŠåŸããã人ãšãªãœãŒã¹ãå ±æããå¿ èŠããããŸãã
åç
§è³æ
ãœãããŠã§ã¢ãåæ³çã«ç¡æã§äœ¿çšã§ããå ŽåãCADããªãŒãã³ãœãŒã¹è£œåã§ãããã©ããã¯é¢ä¿ãããŸãããDIHALTã® åºçç©ãšãããªã³ãŒã¹ã èªãã§ãã ãã
- LinuxCNC
- ãã·ã³ããã
- Freecad
- Heekscad
- Gcodedetools
- LinuxCNC telnetãããã³ã«
- LinuxCNCã®Gã³ãŒã
- githubã®camel-gcode
- ã¢ããããã£ã¡ã«
- camel-gcode Groovyã®äŸ
ãœãããŠã§ã¢ãåæ³çã«ç¡æã§äœ¿çšã§ããå ŽåãCADããªãŒãã³ãœãŒã¹è£œåã§ãããã©ããã¯é¢ä¿ãããŸãããDIHALTã® åºçç©ãšãããªã³ãŒã¹ã èªãã§ãã ãã