08-13-2025 02:17 PM
@altenbach wrote:
@Yamaeda wrote:
If you add a U8 to a I32, to you explicitly convert the U8 first? 😉 I mean, the code is more correct, but the extra blocks makes it a little harder to read, since i always think "why are they doing this explicit conversion?".In addition, an explicit conversion is sometimes more expensive. (Example, but you would think the compiler should create identical code. I have not tested in recent version)
Debug still turned on? My impression was that the explicit conversion was making more places that could be probed, etc. With debugging off, I would expect identical code.
08-13-2025 02:40 PM
@crossrulz wrote:
With debugging off, I would expect identical code.
In principle, there is still an extra memory allocation of the lower DBL array while the multiplication might know how to multiply an integer with a DBL directly. No time for extensive tests at the moment ....
08-19-2025 09:08 AM
@altenbach wrote:
@Yamaeda wrote:
If you add a U8 to a I32, to you explicitly convert the U8 first? 😉 I mean, the code is more correct, but the extra blocks makes it a little harder to read, since i always think "why are they doing this explicit conversion?".In addition, an explicit conversion is sometimes more expensive. (Example, but you would think the compiler should create identical code. I have not tested in recent version)
Yeah i remember that little nugget. I assume it allocates a new array or something. Maybe Bool to number should have configurable output like the Multiply has?
08-19-2025 09:29 AM
08-22-2025 10:10 AM
@altenbach wrote:
@Yamaeda wrote:
Maybe Bool to number should have configurable output like the Multiply has?exactly 😄
It was only suggested in 2009, give'em some time! 😉
02-09-2026 11:14 AM
I have no intention debugging this mess, but here's a small section that I think tries to do a rolling average.
(so what's wrong with the ptbypt version???)
02-16-2026 11:46 AM
The original programmer didn't see it on the pallets, didn't recognize what it does?

02-17-2026 02:46 AM - edited 02-17-2026 02:47 AM
@altenbach wrote:
I have no intention debugging this mess, but here's a small section that I think tries to do a rolling average.
...
(so what's wrong with the ptbypt version???)
I'm sure I have made something like this with shift registers, when I was using LV 5.0 and was new to LabVIEW.
02-19-2026 01:20 AM
@thols wrote:
I'm sure I have made something like this with shift registers, when I was using LV 5.0 and was new to LabVIEW.
Yes, with shift registers, one would be enough because you can expand the left side for even older data. I think there were even ancient NI examples that showed that.
The problem is scalability. Once you want to do a 100 point average only a scalable solution is doable. (Here's an efficient but simplified example that can average multiple channels simultaneously, something the stock ptbypt cannot do.)
Note that feedback nodes allow selection of the history, so the above mess could have used a pattern as follows, eliminating a lot of backwards wires.
But as discussed, this is still never the way to do it....