A.5. Sending and Receiving Waveforms

Measuring circuit response to waveform input signals requires simultaneous sending and receiving data with the DAQ. An example was demonstrated above with the oscilloscope measurement project (Fig. A.14). The function generator VI used for that measurement is FG_A.vi. The main subVI of the function generator VI is SR_A.vi. The Front Panel and Diagram of the VI are shown in Fig. A.19. The VI sends and receives voltage arrays from one output channel and one input channel.

Figure A.19. The Front Panel and Diagram of SR_A.vi. LabVIEW AO Write receives the array of the numerical values of the waveform and sends them out on the output channel. The oscilloscope is launched in sequence and measures the response voltage of the input channel while the output array is still being executed.


Information supplied from the top VI, FG_A.vi, includes sine-wave (or square-wave) frequency (Frequency), number of cycles (Cycles), and number of samples per cycle (Samples/Cycle). The information is used to facilitate the computation Sample Rate = Frequency · Sample/Cycle and the size of the waveform data array (Cycle · Samples/Cycle).

The subVI, SR_A.vi, receives this information along with the waveform data array, as required by the functions in the Diagram of SR_A.vi (Fig. A.19). The waveform data array is calculated by a subVI, Sine-wave.vi (on the same level as SR_A.vi). (An alternative waveform, SquareWave.vi, is selectable from FG_A.vi). The execution sequence is AO Config.vi, AO Write.vi, AO Start.vi, OscilloscopeA.vi, AO Wait.vi, and AO Clear.vi.

The Number of Cycles is adjusted automatically in the top VI and increases for higher frequencies. The increase provides assurance that the outgoing waveform is still executing during the oscilloscope measurement phase. The duration of the waveform sent out is Cycles · T.

Project PA.8 Using the Simultaneous Sending/Receiving Function


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.195.249