LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

suggestion for pH adjustment alogrithm

Solved!
Go to solution

Hi, here is my code for judging pH and adjusting pH value using state machine.

 

I only finished the cases when pH >7.5, I havent done the cases for pH<7.5.

 

I understand its very akward because it lacks of real control alogrithm; But I really dont know how to program a controller to relate time and pH value together.

 

In the VI, you will see I adjust pH by opening/closing relay board which further drives valve to open/close to let electrolyte flow out/stop.

 

We will do experiment to determine the time for opening/closing valves... It will invlove a lot of work and I am aware of it.

 

Any suggestion regarding programing technique, bug, etc will be appreciated. Thank u!

 

 

 

p.s the BEi delay VI is provided by one of NI forum adminstrators.

Download All
0 Kudos
Message 1 of 3
(2,177 Views)

I found one problem myself,

 

in the case of ''start DAQ'', I want the VI to take measurement for 5 seconds and stop, then it can calculate mean value. The mean value will be used for later cases.

 

The problem is the start DAQ keeps running, when 5 seconds is reached, the mean pH value is calulated but the Vi is stilling reading data...

0 Kudos
Message 2 of 3
(2,169 Views)
Solution
Accepted by topic author godpaul

  Hello

 -You could wire the stop input in the DAQ assistant and the stopped output to the end condition of the loop to stop the acquisition after 5 seconds. 

 

Regards

0 Kudos
Message 3 of 3
(2,139 Views)