Hello Guest it is January 28, 2020, 08:09:45 AM

Author Topic: Use SystemWaitFor / IsActive ? And what about negative ToolLengthOffset ?  (Read 1774 times)

0 Members and 1 Guest are viewing this topic.

Dear All.

I'm fairly new to this VB, but getting the hang of it.

Now I need to do an axis move until an (oem)input becomes active
On the net I found 2 commands "SystemWaitFor()" and "IsActive()" now which one to use correctly ?

Was thinking of making a While-loop with the "IsActive" ?

2) In the documentation I found that the ToolLength "SetToolParam(toolnum,2,yy) where yy must be a positive value ?
Is this true ? or can I use negative values also ?

Best Regards, Bo Andersen.

Offline BR549

  •  6,925 6,925
    • View Profile
I don't think that is going to happen. Once a move has started the ONLY thing you can do is feedhold or STOP. The feedhold will NOT be imediate and the stop while imidiate will loss position because all it does is shut off the pulses to the drive so basically anything in the buffer is lost.

NOW that said it IS possible to do a commanded stop from an input. You would USE the G31 call for motion and teh trip signal would cause it to stop as fast as possible and NOT loose position. The limitaion of the G31 is that you can ONLY do straightline moves in XY or Z. NO arcs.

Hope that helps, (;-) TP
Thank you for your quick reply.

And sorry for my poor explanation previous:

I want to move to a position, stop movement, and THEN check via input if we are in position ?
It's for an ATC, that, picks up the tool holder, moves to a inductive sensor, stop, check that there is in fact a tool in the spindle before continuing.

Any comment in the negative tool length offset ?

Best Regards, Bo.

Offline BR549

  •  6,925 6,925
    • View Profile
AH ok , A simple while / input  = false  Wend  loop  will work. I would just plan a timed escape sequence in the script to allow you to escape from the endless LOOP in the event something went wrong and you needed to abort the ATC function. OTHERWISE you will be stuck in that endless loop.

I do not see any problem with a negative value for the tool length offset. Just test it to make sure.  Not everything in the manuals is correct. 

(;-) TP