من در زمینه میکرو کنترلرها و دستگاههای سی ان سی و کلا این جور صنایع تازه کار هستم
هدفم از عضویت در این سایت اول از همه یاد گیری خودم هست
دوم گرد آوری اطلاعات از اینترنت و نوشتن در اینجا یا عینا یا نقل به مضمون یا خلاصه است که بعنوان تکرار برای خودم تمرین باشد
و سوم گرد اوری اطلاعات جامع درباره پروژه های مفید است.
چهارم اینکه به مرور زمان در زمینه اردوینو دانش فنی جامع کسب نموده و بتوانم ماشینهای به درد بخوری از اردوینو بسازم.

واما بحث تاپیک:

دستگاههای سی ان سی انواع مختلفی دارند.

چند روز پیش توی پاساژهای تهران مغازه ها را دنبال اموزش ساخت دستگاههای سی ان سی میگشتم که
یک نفری بهم گفت که توی ایران سایتی هست به نام سی ان سی کاران که اموزش و ساخت انجام میدهند.

با جستجو در اینترنت به ادرس این شرکت برخورد کردم:

CNCkaran

از قیمت دستگاهها جویا شدم و مغزم سوت کشید
از یکصد میلیون تومان تا چند صد میلیون تومان و حتی نزدیک یک میلیارد تومان بسته به امکانات و کاربرد سی ان سی
یک دستگاه سی ان سی چهار محوره حدود یکصد و پنجاه میلیون تومان!

کم کم نا امید میشدم.

وقتی باز هم جستجو کردم توی لینکی در آدرس زیر:


Arduino Mega with MACH3

وچند تاپیک انجمن توی همین سایت یک نفر نوشته بود که چه کاریه که میخواین با آردوینو کار سی ان سی انجام بدین کافیه با نرم افزارهائی مانند
mach3 , emc2 میتوان مستقیما خروجی کامپیوترر را به استپ موتور و یا سروو موتور وصل کرده و کار سی ان سی انجام داد!

بیشتر از آردوینو نا امید شده بودم که به چند پروژه توی اینترنت برخورد کردم که بدون کامپیوتر و فقط با اردوینو روی ساخت سی ان سی کار کرده بودند.

همچنین به بحثی توی لینک زیر برخورد کردم که طرف نوشته بود این نرم افزارها برای مته و برش خراطی و غیره مناسب هستند ولی برای کنترل برشهای لیزری مناسب نیستند
و نوشته بود که برای برس لیزری آردوینو مناسب است و میتواند قدرت تشعشع اشعه لیزر را کنترل نماید.
بنابر این امید وار شدم بیشتر روی اردوینو مطالعه کنم و یاد بگیرم.


Laser power control via modbus.
Mach3 is a great program. People have used it to control a vast diversity of machine, but it has some issues when controlling lasers. This is especially true when it comes to the beam control.
The beam can be compared to the spindle of a mill. It does the cutting and has an on/off state and power level (like RPM). On a mill, the spindle can safely stay on during rapid moves above the work and dwell at points without issue. A laser cannot do that because it does not retract from the material. It must only be on during G1 feed moves and must not dwell at any point or excessive burning will occur. The normal spindle logic does not work well with lasers.
I thought it would be a fun experiment to try to enhance the control using a Modbus slave device. Modbus devices are basically remote device that allow a host to read and write data registers. The remote device can then use the data registers to give information to the host or do a task when a register is written to by the host. The devices typically communicate using a serial port or Ethernet. You can view the Modbus protocol here.
There are a lot of commercial Modbus devices like ModIO and the Automation Direct PLCs, but I wanted a cheaper home grown version. I thought an Arduino would be a good choice because it has a built in USB to serial port, it is less cheap (less than $20) and it is open source.
My first task was to see if an existing Modbus library existed. I found a extremely well written and documented one by Juan Pablo Zometa written here. I read the code and determined that I could start by testing it as is without changing anything. I would setup Mach3 to match the port settings and try to read and write to the default memory register setting. I loaded the program into my Arduino Duemilanove.

Setting up Mach3 Modbus

I created a new Mach3 profile by cloning an existing working profile. Modbus is turned on via the Ports and Pins dialog. Check the Modbus dialog. Skip the second check box for now. I used the simpler old Modbus plug in

I needed to restart Mach3 to make the changes available. Next, go to the plugin dialog. Setup the serial ports to match the Arduino settings.