Lichuan 4 axis stepper need help-
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1266
- Thank you received: 442
04 Feb 2026 12:43 #342382
by Hakan
Replied by Hakan on topic Lichuan 4 axis stepper need help-
Can't you just forget about cia for the moment and only work with lcec, like I did.
And transition manually 6,7 15.
And transition manually 6,7 15.
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 232
- Thank you received: 55
04 Feb 2026 13:26 #342385
by andrax
Replied by andrax on topic Lichuan 4 axis stepper need help-
Hi,
I am reading all the topics on EtherCAT and CIA402 carefully. Unfortunately, I am not a programmer and cannot contribute much.
But I found this page, maybe it will help?
EtherCAT Slave: CiA 402 example
Note: would it be possible to incorporate certain safety routines? For example, a watchdog if the servo receives the command for homing but does not start moving.
I am reading all the topics on EtherCAT and CIA402 carefully. Unfortunately, I am not a programmer and cannot contribute much.
But I found this page, maybe it will help?
EtherCAT Slave: CiA 402 example
Note: would it be possible to incorporate certain safety routines? For example, a watchdog if the servo receives the command for homing but does not start moving.
The following user(s) said Thank You: NWE
Please Log in or Create an account to join the conversation.
- NWE
-
- Offline
- Elite Member
-
Less
More
- Posts: 180
- Thank you received: 46
04 Feb 2026 14:52 #342387
by NWE
My drive and motors are expected to show up today. Not that that makes it a rush to get this figured out. I still need to decide what I'll build with it once it's working.
Replied by NWE on topic Lichuan 4 axis stepper need help-
That echos my thoughts, I considered throwing that idea out there but decided I'm too much of a newby in this ethercat business to be making too much noise here without trying stuff out on hardware first.but did you try to go to op-enabled without the cia402 component?
My drive and motors are expected to show up today. Not that that makes it a rush to get this figured out. I still need to decide what I'll build with it once it's working.
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11771
- Thank you received: 3986
04 Feb 2026 22:54 #342422
by rodw
Replied by rodw on topic Lichuan 4 axis stepper need help-
So I reverted to Dominic's original component cia402.comp based on feedback here so I could get back to basics
Now I have learnt/refreshed my knowledge about ethercat, I used halshow to list all of the lcec pins and noticed the familiar value of 561 but it was on the wrong pin. Checking the XML, I had included a torque pin but there is no PDO or SDO for it (I had tested this earlier with raw ethercat command line commands). So I deleted the entry in my xml. Everything is now mapped correctly. But only Drive/Joint 0 works correctly. lcec and cia402 follow each other but motion only happens on X (Joint/Drive 0)
Joint position/fb follow lcec and cia402 when jogging but for some reason the 3 higher drives don't move.
I've attached the revised XML and my CIA402 hal and ini files. I don't tthink I have mapped anything incorrectly in hal
Now I have learnt/refreshed my knowledge about ethercat, I used halshow to list all of the lcec pins and noticed the familiar value of 561 but it was on the wrong pin. Checking the XML, I had included a torque pin but there is no PDO or SDO for it (I had tested this earlier with raw ethercat command line commands). So I deleted the entry in my xml. Everything is now mapped correctly. But only Drive/Joint 0 works correctly. lcec and cia402 follow each other but motion only happens on X (Joint/Drive 0)
Joint position/fb follow lcec and cia402 when jogging but for some reason the 3 higher drives don't move.
I've attached the revised XML and my CIA402 hal and ini files. I don't tthink I have mapped anything incorrectly in hal
The following user(s) said Thank You: NWE, jarvis
Please Log in or Create an account to join the conversation.
- NWE
-
- Offline
- Elite Member
-
Less
More
- Posts: 180
- Thank you received: 46
05 Feb 2026 07:23 - 05 Feb 2026 07:25 #342449
by NWE
Replied by NWE on topic Lichuan 4 axis stepper need help-
My order showed up today!
I tried a minimal hal test in the terminal. I can power up each of the 4 motors, I set control word 6, 7, 15, each motor's shaft locks when I reach 15. But I didn't get anything to move yet. Not even the first motor. I didn't try the cia402 yet.
For my ethercat-conf.xml I directly copied from rodw's post above. The only thing I changed on it was the filename.
I tried a minimal hal test in the terminal. I can power up each of the 4 motors, I set control word 6, 7, 15, each motor's shaft locks when I reach 15. But I didn't get anything to move yet. Not even the first motor. I didn't try the cia402 yet.
For my ethercat-conf.xml I directly copied from rodw's post above. The only thing I changed on it was the filename.
Last edit: 05 Feb 2026 07:25 by NWE.
The following user(s) said Thank You: jarvis
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11771
- Thank you received: 3986
05 Feb 2026 07:35 - 05 Feb 2026 07:36 #342450
by rodw
Replied by rodw on topic Lichuan 4 axis stepper need help-
Hmm, once I plugged the Y axis in to the drive, everything is working perfectly on all drives. Sometimes I am an idiot!
Something funny going on. The maximum speed I can get out of this is around 400 rpm. Thats simple square wave arduino territory. I know I can get 800 rpm out of a similar drive on a Mesa card and a DM542a stepper driver. I have driven the same stepper motors out to 1000-1500 rpm and more in the past.
My ini file (attached) is set up for a metric machine using a Mod 1.5 40 tooth pinion and a 5:1 gearbox.
That equates to a 60mm diameter pinion (1.5x40) with a circumference of 188.49559mm divide by 5 and we have 37.69911 mm per rev, = scale of 265.25 steps per mm based on Lichuan's default 10,000 steps per rev.
I've tested this with G1 x188.49 F2000 and it moves exactly 5 revs on the bench.
Time to dig a bit deper into the Lichuan config program which means I have to boot windows uggg!
So its been a long way to get there but you guys are good to go with Dominic's component, this in i file and my hal file in my last post!
Something funny going on. The maximum speed I can get out of this is around 400 rpm. Thats simple square wave arduino territory. I know I can get 800 rpm out of a similar drive on a Mesa card and a DM542a stepper driver. I have driven the same stepper motors out to 1000-1500 rpm and more in the past.
My ini file (attached) is set up for a metric machine using a Mod 1.5 40 tooth pinion and a 5:1 gearbox.
That equates to a 60mm diameter pinion (1.5x40) with a circumference of 188.49559mm divide by 5 and we have 37.69911 mm per rev, = scale of 265.25 steps per mm based on Lichuan's default 10,000 steps per rev.
I've tested this with G1 x188.49 F2000 and it moves exactly 5 revs on the bench.
Time to dig a bit deper into the Lichuan config program which means I have to boot windows uggg!
So its been a long way to get there but you guys are good to go with Dominic's component, this in i file and my hal file in my last post!
Last edit: 05 Feb 2026 07:36 by rodw.
The following user(s) said Thank You: NWE, jarvis
Please Log in or Create an account to join the conversation.
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1266
- Thank you received: 442
05 Feb 2026 07:36 #342451
by Hakan
Replied by Hakan on topic Lichuan 4 axis stepper need help-
NWE, with controlword at 15 set op-mode to 8 (csp) and try to move again.
Don't move a lot at once, it can overwhelm the drive. Linuxcnc moves just a tiny distance every servo cycle.
Should see it on position feedback.
Don't move a lot at once, it can overwhelm the drive. Linuxcnc moves just a tiny distance every servo cycle.
Should see it on position feedback.
Please Log in or Create an account to join the conversation.
- rodw
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 11771
- Thank you received: 3986
05 Feb 2026 07:39 #342452
by rodw
That works. My stuff is going back to the drawing board
Replied by rodw on topic Lichuan 4 axis stepper need help-
Great! 2 idiots now! So just to be sure you are using my latest XML without the torque pins and dominic's cia402.comp component?My order showed up today!
That works. My stuff is going back to the drawing board
Please Log in or Create an account to join the conversation.
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1266
- Thank you received: 442
05 Feb 2026 07:45 #342453
by Hakan
Replied by Hakan on topic Lichuan 4 axis stepper need help-
rodw, probably a coincidence but 400 rpm = 6,67 rps. 5mm per rev gives 33.33 mm/s which is
awfully close to your MAX_VELOCITY in the ini file.
Happy you got it to work.
I find one learn a lot by messing around and trying to solve issues, real or not.
Here I got to practise setting the controlword manually
Still the issue with position feedback during homing, right?
awfully close to your MAX_VELOCITY in the ini file.
Happy you got it to work.
I find one learn a lot by messing around and trying to solve issues, real or not.
Here I got to practise setting the controlword manually
Still the issue with position feedback during homing, right?
Please Log in or Create an account to join the conversation.
- NWE
-
- Offline
- Elite Member
-
Less
More
- Posts: 180
- Thank you received: 46
05 Feb 2026 07:46 #342454
by NWE
Replied by NWE on topic Lichuan 4 axis stepper need help-
This is looking better. Now I need to tape flag those motor shafts so I can see if they moved like my terminal claimed. Wait, keyboard's wireless, it CAN reach from my desk to my workbench...
Please Log in or Create an account to join the conversation.
Time to create page: 0.517 seconds