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

Setting scan to 0 through setParamInfo #99

Open
hinxx opened this issue May 23, 2024 · 1 comment
Open

Setting scan to 0 through setParamInfo #99

hinxx opened this issue May 23, 2024 · 1 comment

Comments

@hinxx
Copy link

hinxx commented May 23, 2024

I would like to switch between passive and periodic scan.
If the PV has initial scan set to non zero for createPV, is it allowed to set it to 0 during the runtime with self.setParamInfo('det1:trig', {'scan': 0})?

If I do that the PV updates, seen by the camonitor, are flooding my console with PV value changing rapidly.

@xiaoqiangwang
Copy link
Collaborator

The scan thread is only created on startup,

pcaspy/pcaspy/driver.py

Lines 513 to 517 in f2f59c0

# scan thread
if self.info.scan > 0:
self.tid = threading.Thread(target=self.scan)
self.tid.daemon = True
self.tid.start()

So switch from passive to periodic is not possible.

The scan value is directly used to the delay function,

time.sleep(self.info.scan)

There is currently no way to stop it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants