labview is the abbreviation of laboratory virtual instrument engineering workbench , which is the innovative software product of national instruments ( nis ) in united states .
it is the preferred platform when people exploit virtual instrument as the most functional graphic software at present [ 15 ] .
ion analyzer is one of the most widely used analysis instruments in scientific research and practice .
it is widely applied in biomedical , chemical , environmental protection , and other fields .
manual reading and processing data with traditional ion analyzer is not only cumbersome in operation process but also difficult to avoid personal error .
the research about ion analyzer connected to computer has been reported in recent years ; however , the quantity is small , and the software is mostly developed in text - based programming language ( e.g. , c , turbo pascal , vb , and so on ) .
the disadvantage of the text - based language is long developing periods , difficult maintenance , and expandedness .
it not only has friendly interface , easy operation , and expandability , but also can realize automatic slope , temperature , and positioning calibrations .
the system has been applied to determine the rate constant of ethyl acetate saponification reaction when the labview program for determining the reaction rate constant by px is embedded into the system .
actually , ion analyzer , as a high input impedance millivoltmeter , is widely used in measuring the emf of the battery which is composed by ion selective electrode , reference electrode , and solution . the concentration of the unknown solution is acquired through measuring the emf margin between standard solution and tested solution under the same electrode system . by the nernst equation
the authors have inferred 
						 ( 1)exes=2.303  rtzf(pxpxs),if  s=2.303  rtzf ,  px = pxs(exes)s , 
					 where ex is the potential , and px is the px value of tested solution .
it is obvious that the relation between px and e(e = ex  es ) is linear .
s is theoretic slope of the electrode system ; however , the actual electrode slope is also influenced by temperature , ion valence , manufacturing process , surface structure , activation state of the electrode , and other factors .
although the electrodes are of the same type , the s values of the electrodes may be different .
traditional ion analyzer needs transform switches and rheostats to complete positioning , ion valence , polarity , electrode slope , and temperature calibrations for proofreading the instrument . in this condition
the virtual instrument system based on labview 8.0 for ion analyzer brings the advantage of virtual instrument that  software is instrument  into full play .
it achieves proofreading the instrument and data processing automatically by labview program , so the authors can easily get real - time px ~ t and mv ~ t curve .
ion selecting electrode and reference electrode are immersed into the tested solution constituting electrode system .
the potential signal enters into computer via the pci-6014 data acquisition ( daq ) after impedance transformation and filtering by high input impedance conditioning circuit .
precise digital temperature thermoscope connects the computer by rs-232 serial port which makes the automatical temperature compensation easily .
it is made up of one high input impedance voltage follower with ca3140 and second - order active low - pass filter with low drift op07 .
specially the ca3140 is used to accomplish impedance transformation of electrode system , then the low drift op07 accomplishes the output signal filtering .
the system software consists of four main parts , including operation panel , data acquiring and real - time displaying , data storage , and data processing and result displaying .
thereinto , the former three parts of the system software are necessary , and the last one can be adjusted according to the purpose of users ' measurement .
virtual instrument operation panel is shown in   figure 3 . to enable users to adjust sampling interval and channels according to their needs , sampling interval knob and channels selecting controller
users can also decide whether to save the date synchronously by synchronous memory controller or not . in this labview program , event structure which comprises data acquiring
, data saving , data processing , result printing , and exit five subevents is used .
each subevent corresponds with a control button on the panel . when clicking the control button , corresponding event will be called .
operation panel adopts tab control on the whole to achieve the switch between mv stall and px stall and connects tab control with selection terminal of a case structure on block panel . clicking the mv stall and px stall button on top of the operation panel
program for data acquiring and real - time displaying of px measurement is the key program of the system which can automatically complete temperature , slope , orientation , and ion valence correction .
the program consists of a stacked sequence structure , which includes seven frameworks . while the program is running the structure
will gradually execute the framework program according to the order of selection for labels 0,1,2  . 

it executes real - time acquiring and displays the px value of the solution under test and data provisional storage , which is mainly constituted by three while structure .
the upmost while structure accomplishes the driving of data acquisition card and data acquiring continuously .
channels selecting controller select channel , ai config function sets up the size of buffer , ai read function sets up sampling rate , and max & min function controls the amount lagging to avoid data coverage . to enhance the stability and veracity of the result , 300 acquired data will be switched to px value after averaged and then real - time displayed by the control meter and transmitted to the downmost while structure by native variable to save . at the same time the textboxes on the right of the operation panel display px value , electrode slope , mv , ion concentration of x , and other data .
the while structure in the middle real time acquires the temperature value of exact digital temperature thermoscope by the serial communication vi and then transmits it to the upmost while structure by native variable to accomplish temperature compensation automatically .
the temperature of solution is real - time displayed by the control thermometer in the operation panel . the while structure downmost writes the discrete px value to file according to the sampling interval set by users and displays it in express xy graph . because labview program adopts parallel operation mechanism , the three while structure can run independently .
the program of mv stall is similar to this and simpler relatively ; the only difference is real - time displays are potential   ~time curve .
first , open a file dialog box with the function file open to offer the storage path for users . then copy the data saved in provisional
file to appointed file with the function copy and superadd initial experiment conditions to the file which is saved for the use of data processing at the same time . if any failure during data storage , it will pop up invalid save and give error reasons to users , allowing users to save again until success .
the biggest advantage of virtual instrument is easy expandability , fully playing the powerful data processing function of computer to deal with the test data collected according to the programming needs of users .
basic principles of determining rate constant by px are that the concentration of the participation in the reaction system changes over time with reaction proceeding , so tracking and recording a curve of px with the change of time t , and then by corresponding data processing under the principle of dynamics the corresponding parameters of dynamics can be determined . for easy presentation , take a typical second - order reaction the reaction of ethyl acetate saponification as an example : 
 ( 2)ch3cooc2h5+ohch3coo+c2h5oh . 
 
with reaction proceeding , oh gradually diminishes , and ch3coo gradually increases in the system , so the ph value of the system gradually reduces .
the information of reaction course is obtained by determining the ph value with the time .
so the rate constant of this reaction can be determined by the method of px . for second - order reaction , data processing formulae are different for the equal and unequal initial concentration of reactants . in accordance with the principle of dynamics , according to [ 79 ] , when the initial concentrations of reactants are equal , setups of the initial concentration are both c0 , then the dynamic formula for the reaction is 
								 ( 3)1c = kt+1c0 , 
							 where c is the concentration of naoh at the time t ; k is rate constant , for strong base boh , [ oh ]  cboh , poh =   log[oh ] when the concentration cboh    10 m. integration yields : 
								 ( 4)1c=1[oh]=110poh=10poh=1014ph . 
							
so we can educe the relationship formula between the ph value of the system and time as ( 5 ) 
								 ( 5 )  1014ph = kt+1c0 .
it shows that by plotting 10 against t , the slope of the line is rate constant , k.   when the initial concentrations of reactants are unequal , setups a , b ( a > b )   are , respectively , the initial concentration of naoh and ch3cooc2h5 , then the concentration of each component of the reaction system at different reaction time can be expressed as 
								 ( 6)ch3cooc2h5+naohch3coona+c2h5oht=0  b  a  0  0t = t  bx  at = ax  x  xt=  0  a=ab  b  b , 
							 where at ,    a are , respectively , the concentration of naoh at the time of t and t =  , and x is the concentration of product ch3coona and c2h5oh at the time of t. when a  b the dynamic formula for second - order reaction is 
								 ( 7)ln  ( ax)(bx)=(ab)kt+ln  ab . 
							 because a  b = a ,    a  x = at ,    b  x = at  a , 
								 ( 8)ln  atata=akt+ln  ab . 
							 set up [ oh]t , [ oh] are [ oh ] of the system at the time of t = t and t =  , then obtain 
								 ( 9)ln  ( 1[oh][oh]t)=[oh]kt+ln  ab . 
							 also because [ oh ] = 10 , ( 5 ) can be expressed with ph value as 
								 ( 10)ln  ( 110ph1410pht14)=10ph14kt+ln  ab . 
							 set up a =   ln(1  ( 10/10 ) ) , then 
								 ( 11)a=10ph14kt+ln  ab .   equation ( 11 ) is the relationship formula between ph value and time , which shows that by plotting a against t a straight line is obtained , and after determining   [ oh]t , [ oh] of the system at the time of t = t and t =  rate constant k can be obtained from the slope of the line .
