Extremely confused - Nonworking limit switches

More
29 Sep 2025 03:16 - 29 Sep 2025 03:36 #335531 by ffffrf
This is my second linuxcnc machine I am in the process of building (First one was a C axis lathe). This is a very simple 3 axis mill and I am running into some sort of issue with the limit switches that I cannot for the life of my figure out.

Here are the facts

1. Wiring is all the same as my first machine, using a mesa 7i96s (same as prev machine as well)
2. I set my input 0 as my X min limit (although have tried home/min, max, home/max) have also tried inverted and non-inverted
3. When I get to my X motor test/tune page, I go to my halmeter and I PROBE GPIO-000 AND input-00 BOTH of them correctly change states when I press the limit switch, indicating it seems to be working correctly.
4. HOWEVER, when I open the actual machine program (am using gmocappy) the limit switch no longer works / does not change state - neither gpio-000 nor input-00 change state. If it is inverted in pncconf it will show the switch as always active and thus I cant turn on the machine, and if it is non-inverted, the limit switch simply does nothing.

I am utterly confused, it is the same code as the other machine, I must be doing something stupid but I am not seeing what that is. I will upload my hal/ini, can someone please help? Like I said I have tried setting it as all sorts of limits and homing and whatnot, and have tried inverted / non-inverted.

I am so so confused....


edit: just as an FYI - the actual axis motors move correctly, so I don't think its something like the mesa is not being communicated with in the real instance of the software
edit2: could it have something to do with the fact that i am using the same computer for both machines? (I unplug one mesa board and plug in the other when i want to run the 2nd machine)
 
Attachments:
Last edit: 29 Sep 2025 03:36 by ffffrf.

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

More
29 Sep 2025 12:34 - 29 Sep 2025 14:18 #335542 by langdons
Replied by langdons on topic Extremely confused - Nonworking limit switches
Try creating a new config in PNCConf; try using the AXIS GUI, it's really stable and reliable.

"min limit" = "home"?

Try setting them as home switches.

Remember, AXIS is the default GUI for a reason.
Last edit: 29 Sep 2025 14:18 by langdons. Reason: Removed idiotic garbage.

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

More
29 Sep 2025 13:55 #335546 by jjdege
Sorry, there are no pins connected to the Mesa IOs.
net min-home-x     =>  joint.0.home-sw-in
net min-home-x     =>  joint.0.neg-lim-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Sep 2025 15:12 #335551 by tommylight
Replied by tommylight on topic Extremely confused - Nonworking limit switches

Sorry, there are no pins connected to the Mesa IOs.

Yes there is a pin, it is way up in his hal file
# --- MIN-HOME-X ---
net min-home-x     <=  hm2_7i96s.0.inm.00.input-00-not
The following user(s) said Thank You: jjdege

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

More
29 Sep 2025 15:23 #335552 by jjdege
I'm sorry, I missed it :-(
The following user(s) said Thank You: tommylight

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Sep 2025 15:50 #335553 by tommylight
Replied by tommylight on topic Extremely confused - Nonworking limit switches
No worries, we all miss things and mess up.
Thank you for helping.
The following user(s) said Thank You: jjdege

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

More
29 Sep 2025 21:45 - 29 Sep 2025 23:08 #335572 by ffffrf
I think my original reply did not save - these did not work unfortunately

I remade from scratch a pncconf with axis gui. again in pncconf I am seeing the GPIO-000 pin and input-00 correctly change state when i press the limit switch. Similarly I see on the board the LED light of input-00 change state

However, when I run the actual axis instance, and use hal meter to view gpio.000 or input-00 neither change state anymore, HOWEVER, the led light on the board continues to change states correctly.

I am at an utter loss. It almost seems like the input side of mesa is not communicating when I am running the software, but I do not understand how that is possible. Do you have any other thoughts? I am at a complete loss

EDIT: I have an important clue I discovered: If I open my first machine's instance of linuxcnc, and go into hal config, then I am able to see my limit switch activate successfully. I believe this means there is some issue with having two of my mesa's on this computer even though I only have one plugged in at a time. Has anyone encountered this and know of a fix? I will purchase a new computer most likely regardless but I am still hoping to figure this out while I wait.

EDIT2: I am trying to change the ip address of this second mesa to 10.10.10.11 ( I have w4 and w5 set to eeprom). It says it changed successfully, but when I try to readhmid it says no board found, and I can no longer communicate with the board. So trying to fix this now... (when I do ping 10.10.10.11 it does ping successfully)

Edit3: I have successfully changed the IP address to 10.10.10.11 and connected it back to my computer and it STILL only works in pncconf but NOT when i run my linuxcnc!!!!!
Last edit: 29 Sep 2025 23:08 by ffffrf.

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

More
29 Sep 2025 23:12 #335582 by PCW
Edit3: I have successfully changed the IP address to 10.10.10.11 and connected it back to my computer and it STILL only works in pncconf but NOT when i run my linuxcnc!!!!!

What is the host IP address set to?

The command:

ip a

will report this.

Also note that when you change the 7I96S EEPROM IP address, you must power cycle the card
or issue a reset command before the new EEPROM information is applied.
 

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

More
29 Sep 2025 23:33 - 30 Sep 2025 00:20 #335584 by ffffrf
I do power cycle the card each time, this is what it outputs with ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 34:17:eb:c5:16:36 brd ff:ff:ff:ff:ff:ff
altname enp0s25
inet 10.10.10.1/24 scope global eno1
valid_lft forever preferred_lft forever


Keep in mind after using mesa flash to change my card's ip to 10.10.10.11, I can ping it but linuxcnc wont connect to it until I do:

sudo ip addr flush dev eno1
sudo ip addr add 10.10.10.1/24 dev eno1
sudo ip link set eno1 up
sudo ip neigh flush dev eno1

ping -c2 10.10.10.10
mesaflash --device 7i96s --addr 10.10.10.10 --readhmid

and if i restart my computer I have to redo that code, but I imagine I just need to set it as permanent, but nontheless it does not fix my issue even when linuxcnc and pncconf can communicate with the board on its new ip address


EDIT:  when I run a temporary hal instance via 
halrun
loadrt hostmot2
loadrt hm2_eth board_ip=10.10.10.11
loadrt threads name1=servo-thread period1=1000000
addf hm2_7i96s.0.read  servo-thread
addf hm2_7i96s.0.write servo-thread
start

and use getp to get the value of the pin, the limit switch DOES work

 
Last edit: 30 Sep 2025 00:20 by ffffrf.

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

More
30 Sep 2025 00:26 - 30 Sep 2025 00:28 #335587 by PCW
So LinuxCNC setup (2.9.4) with 7i96S initially set at IP address 10.10.10.10:

mesaflash --device  7i96s --addr 10.10.10.10 --readhmid
(works)
LinuxCNC with 10.10.10.10 IP address works and inputs work
mesaflash --device  7i96s --addr 10.10.10.10 --set ip=10.10.10.11
mesaflash --device  7i96s --addr 10.10.10.10 --reset
mesaflash --device  7i96s --addr 10.10.10.11 --readhmid
(works)
LinuxCNC with 10.10.10.11 IP address works and inputs work
mesaflash --device  7i96s --addr 10.10.10.11 --set ip=10.10.10.10
mesaflash --device  7i96s --addr 10.10.10.11 --reset
mesaflash --device  7i96s --addr 10.10.10.10 --readhmid
(works)
LinuxCNC with 10.10.10.10 IP address works and inputs work

Did nothing else (never ran ip command at all)


 
Last edit: 30 Sep 2025 00:28 by PCW.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum