Encoder Pins linked to LCNC

More
7 years 9 months ago #125420 by tommylight
Replied by tommylight on topic Encoder Pins linked to LCNC

CORBETT wrote: Ok one other thing on a tangent while talking about encoders.... I have several EtherCAT amps and drives that have absolute encoders. I know LCNC will not work with absolute encoders,....


That is not true, Linuxcnc does work with absolute encoders very nicely, i did a retrofit over 2 years ago using Mesa 7i74 to interface them to Linuxcnc.
You need some hardware for any kind of encoders to work with Linuxcnc, from parallel port to Mesa cards for incremental encoders, absolute encoders or resolvers.

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

More
7 years 9 months ago - 7 years 9 months ago #125423 by PCW
Replied by PCW on topic Encoder Pins linked to LCNC
If the drives report the absolute position over Ethercat you should be fine.

Note that there are 1 turn absolute (mainly for commutation) and multiturn absolute
encoders, Multiturn encoders allow machine startup without homing.
Last edit: 7 years 9 months ago by PCW.

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

More
7 years 9 months ago #125464 by andypugh
Replied by andypugh on topic Encoder Pins linked to LCNC

PCW wrote: If the drives report the absolute position over Ethercat you should be fine.
Note that there are 1 turn absolute (mainly for commutation) and multiturn absolute
encoders, Multiturn encoders allow machine startup without homing.


As LinuxCNC can be configured to store the shutdown position it is possible to also have absolute homing with single-turn absolute encoders and resolvers.

This isn't implemented in any of the existing encoder modules, but is built-in to the Hostmot2 resolver driver.
linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#resolver

However, for any true absolute encoders (Fanuc, BiSS, SSI, EtherCAT) you can set up the INI file for absolute encoders.
linuxcnc.org/docs/devel/html/config/ini-...t__lt_num_gt_section
(HOME_ABSOLUTE_ENCODER)

Though this is one of an increasingly large list of very useful features that are only available in the development branch.

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

More
7 years 9 months ago #125479 by CORBETT
Replied by CORBETT on topic Encoder Pins linked to LCNC
Tommy, Pete, Andy,

Thanks for getting back with me. I am glad to hear that the absolute encoders are not a problem. I know things change, and at some point over the last few years it must have been implemented as years and years ago only incremental encoders would work (or at least that is what I remember and could be completely wrong). I am probably thinking about when it was EMC as I still have a few EMC and EMC2 disc laying around. Plus I keep a folder of everything that I thought needed to be saved over the years and I may have been reading a older manual. I caught myself accidentally reading a older manual last week. I have my folders separated by new and old, but sometimes mess up.

I did not want to pursue this until I finish up my current set-up, but this makes me want to start the ball rolling quicker. My thinking was worse case I would simply add a incremental encoder to each axis, but since absolute will work it will save a lot of time and extra money.

It will be good if It works out to eliminate homing each time you fire up the controls. (that is the whole reasoning of absolute encoders). I knew if you could get absolute to work it was a added benefit. I am just glad they will work in the first place as that makes me feel a lot better about the money that I have spent so far.

I am sure this is not the last time you will hear from me... but thanks for all the help as it is much appreciated.

Thanks,
Robert

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

More
7 years 9 months ago #125485 by andypugh
Replied by andypugh on topic Encoder Pins linked to LCNC

CORBETT wrote: years and years ago only incremental encoders would work


Probably true.

Homing to absolute encoders came in in 2016
github.com/LinuxCNC/linuxcnc/commit/f59b...9e0fd6b15af29a0c29c3

Reading serial absolute encoders was 2013
github.com/LinuxCNC/linuxcnc/commit/83f2...d099a1150fb601cd785d

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

More
7 years 7 months ago #129135 by CORBETT
Replied by CORBETT on topic Encoder Pins linked to LCNC
Ok, finally was able to get back to the original project. After wasting a lot of time, I realized that the new encoders were open collector and I had thought we bought voltage output type... So with this in mind I went and pulled one of the open collector 5 volt encoders from the machine and added a 10K pull up resistor wired to the +24V BUS and now have the EL5151 input led flashing for the first time ever. Now when you rotate the encoder, the input led’s for A & B channel flash accordingly letting me know the module is “seeing” the encoder output. Now that I finally have one of the existing machine encoders working with the EL5151 encoder module, I tried opening the hal configuration to watch the encoder pins but could not see a change in any of the pins.

Todd, I tried tying the x-pos-fb to the encoder scale pin which I am pretty sure is “lcec.0.D19.enc-pos-scale”, but did not get it working. I have tried watching all of the pins and hooking the x-pos-fb to other pins such as the “enc-count”, “enc-pos”, “enc-period” but nothing seems to work. I would have assumed there would be some change in the enc period or count pins, but nothing happens when rotating the encoder. I did follow up and remove the “loadrt encoder” component, so that is not a issue. Below is the list of encoder pins in case I am trying to tie to the wrong pin.


7 s32 OUT 0 lcec.0.D19.enc-count
7 bit OUT FALSE lcec.0.D19.enc-expol-stall
7 bit OUT FALSE lcec.0.D19.enc-ina
7 bit OUT FALSE lcec.0.D19.enc-inb
7 bit OUT FALSE lcec.0.D19.enc-inc
7 bit I/O FALSE lcec.0.D19.enc-index-c-enable
7 bit I/O FALSE lcec.0.D19.enc-index-ext-neg-enable
7 bit I/O FALSE lcec.0.D19.enc-index-ext-pos-enable
7 bit OUT FALSE lcec.0.D19.enc-inext
7 bit OUT FALSE lcec.0.D19.enc-latch-c-valid
7 bit OUT FALSE lcec.0.D19.enc-latch-ext-valid
7 float OUT 3.355443 lcec.0.D19.enc-period
7 float OUT 0 lcec.0.D19.enc-pos
7 float I/O 1 lcec.0.D19.enc-pos-scale
7 s32 OUT 0 lcec.0.D19.enc-raw-count
7 s32 OUT 0 lcec.0.D19.enc-raw-latch
7 u32 OUT 0x01FFFFFE lcec.0.D19.enc-raw-period
7 bit IN FALSE lcec.0.D19.enc-reset
7 bit I/O FALSE lcec.0.D19.enc-set-raw-count
7 s32 IN 0 lcec.0.D19.enc-set-raw-count-val
7 bit OUT FALSE lcec.0.D19.enc-sync-error
7 bit OUT TRUE lcec.0.D19.enc-tx-toggle
7 bit OUT TRUE lcec.0.D19.slave-online
7 bit OUT TRUE lcec.0.D19.slave-oper
7 bit OUT FALSE lcec.0.D19.slave-state-init
7 bit OUT TRUE lcec.0.D19.slave-state-op
7 bit OUT FALSE lcec.0.D19.slave-state-preop
7 bit OUT FALSE lcec.0.D19.slave-state-safeop


Any Idea what I am doing wrong?

Thanks,
Robert

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

Time to create page: 0.166 seconds
Powered by Kunena Forum