opto-coupler: transistor vs logic

Grumpy_Mike:

I'm showing the circuit using the normally-closed terminal.

@Runaway Pancake
Been telling him that for ages but he keeps on ignoring it.

I wasn't ignoring it, I appreciate all the feedback. I did do some testing with normally closed switch - actually I just closed the limit switch to see if that made any difference with the noise I saw on the scope. Unfortunately, I didn't see any difference. I thought I posted that on the forum, but apparently I didn't.