Waffel85
HW: ESP32 as standalone PLC

If I use the DS18B20_5_OUT block in the editor, how are the individual sensors assigned to the outputs? And is it possible to read the indexes of the individual sensors somewhere? Will the outputs remain assigned to the same sensors after a reboot?
What happens if the communication with the sensors fails? Does the PLC continue or does it stop and display an error? How can such a situation be diagnosed?
Thank you for your answer.

Text translated on deepl.com
Reply 0 0
thiagoralves
This block uses the Arduino DallasTemperature lib under the hood. This is exactly what the block does internally:
OneWire *oneWire;
DallasTemperature *sensors;
oneWire = new OneWire(pin);
sensors = new DallasTemperature(oneWire);
sensors->begin();
return sensors;

I believe (hope) that the DallasTemperature lib does a good job indexing the sensors by their internal IDs so that they will always come back on the same order every time. Apart from that, there is nothing OpenPLC can do as it receives the list of sensors straight from the lib.
Reply 0 0
Reply