Pardon me for saying, but who ever programmed that needs a smack on the head.
The first SUB_I and DIV_I and #temp6, #temp7 are useless, they can be deleted and #temp7 can be replaced by 54.
However, it looks like you are using a 4-20mA signal while the AI-card is configured for 0-20mA.
Bad practice all around, and as you can see, makes it more difficult then it needs to be.
The good way to do it:
Configure the AI-card for 4-20mA, then use FC105 from the standard library to scale your value.
As for your last question, why 400? Well the analog value get scaled 0-400, if you want to scale it 0-500, just replace the 400 in the first DIV_I with 500.