MCP23S17_FB (FB) ¶ FUNCTION_BLOCK MCP23S17_FB EXTENDS spi InOut: Scope Name Type Input byOutputsA WORD byOutputsB WORD Output auiValue ARRAY [0..7] OF UINT byInputsA BYTE byInputsB BYTE _byGPIOSelectInputA BYTE _byGPIOSelectInputB BYTE _byGPIOPullupA BYTE _byGPIOPullupB BYTE Methods: AfterReadInputs BeforeWriteOutputs Initialize read8 write8 writeBit Structure: basic-readwrite-commands read8 (Method) write8 (Method) writeBit (Method) connector AfterReadInputs (Method) BeforeWriteOutputs (Method) Initialize (Method)
basic read/write commands ¶ read8 (Method) write8 (Method) writeBit (Method)
MCP23S17_FB.read8 (METH) ¶ METHOD read8 : BYTE This method is used to read the data byte of one port using the following protocol: Byte0: 16#41 + hardware address Byte1: Port Byte2: 16#FF return value: data content InOut: Scope Name Type Comment Return read8 BYTE Input byHardwareAddress BYTE (0..7) hardware address byPort BYTE port number to read
MCP23S17_FB.write8 (METH) ¶ METHOD write8 : BOOL This method is used to write a data byte into a port using the following protocol: Byte0: 16#41 + hardware address Byte1: Port Byte2: Value return value: TRUE if successful InOut: Scope Name Type Comment Return write8 BOOL Input byHardwareAddress BYTE (0..7) hardware address byPort BYTE port number to read byValue BYTE value to write
MCP23S17_FB.writeBit (METH) ¶ METHOD writeBit : BOOL This method is used to modify one bit of a certain register: It first reads the register, modifies the bit and then writes the register (no matter if the bit already had the desired value) return value: TRUE if successful InOut: Scope Name Type Comment Return writeBit BOOL Input byHardwareAddress BYTE (0..7) hardware address byPort BYTE port number to read byBit BYTE (0..7) bit number to read/write xValue BOOL value to write
connector ¶ AfterReadInputs (Method) BeforeWriteOutputs (Method) Initialize (Method)
MCP23S17_FB.AfterReadInputs (METH) ¶ METHOD AfterReadInputs : INT InOut: Scope Name Type Return AfterReadInputs INT
MCP23S17_FB.BeforeWriteOutputs (METH) ¶ METHOD BeforeWriteOutputs : INT InOut: Scope Name Type Return BeforeWriteOutputs INT
MCP23S17_FB.Initialize (METH) ¶ METHOD Initialize : UDINT InOut: Scope Name Type Return Initialize UDINT Input wModuleType UINT dwInstance UDINT pConnector POINTER TO IoConfigConnector
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 25.10.2023, 14:08:38 companyName string 3S-Smart Software Solutions GmbH libraryFile Raspberry SPI MCP23S17.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile Raspberry SPI MCP23S17.clean.json version version 2.0.0.0 ProjectInformation Released bool True LastModificationDateTime date 25.10.2023, 14:08:36 LibraryCategories library-category-list Target Author string 3S - Smart Software Solutions GmbH Company 3S - Smart Software Solutions GmbH CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 DefaultNamespace MCP23S17_Lib Description See: Description Placeholder SPI MCP23S17 Project Raspberry SPI MCP23S17 Title Raspberry SPI MCP23S17 Version version 4.10.0.0