Been a while since I posted anything here. I am still working on this but things slowed through the holidays then I had some mechanical issues to resolve with the machine. But I am back on this now. Anyhow, here is my problem:
I have limit switches on each axis of travel. 1 switch also doubles as a home switch for each axis. Because I have too much I/O to report everything to EMC, I am using my card to watch the switches. This way I can report the "home" switches and throw an E-stop if any other limits are hit.
Now for the question: when the machine homes, it is set up to do 1 axis at a time, leaving the axis on the home switch. I need to be able to ignore the switch until homing is complete (i have that working) but also need to ignore them until the first time the axis moves off the switch. Does this make sense? I am sure this will need some flags, but I am at a loss as to how to do the checking without having a zillion IF's and so forth.
Any suggestions/questions?






Bookmarks