HAL CiA402 Drive Interface for Can Bus,Ethercat etc...

More
08 Jun 2025 12:12 #329942 by Hakan
Sounds great!
What are your plans with this?
Keep it separate in your code or bring it into mainstream linuxcnc code?
The following user(s) said Thank You: Grotius

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

More
08 Jun 2025 13:52 #329947 by Grotius
Others may bring it in the main stream.
I am against one off the github policys.
Therefore i stay at Codeberg wich dont use the policy i hate.

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

More
28 Jun 2025 18:05 #330967 by Marko6
Hi everyone.

Does anyone have CSV mode working? I'm running CSP on XYZ without any problems, but CSV on the spindle is just running the drive (Delta C2000 + Ethercat + Encoder) and I can't send the speed/direction signal.

I've spent two days trying to get it running, but to no avail. Also, there is no sample hal/ini file that explains CSV and the spindle.

Thank you. BR,
Pavel

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

More
07 Jul 2025 19:56 #331481 by Marko6
Hi everyone. I have made some progress on 3x Lichuan + 1x Delta C2000. Now I am able to measure the speed when the drive is turned on manually. But still no success with the speed command.

I found that the speed command in HAL CiA402 is 60FF and here in Delta it is 6042. I have tried both, but when I set only 6042 in the XML file, I am not even able to turn on the drive.

Any idea? Thank you. 

 

File Attachment:

File Name: ethercat-conf.xml
File Size:9 KB
 

File Attachment:

File Name: cia402.hal
File Size:5 KB
 

File Attachment:

File Name: cia402.ini
File Size:5 KB
Attachments:

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

More
07 Jul 2025 20:18 - 07 Jul 2025 20:22 #331484 by Hakan
Is that the Delta 2000 CMC-EC01?
There is a manual for download includes a speed demo example.
downloadcenter.deltaww.com/en-US/Downloa...=cdate&sort_dir=DESC
Last edit: 07 Jul 2025 20:22 by Hakan.

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

More
07 Jul 2025 21:12 #331491 by Marko6
Hi. Yes, but no.

Speed tutorial is there but its just procedure what to send to drive. I have no clue how to implement that to Linuxcnc. 

 Thank you.
Attachments:

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

More
08 Jul 2025 06:43 - 09 Jul 2025 05:11 #331504 by Hakan
Yeah, it seems you can't do that with the standard cia402 component.
It only support csp mode(1) and possibly csv(0), and what I read your device is working in asynchronous velocity mode(2) and that's not supported at least fully.
It's the controlword, obviously, that starts and stops the motor.
Normally the cia402 component has full control over the controlword and that must be now manipulated by setting on and off bit 4-6 (7F vs 0F) for start stop
There is the option to modify the cia402 component, but maybe "easier" to manipulate the controlword
between cia402 component and lcec.

Break the connection between cia402 and lcec controlword and insert something like
if op-enabled (controlword bit 0-3 set) and start pin (new pin)
  set controlword bit 4-6 true
else
  set controlword bit 4-6 false
with hal logic. The resulting controlword connects to lcec.

In addition to that, don't connect any of the cia402 commanded or feedback pins, do the speed setting and speed feedback outside the cia402 component. Basically, the cia402 component will bring the device to op-enabled, that's all. You set the op-mode and all speed settings directly to lcec.

 
Last edit: 09 Jul 2025 05:11 by Hakan. Reason: Fixed 7F and 0F conversion to bits
The following user(s) said Thank You: Marko6

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

More
08 Jul 2025 16:39 #331534 by Marko6
Hi. Thanks for the help. It works now. It's not finished yet, but it's a good start.
Here are my files, maybe someone will like it. :-)

​BR Pavel



File Attachment:

File Name: cia402.comp
File Size:11 KB

File Attachment:

File Name: cia402_2025-07-08.hal
File Size:6 KB

File Attachment:

File Name: ethercat-c...7-08.xml
File Size:9 KB

File Attachment:

File Name: cia402_2025-07-08.ini
File Size:5 KB

File Attachment:

File Name: cw-start.comp
File Size:1 KB
Attachments:

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

More
08 Jul 2025 17:22 - 08 Jul 2025 17:34 #331536 by Hakan
Looks great! 
A new component for the logic, even the easiest way.
Btw, I noticed my hex to bin conversion was totally wrong, but you get the point with 7F and 0F.
Last edit: 08 Jul 2025 17:34 by Hakan.

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

Time to create page: 0.162 seconds
Powered by Kunena Forum