LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotary encoder and pressure sensor sync

Just so I am understanding properly, If I run the error out of the start task for the encoder to the error in for the AI start task merged or otherwise Labview will make sure that the encoder task runs first so that it can do proper error checking?

 

Yes, the temperature and pressure could be combined into one task, an earlier version of the program had a reason to have them split that is no longer valid. Will the script will run slightly faster with less individual task handlers?

0 Kudos
Message 11 of 13
(285 Views)

Move the Datasocket open and close to before and after the loop respectively to get faster loop times.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 13
(282 Views)

@ColeL wrote:

Just so I am understanding properly, If I run the error out of the start task for the encoder to the error in for the AI start task merged or otherwise Labview will make sure that the encoder task runs first so that it can do proper error checking?

Yes.  This is exactly how dataflow works.  The encoder task must execute its instance of DAQmx Start before releasing its error out.  And then the AI task cannot execute its instance of DAQmx Start until it receives its error in.  You've thus guaranteed that the encoder task starts before the AI task, as needed.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 13 of 13
(277 Views)