owWriteData (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 write data to the 1-Wire net, a device must first have been selected with owAccess. If the lock has not been acquired, no data will be transmitted.

See also owWrite and owWriteBit.

 

 

Input:

data : PTR

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

 

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

Number of bytes/bits to read.

 

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

If true, then each byte is sent as a single bit, where the value "0" is sent as a "0" and any other value is sent as a "1".

 

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"