Parallel port stepper control and etherCAT I/O

More
09 Sep 2022 22:15 - 09 Sep 2022 22:16 #251575 by O.R
Hi

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?
Last edit: 09 Sep 2022 22:16 by O.R.

Please Log in or Create an account to join the conversation.

More
09 Sep 2022 22:58 #251579 by tommylight
Pretty sure you can use both.
The following user(s) said Thank You: rodw, CORBETT

Please Log in or Create an account to join the conversation.

More
10 Sep 2022 01:44 #251593 by rodw
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.
The following user(s) said Thank You: CORBETT

Please Log in or Create an account to join the conversation.

More
10 Sep 2022 20:43 - 10 Sep 2022 20:44 #251643 by O.R
Ok great, i have already that Beckhoff etherCAT module with digital input and output modules, so that's why i thought if i can find a use for these. I have also two linear encoders with 0,005 mm resolution, which I was thinking of installing on my lathe. What kind of velocity i can get if i connect those linear encoders to parallel port? Can those basic digital input modules EL1xxx handle high pulse counts better than parallel port? Those Beckhoff EL51xx incremental encoder modules seems to be quite expensive.
Last edit: 10 Sep 2022 20:44 by O.R.

Please Log in or Create an account to join the conversation.

More
11 Sep 2022 14:05 - 11 Sep 2022 14:39 #251680 by CORBETT
@ O.R

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
Last edit: 11 Sep 2022 14:39 by CORBETT. Reason: spelling

Please Log in or Create an account to join the conversation.

More
11 Sep 2022 14:14 - 11 Sep 2022 16:41 #251681 by CORBETT
O.R

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
Last edit: 11 Sep 2022 16:41 by CORBETT.

Please Log in or Create an account to join the conversation.

More
11 Sep 2022 15:36 - 11 Sep 2022 16:12 #251683 by CORBETT
@ O.R

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
Last edit: 11 Sep 2022 16:12 by CORBETT.

Please Log in or Create an account to join the conversation.

More
11 Sep 2022 20:37 #251703 by O.R
Ok, thanks for the comprehensive answer CORBETT. I have to consider that  EL1124 input module, if i don't find reasonably priced EL5x encoder module. 

Please Log in or Create an account to join the conversation.

More
12 Sep 2022 05:41 - 12 Sep 2022 06:08 #251723 by RDA

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
Last edit: 12 Sep 2022 06:08 by RDA.

Please Log in or Create an account to join the conversation.

More
12 Sep 2022 15:42 - 12 Sep 2022 15:46 #251743 by O.R

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


 

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.
 
Last edit: 12 Sep 2022 15:46 by O.R.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Time to create page: 0.455 seconds
Powered by Kunena Forum