02-27-2026, 04:21 PM
Hi Petr, Thanks for your advice.
And... you're right, that ON TIMER would mess up your carefully timed routine.
So I stopped using the ON TIMER (nonsense in this case...).
So what did I do?
- I defined a global variable PT100start% At the start, I set PT100start% = TRUE
- I named your main routine PT100Read.
I placed your startup or initiation routines between IF THEN END IF statements.
- If the startup routines AND after an initial read test of the PT100 sensors return no errors:
Only then will PT100start% = FALSE From this point on, the next time your routine is called, only the reading of the PT100 sensors will be performed.
OK, so far...
Yesterday I ran the above 50-60 times (also to clean up some minor bugs in my software).
AND: Your routine didn't fail a single time!
Congratulations on your wonderful piece of software!!!
I launched the program until I had to heat up the brewing kettle.
(With the USB relay, I trick the PC into thinking a brewing system is connected.)
Result: The PC switches on the induction hob (via the USB relay).
Then my subroutine checks... Temperature too high or too low, then switches the induction hob OFF or ON.
I could clearly see that the reading speed (of the PT100 sensors) was 100% controlled by your routine (POLHz...).
(because the powerled on the MODBUSboard "blinks" every time the module reads the sensors.)
I'll do some more testing in the coming days, and if it continues to work without bugs,
I'll publish your routine with my (minor) changes here on the forum.
All in all... I'm truly grateful to you; without your knowledge,
I couldn't have achieved this.
Thank you, Rudy M
And... you're right, that ON TIMER would mess up your carefully timed routine.
So I stopped using the ON TIMER (nonsense in this case...).
So what did I do?
- I defined a global variable PT100start% At the start, I set PT100start% = TRUE
- I named your main routine PT100Read.
I placed your startup or initiation routines between IF THEN END IF statements.
- If the startup routines AND after an initial read test of the PT100 sensors return no errors:
Only then will PT100start% = FALSE From this point on, the next time your routine is called, only the reading of the PT100 sensors will be performed.
OK, so far...
Yesterday I ran the above 50-60 times (also to clean up some minor bugs in my software).
AND: Your routine didn't fail a single time!
Congratulations on your wonderful piece of software!!!
I launched the program until I had to heat up the brewing kettle.
(With the USB relay, I trick the PC into thinking a brewing system is connected.)
Result: The PC switches on the induction hob (via the USB relay).
Then my subroutine checks... Temperature too high or too low, then switches the induction hob OFF or ON.
I could clearly see that the reading speed (of the PT100 sensors) was 100% controlled by your routine (POLHz...).
(because the powerled on the MODBUSboard "blinks" every time the module reads the sensors.)
I'll do some more testing in the coming days, and if it continues to work without bugs,
I'll publish your routine with my (minor) changes here on the forum.
All in all... I'm truly grateful to you; without your knowledge,
I couldn't have achieved this.
Thank you, Rudy M

