IEC 61131-3 C Tools User Manual


Add to my manuals
501 Pages

advertisement

IEC 61131-3 C Tools User Manual | Manualzz

IEC 61131-3 C Tools Function Specifications

ioBusSelectForRead

Select I

2

C Slave Device for Reading

Syntax

#include <ctools.h> unsigned ioBusSelectForRead(unsigned char address);

Description

The ioBusSelectForRead function selects an I

2

C slave device for reading. It writes the slave device address with the read/write bit set to the read state. The function handles the formatting of the address byte.

The function has one parameter, the address of the device. It returns TRUE if the write succeeded, that is the byte was acknowledged by the slave. It returns

FALSE if the write was unsuccessful, that is the byte was not acknowledged by the slave.

Notes

This function can only be used immediately after a START condition, e.g.

ioBusStart.

The IO_SYSTEM resource needs to be requested before calling this function.

See Also

ioBusStart, ioBusStop, ioBusReadByte, ioBusReadLastByte,

ioBusReadMessage, ioBusSelectForWrite, ioBusWriteByte,

ioBusWriteMessage

Example

See example for ioBusReadByte.

Document (Version 2.50) 5/12/2011 264 264

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents