Parallel port stepper control and etherCAT I/O
I need more inputs than parallel port can offer. I'm now using basic parallel port step/dir control for my stepper drives and i like to keep it like that and expand my setup with Beckhoff etherCAT modules. Is this possible or do i have to use either parallel port or etherCAT separately?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
- Posts: 18562
- Thank you received: 6218
Please Log in or Create an account to join the conversation.
Alternatively something like this may be more reaonably priced. Its not hard to setup and they have good documentation. I have one of these.
www.rtelligent.net/EtherCAT-Expansion.html
When you want to add an encoder, you are really stuck wth using Beckhof. I could not find anything else.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Yes, you can do Parallel Port and EtherCAT at the same time. I have done exactly what you are describing. I had a problem with the existing encoders on one of our machines "Ghosting" at the EL5151. I missed an elementary mistake on the "pull up" voltage. So, I put a simple DB-25 breakout board and hooked the encoders up to LCNC using software encoding. It did work, but you will need to get the EL5151's in the long run.
Here is the problem... I was running 1000ppr so if you try to run a fast velocity move LCNC will lose count as the parallel port cannot read the pulses quick enough for the large resolution. You will have the same problem since your linear encoders resolution is so high. If I changed over to 200ppr encoders, then the velocity can be increased, but at the cost of better resolution. I could have gotten away with 200ppr, but he 1000's were already on the machine, so I decided to get the EL5151 problem I was having fixed.
But it will work if you need to get your machine working. I HAD to get ours back operating and did what we had to do at the time. You can get it working to at least get your machine started up and then move over the EL5151's when you acquire them.
The below is how I had my HAL code way back 4 or 5 years ago running LCNC 2.7 with Debian Wheezy at the time: As you can see, I simply added the parallel port and software encoder code then moved EtherCAT to the base thread to get it working.
# LOAD REAL TIME MODULES FOR ETHERCAT, PID, PARAPORT CARD FOR ENCODER INPUT, ETC
loadusr -W lcec_conf /home/robert/linuxcnc/configs/ethercat-conf.xml
loadrt lcec
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="e010 in"
loadrt encoder num_chan=3
loadrt pid num_chan=3
loadrt pwmgen output_type=0
# ADD FUNCTIONS TO REALTIME THREAD, DEFINE THE ORDER OF EXECUTION OF RT CODE
addf lcec.read-all base-thread
addf parport.0.read base-thread
addf encoder.update-counters base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf lcec.write-all base-thread
addf encoder.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pwmgen.update servo-thread
Hope this gets you going until you can find some cheap EL5151's
Robert
Please Log in or Create an account to join the conversation.
I forgot to add that the EL5151's using the EtherCAT bus will run circles around Parallel port. Only use Parallel port for temporary as your adding a base thread instead of Servo thread only. You can use older computers if using servo thread only and latency doesn't come into play as bad with EtherCAT compared to adding a base thread with a breakout board for parrallel port connection.
Also, when you get the EL5151's you will need to tweak your HAL code and get EtherCAT onto the servo thread and totally eliminate the base thread as you only need it for the parallel port connection and software encoding.
EDIT:
I re-read and realized you wanted to keep your existing stepper setup with parallel port, so in the long run you will keep the base thread and just add the EtherCAT parts to get working.
Hope this helps,
Robert
Please Log in or Create an account to join the conversation.
Ok I went back and read where you are asking about the EL1xxx's for encoder input. They will not work for any of them as they all have a small ms input filter, so therefore the EL terminal will never see the fast pulse of the encoder only the EL5151 and EL5101 will work as there is no input filter and made specific for encoder input. I have both the EL5151 and EL5101 and they both work. I am not sure about the EL5001 as I do not have this terminal.
Just to save you time and money... I have tried the following with encoders, and they do NOT work EL1002, El1004, El1008, El1018. All of these I own and have tried with no success, but that was before I realized they all had an input filter. There are other EL1xxx models, but I have not tried them.
Another user here on the forum named Dan (sqmathlete) has gotten the EL1124's to work with an encoder. I have several of the EL1124's, but I have not tried this yet as I had enough EL5151's
EDIT:
I forgot to add: Rod Webster is right, I don't think there is anything out there that can do encoder input other than the Beckhoff terminals for an independent encoder that is not built into a servo motor tied to the drive such as Delta ASDA series, Stober, Omron, Etc... I know there is other devices out there, but they are not supported.
Robert
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Wago has the 750-637 , depending where you buy it, it might be a bit cheaper than the EL5101. But please note the quite "poor" 250kHz speed limit.Normally you would just use some Beckhoff I/O modules.
Alternatively something like this may be more reaonably priced. Its not hard to setup and they have good documentation. I have one of these.
www.rtelligent.net/EtherCAT-Expansion.html
When you want to add an encoder, you are really stuck wth using Beckhof. I could not find anything else.
CORBETT post=251683 userid=23549@ O.R
EDIT:
I forgot to add: Rod Webster is right, I don't think there is anything out there that can do encoder input other than the Beckhoff terminals for an independent encoder that is not built into a servo motor tied to the drive such as Delta ASDA series, Stober, Omron, Etc... I know there is other devices out there, but they are not supported.
Robert
EDIT: and a "true DIY" is to use the trinamic TMC8462 as a "coupler". Here is a link to encoder-->ethercat AN023
Please Log in or Create an account to join the conversation.
Is it possible to mix Wago and Beckhoff modules? Is it possible use those KL series beckhoff module with EK1100 etherCAT coupler unit, i don't think so, but i did not find answer for that. I found cheap used EL1124 module from ebay, hopefully that will work with my encoders.
Normally you would just use some Beckhoff I/O modules.
Alternatively something like this may be more reaonably priced. Its not hard to setup and they have good documentation. I have one of these.
www.rtelligent.net/EtherCAT-Expansion.html
When you want to add an encoder, you are really stuck wth using Beckhof. I could not find anything else.
CORBETT post=251683 userid=23549@ O.R
EDIT:
I forgot to add: Rod Webster is right, I don't think there is anything out there that can do encoder input other than the Beckhoff terminals for an independent encoder that is not built into a servo motor tied to the drive such as Delta ASDA series, Stober, Omron, Etc... I know there is other devices out there, but they are not supported.
Robert
Wago has the 750-637, depending where you buy it, it might be a bit cheaper than the EL5101. But please note the quite "poor" 250kHz speed limit.
EDIT: and a "true DIY" is to use the trinamic TMC8462 as a "coupler". Here is a link to encoder-->ethercat AN023
Please Log in or Create an account to join the conversation.