I have a machine which has a homemade (not by me) circuit to connect an indexer table. I am trying to figure out several things:

1. Which M code activates the indexer program.

2. how to activate the different output bits on the 016D module, which is a A03B-0801-C117, for future development.

3. How to read an input, to allow the M code to complete and allow the Gcodes to continue after the indexer has finished.

I have set of manuals and have found several parameters which are related to M codes, like setting strobe delays and width, etc.

Is the output module memory mapped, ie do I just have to find the appropriate memory location to write the output bit?

The homemade circuit connects to Terminal 15 on the A03B-0801-C117, which I suppose is a good clue for reverse engineering.

Can someone point me in the right direction?