I tried the same way as Example available in LabVIEW..... that is general auto PID simulator... But that didn't worked out for me.....
The 'General Auto PID Simulator.vi' example uses the technique "PID Relay" feedback where it tries to calculate the PID values based on the relay feedback, but using the PID also in the loop:
This technique works, but it requires initial PID parameters that will make the relay setpoint stable and it is able to obtain the results you are expecting.
Now, for flow control, you can try the most classic techniques. Please use other shipping examples that start with "autotuning" and in special this:
C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\control\PID\Autotuning PID Online.vi
In this VI, you can choose other techniques like open-loop step response, closed-loop step response and the original 'relay feedback' where it doesn't have a PID inside the estimation loop.
Anyway, here you have more information about those techniques http://zone.ni.com/reference/en-XX/help/370401H-01/TOC4.htm.
One more thing: keep in mind that depending on the plant parameters, a PID could not be suited for your application and a more complex controller need to be developed.
Hope this can help you...