PDA

View Full Version : VN command BUG? Limit Switch Override



dana_swift
07-18-2009, 02:45 PM
I am having a problem, the SB Command Ref manual shows the VN command as enabling and disabling the limit switches. Yet it appears to always be enabled even when I set VN,0

This appears to not work. I am driving the system to the lower X limit, then using the "ON INP" command to signal the arrival at the limit. That all works.

Then I use "VN,0" to disable the limit switches so the bot can back out of the limit. When I execute the move instruction it says "Limit switch hit". If I hit "resume" it will continue correctly.

How do I disable the limit switch functionality from a program? Is this a bug in the VN command?

Here is the exact code that exhibits the fault:

======= start of SBP file contents
SA 'Set program to absolute coordinate mode
MS,2.000,2.000 'Set move and plunge rate
JS,10.000,10.000 'Set jog rates
' ----------------------------------------------------------------
JZ,1.000 'Move to safe Z
ON INP(2,0) GOTO L16B

Gary Campbell
07-18-2009, 03:58 PM
Dana...
Disable the switch as a limit before you hit it. your "on input" command will still work just fine as a standard switch.

something like this:
VN,0
ON INP(2,0) GOTO L16B
etc....
Gary

dana_swift
07-18-2009, 04:36 PM
Thanks Gary, that does make it work, but the way I think, my version should have worked also. Since I disable the limit switches and THEN issue a move command it should not immediately go to the "limit switch hit" dialog. Obviously it does tho.

"An opinion on a fact is irrelevant"..

Nothing in the documentation would give any hint as to that little secret. I'm curious, how did you discover that trick?

Thanks

D

Gary Campbell
07-18-2009, 05:03 PM
Dana...
I would really like to go into an hour of technical dissertation on this, but cant. I copied the ZZero & XYzero syntax


IF you follow the code...it says:
when hit... go to
move...
(assume hit here)
turn off switch (which is already on)

looks out of order.
Gary