Homing signal processing

More
19 Jan 2023 23:44 #262444 by Masa
Replied by Masa on topic Homing signal processing
rodw, thanks for the detailed explanation. appreciate.
I will also add to the manual for understanding my LinuxCNC.
I am writing to tell people other than myself about LinuxCNC in Japan.

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

More
19 Jan 2023 23:49 #262445 by Masa
Replied by Masa on topic Homing signal processing
andypugh, I didn't have enough info on my Servo.
An absolute encoder is implemented, but I use it as an incremental in the amplifier settings. Absolute's system will cause the amplifier to generate an alarm when the cable is attached or detached, so it will not burden the final user.

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

More
22 Jan 2023 07:22 - 23 Jan 2023 02:09 #262635 by Masa
Replied by Masa on topic Homing signal processing
After getting a lot of advice from everyone, I decided on a solution for the time being.

1. Use the servo amplifier in the interpolated position mode in the position control mode.
2. Set the TouchProbeFunction to trigger on the C phase of the encoder.
3. Trigger detection uses TouchProbeStatus bit7 toggle signal.
4. Use TouchProbe1PositionValue for the trigger position.

The previous toggle2index has been rewritten as follows.


#!/usr/bin/env python
import hal
h=hal.component("toggle2index")

h.newpin("tgl-in",hal.HAL_BIT,hal.HAL_IN)
h.newpin("index-enable",hal.HAL_BIT,hal.HAL_IO)
h.newpin("tp-pos",hal.HAL_FLOAT,hal.HAL_IN)
h.newpin("scale",hal.HAL_FLOAT,hal.HAL_IN)
h.newpin("fb-pos",hal.HAL_FLOAT,hal.HAL_OUT)
h.newpin("tg-pos",hal.HAL_FLOAT,hal.HAL_OUT)
h.newpin("cmd-pos",hal.HAL_FLOAT,hal.HAL_IN)
h.newpin("sv-ac-pos",hal.HAL_FLOAT,hal.HAL_IN)

h.ready()
ib=False
ofset=0
scl=0.001

while 1 :

    if ib != h['tgl-in'] :
        ib = h['tgl-in']
    if h['scale']!=0 :
        scl=h['scale']

        if h['index-enable'] == 1:
            ofset=h['tp-pos']
            h['index-enable'] = 0

    h['tg-pos']=h['cmd-pos']/scl+ofset
    h['fb-pos']=(h['sv-ac-pos']-ofset)*scl

When setting the scale of the servo amplifier coordinates and the joint command and checking the C phase of the encoder during homing, the command system coordinates were reset, the encoder and offset values were memorized, and the coordinates after homing was completed were determined. So far it seems to work like that.
In the future, I would like to write this python program in C language as a hal component and add some functions of the encoder module. You will learn how to create components. I would like to refer to cia402.comp that you introduced.

Thanks for all your advice.
 
Last edit: 23 Jan 2023 02:09 by Masa.

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

More
22 Jan 2023 08:14 #262638 by rodw
Replied by rodw on topic Homing signal processing
I had a good look at the homecomp today and its now a lot more user friendly than it was when I last looked (which has obsoleted all of my earleir work)

If you have absolute encoders I think the cia402.comp will be all you need. Just follow the examples.

If you have drives that home to a sensor, it will also require a custom homemod.comp and I think it will only need a few lines of code to configure it to talk to the cia402.comp

One day I will set up an ethercat lab and give it a go.

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

More
23 Jan 2023 02:20 - 23 Jan 2023 02:22 #262695 by Masa
Replied by Masa on topic Homing signal processing
I edited my post because the python program code I posted didn't display properly.
Last edit: 23 Jan 2023 02:22 by Masa.

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

More
10 Feb 2023 20:22 #264246 by haham
Replied by haham on topic Homing signal processing
Thank you Andy, tristate_bit was the trick for me to use index-enable as an input.

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

More
11 Feb 2023 05:00 #264269 by akg1904
Replied by akg1904 on topic Homing signal processing
Hi Masa,

May I know if you are using Yaskawa Ethercat drives ?

Regards
Abhishek

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

More
27 Apr 2023 05:08 #270030 by Masa
Replied by Masa on topic Homing signal processing
Hello Abhishek

Sorry for my late reply
The servo I used is yaskawa's sigma-X series amplifier with EtherCAT connection.
We tested position, velocity and torque control modes.

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

More
05 Jul 2023 22:25 - 05 Jul 2023 22:49 #274862 by saiko
Replied by saiko on topic Homing signal processing
I may not understand as I am new but why not simply attach
joint.N.home-sw-in to our's servo home input, and
joint.N.index-enable assuming that drive can map encoder index to any of its inputs
and use linuxcnc internal homing procedure?
Last edit: 05 Jul 2023 22:49 by saiko.

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

More
05 Jul 2023 23:48 #274868 by Masa
Replied by Masa on topic Homing signal processing
hello saiko

I am currently using the Llinuxcnc internal homing procedure. The reason why servo amplifier homeing is not used is for synchronous operation with other servo amplifiers. For example thread cutting.
If the problem is solved, please tell me how to write the HAL.

Currently Home-Switch is connected to joint.N.home-sw-in and joint.N.index-enable is controlled by an external module I made.
The external module processes the Touch-Probes signal of the servo amplifier, etc., and performs coordinate reset and index-enable processing.

thank you.

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

Time to create page: 0.539 seconds
Powered by Kunena Forum