LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use time loop to output 2D array in DAQmx write

Hi everyone! I'm trying to use the time loop structure to control the output frequency. The data type is 2D array. I've made a 1D array which can be controlled by the time loop structure but things just don't work out the same way. Attached is my code. I was planning to only put the DAQmx write into the time loop but I failed. Any help and feedback can be useful and I really appreciate. Thanks!

0 Kudos
Message 1 of 2
(2,051 Views)

Sorry, don't have access to LabVIEW right now, so can't look at your code.

 

Some comments:

  • You need to learn how to use DAQmx.  There are video Tutorials from NI that will teach you the basics.
  • You don't say (in your post, it would help to put a few more descriptions in your post just in case we can't see your code).  What device were you using?  Are you sampling voltages (A/D converter)?  How many channels?  What sampling rate?
  • Look at the DAQmx Examples that ship with LabVIEW.  Generally all of the DAQmx timing is done by the hardware device -- you (almost) never use a Timed Loop Structure, nor do you use any of the Timing VIs.  The "clock" in DAQ devices is generally more precise and more accurate than timing in Windows (among other things, antivirus software has no effect on loop timing).

Bob Schor

0 Kudos
Message 2 of 2
(1,987 Views)