Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

valve control with CR Basic


Hydro_engineer Feb 6, 2018 02:01 AM

We use Cr1000 data loggers at our sites, and we are controlling stream release flow with valves that are controlled from the data loggers. These valve control applications are quite complex. Is anyone else doing flow control with thier data loggers ( I'm someone must be) ?. Is it possible to do PID control of a valve using CR1000 and loggernet. Any input, advice, or examples would be greatly appreciated.


smile Feb 9, 2018 08:17 AM

Hi,

Are ON-OFF or proportional valves (analog or digital)? Surely you need an additional device, the CS produces various useful devices for this activity. They can control via relay or even SDM devices. It would need more information to provide more details on how to resolve the issue. The CR1000 has only one 12V power channel (SW12) that at most only controls 1Amp (ON-OFF).

Smile


Hydro_engineer Feb 11, 2018 07:34 PM

We have an SDM-CD16AC module connected to our CR1000 data logger. This provides discrete commands to either open or close the valve. Presently we are using a timer (within the CR1000 program) to determine the length of time the output contacts (either valve open or valve close) are closed. This time setting is the result of subtracting the measured flow from the flow setpoint. This becomes the error. The error is then multiplied by a constant and this becomes the setting of the previously mentioned timer. The problem with this approach, is that the constant value is always the same, and the flow rate through the valve is not linear. In addition to this, other factors affect flow rate such as reservoir level. 


smile Feb 12, 2018 10:36 AM

Hi,

clear, maybe you need a flowmeter!


rlwoell Feb 14, 2018 07:52 PM

There are two appoaches that come to mind.

You say a constant is used in the equation and the flow rate through the valve is non-linear.  If you know what the constant should be at different flow rates you could provide a series of constants in a Data statement and use which ever one is appropriate for that flow.

The other approach is to use it lke a PID based controller.  Within the CRBasic editor, select Help and then CRBasic Editor Help.  From there search on PID.  You should see an example progrram for the PWM instruction which is based on PID control.  You should be able to use the same technnique for determining your timer control.

Log in or register to post/reply in the forum.