I2C_open block

Short summary

Name

I2C_open

→POU type

→function

Category

more system blocks, blocks for I2C elements, block with internal error diagnostic

Graphical interface

images/download/thumbnails/414780059/I2C_open-version-1-modificationdate-1534490784957-api-v2.png

Available since

version 1.13.0 (for logi.CAD 3) and version 2.3.901 of logi.RTS
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg This block is supported for →Raspberry Pi only.

Functionality

The block initializes a device file of the Linux "i2c-dev" driver for I/O operation.

For more information on the die "i2c-dev" Modules see for example: https://www.kernel.org/doc/Documentation/i2c/dev-interface

Inputs, return value


Identifier

→Data type

Description

Inputs:

bus_id

INT

the ID of the →I2C bus (0 = /dev/i2c-0, 1 = /dev/i2c-1, etc.)

Return value:

DINT

returns the file descriptor for subsequent I2C I/O operations

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Internal error diagnostic for block

See "System_open block".

Example for usage within ST-editor

At present, there is no example.

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.