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

AI Reads are taking longer than what they should #53

Open
agomez08 opened this issue Mar 1, 2019 · 2 comments
Open

AI Reads are taking longer than what they should #53

agomez08 opened this issue Mar 1, 2019 · 2 comments
Assignees
Labels

Comments

@agomez08
Copy link
Contributor

agomez08 commented Mar 1, 2019

Steps to reproduce:

  1. Engine running at 10 ms.
  2. DAQmx module running at 100 ms. Configure rate to 100 ms as well. Added 8 AI channels or so.
  3. AI channels update at ~200 ms.

I think this is hapenning because the RelativeTo property being set to Most Recent Sample before each read. This causes the read to wait for the next acquired sample. If the intention was reading the last sample, the property offset has to be changed to -1 (check the RelativeTo Property help). Would it also be good moving this property nodes to init?

@agomez08 agomez08 added the bug label Mar 1, 2019
@agomez08 agomez08 self-assigned this Apr 9, 2019
agomez08 added a commit that referenced this issue Apr 10, 2019
… the last acquired sample instead of waiting for the next one.

Move this to Configure AI task.vi so it is set only once in initialization.
Fixes #53
@becega becega reopened this May 20, 2019
@becega
Copy link
Contributor

becega commented May 20, 2019

@agomezni Having this offset at -1 is creating errors in modules running in a cdaq connected to a cRIO
Error -200277 occurred at an unidentified location

Possible reason(s):

Invalid combination of position and offset. The position and offset specified a sample prior to the first sample acquired (sample 0).

Make sure any negative read offset specified will select a valid sample when combined with the read position.

@aggieslaughter this was the cause of the error you were seeing

@agomez08
Copy link
Contributor Author

Hi @becega @aggieslaughter

Might be that the last sample still doesn't exist when we are setting the property. Maybe adding a For Loop to retry that same operation a certain number of times until we know the first sample is there?

image

If possible, I'd suggest we come up with a solution that doesn't imply going to the previous version where we used 0 for the offset since this causes the engine to run late in all the iterations.

Thanks!

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

No branches or pull requests

3 participants