More advanced EtherCAT setup questions
- mwc
- Offline
- Premium Member
-
- Posts: 111
- Thank you received: 9
Now that I've got my basic setup running, I'm looking at the more detailed setup, and have a few questions.
How are people monitoring that all the EtherCAT devices are still connected?
I've been testing, and if I simply unplug a cable or power them off, no immediate fault is generated. LinuxCNC only finally disables when I try moving an axis due to a following error. Is there some form of pin available that will detect if a device(s) have lost communication?
Is anybody reading the status from drives during operation?
I know I could connect the drive error variable to a suitable HAL pin. but is anybody also reading the error code?
I know that the last two questions are probably as much GUI based, but I'd be grateful to any pointers on how these things can be implemented.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 12094
- Thank you received: 4132
But what about monitoring a normal stepper drive or a Mesa card. Isn't the same risk there?
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
-
- Posts: 2136
- Thank you received: 887
Check your xml file - it may already have a fault status hal pin 'baked in'
Is anybody reading the status from drives during operation?
I know I could connect the drive error variable to a suitable HAL pin. but is anybody also reading the error code?
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="603F" subIdx="00" bitLen="16" halPin="fault-code" halType="s32"/>And cia402.comp has a drive fault pin:
pin out bit drv_fault "true indicates an Drive Error";If you can unplug or power off your drive and LCNC doesn't error out immediately, your setup could use some work. Do you have anything connected in HAL to joint.N.amp-fault-in?
Please Log in or Create an account to join the conversation.
- mwc
- Offline
- Premium Member
-
- Posts: 111
- Thank you received: 9
lcec.0.slaves-responding gives the current number of slaves active, so I'm guessing I can use that via Classic Ladder to monitor for any major failings, and trigger a suitable warning?
I should be able to pull the basic Error status from the controlword, but it'd be nice to pull the actual error code without having to open a cabinet to look at the drive (on the nice to have list!).
My main concern is that LinuxCNC loads up without any warning if the drives aren't powered up, or the CAT cable is unplugged, and the first that you know there is an issue, is when you try moving an axis and get a position error. I like to cover most common eventualities when retrofitting/building a machine, so a basic sanity check of all the slaves being online I think is quite essential.
Something I've found missing from the linuxcnc-ethercat documentation, is a more general overview of the XML, as although it goes into good detail on specific functions, I can't see anything about the more general function of blocks. Like why are there 4 syncMaster blocks, yet the first two are empty (and required by the Lichuan drives!)?
For example my current question is how do I configure the drive current during initialisation?
I should really write a driver* for my Lichuan CL3-E57H drives, but even looking at the drivers for other drives, I'm not sure where that setting would fit into the XML, as I can't even find an example where somebody has set the current.
I'm fairly sure it shouldn't be in the syncManager/PDO block for the 1ms updates, but where does it go?
*I'd be willing to write a driver, but it would probably need the existing Lichuan driver renamed, as from a brief look at it, there is a bit more difference than just 4x the number of axes, as the xL3 drivers have more IO, so I think for simplicity, keeping the drivers separate would provide cleaner drivers for both.
Please Log in or Create an account to join the conversation.
- mwc
- Offline
- Premium Member
-
- Posts: 111
- Thank you received: 9
<snip>
Just had a quick look, and drive error isn't currently collected, but I can add that.
I already have a line to check amp-fault-in, but having just checked in Halshow, drv-fault remains unchanged if I unplug the drives.
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
-
- Posts: 2136
- Thank you received: 887
Maybe see if there's a drive parameter you can adjust which defines what the drive considers a 'fault.'
Just had a quick look, and drive error isn't currently collected, but I can add that.
I already have a line to check amp-fault-in, but having just checked in Halshow, drv-fault remains unchanged if I unplug the drives.
I would think that a drive would default to 'faulted' if it gets unplugged, but who knows what drive programmers think? It could be that the default setting is 'fault' only gets asserted if there's an internal following error or under/over volt condition.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 12094
- Thank you received: 4132
Please Log in or Create an account to join the conversation.
- mwc
- Offline
- Premium Member
-
- Posts: 111
- Thank you received: 9
I'm assuming the drv-fault only triggers once the drive actually errors, but I've not found an easy way to get the drives to fault yet, although i did just think about how to do it without risking blowing one up.
@rodw that's the kind of thing that I'm aiming for.
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
-
- Posts: 2136
- Thank you received: 887
Please Log in or Create an account to join the conversation.
- mwc
- Offline
- Premium Member
-
- Posts: 111
- Thank you received: 9
Looking at the ethercat documentation, the main parameter I can see is lcec.<m>.slaves-responding, which does what it says.I haven't read deeply in to lcec component, but I wonder if there's a polling process to check for changes. I'd be interested if drives change state on some parameter if they're disconnected.
It doesn't appear to refresh that quickly, although that may just be that Halshow is slow to update.
I'd guess should a slave disappear during motion, a joint following error is likely to be triggered quicker.
Please Log in or Create an account to join the conversation.