Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

pH control

Hi all. Can someone help with information on how to build a VI that uses a pH signal to turn on/off a set of valves. I have a dual channel HI 4222 ph meter that I would like to connect via USB or RS232. Thanks in advance!
0 Kudos
Message 1 of 10
(4,883 Views)

Hi

 

This boils down to 

a) find a way to reliable measure pH, probably with your instrument

b) have some valves controlled by the pc and preferably also something to stirr the mixture so you don't have to wait minutes.

 

I found the manual but no sign of codes that can be exchanged between the pc and the instrument!

Ask the manufacturer or dig up a programming manual

 

As long as that info is not available b is not useful.

You can eventually spy the communication with the instrument using the propriatory software with portmon ( a serial port logging program)

But that is a tedious task.

 

good luck

 

greetings from the Netherlands
0 Kudos
Message 2 of 10
(4,877 Views)
Thanks Albert. I was actually looking for a description on how to set up the block diagram. As of now,  I am able to acquire data and place it on a chart. I want to know how to manipulate the data I obtain to turn my valves on/off according to the pH. 
0 Kudos
Message 3 of 10
(4,853 Views)

Hi

 

the best you can do is to switch on the valve (with acid) when the pH  gets too high and close when it gets to acidic.

If you also have a base liquid you can add that when to low but be careful not to start oscillating.

 

maybe the best is to open the valve depending on the difference with the wanted pH.

A longer time when the difference is bigger

but short enough to make a measurement after that.

 

When these valves are not digital but analog controlled you can open them accordingly to the difference with the wanted situation.

 

So add a case statement after the measurement and put the valve coding there.

greetings from the Netherlands
0 Kudos
Message 4 of 10
(4,840 Views)

HI all,

 

I also doing the same project about the pH control for water treatment,i have the model,but I don't know how to draw an automatic on-off controller, so that the valve can automatic on and off to control the the flow rate of the liquids, got any idea how to do an automatic on-off controller to control the on off of the valve base on the set point?because I am beginner of labview, this problem make me headache. 

 

 

Regard,

Vriezz

0 Kudos
Message 5 of 10
(4,209 Views)

A good sleep can cure the headache and a starting course in LabVIEW will get you going.

So start simple with measuring.

When that works, start controlling by hand and keep measuring. 

Make sure that you understand what is happening and also make sure that what you did by hand can be automated with equipment.

After that you program it.

 

So simple as what, start by hand and atthe same time leaarn to program and the NI guy's will tell you it will happen in 5 minutes.

But just as easy as repairing a car, the only problem it takes time to learn to repair.

 

In the mean time keep us informed and ask detailed questions.

greetings from the Netherlands
0 Kudos
Message 6 of 10
(4,199 Views)

Hi Albert,

 

I already try all the simple with measuring. I already draw the model of my project, I just don't know how to connect it with a on-off controller, and i don't know how to create a automatic controller to control the open&close of the valve, do you have any suggestion for me? because I had face the simulation whole week already still stuck with the controller.

0 Kudos
Message 7 of 10
(4,187 Views)

show your vi and pinpoint your question.

What type of controller do you have? Do you have a driver ?

How fast and/or accurate do you need to work?

 

You can attach vi's or zipfiles of the project in this forum.

greetings from the Netherlands
0 Kudos
Message 8 of 10
(4,184 Views)

this is my model. I don't know how to put the on-off controller inside the system.

my question is:

first of all, I will insert a set point pH value, the set point value is constant.

when i insert another process value and run the simulation, the process value will compare with the set point value.

my job is to find out how fast the time for the process value reach the set point value.

I want the on off controller can be automatic switch on and off to adjust the open&close of the valve in the dilution process.

now i will try the on off controller first, after get the result i will change the on off controller to PID controller to do the simulation again.

all of this just using the labview software. no need to implement the hardware.

here is my vi,

 

TQ

0 Kudos
Message 9 of 10
(4,174 Views)

Hi

nice frontpanel but some fundamental problems in the block diagram.

First of all both sequence frames will be executed after each other. That is not what you want.

So either put your calculation somewhere in the while.

A hint: You don't need a sequence frame except in the initialisation of the graph.

 

After each measurement you can decide to open one switch or close both.

 

As a former chemist I know that measuring pH is slow and depending on the size of your vessels mixing also takes time.

So don't control too fast.

 

To begin with create a separate  vi that you feed the wanted pH and the actual pH. Inside you remeber in an unitialized shiftregister the previous pH and time.

From those values you can calculate what to do and give a value for both switches and the time one should open, if any should open.

 

I would say good start and keep asking and showing the status.

greetings from the Netherlands
0 Kudos
Message 10 of 10
(4,164 Views)