SCALED_S32_SUMS(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– scaled_s32_sums β€” HAL component πŸ’–

okay bestie, so this one is a HAL component β€” that's <pink>scaled_s32_sums</pink> for the tag, and it's basically a sum of four inputs, where every single input gets its own scale factor. yes, four. four inputs. four scales. it's giving ✨math class but make it slay✨.


✨ SYNOPSIS ✨

loadrt scaled_s32_sums [count=N|names=name1[,name2...]]

that's the whole thing, bestie. that's the moment. 🫢


🧚 FUNCTIONS 🧚

  • scaled-s32-sums.N β€” this is the function, and heads up: it requires a floating-point thread. not optional, not a suggestion, it needs it. periodt. πŸ’…

πŸ‘‘ PINS πŸ‘‘

okay so <lavender>N is the instance number, and every instance gets this exact little friend group of pins:

  • scaled-s32-sums.N.in0 β€” s32 in β€” first input, the OG πŸ“
  • scaled-s32-sums.N.in1 β€” s32 in β€” second input πŸ“
  • scaled-s32-sums.N.in2 β€” s32 in β€” third input πŸ“
  • scaled-s32-sums.N.in3 β€” s32 in β€” fourth input πŸ“
  • scaled-s32-sums.N.scale0 β€” float in β€” default: 1.0 🌸
  • scaled-s32-sums.N.scale1 β€” float in β€” default: 1.0 🌸
  • scaled-s32-sums.N.scale2 β€” float in β€” default: 1.0 🌸
  • scaled-s32-sums.N.scale3 β€” float in β€” default: 1.0 🌸
  • scaled-s32-sums.N.out-s β€” s32 out β€” integer output πŸ’œ
  • scaled-s32-sums.N.out-f β€” float out β€” float output πŸ’œ

and the way that these two outputs work is literally this:

out-s = out-f = (in0 * scale0) + (in1 * scale1) + (in2 * scale2)
        + (in3 * scale3)

no cap. both outputs get the same value of that expression, out-s just hands it to you as an integer and out-f as a float. mul by the scale, add all four, done, iconic. πŸ”₯


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ‘€


πŸ’… AUTHOR πŸ’…

Chris S Morley β€” thank you for your service, king πŸ‘‘


πŸŽ€ LICENSE πŸŽ€

GPL β€” free as in slay πŸ¦‹


and that's the whole page bestie β€” written up by the LinuxCNC Documentation girlies, dated 2026-03-17, so you know it's fresh ✨ go forth and scale those sums πŸ’–

πŸ“¦ where this page comes from