DDC-9 - Valve Exercise Component

Current Status:

Developed - In Testing GitLab Last Commit GitLab Contributors

Suggested By: @Rosenthaler
You Track: DDC-9
Gitlab Branch: DDC-9

Description:
A block to exercise a valve.
It has a status input to see if the equipment is running and a valve input and output.
Exercise at a specific time each day, for 5 [adjustable] minutes unless the valve has had a value of >95% [adjustable] within the last 24 [adjustable] hours.
[Option]
Don’t exercise if the status input is “true”. Maybe queue for when the status is false.


:face_with_monocle: This component has been developed and is now in the beta testing phase. I left out the que for when status is false, simply because I forgot :smiley:. However after some testing i’m not sure it is required.


image

How to Use the Valve Exercise Block in Niagara

The Valve Exercise Block is a custom component created to automatically exercise a valve at scheduled intervals. This helps prevent the valve from sticking due to lack of use. Below is a step-by-step guide to help you understand how to use this component effectively in your Niagara system.

Key Features

  • Scheduled Valve Exercise: The valve will be exercised at a specific time each day or at an interval (customisable).
  • Avoidance Mechanism: If the valve has been exercised since the last scheduled exercise, it won’t be exercised again. This is determined by the adjustable valve threshold. If the threshold is exceeded, the valve is flagged as “exercised.”
  • Manual Override Protection: If the system status indicates that the equipment is running, the valve exercise will be skipped to avoid interfering with normal operation.
  • Customisable Exercise Duration: You can set how long the valve remains open during the exercise.

Properties and Actions

  1. Status Input (statusIn)
  • Type: Boolean
  • Purpose: Indicates whether the equipment is running. If true, the valve exercise will be skipped.
  1. Exercise Schedule (exerciseSchedule)
  • Type: Time Trigger
  • Purpose: Defines the time at which the valve exercise should occur daily or interval.
  1. Valve Input (valveIn)
  • Type: Numeric
  • Purpose: Represents the current position of the valve (your valve control logic write into this property)
  1. Exercise Duration (exerciseDuration)
  • Type: Relative Time
  • Purpose: The duration for which the valve should remain fully open during the exercise.
  1. Last Exercise Time (lastExerciseTime)
  • Type: Absolute Time (Read-Only)
  • Purpose: Records the last time the valve was exercised.
  1. Valve Threshold (valveThreshold)
  • Type: Integer
  • Purpose: The percentage threshold above which the valve is considered exercised.
  1. Is Exercising (isExercising)
  • Type: Boolean (Read-Only)
  • Purpose: Indicates whether the valve is currently being exercised.
  1. Valve Exceeded Threshold (valveExceededThreshold)
  • Type: Boolean (Read-Only)
  • Purpose: Indicates whether the valve has exceeded the defined threshold since the last exercise.
  1. Output (out)
  • Type: Numeric
  • Purpose: Controls the position of the valve during normal operation and exercise.
  1. Actions
  • Exercise Valve (exerciseValve): Manually trigger the valve exercise (or automatically triggered by the schedule.
  • Release Exercise (releaseExercise): Stops the exercise and returns the valve to its normal position and resumes normal passthrough control.

How It Works

  1. Schedule
  • The component uses a time trigger to exercise the valve at a specific time each day (or at an interval). This time is set by you in the exerciseSchedule property.
  1. Avoid Re-exercising
  • Before starting an exercise, the block checks if the valve has been exercised since the last scheduled exercise. If it has, the exercise is skipped.
  1. Exercising the Valve
  • When the exercise begins, the valve will fully open (output set to 100%) for the duration specified in the exerciseDuration property.
  • The isExercising property will be set to true during this period.
  1. Returning to Normal
  • After the exercise duration, the releaseExercise action is triggered. This resets the valve to its normal position based on the current input, and the isExercising flag is set to false.
  1. Skipping Exercises
  • If the statusIn input indicates the equipment is running, the exercise is automatically skipped to prevent interference with normal operation.

Sneaky code sesh to get this one underway.

Update:

  • Developed the component.
  • Implemented the features mentioned in the description (with some variation).
  • Tested the component on local station.
  • Committed to DDC-9 for review, to be merged into main.

@Rosenthaler, when you’re free please review.

That’s amazing @Giantsbane :wink: almost making life too easy on my. Basically just have to copy paste this to the doc file :joy:

I’ll be home tomorrow night. If I’m not too tired after the drive, I’ll review it there :blush:

1 Like

Haha AI wrote the description for me :laughing: I just showed it the code. Sounds good man no rush, just keeping the ball rolling!

1 Like

Hahaha whatever works :rofl: I might have some more ideas too.

1 Like

Merged → main
Big props @Rosenthaler for tidying this one up!

If anyone is interested I have a numeric component extension that does valve exercising. It includes an option for a pump command output.

Code may be a bit rough and it only works with numeric. Maybe we could also get it working with Booleans.

A point extension version of the valve exercise sounds like a great idea and easily deployable with the program service. Create branch off the repo main branch and push it so we can a look! Love the idea :slight_smile: