Linuxcnc ethernet over Arduino?

27 Feb 2017 08:46 #88656 by Holzwurm56
Holzwurm56 replied the topic: Linuxcnc ethernet over Arduino?
Hello M4Mazakuser,
you understand what i mean. Mesa is super, but it must be a easy way for beginner to use Linuxcnc with an inexpencive stuff and without printerport. For a beginner who build this "Käsefräse" from scrap are 10 I/Os enough. Can you tell us your way with multiple UNOs.


01 Mar 2017 01:53 #88791 by M4MazakUser
M4MazakUser replied the topic: Linuxcnc ethernet over Arduino?
I have tried the io over ethernet (it used udp)that someone posted on this forum and for buttons/ other input stuff it works great.not fast enough for an encoder but.
06 Apr 2017 19:37 #90978 by cromaglious
cromaglious replied the topic: Linuxcnc ethernet over Arduino?
I have 3 Integrated steppers coming tomorrow. I don't need to read encoders. I just need to check the ESTOP/ERROR pin to see if the estop or one of the motors has alarmed. When they get here I find out if I can run them as NO or NC switches or if I need to get some more MFQ2222 chips which I already use for home sensors

I'm rewriting the uno ethernet code I found for the Mega2560. From:
I have also found using PORTA through PORTM for using coordinated multipin fires at the same time. I can use PA0-PA7 PORTA Digital pins 22 through 29 for 8 axis of DiRECTION pins. and 6usecs later use PC7-PC0 PORTC for digital pins 30-37 for step.

PORTA = B11001101;
PORTC = B00001011;
instead of a whole bunch of
digitalWrite(26,LOW); ...

Integrated Closed-Loop Stepper 2nm 285ozin

This is the layout of the Mega 2560 chip PA0 is PORTA0 which is Arduino Pin Digital 22
02 May 2017 23:50 #92556 by cromaglious
cromaglious replied the topic: Linuxcnc ethernet over Arduino?
Yes Arduino can do 5khz easily and by using PORTA (on the MEGA2560) raising 8 pins all at the same rime is trivial is easy. I'm working on a udpioMEGA project as we speak. the original code was for the uno, which runs on the Nano. I have 24pins digital out, 10pins PWM out, 16pins digital input and 6pins read from interrupts and 2 polled pins. Packet sent from linuxcnc is 14bytes and the receive packet (sent from the Arduino MEGA) is 3bytes. Writing the 24pins is 3 lines PORTA = rxbuffer[1]; PORTC = rxbuffer[2]; PORTL = rxbuffer[3]; for(i=0; i<PWMPINCOUNT; i++) { analogWrite(pwmpin);}

Most speed controls want a pwm signal arong 1khz. The mega has 4pins to can set the around 980hz for pwm.

Right now I'm fighting a python issue getting it all working with gwibber.
Moderators: PCWjmelson
Time to create page: 0.124 seconds
Powered by Kunena Forum