OPENCNC-J 📖中文README
- Introduction
- This is an open-source integration project based on Linuxcnc. Its aim is to facilitate electrical engineers in using a combination of Linuxcnc + EtherCAT with CIA402 protocol + Raspberry Pi (or X86 - Debian).
- Current Version - Looking forward to more developers joining
- 0.1.0
- Personal Video Release Page - Detailed Project Content
- Notice & Warning!!!
- This is an open-source project. It does not provide any warranty or compensation, and involves electrical safety warnings. Please be responsible for it yourself.
- This project follows the GPL-3.0 open-source license.
Install Linuxcnc
- Download the official installation package - LinuxCNC 2.9.1Raspberry Pi OS based on Debian 12 Bookworm
- Create an SD card system - It is recommended to use the official Raspberry Pi SD card system creation tools forWindows &Ubuntu
- Insert the card to boot the Raspberry Pi
- Configure Linuxcnc - [To be filled in]
Install dependencies - Refer to the EtherCAT installation example, CIA402
- EtherCAT installation
- Open terminal:
sudo apt install ethercat-master libethercat-dev linuxcnc-ethercat
- If installation fails, please refer to the example
- Check the MAC address of the network port:
ip a
- Record the MAC address, e.g.,
xx:aa:yy:zz:bb:cc
- Record the MAC address, e.g.,
- Enter (configure) into the ethercat.conf file
sudo geany /etc/ethercat.conf
- Modify the file with geany
MASTER0_DEVICE="xx:aa:yy:zz:bb:cc"
- Replace with the MAC address you just obtainedDEVICE_MODULES="generic"
- Set the EtherCAT service to start on boot
sudo systemctl enable ethercat.service
sudo systemctl start ethercat.service
sudo systemctl status ethercat.service
sudo chmod 666 /dev/EtherCAT0
- EtherCAT test command
ethercat slaves
- Check for errors to confirm successful installation- Restart
- Open terminal:
- Install CIA402
- Return to the user directory:
cd
git clone https://github.com/dbraun1981/hal-cia402
- If there's an error, please confirm if git tool is installedsudo apt install git
- Git installation command
- Enter the hal-cia402 folder:
cd hal-cia402
- Compile and install the 402 tool package:
sudo halcompile --install cia402.comp
- Return to the user directory:
That completes the most challenging part 👍
- When starting, shows AL221 alarm [Encoder not zeroed]
- Set zero point: Click on driver panel operation → Switch to [AF.CEN] → Press S → Press S again → Set successfully #Refer to the driver manual P39 - 4.3.3 Absolute operation
- Motor Reversing
- If the motor direction is incorrect, the motor direction can be switched
- Setting method: Modify parameter P1.01 = 1 or 0
- If the motor direction is incorrect, the motor direction can be switched
- Electronic Gear Ratio
- Electronic gear ratio numerator P3.08 Electronic gear ratio denominator P3.10
- CAD - Electrical schematic diagram in PDF format
- linuxcnc - Contains all the required configuration files
Disclaimer: There is no commercial relationship with the procurement links, please inquire and compare prices yourself.
Item | URL | Model | Quantity | Notes |
---|---|---|---|---|
XY Axis Motor+Drive | URL | (New) 400W Servo+Drive+5m Cable Motor Model: RSM-M06L1330A (No Brake) |
2 | Multi-turn Encoder Absolute Origin, This costs extra, 5m Cable Supports EtherCAT+CIA402 |
Z Axis Motor+Drive | URL | (New) RS400E Servo+Drive+5m Cable Motor Model: RSM-M06L1330A-Z (With Brake) |
1 | Multi-turn Encoder Absolute Origin!!! This costs extra, 5m Cable Supports EtherCAT+CIA402 |
Spindle Motor+Drive | URL | (New) RS400E Servo+Drive+5m Cable Motor Model: RSM-M06J1330A (No Brake) |
1 | Standard Encoder , 5m Cable Supports EtherCAT+CIA402 |
Raspberry Pi_4 Dev Board | URL | Pi 4B/8G[Essential Package] | 1 | |
Micro HDMI to HDMI Cable | URL | 3m | 1 | |
EtherCAT Servo Bus | URL | High Flexibility Gigabit Shielded Ethernet Cable - Green | 3(0.5m) 1(1.5m) |
- |
Raspberry Pi_Rail Box | URL | 1 | ||
Monitor with Case | URL | 7 inch 1024*600 IPS+Touch+Case | 1 | Not recommended, Broke in less than a month |
Monitor Stand | URL | 1 | ||
Handwheel | URL | MACH3 Wired Handwheel 4 Axis | 1 | |
Rail Socket | URL | 5 Slots | 1 | |
USB Cable | URL | Micro USB Data Cable Black 5m | 1 | |
Axial Fan | URL | Flame Retardant ZL-803+12038 Fan AC220V+Protective Net | 2 | |
Emergency Stop Button | URL | |||
Circuit Breaker (Schneider) | IC65N-C10A/2P 10A IC65N-C6A/2P 6A |
1 2 |
Please purchase on your own | |
24V DC Power Supply | MW Power Supply, 120W | 1 | Please purchase on your own |
- Thanks to Guilin Guanglu Digital Measurement and Control Co., Ltd. for their support of this open-source project
- Tmall Flagship Store - Product Purchase Address
- Thanks to the developers who helped me during the development process Hakan,rodw, and garlicbread
- Project References