Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: havery 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
-
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
-
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
-
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
-
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
-
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
-
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.
-
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
-
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
-
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.