Run Mesa 7i76e + 7i85 with 3 servos and 1 stepper motor
- MarcusM
- Topic Author
- Offline
- Junior Member
- Posts: 25
- Thank you received: 2
But there are two new challenges to solve
1) The motor turns much to fast. Editing the carousel.N.*-dc values has no effect. Has the axis/joint parameter to be changed?
2) The home position of the carousel is wrong. I have no idea how to handle, as I can not use the classical axis homing stuff.
Any ideas?
Thanks & best regards
Marcus
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19568
- Thank you received: 6577
Belt? Direct drive? Force field ?
How many steps does the motor have to do for a full revolution of the carousel?
What microstepping is set on the drives?
Those are all things that will mess with the speed and position of the pockets.
Please Log in or Create an account to join the conversation.
- MarcusM
- Topic Author
- Offline
- Junior Member
- Posts: 25
- Thank you received: 2
The motor is directly attached to the carousel. There is no gear. Microstepping is 1.600. Seems to be ok.
Next issue is to figure out, how to drive the carousel to pocket-1-position after/within the init-sequence.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4868
It needs so time to realize, that the carousel.*-dc has no effect, but has to exist regardless. I changed now the max_vel and max_acc to get proper speed.
The "dc" outputs ought to work.
github.com/LinuxCNC/linuxcnc/blob/master...s/carousel.comp#L266
Shows that the motor-vel pin should be the same as the duty cycle.
I suspect that you had simply set the fwd-dc and rev-dc too high. 2 = 2 revs per second...
Try numbers less than 1.
Next issue is to figure out, how to drive the carousel to pocket-1-position after/within the init-sequence.
Does it need to? It should home itself the first time that it is enabled. Though I don't see any connection to the "sense-0" pin (home sensor) in your HAL file.
Please Log in or Create an account to join the conversation.
- MarcusM
- Topic Author
- Offline
- Junior Member
- Posts: 25
- Thank you received: 2
I'am sorry - I didn't attach my lastest config files. They're added now.Does it need to? It should home itself the first time that it is enabled. Though I don't see any connection to the "sense-0" pin (home sensor) in your HAL file.
The sense-o pin is connected to a digital-in and works fine. While doing M13, the carousel stops at sense-0 = high as expected. Unfortunately the position of the pockets will not fit with needed position. So I have to offset - just like in a typical axis homing too. In the moment I have no idea, how to make that best. Is it a good way, to config the carousel stepper as a axis and do a usual axis homing?
And another issue I think about: After correct homing I obviously do not need the step-calculation in M11 and M12...I just have to jog n times where n is the amount of pockets to move. Is this correct? As I'am not a software developer: How can I code a carousel jog in the M12 ngc file?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4868
Would a home-offset pin help? I have added one.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4868
The carousel component has jogging built in. Just connect buttons (physical or software) to the carousel.0.jog-plus and jog-minus pins.
And another issue I think about: After correct homing I obviously do not need the step-calculation in M11 and M12...I just have to jog n times where n is the amount of pockets to move. Is this correct? As I'am not a software developer: How can I code a carousel jog in the M12 ngc file?
Please Log in or Create an account to join the conversation.
- MarcusM
- Topic Author
- Offline
- Junior Member
- Posts: 25
- Thank you received: 2
Please Log in or Create an account to join the conversation.
- MarcusM
- Topic Author
- Offline
- Junior Member
- Posts: 25
- Thank you received: 2
I hope it's ok to ask another question. I didn't get 100%, what to define in carousel.N.width. And what the value has effect to the carousel moves. My pockets has a distance of 200 steps (carousel.N.scale = 200). In the moment, I defined a width of 110 after some try and error. Confusing side effect: home-offset is 0 in the moment.
After homing by M13, the carousel stops by the prox sensor - with wrong position for pocket 1. After jogging cw once, pocket 1 is positioned perfectely. All jogs after this procedure are fine and as needed.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4868
Try something like 20 for width and then adjust the offset so that it homes to pocket 1.
Testing might get tedious, it might help to create a pin to manually unhome the carousel.
Change the "homed" pin from "r" to "rw" so that you can "halcmd setp" it back to 0 from the command line, and then the carousel will re-home next time it is enabled.
github.com/LinuxCNC/linuxcnc/blob/master...s/carousel.comp#L101
Please Log in or Create an account to join the conversation.