How to combine Digital Output, a delay and Analog Input in a fast loop 
Author Message
 How to combine Digital Output, a delay and Analog Input in a fast loop

I need to develop a process loop that runs at least at 250 Hz that
performs a Digital output, than a delay of 50 microseconds and than an
analog input of all the channels. All will be done using ATI MIO 64E3
card. Of course, the acquired data will be processed, displayed and
saved. The loop will be running for several minutes until user stops
it.


Sun, 02 Nov 2003 16:04:50 GMT  
 How to combine Digital Output, a delay and Analog Input in a fast loop
The fastest and most precise timing will occur if you use hardware
timing.  You can apply hardware timing to analog input on the E Series
boards, but not the digital lines.  Let's focus on the analog input
first.  Continuous waveform scanning uses a scan clock, which can be
the board's internal one or an external one which you apply.  If you
want to scan all the channels 50 microseconds after a digital rising
edge, then you need an external signal to signify that scan clock.

The E Series boards also have 2 counter/timers onboard that you can
use for this purpose.  You can set up a retriggerable pulse generation
operation, where the counter receives a trigger and then on the user
specifications, produces a pulse.  You can have that route to the
analog input scan clock.

The trigger signal for the counter is that digital pulse.  As I
mentioned earlier, there is no hardware timing for the digital lines
on an E Series board.  We do have other digital boards (653x family)
that have hardware timed operations if precision is important.  If you
are satisfied with software's resolution (in the milliseconds), then
you can call the E Series board digital function in a loop with a
software timer.  That digital line can route to the counter to act as
the trigger.

So, on the programming side, you can have three separate and
independent operations in parallel.  One is for the digital function
to output on that line every so often.  Another is for the counter set
at the retriggerable pulse generation.  The last is for the analog
input.  I will describe this in terms of labview, but it can be done
in a similar fashion with the NI-DAQ function calls or Measurement
Studio.

The digital examples are in the LabVIEW >> Examples >> Daq >> Digital

Quote:
>> E-Series directory.  The Generate Retriggerable Pulse example is in

the LabVIEW >> Examples >> Daq >> Counters >> DAQ-STC directory.  The
E Series boards use the DAQ-STC timing chip.

Go to the LabVIEW >> Examples >> Daq >> anlogin >> strmdisk.llb
directory and start with the Cont Acq to Spreadsheet File.  This shows
how to continuously acquire data and stream it to disk while
displaying the data on a chart.  Streaming to disk is the efficient
way to save data while you are acquiring, as it eliminates the
overhead of always opening and closing the file through the iterations
of the loop.  This saves to a file that can be opened by other
applications (Excel, Word, etc.), but it is not as fast as writing to
a binary file, which must be opened and read back through LabVIEW.
However, for your ~250 Hz rate, it should be fine.  Then, go to the
LabVIEW >> Examples >> Daq >> anlogin >> anlogin.llb and look at the
Acquire N Scans -ExtScanClk example.  This shows how to apply the scan
clock.  Here, the AI Start that you saw in the previous example is
replaced by 4 VIs (3 AI Clock Config's and the AI Control).  Make
those changes to the first example and then add a constant 0 to the AI
Control parameter for total scans to acquire.  That specifies the
continuous operation.  The File >> VI Properties >> Documentation menu
item of the example describes the physical connections.

If you aren't using LabVIEW, use the NI-DAQ User Manual and the NI-DAQ
Help file installed on your machine.  You can look at your AT E Series
User Manual at the http://www.ni.com/manuals pages for more
information on the hardware.  Also, if you want to route those signals
internally on the board, you can find some entries in the
KnowledgeBase at the http://www.ni.com/support pages.

Regards,

Geneva L.
Applications Engineering
National Instruments
http://www.ni.com/ask



Mon, 03 Nov 2003 23:50:07 GMT  
 How to combine Digital Output, a delay and Analog Input in a fast loop

Quote:

> I need to develop a process loop that runs at least at 250 Hz that
> performs a Digital output, than a delay of 50 microseconds and than an
> analog input of all the channels. All will be done using ATI MIO 64E3
> card. Of course, the acquired data will be processed, displayed and
> saved. The loop will be running for several minutes until user stops
> it.

Software driven digital output loop would be too slow. In a similar
project, I used the A/D SCANCLK(1 pulse per conversion) signal as the
master sync. The buffered A/D conversion keeps running irrespective of
anything else. Then I used the SCANCLK (scaled down by a counter) to
trigger a software buffered hardware handshaking digital output
(PCI-DIO-96) to drive the digital output. Buffered A/D data is
retrieved after the run and the 50microsecond of data after the
digital output is discarded.

Because the output pattern is still software buffered in my case. The
digital output would eventually fall behind if my A/D is too fast. But
I got a lot done. If a hardware buffered digital output board is used.
The digital output loop would never fall behind.



Sat, 08 Nov 2003 04:54:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using analog output to trigger analog input.

2. Delays between analog inputs

3. Analog Output Being Delay by Waveform Aquisition

4. Delayed repeated analog output

5. Analog Output Being Delay by Waveform Aquisition

6. How to generate two analog square output with one delayed

7. How to synchronize Analog generation with digital input

8. sychronized digital/analog output at a microsecond time scale on a PCI 6713 card

9. synchronizing digital output and analog data acquisition

10. Digital/Analog Output with Labview

11. DAQ Channel Wizard won't configure analog outputs or digital I/O

12. Update analog output fast

 

 
Powered by phpBB® Forum Software