owRead (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All devices with 1-Wire

Firmware version:

2.80 / 1.00.00


This function will read a single byte from the 1-Wire net. A device must first have been selected with owAccess. If not, then data will be received as 16#FF as if connection to the device has been lost.

 

 

Input:

None.

 

Output:

data : SINT

Data received.

 

Returns: INT

0


Successful.

-1


1-Wire not supported on target.

 

Declaration:

FUNCTION owRead : INT;
VAR_INPUT
  data : ACCESS SINT;
END_VAR

 


Example:

 

Please see the "Examples - Generic OneWire Example"