Hello,
Glad you have got on well with the new one wire components.
The OneWire ScanBus macro looks at all the devices on the bus in that instant and makes a log of all devices. The maximum number that can be logged is specified by the OneWire component.
The OneWire ScanBus macro is automatically called for you as part of the DS18B20 initialise. If devices are being hot plugged and unplugged then you can refresh the log at any time by calling the OneWire ScanBus macro.
The DS18B20 AddressNextDevice macro looks for the next matching DS18B20 device in the log. If there is only one device then it will address the same device, if there are multiple devices then it will address each device in turn. The downside with this is if you have multiple sensors connected then you don't know which sensor is which without recording the ID. GetSerialString macro returns the ID as a string so you can print to a LCD etc.
The DS18B20 AddressSpecificDevice macro bypasses the log and allows you to specify a device ID ensuring you are communicating with a known specific device. The downside to this is you need to know the device ID ahead of time.
In your program in say the Input macro there are a few macro calls that are unnessisary.
SampleAllDevices will make all the connected DS18B20 devices do a temperature conversion together at the same time. You can then use the AddressSpecificDevice and GetTemperature macros to address the device and read the result of the temperature conversion. This will be much faster and will yield synchronised samples for all devices.
Or you can do a conversion at a time on each device by using AddressSpecificDevice then SampleAddressedDevice and GetTemperature macros.
At the moment you seem to be doing a bit of both. I have made a few minor changes to your program here.
Hope this makes sense.