Hello Guest it is March 28, 2024, 01:18:11 PM

Author Topic: Limit Switch activates on "ActivateSignal(Output2) "Command  (Read 6568 times)

0 Members and 1 Guest are viewing this topic.

Limit Switch activates on "ActivateSignal(Output2) "Command
« on: October 09, 2009, 11:42:50 AM »
When I run the following code and get to the DeActivateSignal(Output2) the Reset Button lights and the message says a limit switch has activated.  I am no where near a limit switch and no movement is occurring anyway.  My machine homes fine and the limit switches do stop an overtravel movement.  Even though this is a new setup, I have been able to cut parts without issue.  This is the 1st time I am trying to use the Activate Deactivate commands.

ActivateSignal(Output2)
Sleep(500)
DeActivateSignal(Output2) 'When it gets to this point the reset activates.
Sleep(500)
ActivateSignal(Output2)
Sleep(500)
DeActivateSignal(Output2)
Sleep(500)
ActivateSignal(Output2)
Sleep(500)
DeActivateSignal(Output2)
Sleep(500)
ActivateSignal(Output2)
Sleep(500)
DeActivateSignal(Output2)
Sleep(500)
Message "ALMOST DONE"
While IsMoving()
Sleep 100
Wend
Message "NOW WE ARE DONE"

I am using the VB editor and both running and stepping through the code.  Same result.   Any ideas why this would be happening and more importantly how to fix it.

Thanks
Haze

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #1 on: October 09, 2009, 01:29:12 PM »
What do you have connected to OutPut 2? Sounds like whatever it is could be causing noise which is being seen by Mach on the limits.

Hood
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #2 on: October 09, 2009, 01:35:00 PM »
I have a 12V solenoid actuated air valve attached to OutPut 2.  To fix this do I need to shield the cables?  Which would be better to shield: The source (line for the output) or the receiver (X,Y,Z limit switch cables)?

Haze

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #3 on: October 09, 2009, 01:38:28 PM »
Limit switch wires should in my opinion always be shielded if  they are using 5v and it certainly does no harm in also shielding outputs as well. You may get away with just increasing the debounce interval on the general configs page but really that is just masking the problem and its better to cure it.

Hood
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #4 on: October 09, 2009, 01:46:48 PM »
The limit switches are Nais UCP141 and the spec on the limit switches are 12 to 24 volts ±10%.  I am using the 12v signal from one of the yellow wires in the computer case to power them.  Can I shield them all together as exit the control or do they all need to be shielded separately?

Haze

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #5 on: October 09, 2009, 01:53:24 PM »
How are you getting the signal to Mach? Do you have a BOB with 12v inputs that the limits are connected to or are you converting some other way?
The 12v wires should not be nearly so prone to noise as 5v ones would be.
Hood
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #6 on: October 09, 2009, 02:01:21 PM »
I am using the Gecko 540 drive (http://www.geckodrive.com/upload/G540%20REV3%20MANUAL.pdf).  The limit switch's are connected to terminals 1 - 3 and the output is connected to terminal 6.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #7 on: October 09, 2009, 02:12:25 PM »
I  am not following how you have your switches wired, did a google for Nais UCP141 but came up a blank. The Gecko drawing shows that you connect  the switches to 1, 2 and 3 and ground via pin 12, should only be 5v on them.
 Hood
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #8 on: October 09, 2009, 02:54:27 PM »
I attached the file for the prox sensor.  It is a three wire switch.  One wire connects to the terminal on the 504, one wire connects to the ground of the power supply and the other attaches to the +12V PS (which is a transformer I added to the control not the +12V from the computer like I previously stated).  The 12V solenoid attaches to the same ground, could this be the issue?  I did not see where the 540 inputs were limited to 5 volts.

Haze

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Limit Switch activates on "ActivateSignal(Output2) "Command
« Reply #9 on: October 09, 2009, 02:58:20 PM »
Ok didnt realise they were prox switches. Your wire that goes to the pins on the 504 and also the one that goes to 0V of the PSU only have 5v on them so you want to shield them.

Hood

Edit just got the prox spec downloaded and to be honest I am not the best with electronics so not sure exactly how they work. The Gecko is however from the specs meant to be connected to Gnd from the Inputs via a normal switch.
« Last Edit: October 09, 2009, 03:10:43 PM by Hood »