Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between fetch and read waveform?

What is the difference between fetch and read waveform vi's in the HSDIO pallette?  Also I see some VI's use the HSDIO inistiate vi and some that don't (I.E. Dynamic Acquisition with Read.vi)  When do you use this vi?
 
Thanks in advance,
Brian
0 Kudos
Message 1 of 4
(4,752 Views)

Hey Brian.  Calling "niHSDIO Read.vi" is essentially the same as calling "niHSDIO Initiatie.vi" followed by "niHSDIO Fetch".  "Initiate" starts the process of acquiring digitial data into the device's onboard memory, but  you still have to call "Fetch" to be able to transfer the acquired data back to the PC to be used in your program.  "Read" can be considered a shortcut to this process.  One example of why you might want to break "read" apart into its components is if you were doing a very lengthy acquisition and wanted to process chunks of data while still acquiring.  In this case, you'd call "Initiate" to start acquiring data into onboard memory, and then you'd fetch back chunks of data using the "fetch" call.  "Read" doesn't allow this kind of granularity... it doesn't return until all data you asked for has been acquired.

Check out the online documentation, too ("NI Digital Waveform Generator/Analyzer Help"... launchable from your start menu).  It provides some more information about this.  See the section under "Programming>>Programming Flow>>Acquiring Dynamic Data" for a diagram of this information.

Have a great day!

Chris

0 Kudos
Message 2 of 4
(4,748 Views)

Chris,

I know how to assign channels for dynamic operation, either for generation or acquisition. If I perform an INITIALIZE GENERATION followed by a ASSIGN DYNAMIC CHANNEL, this will set those DIO channels as outputs. If I perform an INITIALIZE ACQUISITION followed by a ASSIGN DYNAMIC CHANNEL, this will program the HSDIO to acquire signals at the DIO channels.

 

How do I know which DIO channels will be set to outputs and which are inputs? Does the INITIALIZE ACQUISITION followed by ASSIGN DYNAMIC CHANNEL automatically make all of those DIO channels as inputs? How do I program DIO channels as inputs?

 

Thanks,

 

Roger

0 Kudos
Message 3 of 4
(4,316 Views)

Roger's questions addressed in this post.

 

Regards,

DJ L.

0 Kudos
Message 4 of 4
(4,283 Views)