Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Can I Create Two Simultaneous Analog Output Waveform on Different Channels on the Same Device?

Primary Software: LabVIEW Development Systems
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I am receiving the Error -50103 "specified resource is reserved" when I try to write two simultaneous waveforms with a phase shift to two analog output channels. Is there an example program that does this?



Solution:
While there is not a specific example that does this, the Continuous Generation Voltage Waveform-Internal Clock VI can quickly be modified to accomplish this. This VI is located in the Example Finder under Hardware Input and Output»DAQmx»Analog Generation»Voltage»ContGenVoltageWfm-IntClk.vi. Navigate to the block diagram and double-click the Waveform Buffer Generation (multi) VI as shown in Figure 1.


Figure 1

Modify this VI as follows
  1. Open the block diagram of the Waveform Buffer Generation (multi) VI.
  2. Inside the For Loop, add a Multiply VI function and wire the Iteration Terminal and a constant to the Multiply VI function. This constant should be the desired phase shift in degrees.
  3. Wire the output of the Multiply VI function to the Phase input of the Basic Function Generator VI.
  4. Right click the Reset Signal input of the Basic Function Generator VI and select Create»Constant. Set the constant to True.
Ensure that the completed for loop looks like Figure 2.


Figure 2

Save and close the Waveform Buffer Generation (multi) VI. On the front panel of the Cont Gen Voltage Wfm-Int Clk VI, choose the two channels to output the simultaneous waveforms. For example, to output the waveforms on channels 0 and 1 of device 1, the physical channels should be Dev1/ao0:1. When the program runs, the waveform should be similar to Figure 3 (for a phase shift of 180°).


Figure 3


Related Links:
KnowledgeBase 4T6CQKBP: Causes of NI-DAQmx Error -50103 "The Specified Resource is Reserved"

Attachments:





Report Date: 08/26/2008
Last Updated: 02/22/2010
Document ID: 4OPFI8BB

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit