Question: = , sp Control program for the water level in a tank. 'program in QUICKBASIC to apply a P+I control strategy to a level system

 = ", sp Control program for the water level in atank. 'program in QUICKBASIC to apply a P+I control strategy to alevel system BA = SHIBO: porta = BA: portb = BA+1: portc= BA+2: cr = BA+3 OUT cr, &H91: 'set up ports asrequired OUT portb, O: OUT porto, O: 'switch off pump and close

= ", sp Control program for the water level in a tank. 'program in QUICKBASIC to apply a P+I control strategy to a level system BA = SHIBO: porta = BA: portb = BA+1: portc = BA+2: cr = BA+3 OUT cr, &H91: 'set up ports as required OUT portb, O: OUT porto, O: 'switch off pump and close control valve CLS INPUT "setpoint level in mm INPUT "controller proportional band as a % pb INPUT "controller integral time setting in seconds =" Ti k = 100/pb: sum = 0: span = 400 dt= .5: 'discrete sample time for loop is 0.5 seconds start: 'this is the control loop t = TIMER GOSUB adc e = 100 * (sp - pv) / span sum = sum + e u% = INT((ke)+((k* dt/TI) * sum)) IF u% 100 THEN u% = 100 OUT portb, u%* 2.55 WHILE (TIMER -t) 100 THEN u% = 100 OUT portb, u%* 2.55 WHILE (TIMER -t)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!