Anonymous - 2018-08-26

Originally created by: phenixrb

Hello everyone,
I start with using codesys for raspberry,
I want to use several mcp23s17 to extend the IO number of the pi.
I found the: FUNCTION_BLOCK MCP23S17_FB EXTENDS spi.
but I do not understand how to use this block.

could someone do like a tutorial step by step to explain how:

1-define the address of each integrated circuit.
2-Define the inputs and outputs for each circuit, and ideally be able to rename them.
3-recover the states of the inputs and outputs and be able to use them as global variable.

thank you for your help, I have not found any documentation on this block function.
neither on codesys or on the internet.
even in the program examples provided by codesys, you do not have access to the program lines to understand the operation.