I'm now retired but like to keep my hand in, Like they say you can take the programmer out of programming but you can't take the programming out of the programmer, well a re-shaped saying lol.
Yes you could use the similar code of the existing, however, if you want it to be in cubic metres / minute instead of percent then just scale it differently.
I assume the existing code takes the set point i.e. 0-100% and scales it up to 0-4000 to send to the analogue card, There are a number of ways this might be done so you need to keep this in mind. for example, some HMI's can scale the entered value however, a quick look at GT I could not see any scaling settings so assuming this is done in the PLC.
I am assuming then that they take the 0-100% and multiply it by 40 or (4 if they use 100.0) so you will need to do the same i.e. 400. For a trial you could use the 0-100% but it does not make much sense you need to know what the pump will deliver at full speed easy checked by setting the inverter to full speed then see what the flow meter reads, this is your 100% scale so as I said earlier find the max flow, divide the raw analogue out (normally 4000) by your flow i.e. 10.0 is equal to 100 decimal.
As shown in earlier posts you can limit the upper or lower limit of the value the operator enters.
The above assumes that the Analogue card is a Q68DAN and set to normal resolution i.e. 4000 = 20ma it could be set differently so check what other channels are using.
the maths are easy take the above 10.0 CM/H is 4000 or 20ma so setting the required flow to 5.0 CM/H (4000 / 100 = 400 , 50 * 400 = 2000 ) so at a setting of 5.0 CM/H will give 2000 or 12ma (20ma - 4ma = 16ma so half 16 is 8 plus the offset 4ma = 12ma). You just need to get your head around the maths, 4ma is min 20ma is max so that is a swing of 16ma if 4ma = 0 and 20ma = 4000 then it becomes obvious that half way is 12 i.e. an offset of 4ma (offset 4ma plus the 8ma = 12ma).
see pic of the two modes I assume your card will be set to mode 1 normal resolution.