Setting up the Stepperonline A6 battery encoder cable

More
4 months 4 weeks ago - 4 months 4 weeks ago #346900 by andrax
Oh, right,
I use the CIA402 and CIA402_homecomp by Colin Bardini. It works very well on XYZ machines.
However, there are generally issues with XYYZ machines.
It can happen that during homing, only one gantry axis moves. The other one stays still or starts moving late. It’s a known issue. 
@Marcos DC has taken on the problem. The current status of the work is unknown.
forum.linuxcnc.org/ethercat/58592-cia402...ation-easier-debuggi
There may also be issues with jitter.
Read more here:
forum.linuxcnc.org/ethercat/58103-ethercat-random-jitter-fix
@rodw has already incorporated all of this into his repositories and created installation instructions. I can’t find the link right now.

regards

andrax
Last edit: 4 months 4 weeks ago by andrax.

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

More
4 months 2 weeks ago #347094 by fer662
I now have X and Y working on the actual machine and I want to give this another go. Can you clarify if to use cia402 homing I need to have the limit switches wired into the servodrive specific input pins, or if it works all the same with them wired to beckoff input pins?
Yesterday I had it sort of working (motor direction wrong + homing direction wrong yielded something sort of working) with them wired into beckoff but i'm wondering if by any chance it could be using regular homing because of something else in the config.

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

More
4 months 2 weeks ago #347097 by andrax
Hi,

It's important to always read the manufacturer's documentation.
Check page 27

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

More
4 months 2 weeks ago #347102 by fer662

Hi,

It's important to always read the manufacturer's documentation.
Check page 27
I had seen that already, but that seemed more like "hey, you can use these pins and not have to buy separate inputs for homing" rather than "you NEED to use these for cia402 homing to work". What made it click was the readme on CIA402_home_comp explaining how you basically need to tell linuxCNC not to panic when it sees the drive moving without it asking and i figured since the linuxCNC is not part of the process, its input pins cannot be part of it either, and just wanted to confirm that. I ordered the db15 connections to solder and they should arrive tomorrow, my plan is to join the drive's internal supplies' grounds to my common ground and just wire the signal wire in there.

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

More
4 months 2 weeks ago #347103 by spumco
since the linuxCNC is not part of the process, its input pins cannot be part of it either, and just wanted to confirm that.

I'm inferring that the HAL file has the home switches connected to both LCNC and the drives' digital input:

net X-home-sw            <= lcec.0.10.din-4      #physical digital input on Beckhoff EL1018?
net X-home-sw            => joint.0.home-sw-in   #LCNC joint home switch pin (motion.comp)
net X-home-sw            => lcec.0.5.dout-0      #physical digital output on Beckhoff EL2008?

@Andrax has not mentioned any drive connections explicitly, but the only reason I can imagine sending the home switch signal to a physical output is to signal the drive.  Unless I'm mistaken, a drive's digital input is the only way a drive 'knows' when the home switch is triggered.

Which begs the question - why is the home switch also connected to LCNC joint.N.home-sw-in?

Maybe to do LCNC homing first, then move on to cia402 (internal) homing, and finally absolute encoder homing?

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

More
4 months 2 weeks ago - 4 months 2 weeks ago #347149 by fer662
I don't think any of that is necessary (mapping homing pins to the regular inputs). I'm like 95% there now getting cia402 homing working with the absolute mode disabled. I'm able to home all axis x and y (z spins around looking for the z pulse and doesn't find it), but sometimes a joint will throw an amplifier fault JUST after completing homing (I can see the logging from cia402_homecomp indicating that the process had finished for that axis). I'm not sure why this is and it seems to be random...It'd be nice to figure it out but I guess that all i need is for homing to succeed once and then switch to absolute encoder mode? I'm still not sure how the combined Y+Y2 is supposed to work without homing... Like suppose you move one of the motors when the machine is off, will linuxCNC or something try to correct this deviation when the machine is turned on? If anyone knows what is the aim regarding this topic, please let me know. Below are my steps to getting to this stage:

- This repo is the best one I found for both homecomp implementation and linuxCNC config for these servos github.com/nickstewartroc/linuxcnc-a6-servo , and it is a fork from the one mentioned by @andrax (though the files he posted are not from there or are modified at least). Only one thing from there didn't work for me which is the binding of the di pins to see their state, they didn't reflect the way they are setup there. This is how each servo looks and what worked for seeing the home switches change state ( see<pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">;). Also, I initially had issues halcompiling this homecomp with the additional includes, it was giving me an error on some types, make sure the cloned linuxCNC repo is on the same tag as your installation and not on main.

<slave idx="3" type="generic" vid="0x00400000" pid="0x00000715" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="300000"/>
<watchdog divider="2498" intervals="1000" />
<sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32" />
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32" />
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32" />
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
<pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32" />
<pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
<pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
<pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1A00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="status-word" halType="u32" />
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="mode-display" halType="s32" />
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32" />
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="digital-inputs" halType="u32"/>
<pdoEntry idx="2040" subIdx="05" bitLen="16" halType="complex">
<complexEntry bitLen="1" halPin="di-1" halType="bit"/>
<complexEntry bitLen="1" halPin="di-2" halType="bit"/>
<complexEntry bitLen="1" halPin="di-3" halType="bit"/>
<complexEntry bitLen="1" halPin="di-4" halType="bit"/>
<complexEntry bitLen="1" halPin="di-5" halType="bit"/>
<complexEntry bitLen="11"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>

- Wire the home switch per page 26 of the manual. You need to tie either COM- or COM+ to your external PSU's negative output depending on the sensor type (NPN or PNP). I had tied COM- instead of COM+ for PNP and that wasn't working. Make sure DI3 flips when the sensor toggles before proceeding any further.
- Depending on whether your sensor is NC or NO, you need to change your home switch between active low and active high, documentation for this is in page 209. (<sdoConfig idx="2004" subIdx="0a"><sdoDataRaw data="01 00"/></sdoConfig> in my config for NC switch). Also on page 209 is the function selection for DI3. It's set correctly by default, but one of my drives had it wrong and i presume this was the result of debugging changes made via dcConf entries that got removed. Check that all yours drives have it on the correct setting which is 5. You could technically use any of the DI pins that have function selection as the home switch changing stuff around this PDO. By this time the sensor pin should light up in halshow when triggered no matter whether the sensor is NO or NC.
- At this point it should be possible (though i haven't tested, i did have it working with the pins wired to the beckoff inputs though) to configure regular homing using the drive pins as input if you wished to test it out for sanity checking.
- Assuming that works or you skip it, copy the relevant bits of the hal in the referenced repo. I didn't have to change anything there since i dumped my XML (which was already very close but had slightly different property names) so i could just copypaste as it was.
- I used homing mode 4 like @Andrax but that might not be right for you. On Page 74 there's ample documentation for how each home mode works.
- When trying things out you might use low speeds for the 2 speeds involved in homing. Beware homing has a timeout that defaults to 60 seconds on the servo config. Homecomp doesn't catch this timeout and gets stuck forever, leading you to have to close linuxCNC and power cycle the drives (Page 215).
- Presumably once you're happy you'd comment the homing stuff and add HOME_ABSOLUTE_ENCODER to the joints like the initial post suggests.

I hope this helps someone, and please let me know if your know what the amplifier faults i'm getting after homing might be. This is my first time using linuxCNC. My config is attached for whoever finds it useful or can help me with the little bit i think i have left to fix.
Last edit: 4 months 2 weeks ago by fer662. Reason: fixed format
The following user(s) said Thank You: spumco

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

Time to create page: 0.379 seconds
Powered by Kunena Forum