owGetID (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 return the ROM ID number of a known device previously found with owSearchX, owSearch, or owiButtonGetID.

 

Input:

family        : INT [0..255] (default 0)

Family code of the device.
0 = Any family code. The device count will ignore family code and will represent the raw order of found devices with the lowest family first.

 

device        : INT [1..50] (default 1)

Device number within the applied family.
1 = This will give the first device within family if present. When <family> is 0, the device count continues across family codes.

 

Returns: STRING

A string containing the ID of the device if present or an empty string if not.

 

Declaration:

FUNCTION owGetID : STRING;
VAR_INPUT
  family   : INT := 16#00;
  device   : INT := 1;
END_VAR;

 

 


Example:

 

Please see the "Examples - Generic OneWire Example"