Function Block VALVE3WAY

The Function Block VALVE3WAY controls a 3-way valve.

Input MOVETO

The target position as an integer from 0 to 255 of the valve. This value can be directly connected to the PID controller. The delay is set with the input PT_MIN.

Input CALIBRATE

A positive edge at this input performs a calibration immediately. This happens through a complete closing movement with the full time PT_CLOSE, regardless of the valve position at the beginning.

Input PT_OPEN

Defines the time in T# to open the valve. The time is measured in a full movement. This value should not be changed during travel.

Input PT_CLOSE

Defines the time in T# to close the valve. The time is measured in a full movement. It is also used for calibration. This value should not be changed during travel.

Input PT_DELAY

The delay in T# when changing direction to protect the valve. This value also affects the output POS, unless the input SYNC changes.

Input PT_MIN

Defines the minimum travel time in T# of the valve. This means that the travel only begins when this can be maintained. Unless the valve travels to 0 or 255, then the minimum travel time is exceeded beyond the position. The calibration is not automatically triggered.

Input PT

Defines the sampling rate in T# for calculating the actual position of the valve. This should be kept smaller than PT_MIN, as the calculation is used for the minimum travel.

Input DIS

Stop the current travel immediately and ignore further input signals. After unlocking, the travel resumes if the travel time PT_MIN exceeds or travels to the position 0 or 255. After locking, it only travels when PT_DELAY has elapsed.

Output POS

Before starting, the target position is output as an integer between 0 and 255. The value 0 is closed and 255 open. After travel, the output is overwritten with the actual position.

This output can be used to control a 0-10V valve. The advantage is setting the minimum travel time. Calibration has no effect on the output.

Output DO_OPEN

This binary output is directly connected to the hardware output for opening the valve.

Output DO_CLOSE

This binary output is directly connected to the hardware output for closing the valve.

Output DO_DELAY

Is true when the valve changes direction and the delay time PT_DELAY is active.

Output REAL_POS

Tracks the position of the valve in real-time. The position is output as a floating-point number between 0 to 255. The sampling rate can be adjusted with the input PT. This optimizes performance at higher times for the PLC. After the end of travel, this value is set immediately.

Output MOVES

Returns the number of travels. The value is reset to 0 during valve calibration. It is recommended to recalibrate the valve after a certain number of travels and after a certain time without calibration.