closed loop servo cnc encoder interface with linuxcnc
07 Jan 2018 00:55 - 07 Jan 2018 00:56 #104094
by gui3333
closed loop servo cnc encoder interface with linuxcnc was created by gui3333
hi guys,
I'm new to linuxcnc and I´m building my own closed loop servo cnc machine and intend to run it with linux cnc I'm doing it on the cheap and as a hobby project for now, so I do not intend to buy any mesa boards and want to make my self a simple breakout board. Any way i have been reading about de encoders and there interaction with the pc and linuxcnc and saw in the wiki that the direct reading of the encoders by linux can force the machine to run slower to keep up with the readings and that is better to use some kind of interface in between pc and encoder.
Can any of you tell me what kind of interface is expected to be used, to run it better and faster?
I'm new to linuxcnc and I´m building my own closed loop servo cnc machine and intend to run it with linux cnc I'm doing it on the cheap and as a hobby project for now, so I do not intend to buy any mesa boards and want to make my self a simple breakout board. Any way i have been reading about de encoders and there interaction with the pc and linuxcnc and saw in the wiki that the direct reading of the encoders by linux can force the machine to run slower to keep up with the readings and that is better to use some kind of interface in between pc and encoder.
Can any of you tell me what kind of interface is expected to be used, to run it better and faster?
Last edit: 07 Jan 2018 00:56 by gui3333.
Please Log in or Create an account to join the conversation.
07 Jan 2018 01:40 #104096
by jmelson
So, that would work, but with little margin for thread jitter, encoder duty cycle, etc.
If you want a higher count rate, you need a hardware encoder counter. There are chips that can do this, or you can set up an FPGA to do a bunch of counters and other logic. The Pico Systems and Mesa boards provide this sort of function using FPGAs.
Jon
Replied by jmelson on topic closed loop servo cnc encoder interface with linuxcnc
The servo thread is typically run at 1 KHz, which is WAY too slow to detect all encoder transitions. You can use the base thread with the LinuxCNC software encoder component to read encoders at about 50 KHz. It depends on the quality of the CPU and motherboard as to how fast the base thread can run reliably. With the base thread at 50 KHz, you can reliably run up to 20,000 encoder counts/second. With a 1000 line/rev encoder on a 5 TPI leadscrew, at 60 IPM (one inch/second) you will turn the leadscrew 5 times/second, and thus generate 1000 X 4 (quadrature) X 5 (leadscrew RPS) = 20,000 counts/second.hi guys,
I'm new to linuxcnc and I´m building my own closed loop servo cnc machine and intend to run it with linux cnc I'm doing it on the cheap and as a hobby project for now, so I do not intend to buy any mesa boards and want to make my self a simple breakout board. Any way i have been reading about de encoders and there interaction with the pc and linuxcnc and saw in the wiki that the direct reading of the encoders by linux can force the machine to run slower to keep up with the readings and that is better to use some kind of interface in between pc and encoder.
Can any of you tell me what kind of interface is expected to be used, to run it better and faster?
So, that would work, but with little margin for thread jitter, encoder duty cycle, etc.
If you want a higher count rate, you need a hardware encoder counter. There are chips that can do this, or you can set up an FPGA to do a bunch of counters and other logic. The Pico Systems and Mesa boards provide this sort of function using FPGAs.
Jon
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds