Scaling is just a conversion.
Engineering Units = The unit you wish to use...Percent, Gallons, LBS, PSI...etc.
Raw = This is the integer value of the 0-10v/4 - 20mA signal. The analog card converts this voltage/current input into a value that can manipulated in the PLC. The resolution of that value depends on the analog/digital converstion capabilities in the card. Some are 12 bit, 16 bit....
Theoretically..
A 12 bit card gives a Raw value of 0 - 4095 (convert the binary)
A 16 bit card gives a Raw value of 0 - 65535
Depending on the card manufacturer the Raw value could be different, it is essential you check the manual for the particular analog card to know the range it will provide. Many GE Fanuc cards will give a 0 - 20000 value.
If a 4 - 20 mA signal indicates a 0 - 100% level in a tank, then the Engineering Unit is in %. And for a 12 bit card that 4 - 20 mA input would have a raw value of 0 - 4095.
You need to convert from RAW to %.
Remember the equation y = mx+b? That's really all you need to know. Graph your RAW on the X axis, and the EU on the Y axis and draw a line at the two known points.(this assumes the signal is linear, which most signals are...)
Determine the equation of the line, and do the math.
Many PLCs have an instruction that can do this internally, you simply provide the min/max values for the EU and RAW, the signal reference and you're set. Check the SCL instruction in AB.
Scaling for a PID, a PID usually cannot take in your Engineering Unit and process it. It must be scaled to the PID, AB PID's need to be scaled 0 - 16383 (again check PID documentation for the specific values needed if unsure), so the Setpoint, Process Variable and Control Variable must be scaled properly. The process is the same as above.
You must do the same in output signals, except this time the EU is on the X axis of your plot and the Raw units are on the Y axis.
Do some searches on scaling you should find examples.