Well, I have been using the Focuser 2 (GPIOA) from the beginning for the stepper that drives the focuser. For some reason, here the Output-pins 4-7 are powered.
Not sure where the pin base is set to 4, instead of 0, i.e. whether output 7 actually corresponds to MCP27s13-pin 28 (GPA7) or whether the sequence is twisted upside-down, i.e. output pin 7 is MCP23s17-pin 21 (GPA0), and 6 is pin 22 (GPA1) etc.? (See also schematics for PiFace digital).
For the filterwheel I wanted to use the Focuser 1 (which is assigned to GPIOB). Here the driver relates to the inputs 0-3, but that is not working. So question is, whether both focusers could be assigned to GPIOA, one to the Pins 0-3, the other (as is) to pins 4-7?
The below command from the library PiFace-focuser.cpp ( indiPiFaceFocuser2) refers to GPIOA, but could not get my head around, where the assignment to pin 4-7 comes from - would be really curious to understand:
mcp23s17_write_reg(payload, GPIOA, 0, mcp23s17_fd);
Could it just be a matter of transponing the stepstates for example like this:
int step_states[8] = {0xa, 0x2, 0x6, 0x4, 0x5, 0x1, 0x9, 0x8};
into ... = {0xa0, 0x20, 0x60, 0,40, 0x50, 0x10, 0x90, 0x80};
I.e. to change the bits from e.g. from 1010 to 10100000 thus accessing the pins further "to the right" on the PiFace board.
...providing both steppers are not run at the same time.