Homing signal processing
13 Jan 2023 12:59 #261794
by Masa
Homing signal processing was created by Masa
Hello everybody.
I am building a LinuxCNC+EtherCAT system in Japan. I'm posting using machine translation, so please forgive me if it's hard to read.
Currently, I connect 4 torque mode servo amplifiers to Beckhoff EM-7004 and use them as XYZ+Spindle. A YASKAWA SGDXS servo amplifier (EtherCAT) was added to add a new control axis. JOG and program operation can now be performed in position control mode. I'm doing some trial and error to get Homing working. Homing uses the Home switch.
I can't find a way to connect to JOINT.N.index-enable in my HAL file. I had a hard time processing this signal in my previous system. I am worried about how to make all new machines in the future compatible with EtherCAT-connected servo amplifiers.
I was able to detect the one-rotation signal of the motor with the touch probe signal and read the encoder counter, but it didn't make much sense for JOINT.N.index-enabel.
I'm thinking maybe I need to add a Beckhoff EL5101 to use index-enable correctly. There are some doubts about using a servo amplifier with EtherCAT connection. I hope someone with more knowledge can give me some good ideas.
thank you.
I am building a LinuxCNC+EtherCAT system in Japan. I'm posting using machine translation, so please forgive me if it's hard to read.
Currently, I connect 4 torque mode servo amplifiers to Beckhoff EM-7004 and use them as XYZ+Spindle. A YASKAWA SGDXS servo amplifier (EtherCAT) was added to add a new control axis. JOG and program operation can now be performed in position control mode. I'm doing some trial and error to get Homing working. Homing uses the Home switch.
I can't find a way to connect to JOINT.N.index-enable in my HAL file. I had a hard time processing this signal in my previous system. I am worried about how to make all new machines in the future compatible with EtherCAT-connected servo amplifiers.
I was able to detect the one-rotation signal of the motor with the touch probe signal and read the encoder counter, but it didn't make much sense for JOINT.N.index-enabel.
I'm thinking maybe I need to add a Beckhoff EL5101 to use index-enable correctly. There are some doubts about using a servo amplifier with EtherCAT connection. I hope someone with more knowledge can give me some good ideas.
thank you.
Please Log in or Create an account to join the conversation.
14 Jan 2023 02:00 #261847
by Masa
Replied by Masa on topic Homing signal processing
hello
I was reading the HAL manual and wondered if it would be possible to use the edge function to extract the single rotation signal. Bit 7 of the touch probe status of PDO 609Bh stores the probe's latch and toggles by 1/0 on every detection. When reading this into the edge function, it was confirmed that a signal was output for each rotation.
I'm wondering if I can successfully connect this signal to index-enable. Is there a better way? Since edge.out is only out, it cannot be connected to index-enable I/O as is.
I was reading the HAL manual and wondered if it would be possible to use the edge function to extract the single rotation signal. Bit 7 of the touch probe status of PDO 609Bh stores the probe's latch and toggles by 1/0 on every detection. When reading this into the edge function, it was confirmed that a signal was output for each rotation.
I'm wondering if I can successfully connect this signal to index-enable. Is there a better way? Since edge.out is only out, it cannot be connected to index-enable I/O as is.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6432
14 Jan 2023 02:32 #261850
by tommylight
Replied by tommylight on topic Homing signal processing
Not helping much as i have very limited experience with ethercat, but i would think that it is ok to wire the edge.0.out to index-enable, although i am not sure what exactly you need, maybe homing to index for XYZ axis? or spindle index for threading and tapping ?
Please Log in or Create an account to join the conversation.
14 Jan 2023 02:45 - 14 Jan 2023 02:46 #261852
by rodw
Replied by rodw on topic Homing signal processing
Masa, your drive follows the cia402 standard.
This component implements homing on cia402 drives.
github.com/dbraun1981/hal-cia402
I did not have much luck with it wth drives that supported a home switch attached to the servo. Dominic who developed it used it on drives with a index mark. I could get it to start homing and once the home sensor was triggered, I would get a following error.
I concluded it would be necessary to modify homing.c so that a number of standard homing steps were skipped. eg. homing should start and then it should do nothing until it got the "I am homed" signal. Then complete the homing sequence.
SInce I looked at this, the ability to write custom homing components has been added in V 2.9 so this could be achieved in a custom homecomp.comp without modifying the core code. Start here, find the source of the component and read the comments in it
linuxcnc.org/docs/2.9/html/man/man9/homecomp.9.html
There has been a discussion on this forum about using the probe signal for homing but it adds complexity and I think little benefit given homing is supported in cia402 drives.
This component implements homing on cia402 drives.
github.com/dbraun1981/hal-cia402
I did not have much luck with it wth drives that supported a home switch attached to the servo. Dominic who developed it used it on drives with a index mark. I could get it to start homing and once the home sensor was triggered, I would get a following error.
I concluded it would be necessary to modify homing.c so that a number of standard homing steps were skipped. eg. homing should start and then it should do nothing until it got the "I am homed" signal. Then complete the homing sequence.
SInce I looked at this, the ability to write custom homing components has been added in V 2.9 so this could be achieved in a custom homecomp.comp without modifying the core code. Start here, find the source of the component and read the comments in it
linuxcnc.org/docs/2.9/html/man/man9/homecomp.9.html
There has been a discussion on this forum about using the probe signal for homing but it adds complexity and I think little benefit given homing is supported in cia402 drives.
Last edit: 14 Jan 2023 02:46 by rodw.
The following user(s) said Thank You: mehdidadash
Please Log in or Create an account to join the conversation.
14 Jan 2023 02:48 #261853
by Masa
Replied by Masa on topic Homing signal processing
Connecting edge.out to index-enable will result in an error.
Signal 'findEdge2' can not add I/O pin 'joint.3.index-enable', it already has OUT pin 'ed1.out'
Index-enable is necessary not only for homing, but also for effective use of thread cutting and fixed position stopping of the spindle. Therefore, the servo amplifier will eventually be used in torque control mode.
Signal 'findEdge2' can not add I/O pin 'joint.3.index-enable', it already has OUT pin 'ed1.out'
Index-enable is necessary not only for homing, but also for effective use of thread cutting and fixed position stopping of the spindle. Therefore, the servo amplifier will eventually be used in torque control mode.
Please Log in or Create an account to join the conversation.
14 Jan 2023 03:25 #261857
by Masa
Replied by Masa on topic Homing signal processing
rodw, I know there was a discussion on the forums a while back. If you want to use Homing of cia402 drive, I would like to install Beckhoff's encoder reading module and adopt the method of using LinuxCNC. I'm looking for a way to avoid such usage. The purpose is for synchronous operation of the motor for the Spindle.
Please Log in or Create an account to join the conversation.
14 Jan 2023 03:56 #261871
by rodw
Replied by rodw on topic Homing signal processing
There is clearly an error in your hal file to receive a message like that.
It even tells you why. Fix that and you will probably be OK
I can't advise from afar..
It even tells you why. Fix that and you will probably be OK
I can't advise from afar..
Please Log in or Create an account to join the conversation.
14 Jan 2023 03:58 #261872
by rodw
Replied by rodw on topic Homing signal processing
I might add that in a homecomp you could create a seperate pin to trigger homing so the index is used as intended.
Please Log in or Create an account to join the conversation.
14 Jan 2023 06:29 #261898
by Masa
Replied by Masa on topic Homing signal processing
I used the edge function, but it detected only one side of the toggle motion. I gave up on this too.
Please Log in or Create an account to join the conversation.
14 Jan 2023 11:42 #261924
by db1981
Replied by db1981 on topic Homing signal processing
Hello,
we are talking about ethercat, and so are usually about 1ms steps in which data arrives and is sent from/to linuxcnc. for getting an precise homing this bus cycle is much to slow, for only reacting to an index bit ( in the cycle of 1ms the encoder has already moved many counts.... )
In the industrial field homing / zero setting is done in either of the two following ways:
-drives sets is counter self to zero
-external control handles pos counter by raw enc positon from bus and receives latch bit together with an latch position (offset in raw counts from the real zero) in the correspondending cycle and calcs its new Axis Position.
For linuxcnc both variantes needs a bit of code, that is usually done in "ethercat-driver" for the device.
Sadly this can not be easy done with my CIA402 wrapper and the generic device driver, because device specific encoder handling is needed.
But we have implemented this in many of the the device drivers. You can take a look in the src folder . EM7004, all Beckhoff Encoder Cards (5101, 5112, 5152 ...) and the specific servo drives like AX5000, Stoeber, Indramat etc... (for all of them this is done in lcec_class_enc.)
Search for latch or index....
we are talking about ethercat, and so are usually about 1ms steps in which data arrives and is sent from/to linuxcnc. for getting an precise homing this bus cycle is much to slow, for only reacting to an index bit ( in the cycle of 1ms the encoder has already moved many counts.... )
In the industrial field homing / zero setting is done in either of the two following ways:
-drives sets is counter self to zero
-external control handles pos counter by raw enc positon from bus and receives latch bit together with an latch position (offset in raw counts from the real zero) in the correspondending cycle and calcs its new Axis Position.
For linuxcnc both variantes needs a bit of code, that is usually done in "ethercat-driver" for the device.
Sadly this can not be easy done with my CIA402 wrapper and the generic device driver, because device specific encoder handling is needed.
But we have implemented this in many of the the device drivers. You can take a look in the src folder . EM7004, all Beckhoff Encoder Cards (5101, 5112, 5152 ...) and the specific servo drives like AX5000, Stoeber, Indramat etc... (for all of them this is done in lcec_class_enc.)
Search for latch or index....
The following user(s) said Thank You: tommylight, mehdidadash
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds