what is the purpose of newest TDLY and RDLY functions?
Is not clear to me how to use them and what is the effect they do.
thanks for some hints.
Hi
See: https://torque-bhp.com/wiki/Equations (though it is still being written)
The TDLY and RDLY functions delay data being output by either a set time or a number of polling loops (Time Delay, Read Delay). The time delay will take in a value, and then delay it for a set time (say 10 seconds), then it is output
The RDLY function does the same as the time delay, but instead of a time base delay it uses a call based delay (so if you set it to 5, you will need to wait 5 times for the data to start to be output from that function)
Basically, both are simply delay lines, delaying data
thanks and sorry, I was nor aware about this wiki.
so these function introduces some delay one time based and the other on number of readings.
is it possible to make a function that enables the reading of the sensors only at a defined interval of time? (I mean at every 5, 10, 15 seconds), this should be useful to put low priority for some sensors that doesn't need to be updated very often.
+1 to the post above 🙂
A little up for these function, I have a question:
If I use this:
RDLY(100:A)
During the 100 loops the sensor is polled but the showing of result is skipped or the function makes the sensor not requested for 100 times?
I believe it is still reading values every
polling but the result is delayed before
it comes out of the queue.
Lets say I change an output and another
process variable reacts to the change with
a process lag. By delaying the output
change by the amount of process lag, I can
then graph the two variables together to see the
relative effect of the output change to the
other variable.
My two cents anyway.
Hi!
That's correct - The RDLY (Read Delay) function basically delays the read value for X polling loops, so if you read the sensor 100 times, and the sensor value started at 1, and started counting up, you'd get 99 0's then the 100'th should start at 1,2,3 (etc)
Similar for the TDLY (Time Delay) function, but that operates on time instead of the number of reads which is handy when you want to ignore various adapter/signalling read speeds
If the PID is not requested, then the function does not get called
Thanks for explaining to both. 😉
Is it possible to have a function that sets the polling reading speed or polling reading interval, I mean the possibility to set to read acspecific sensor with predefined interval of time?