Skip to content

AI Reads are taking longer than what they should #53

Open

Description

@agomez08

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?

Activity

  1. self-assigned this
    on Apr 9, 2019
  2. added a commit that references this issue on Apr 10, 2019
    38b8a1d
  3. reopened this on May 20, 2019
  4. becega commented on May 20, 2019

    @becega

    @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

  5. agomez08 commented on May 20, 2019

    @agomez08
    ContributorAuthor

    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions