EMC2 running on Raspberry Pi?
06 Dec 2013 09:19 #41366
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
Hello Kinsa,
May be a bit complicated, but it´is fast too and more peaceful to GPIO Control
I think MOSI (pin 10), MISO (9), SCLK (12) and more n GPIOs to SS (enable/disable) slave drivers.
Can you help me with the first steps: To change the control mechanism the LinuxCNC just compile - with-platform = X where X is the new HAL file? I am in doubt about the LinuxCNC API and the keys of configuration.
Ps: Great job with 3D printer ;D
May be a bit complicated, but it´is fast too and more peaceful to GPIO Control
I think MOSI (pin 10), MISO (9), SCLK (12) and more n GPIOs to SS (enable/disable) slave drivers.
Can you help me with the first steps: To change the control mechanism the LinuxCNC just compile - with-platform = X where X is the new HAL file? I am in doubt about the LinuxCNC API and the keys of configuration.
Ps: Great job with 3D printer ;D
Please Log in or Create an account to join the conversation.
06 Dec 2013 11:51 #41368
by kinsa
Thanks!
I would prefer to minimize the usage of GPIO's so that the board could be easily used for other ARM boards.
For compiling LinuxCNC, the --with-platform switch only adds the built-in HAL drivers for that board. I've used the instructions here to build the latest LCNC.
It is easy to compile out-of-tree drivers using the comp command. Here's the example SPI driver for RPi: code.google.com/p/picnc/source/browse/#g...FHAL%2Ftest%20driver
I've moved over to plain C for the HAL driver as I have more control over the HAL pin naming.
Cheers!
Replied by kinsa on topic EMC2 running on Raspberry Pi?
Hello Kinsa,
May be a bit complicated, but it´is fast too and more peaceful to GPIO Control
I think MOSI (pin 10), MISO (9), SCLK (12) and more n GPIOs to SS (enable/disable) slave drivers.
Can you help me with the first steps: To change the control mechanism the LinuxCNC just compile - with-platform = X where X is the new HAL file? I am in doubt about the LinuxCNC API and the keys of configuration.
Ps: Great job with 3D printer ;D
Thanks!
I would prefer to minimize the usage of GPIO's so that the board could be easily used for other ARM boards.
For compiling LinuxCNC, the --with-platform switch only adds the built-in HAL drivers for that board. I've used the instructions here to build the latest LCNC.
It is easy to compile out-of-tree drivers using the comp command. Here's the example SPI driver for RPi: code.google.com/p/picnc/source/browse/#g...FHAL%2Ftest%20driver
I've moved over to plain C for the HAL driver as I have more control over the HAL pin naming.
Cheers!
The following user(s) said Thank You: ADBensi
Please Log in or Create an account to join the conversation.
07 Dec 2013 19:21 #41395
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
Thank you,
Cubieboard has a lib in C that can toggle a pin something about 1.5MHz. The idea is to understand what the LinuxCNC sends to pass to GPIO, and migrate to Cubieboard as similar option BEAGLEBONE or direct control of the SPI drivers with specific chip. I prefer the first condition because I already have Cubieboard and parallel drivers and it is not expensive and the whole assembly is flexible to changes.
Best Regards
Cubieboard has a lib in C that can toggle a pin something about 1.5MHz. The idea is to understand what the LinuxCNC sends to pass to GPIO, and migrate to Cubieboard as similar option BEAGLEBONE or direct control of the SPI drivers with specific chip. I prefer the first condition because I already have Cubieboard and parallel drivers and it is not expensive and the whole assembly is flexible to changes.
Best Regards
Please Log in or Create an account to join the conversation.
07 Dec 2013 22:20 #41396
by kinsa
Replied by kinsa on topic EMC2 running on Raspberry Pi?
Have a look at
stepgen.c
, it's the software step generator for the x86 parallel port.
Please Log in or Create an account to join the conversation.
08 Dec 2013 09:44 #41404
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
I am again
I created new hal in /usr/src/emc2-dev/configs but I not know how to load new hal in linuxcnc to try it. I saw many posts but I did not know how do. Please, it is possible to change only /usr/src/emc2-dev/configs/new or I miss anything? I'm starting with the idea that the platform is already compiled with the raspberry.
Best Regards,
I created new hal in /usr/src/emc2-dev/configs but I not know how to load new hal in linuxcnc to try it. I saw many posts but I did not know how do. Please, it is possible to change only /usr/src/emc2-dev/configs/new or I miss anything? I'm starting with the idea that the platform is already compiled with the raspberry.
Best Regards,
Please Log in or Create an account to join the conversation.
09 Dec 2013 05:51 #41423
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
I solved The correct dir is /usr/local/share/doc/linuxcnc/examples/sample-configs/. May be /usr/src/emc2-dev/configs/ is backup or others.
Please Log in or Create an account to join the conversation.
17 Dec 2013 08:32 #41671
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
Kinsa you noticed that steplen is variable? Sometimes your period is 50uS and sometimes occur periodos minor than 1 uS (big problem).
It varies even entering the parameters:
setp rpi_stepgen.0.steplen 2000
setp rpi_stepgen.0.stepspace 2000
setp rpi_stepgen.0.dirhold 800
setp rpi_stepgen.0.dirsetup 800
If you have investigated, please could tell if has experienced reduce the timer from 10MHz to 1MHZ to see if it improved resolution? Or may be timers erased, or frequency hight for sample:
min_step_period = rpi_stepgen->step_len + rpi_stepgen->step_space;
max_freq = 1.0 / (min_step_period * 0.000000001);
2000 + 2000 = 4000
1/(4000 * 0.000000001)
250 KHz
I would like to reduce speed to ensure accuracy. Suggests something?
Best Regards!
It varies even entering the parameters:
setp rpi_stepgen.0.steplen 2000
setp rpi_stepgen.0.stepspace 2000
setp rpi_stepgen.0.dirhold 800
setp rpi_stepgen.0.dirsetup 800
If you have investigated, please could tell if has experienced reduce the timer from 10MHz to 1MHZ to see if it improved resolution? Or may be timers erased, or frequency hight for sample:
min_step_period = rpi_stepgen->step_len + rpi_stepgen->step_space;
max_freq = 1.0 / (min_step_period * 0.000000001);
2000 + 2000 = 4000
1/(4000 * 0.000000001)
250 KHz
I would like to reduce speed to ensure accuracy. Suggests something?
Best Regards!
Please Log in or Create an account to join the conversation.
17 Dec 2013 13:08 #41681
by kinsa
Replied by kinsa on topic EMC2 running on Raspberry Pi?
What hal driver are you using?
Please Log in or Create an account to join the conversation.
17 Dec 2013 17:14 #41687
by ADBensi
Replied by ADBensi on topic EMC2 running on Raspberry Pi?
Hello!
I am using rpi_stepgen.so with type 0
loadrt rpi_stepgen step_type=0,0,0 step_pins=30,28,22,10,11,9
addf rpi_stepgen.make-pulses servo-thread
addf rpi_stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf rpi_stepgen.update-freq servo-thread
and
setp rpi_stepgen.0.steplen 2000
setp rpi_stepgen.0.stepspace 2000
setp rpi_stepgen.0.dirhold 800
setp rpi_stepgen.0.dirsetup 800
setp rpi_stepgen.1.steplen 2000
setp rpi_stepgen.1.stepspace 2000
setp rpi_stepgen.1.dirhold 800
setp rpi_stepgen.1.dirsetup 800
setp rpi_stepgen.2.steplen 2000
setp rpi_stepgen.2.stepspace 2000
setp rpi_stepgen.2.dirhold 800
setp rpi_stepgen.2.dirsetup 800
and
MAX_FEED_OVERRIDE = 0.2
BASE_PERIOD = 175000
SERVO_PERIOD = 1000000
and
[AXIS_0 1 2]
[AXIS_0 1 2]
[AXIS_0 1 2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 44.64
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 21.0
BACKLASH = 0.000
SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
FERROR = 1.7
MIN_FERROR = 1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
I forgot something?
Thanks a lot!
I am using rpi_stepgen.so with type 0
loadrt rpi_stepgen step_type=0,0,0 step_pins=30,28,22,10,11,9
addf rpi_stepgen.make-pulses servo-thread
addf rpi_stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf rpi_stepgen.update-freq servo-thread
and
setp rpi_stepgen.0.steplen 2000
setp rpi_stepgen.0.stepspace 2000
setp rpi_stepgen.0.dirhold 800
setp rpi_stepgen.0.dirsetup 800
setp rpi_stepgen.1.steplen 2000
setp rpi_stepgen.1.stepspace 2000
setp rpi_stepgen.1.dirhold 800
setp rpi_stepgen.1.dirsetup 800
setp rpi_stepgen.2.steplen 2000
setp rpi_stepgen.2.stepspace 2000
setp rpi_stepgen.2.dirhold 800
setp rpi_stepgen.2.dirsetup 800
and
MAX_FEED_OVERRIDE = 0.2
BASE_PERIOD = 175000
SERVO_PERIOD = 1000000
and
[AXIS_0 1 2]
[AXIS_0 1 2]
[AXIS_0 1 2]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 44.64
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 21.0
BACKLASH = 0.000
SCALE = 4000
OUTPUT_SCALE = 1.000
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
FERROR = 1.7
MIN_FERROR = 1
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
I forgot something?
Thanks a lot!
Please Log in or Create an account to join the conversation.
17 Dec 2013 20:04 #41695
by kinsa
Sorry but I'm not familiar with this HAL driver.
Replied by kinsa on topic EMC2 running on Raspberry Pi?
Hello!
I am using rpi_stepgen.so with type 0
Sorry but I'm not familiar with this HAL driver.
Please Log in or Create an account to join the conversation.
Time to create page: 0.135 seconds