spi (FB)ΒΆ
FUNCTION_BLOCK spi
This function block is the base class for SPI devices controlled via the SPI device /dev/spidev0.0.
It is meant to be extended by other function blocks that overload the body and the following methods/properties and replace it with their specific implementation,
always including a call of the base implementation with super^.<MethodName>() :
- body (general handling, start-up) 
- AfterReadInputs (reading input data) 
- BeforeWriteOutputs (writing output data) 
- Initialize [optional] (used to read parameters from the configuration) 
- Operational [optional] (used to signal the status of the device) 
The body of this FB is called by the methods AfterReadInputs and BeforeWriteOutputs, where _xAfterReadInputs indicates the caller.
Use _iState to control your statemachine. A value of 10 by default indicates that the device is operational.
Do not forget to call the base implementation with super^(), where the diagnosis indicators are set according to the Operational property.
Properties:
Methods:
Structure: