Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Pfeiffer agent. #145

Merged
merged 11 commits into from
Nov 22, 2024
Merged

Updates to Pfeiffer agent. #145

merged 11 commits into from
Nov 22, 2024

Conversation

tanaybhandarkar
Copy link
Contributor

@tanaybhandarkar tanaybhandarkar commented Feb 22, 2021

It now catches when the monitor channels are turned off and prints a statement to the logs. Also sets pressure value to zero if the channel was off. Prior to this, it threw an error when querying pressure values when channels are off

Description

I added an if statement that first queries the status of the channel. If the status is "on", then the agent goes and queries the pressure reading. If the channel status is off, it returns a pressure value of 0.

Motivation and Context

The agent used to crash when trying to query a pressure gauge channel that was off. This error is detailed in Issue #100

How Has This Been Tested?

I have been testing this on the software development computer at Penn. It has been running on this computer over the weekend, with no crashes, despite turning the pressure gauge channels on and off.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Unless I am preparing a release, I have opened this PR onto the develop branch.

…re turned off and prints a statement to the logs. Also sets pressure value to zero if the channel was off. Prior to this, it threw an error when querying pressure values when channels are off
@BrianJKoopman BrianJKoopman linked an issue Feb 22, 2021 that may be closed by this pull request
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR Tanay, it'll be great to get that error fixed.

While this currently sets the pressure value for any non-OK state to 0, a valid reading that I expect would solve the block mismatch issue, there are a few questions that I have about the return values from the two commands you're using, and some other minor comments to address.

agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
@BrianJKoopman BrianJKoopman added the enhancement New feature or request label Mar 8, 2023
@BrianJKoopman BrianJKoopman changed the base branch from develop to main November 15, 2024 22:10
The problem line was `LOG = txaio.make_logger()`, though I'm not sure why, that
same usage is in plenty of other agents.
@BrianJKoopman BrianJKoopman self-assigned this Nov 21, 2024
This counts gauges that cannot be switched on/off as 'on', where it was
previously counting them as 'off'.
socs/agents/pfeiffer_tpg366/agent.py Outdated Show resolved Hide resolved
socs/agents/pfeiffer_tpg366/agent.py Outdated Show resolved Hide resolved
agents/pfeiffer_tpg366/pfeiffer_tpg366_agent.py Outdated Show resolved Hide resolved
@BrianJKoopman BrianJKoopman merged commit 10b48d1 into main Nov 22, 2024
5 checks passed
@BrianJKoopman BrianJKoopman deleted the pfeiffer branch November 22, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pfeiffer Agent Block structure errors
2 participants