Joint on limit errors only when G540 is active

More
30 Dec 2022 21:48 #260575 by trainwreck
I just got my machine configured and have tested everything using hal meter/hal show. It is an xyyz machine, and I can jog all axes (although only one of the Y joints) through the pncconf axis test dialog. Using the hal meter, I have confirmed that all 4 of my inductive limit/home (shared) switches are on the pins I expect them to be on, and they read false until I move some metal near them. I'm using a Gecko G540 for motor drivers, and a Mesa 7i92 with a Mesa 7i75.

The confusing part is I can turn on the machine in linuxcnc just fine as long as the G540 is not active. Once the G540 turns on - or if I try to turn on linuxcnc with the G540 already on, linuxcnc throws a random amount of "join on limit" errors, and sometimes "could not switch the machine on, is limit switch activated?" error as sown in the first image. If I turn on linxcnc with the G540 off, then everything works as I would expect. I can even manually trigger the limit switches as shown in the second image.

I have tested all of the pins with the hal meter when the G540 is on and even then it still sees the pins as false, so I really think there must be something unrelated wrong with my configuration that I just don't realize. Does anybody have any idea why this might be happening?
Attachments:

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

More
30 Dec 2022 22:20 #260580 by PCW
Random errors sounds like a electrical noise issue
How are the limit switches sensed? (via the G540 input or 7I75 inputs?)

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

More
30 Dec 2022 22:39 #260587 by trainwreck
Replied by trainwreck on topic Joint on limit errors only when G540 is active
Sorry, I don't mean the errors randomly happen, they happen 100% of time as described. The randomness is in how many of the joints show up with errors.

The sensors are on the 7i75 inputs which is why I'm so surprised that they react differently if it's on or off.

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

More
30 Dec 2022 22:44 #260590 by PCW
I would still suspect electrical noise issues
You may need better signal shielding and or
debouncing of the hal signals to eliminate impulse noise

To check for noise, try plotting the limit switch signals with halscope

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

More
31 Dec 2022 01:53 #260600 by trainwreck
Replied by trainwreck on topic Joint on limit errors only when G540 is active
I checked in the Hal scope as best as I am able, given I know nothing about how to use it (or any scope). Attached is a picture of the rising edge of a sensor trigger, it looks clean to me.

It did make me realize that these are 6-36v sensors though, and I expect that's a problem considering the 7i75 is meant for 5v logic. I'd that is a problem, is the a simple solution to make these work, or will I need to just buy appropriate sensors?

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

More
31 Dec 2022 23:16 #260681 by trainwreck
Replied by trainwreck on topic Joint on limit errors only when G540 is active
Now that I have been able to spend more time in the shop testing, I believe PCW is correct about electrical noise. While the G540 is active the switch states bounce like crazy, I can even seem them blinking between triggered and untriggered in the Linuxcnc preview window while in the power off state. There is also some strangeness with the watchdog timer where the G540 will not recognize the timer when the power on button is pressed (and so stays in fault) but if I toggle the watchdog off and back on then it will recognize the signal and stay active until I power off Linuxcnc.

I can't really understand why this would be the case unless it has something to do with the 12v -> 5v conversion that's happening on the 7i75. I have used this G540 board successfully with 5V mechanical switches for years before now, using unshielded cable the same as they are now. I really hope I don't need to fish these out of my drag chains and buy new, expensive shielded cable :-\

I am unfortunately pretty far out of my depth, so hopefully some of you fine folks will have some ideas for me!

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

More
31 Dec 2022 23:30 #260682 by PCW
The G540 inputs will be more resistant to impulse noise than the 7I75 inputs
(these are direct high speed inputs to the FPGA), where the G540 input are
via optoisolators which will not pass high frequency signals like those generated
by the step motor wiring.

If you are using limit switches directly into the 7I75, you will likely need to either
shield the switch wiring better, add some capacitors across the 7I75 inputs, or
debounce the limit switch signals in hal

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

More
31 Dec 2022 23:46 #260683 by trainwreck
Replied by trainwreck on topic Joint on limit errors only when G540 is active
Thanks for the suggestions, I will try moving them to the G540 inputs and see if those help.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Dec 2022 23:54 #260685 by tommylight
Replied by tommylight on topic Joint on limit errors only when G540 is active
First check if one of the motor wires are somewhere somehow touching the sensor wires.
Then check the drive power supply for ripple, use a normal Volt Meter set to measure AC voltage and measure the DC output of the power supply.
Yes, Measure AC on a DC side of power supply.
If there is more than 0.5 to 1V of AC voltage on the DC side, change the supply, but try wiring the ground to the 0V first, see if that helps.

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

More
01 Jan 2023 02:03 #260692 by trainwreck
Replied by trainwreck on topic Joint on limit errors only when G540 is active
Progress! I have moved the sensors to the G540 inputs and that seems to have fully resolved the issues with noise. I can now start up Linuxcnc without joint errors.

I did check my power supply for ripple as suggested by Tommylight and measured it at ~3 millivolts. I was expecting it would be pretty good as I am using a power supply out of a Cisco Catalyst 6500. It is massive overkill, but it has all of the convenient voltages and I got a bunch of them for free so ¯\_(ツ)_/¯

I have 2 remaining problems, hopefully these are as easy to resolve.

1) the watchdog timer is still being flaky. I can reliably make it work by starting Linuxcnc with the switch off on the G540, then flipping it on. When I do that it seems to detect the signal and work properly where if I got the software e stop the G540 goes into fault as expected
2) gmoccapy is for some reason only showing joint mode, so I can't actually home and test my tandem Y axis.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum