Read a value from I2C device.

Hint: The three first levels of the I2C Fieldbus Configurations must be declared. This includes the module ID too.

Inputs

Parameter

Data type

Description

EN

BOOL

Enables the function block.

TRUE to start reading.

ID

UINT

ID is defined in the fieldbus configurator.

LEN

UINT

Length of data in bytes to be read.

Hint: DATA[] can be for example a 10 dimensions array. If you want to read only 2 bytes, set LEN to 2.

DATA[]

USINT[]

Array to receive data.

Outputs

Parameter

Data type

Description

Q

DINT

Size readed or -1 if error.

FBD Language

Fixed_Image


Created with the Personal Edition of HelpNDoc: Say Goodbye to Documentation Headaches with a Help Authoring Tool