these methods do not require determining the accurate initial concentration of reactants , which simplifies the experimental operation .
by arrhenius equation ln(k1/k2 ) = ea(1/t2  1/t1)/r , the activation energy can be obtained by the rate constant of different temperature .
the block program is shown in figure 6 . the corresponding program in the sequence structure on the far left firstly judges whether the initial concentration of reactant is equal
data processing includes linear transforming of data , transforming the label of axis , straight line fitting , and correlation coefficient r calculating , and so forth .
a group of data read out from data file enters for loop structure , by using the loop iteration ; the automatically matching of data of x axis and data of y axis is achieved .
after this array enters subprogram for straight line fitting , the unqualified data is deleted and the line slope , intercept , and other data are obtained .
after deleted  and  the data after fitted  are , respectively , bundled by the function bundle , and is displayed by the control xy graph . at the same time , by using xscale.namelb1.text and yscale.namelb1.text in property node of graph and condition of initial concentration of reactant , the label of axis is automatically transformed with different beginning condition .
correlation coefficient of straight line fitting is obtained after the data enters subprogram for r. the system will remind users whether or not to continue data processing after a set of data is processed .
another data file will be selected if the user continues to obtain rate constant at different temperature .
the k value at different temperature can be used to calculate apparent activation energy ea by the function formula node in case structure on the far right .
the results and necessary parameters are added into array by the function insert into array . then each element of array is indexed and transformed into specified precise characters by function number to fractional string .
the characters are concatenated into a string by function of concatenate strings , and at last the string is displayed by string indicator .
this system is used to determine the rate constant of ethyl acetate saponification reaction at the temperature of 298 k and 308 k when the initial concentration of reactants is equal and unequal . in the measuring process
the system automatically collects testing data and real - time displays ph ~ t curve , as shown in figure 3 .
figure 7 is the data processing panel under equal initial reactants concentration , and the two xy graphs on each side , respectively , display testing data at the temperature of 298 k and 308 k. the underside of panel is a testing conditions and results showing box which can display reaction temperature , rate constant , correlation coefficient , and apparent activation energy together .
the virtual instrument system based on labview8.0 for ion analyzer , which has advantages of easy operation and friendly interface , can determine px , realize real - time displaying and drawing a curve of px or mv with the change of time t , process data , and generate result report automatically .
the relative error of result is less than 3.5% . for any second - order reaction system ,
the virtual instrument system can track the concentration change of the corresponding ion and then determine its rate constant if appropriate ion - selective electrode is used .
for other series of reactions , the system can also determine their rate constants by amending data - processing program under the principle of dynamics . with its easy expandability
, the system can be used in autodetermination studies such as potential titration , potential analysis , and potential equilibrium constant measurement through embeding different data - processing programs of labview .
what is more , the system provides users with great convenience for tracking and measuring px or potential application research ; the authors believe that it can be widely used in the production and environmental monitoring .
 the virtual instrument system based on labview 8.0 for ion analyzer which can measure and analyze ion concentrations in solution is developed and comprises homemade conditioning circuit , data acquiring board , and computer . 
 it can calibrate slope , temperature , and positioning automatically . 
 when applied to determine the reaction rate constant by px , it achieved live acquiring , real - time displaying , automatical processing of testing data , generating the report of results ; and other functions . 
 this method simplifies the experimental operation greatly , avoids complicated procedures of manual processing data and personal error , and improves veracity and repeatability of the experiment results . 
1. Introduction
2. System Principles and Configuration
3. Design and Implementation of the Main LabVIEW Program for System
4. Design and Implementation of Program for Data Progressing
5. Example of Application
6. Conclusion