News:

  • October 26, 2025, 07:55:59 PM

Login with username, password and session length

Author Topic: unwanted input signal on limit switch release. please help  (Read 17982 times)

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
unwanted input signal on limit switch release. please help
« on: April 24, 2012, 06:49:50 PM »
Hi all,
i have my CTRIO connected using quadrature counting mode. i have a limit switch that runs along the top of a board and the ctrio operates a router in and out to process the edge of the board. when the the limit switch hits the board i count 500 pulses then operate the CTRIO output for 10000 pulses, then release. the problem i am having is that when the limit switch reaches the end of the board and deactivates, the CTRIO sometimes receives a false input on release of the limit switch. if i manual connect direct to the input on the CTRIO i get the same thing unless i  press and release the wire within a second, then everything works fine.
is there a solution?
« Last Edit: April 25, 2012, 10:06:51 AM by ArmstrongPLC »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: unwanted input signal on limit switch release. please help
« Reply #1 on: April 25, 2012, 10:32:22 AM »
This sounds like you need to debounce your limit switch with an RC circuit.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
Re: unwanted input signal on limit switch release. please help
« Reply #2 on: April 25, 2012, 11:40:25 AM »
would you have a suggestion as to the size of capacitor/resistor to use in this RC circuit?
i was thinking 1 cer cap across 2c 2m and 1k resistor between 2c and limit switch.
« Last Edit: April 25, 2012, 12:05:12 PM by ArmstrongPLC »

Tim

  • Hosties
  • Newbie
  • *****
  • Posts: 9
Re: unwanted input signal on limit switch release. please help
« Reply #3 on: April 25, 2012, 03:52:01 PM »
The connections you mention will form a low pass filter.  The 1k resistor could drop as much as 12V at the CTRIO maximum input current of 12mA, so be sure your power supply is at least 21VDC.  The value of the cap will set the time constant, so 1uF would set a 1ms time constant.  That seems like a good place to start.  If you still have the issue, try increasing the cap size.

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: unwanted input signal on limit switch release. please help
« Reply #4 on: April 26, 2012, 06:14:45 AM »
Just wondering. Obvious you have a plc since you have the ctrio. Ever thought of running the limit switch to the plc input and doing rungs to cancel out the bounce problem? You can use a plc output to trigger your ctrio. I always run switches to my plc, use a one-shot or timer or something to condition the signal. Not sure this would cause a time delay so that is why you are directly running the switch to the ctrio.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: unwanted input signal on limit switch release. please help
« Reply #5 on: April 26, 2012, 07:36:26 AM »
If I understand this correctly, the problem is the limit switch is appearing to open early?  Is this a NO switch?

rgbarr

  • Newbie
  • *
  • Posts: 9
Re: unwanted input signal on limit switch release. please help
« Reply #6 on: April 26, 2012, 07:55:10 AM »
You may want to consider an optical switch to detect the edge of the board - that would eliminate having to deal with contact bounce.

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
Re: unwanted input signal on limit switch release. please help
« Reply #7 on: April 26, 2012, 10:13:29 AM »
PLCGuy; I get a varying delay when i run the limit switch through the PLC.

ATU; The switch is NO. When it closes it produces the required signal, but when it opens, it produces a second unwanted signal.

rgbarr; i am considering a capacitive proximity switch instead of an optical switch because of the sawdust contamination of the lens. not sure how accurate these things are at consistently sensing the edge of a board.

Tim; i have installed a 1uf cap across 2c,2m. this seems to have corrected the problem during testing. The machine will run all day today, hopefully no more problems.

Thanks for all your help. greatly appreciated.
« Last Edit: April 26, 2012, 01:49:24 PM by ArmstrongPLC »

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: unwanted input signal on limit switch release. please help
« Reply #8 on: April 26, 2012, 02:07:46 PM »
Its odd that the double bounce is happening when the switch opens. Could be noise that is present all the time. When the switch is closed, the signal is above the threshold that would cause a problem and when the input is off, its a floating antenna.  Did you use shielded cable out to the switch? Wires near your saw motor?

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
Re: unwanted input signal on limit switch release. please help
« Reply #9 on: April 26, 2012, 05:03:26 PM »
am using shielded cable to switch. although entire plc bank is located aprox 12" from ac power transformer. this was an existing system that i have upgraded. There is not much room in the control panel to relocate.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: unwanted input signal on limit switch release. please help
« Reply #10 on: April 27, 2012, 12:05:50 AM »
If the filter cap doesn't solve the problem, you could try something that worked for us.  We use the CTRIO module inside servo based molding equipment. Never had a problem until we kept getting false home signals on one particular press. Everything was shielded and we had done this on at least 20 other installations without a problem. We even rewired the entire harness, but the problem persisted.   We found out that the module requires 5ma for the input to come on or 9V across the input to ground. Thus the internal resistance is about 1800 ohms. We added a 2.2k resistor on the input of the module for the home sensor circuit. This raised the threshold voltage to the module to about 20V. Any voltages induced by noise were not high enough to trigger the input. After that the glitches on the input stopped and the system worked as it should without any added filter delays.

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
Re: unwanted input signal on limit switch release. please help
« Reply #11 on: April 30, 2012, 03:00:46 PM »
still occasional false signal on input. i am going to try out a 2.2k resistor across the input.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: unwanted input signal on limit switch release. please help
« Reply #12 on: April 30, 2012, 04:57:16 PM »
ATU, did you mean in parallel or series with the input?  I read you to mean in series, but sounds like the other poster thought you meant parallel, to increase the load.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

ArmstrongPLC

  • Newbie
  • *
  • Posts: 8
Re: unwanted input signal on limit switch release. please help
« Reply #13 on: May 01, 2012, 10:45:38 AM »
i am thinking across the input, parallel. is that what you meant ATU?

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: unwanted input signal on limit switch release. please help
« Reply #14 on: May 01, 2012, 10:51:37 AM »
Put the resistor in series, directly on the input.