KIM - I don't think I understand what bug you are seeing - can you please clarify?
Ilia - I'm guessing you want to implement some sort of automated table lock, which is the reason for your question. In any case, the answer would be to write a simple function to activate/deactivate an IO pin, and then insert the function in the appropriate place in the code. My goal right now with the current version of the code is to finalize it with respect to adding any new features, and just make bug fixes. However, I would consider publishing a second experimental version with the function you described if you can give me some additional detail on what you plan to do in terms of hardware. As I said, I am assuming that you want to make a particular hardware IO pin go HIGH after indexing and LOW before indexing (or vice versa) in order to activate a relay. I can write the necessary code, but I would need someone to test it.