Delta Servo position register.

More
19 Nov 2021 14:15 #226984 by serdigi
Hello;

I already checked the ESTUN servo driver with EL6751. The pdo of the target location in the ESTUN driver was U32 bit.
I wanted to run my Delta ASD-A2 drive on the side to improve myself. However, in the Canopen whitepaper I found that the pdo target location consists of High(16bit) and low(16bit) words. As you know, Linuxcnc sends the Float type target location command. To solve this problem I will need low and high 16 bit conversion from Float. And of course, it needs to convert as fast as possible to match real time. My opinion is to convert from float to binary as fast as possible. The Ethercat Hal driver does the rest by dividing and sending complex data type bits. Waiting for your valuable ideas.
Kind regards.
Attachments:

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

More
21 Nov 2021 17:29 #227205 by andypugh
LinuxCNC HAL has float-to-int conversion:
linuxcnc.org/docs/2.8/html/man/man9/conv_float_u32.9.html

But it probably makes sense to write a custom component to output two 16-bit values as I imagine that there is some scaling required?

Do you know C at all?
linuxcnc.org/docs/2.8/html/hal/comp.html
The following user(s) said Thank You: serdigi

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

More
21 Nov 2021 21:17 #227235 by serdigi
Yes Andy.
I am proficient in C language.
Thanks for your support and advice. Earlier, I converted an integer 16bit value to 2 8bit values ​​(high and low). Of course, it's not that simple when it comes to converting a floating number.

void split(uint16_t pxreg1,uint16_t pxreg2)
{

px2=(uint8_t)(0x00ff)&(pxreg1);// low byte
pxreg1=pxreg1>>8;
px1=(uint8_t)((0x00ff)&pxreg1); high byte

px4=(uint8_t)(0x00ff)&(pxreg2);//low byte
pxreg2=pxreg2>>8;
px3=(uint8_t)((0x00ff)&pxreg2); high byte
}

I'm continuing to work. If I find a fast algorithm like I mentioned, I will share it. Being open to ideas has always improved me.

Best Regards.

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

More
21 Nov 2021 22:59 #227242 by andypugh
I don't think that you need to worry too much about speed. The component will run once every mS and will probably complete in nanoseconds.

I would let the compiler convert the float to an int, then split that into two HAL pins.
The following user(s) said Thank You: serdigi

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

More
07 Dec 2021 14:39 - 07 Jan 2022 19:52 #228533 by serdigi
Hello. This is a simple component. I have tested on the EL6751. The result is very good. I haven't had any lag issues. I wish you good luck. Kind regards.
SERDIGI.
component split "Delta ASD-A2 Firmware 1.03 linear Interpolation position register splitting HIGH Word and LOW Word";
pin in  float pos_in;
pin out u32   pos_out;
pin out u32   pos_low;
pin out u32   pos_high;

pin in     float resulation;

variable uint32_t xtemp=0;
variable uint16_t px1=0;
variable uint16_t px2=0;




function _;
license "GPL";
author "serdigi";
;;

#include "rtapi_math.h"

    
FUNCTION(_) {



    xtemp = pos_in * resulation;
    px1 = (uint16_t)(xtemp)&;(0xFFFF);
    px2 = (uint16_t)(xtemp>>16);
    pos_low = px1;
    pos_high = px2;
    

}
Last edit: 07 Jan 2022 19:52 by andypugh.

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

More
07 Dec 2021 20:32 #228572 by rodw
Replied by rodw on topic Delta Servo position register.
Hi, this is interesting as I'm just starting out with Ethercat. I am wondering why you are using the EL6751 when there is direct support for CIA402 drives which the ASD-A2 drive appears to be
github.com/dbraun1981/hal-cia402

I really want to get internal homing working with my drives via a component.. Stall homing sounds very cool.

It would also be great if the mods could move this to the Ethercat section


 

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

More
07 Dec 2021 20:46 #228575 by tommylight
Done.

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

More
09 Dec 2021 20:20 #228727 by 0x2102
He is probably using the ASD-A2-M (CANopen) and not the native EtherCAT drives.

The EL6751 is a CANopen over EtherCAT coupler.
The following user(s) said Thank You: rodw

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

More
13 Dec 2021 06:49 #228995 by serdigi
Hello everyone.
I'm late to explain what I'm doing.As you all understand I used igh etherlabmaster and linuxcnc ethercat driver.I was able to run Delta ASD-A2-M (Canopen supported) sevo drivers by including EK1100 and EL6751 in this system.But since the firmware of the drives I have is outdated, the position register in my linear interpolation mode was still u32, but still wanted 2 as u16.I also tried this simple solution. It worked without any problems.


My main goal is to develop hardware for Canopen.Many of you are probably saying that I already have a solution and that I am using it.But EK1100 and EL6751 are not very cheap in every country.We make many passes at the same time. So we're connecting multiple technologies. As an engineer, I've always avoided the unnecessary pile of software and hardware.i.e. I am designing hardware that can be directly integrated with linuxcnc with an FPGA or ARM based controller. I will share the progress.sometimes re-searching the continent of America can improve you.

I apologize to everyone for my bad english.

Best Regards...
The following user(s) said Thank You: rodw

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

More
13 Dec 2021 18:44 #229024 by 0x2102
Hello serdigi,

I do have a set of ASD-A3-M that I tried to setup with a Beckhoff EK1100 + EL6751 but I never managed to get the EL6751 to OP under LinuxCNC. It was no problem in TwinCAT but LinuxCNC was a no-go for me. This was just a test system, as I will be using the ASD-A3-M with Step/Dir.

I have another set a EtherCAT servo's ASD-A3-E, those work well with LinuxCNC EtherCAT.

Would be great if you should share some details around the EL6751 and how you got it to work. Still unsure why it didn't work for me ;-)

Regards,
-Markus

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

Time to create page: 0.230 seconds
Powered by Kunena Forum