Hi,
I wouldn't be discouraged I think you are almost there. Grounding and noise can be one of the most complex and difficult things in electronics.
even went so far as to run a ground wire to IO6 directly just to make sure there was no software glitch tripping my Limit and throwing "Pos/Neg Limit Axis Disabled" up on my console screen. Grounding the pin outright seemed to be the only way avoid disabling my axis
That pretty much proves you have noise in your wiring to IO6.
I don't think my ILQ74 optocoupler acts like an open collector
I think they are.
My switches are normally closed. When the voltage on the switch side of the opto goes from 12v to 0v (open switch) the voltage on the Kflop side goes from 0.08v to 3.8v. It reverses the signal.
That makes perfect sense. When you remove 12V from the LED side the phototransistor turns off (goes open) so your pull up resistor pulls the signal up to 3.8V.
Note KFLOP can be configured for limits with either polarity. In the above case do not set the "Stop when low" option.
I need to do the opposite and bring that 0.08v float down to straight 0v (or Ground).
wrong
This 0.08v resting voltage is the only thing I see that could still be a reason this Limit get's tripped.
No, there is likely noise that you can't see without an oscilloscope.
On the Kmotion Digital IO screen it seems like the switches are well behaved. There is no flickering at all in the State Check box when I'm Low (0.08v) or High (3.8v) on IO6
Noise glitches are usually very narrow pulses. The Digital IO Screen only samples the inputs several times per second. The chances you see anything on the Screen is very small. Where as the KFLOP Axis continuously samples the limits every 90us.
btw here is a little program you can test to see if the signal ever goes high. It runs and watches the input and if it ever is seen high prints a message and terminates.
Code:
#include "KMotionDef.h"
// Simple check for Glitch on Input Pin
main()
{
while (!ReadBit(6)) ; // tight loop while input is low
printf("Input was high!!\n");
}
KFLOP inputs are standard 3.3V LVTTL signals. Anything below 0.8V is guaranteed to be read as a low signal. Signals are therefore driven below 0.4V to have some margin. 0.08V is a good low level, if there aren't any spikes going above 0.8V
Is there a way to change that threshold in software?
no
Most likely the wiring between the opto coupler and KFLOP is picking up noise. How long is it? More than several inches? Is it shielded? Where is the pull up resistor?
Another solution might be to add a filter capacitor (0.1 to 0.001uF Ceramic) on IO6 to GND located very close to KFLOP. This would stop any noise glitches from entering KFLOP. Something similar to this (but different connector/pins in your case)
Attachment 466728
HTH