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

New IScans property request: bool CanAcceptCustomScan #13

Closed
chhh opened this issue Feb 16, 2018 · 1 comment
Closed

New IScans property request: bool CanAcceptCustomScan #13

chhh opened this issue Feb 16, 2018 · 1 comment

Comments

@chhh
Copy link

chhh commented Feb 16, 2018

Currently there's only event EventHandler CanAcceptNextCustomScan in IScans and this is never fired unless one successfully submits a custom scan with SetCustomScan(ICustomScan scan) : bool. However, when one connects to an instrument, it's not exactly obvious if it's ok to try to submit a custom scan in the first place. For me it doesn't work when a method acquisition is running that was initiated by Excalibur, because, I guess, it has exclusive access (IFusionControl.GetScans(true)?).

I see that you can try submitting and check the return value, but this is not a clear indication, I would retry submitting as long as SetCustomScan returns bool. However, I'd just show an error message, if CanAcceptCustomScan returned false.

@dbaileychess
Copy link
Contributor

The purpose of the CanAcceptNextCustomScan event is to indicate that the previous CustomScan has been queued and ready for injection, and that the internal buffer is available for a new CustomScan to arrive. We do have a small buffer on the instrument that can hold multiple CustomScans in FIFO ordering. This event just lets you know that a buffer spot is now free.

You should always be able to submit a CustomScan, regardless if Tune/XCalibur is in control. I just submitted a method via XCalibur, started up the IAPI, and was able to send Custom Scans down with no issues.

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