bgtorque
Member
I have an analogue channel coming in which I run from a custom ‘Scaling Block’ that consists of first multiplying the raw counts by a gain value to get engineering units and then adding an offset value for calibration at zero. This works fine and has been used on many projects and analogue channels. In this particular instance I want to run my raw input through the scaling block, but I am scaling to give an output percentage. This output percentage is a real floating number and I can see at least 6 decimal places most of the time. I now want to run this percentage through another scaling block to convert to engineering units (torque in Nm in this instance) depending on how I have the driveline setup. As soon as I multiply by a gain term (0.025 in this instance) my final tag (REAL Floating Point) is only seeing 3 decimal places and stepping up/down in .025Nm steps. The offset in the final scaling block is zero since the channel was calibrated when in percentage output during the first scaling block. Where have my extra decimal places disappeared to? As usual, any help / advice is greatly appreciated.
Scaling block code is just 2 rungs:
MUL(Raw_Input,System_Gain,Scaled_Output);
ADD(Scaled_Output,System_Offset,Scaled_Output);
Thanks,
BG
Scaling block code is just 2 rungs:
MUL(Raw_Input,System_Gain,Scaled_Output);
ADD(Scaled_Output,System_Offset,Scaled_Output);
Thanks,
BG