owReadData (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 data from the 1-Wire net. A device must first have been selected with owAccess. If the lock has not been acquired, all data will be read as if the device has been removed from the 1-Wire net.

See also owRead and owReadBit.

 

 

Input:

data : PTR

Address of the memory block that holds the data to be stored.

 

size  : INT [1..32767] (default 0)

Number of bytes/bits to read.

 

bitmode  : BOOL [TRUE, FALSE] (default FALSE)

If true, each bit received is stored as a byte.

 

Returns: INT

0


Successful.

-1


1-Wire not supported on target.

-5


Missing pointer to data.

 

Declaration:

FUNCTION owReadData : INT;
VAR_INPUT
  data     : PTR;
  size     : INT := 0;
  bitmode : BOOL := FALSE;
END_VAR

 


Example:

 

Please see the "Examples - Generic OneWire Example"