LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No analog output from DAQmx in LabVIEW NXG

Hello, 

 

I am using a USB-6356 DAQ device which I would like to use as an analog output source. 

 

My waveform resembles a BPSK signal and is generated inside the "Modulation For Loop" (shown below). The waveform has been verified to be correct. 

 

However, when I try to write the waveform to the DAQmx "Write" node, the program does not terminate and I get the error shown below without an analog output. When the "Wait Until Done" node is removed, the program terminates, again without an analog output. 

 

Any help is appreciated!

Screenshot (44).png

0 Kudos
Message 1 of 5
(2,108 Views)

I've done a ton of DAQ under classic LabVIEW but have not dabbled at all with NXG.

 

My educated guesses about what I'm looking at:

- when you configure task timing, the waveform appears to be used to define the sample rate.  In classic LabVIEW, there's an input at the top for setting the the # samples to generate.  When unwired it reverts to some default value like 1000.

- the waveform you write to the task also sets the size of the buffer.  When I do finite acquisition, I make my buffer size match the # samples I designated when setting up task timing.  I kinda suspect the error is a result of mismatch between these quantities.  The specific error code doesn't ring a bell for me, but then again I make sure those quantities match.

- the wristwatch icon must be the "wait until done" that's throwing the error.  I don't see a timeout value wired.  In classic LabVIEW, there's an input for that and when unwired it takes on a default value of 10 sec.  If your waveform is defined for a longer duration than the timeout, that could be your error cause as well.

 

 

-Kevin P

 

P.S. Side rant that as an engineer who would like his coding work to be taken seriously, the NXG icons and new graphical design are a giant leap in the wrong direction.  It just shouts Preschool!  Cartoons!  Play Time!   It seems embarrassing to show it to someone and say, "yeah, I get paid to do this."

    Sorry OP, not your issue, I'm just getting crotchety and have to vent now and then.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 5
(2,063 Views)

I'm not sure if it is related or not but you have an uninitialized shift register which will retain information between runs.  This would mean each run will append more data to the end over and over again.  That shift register should be initialized with an empty waveform (just right click create constant).  I'd also look at the inputs to that wait until done.  It is possible you are saying something like "You have 1 second to complete this 5 second waveform".  It will then wait 1s and error out.

Message 3 of 5
(1,990 Views)

@Kevin_Price wrote:

I've done a ton of DAQ under classic LabVIEW but have not dabbled at all with NXG.

 

My educated guesses about what I'm looking at:

- when you configure task timing, the waveform appears to be used to define the sample rate.  In classic LabVIEW, there's an input at the top for setting the the # samples to generate.  When unwired it reverts to some default value like 1000.

- the waveform you write to the task also sets the size of the buffer.  When I do finite acquisition, I make my buffer size match the # samples I designated when setting up task timing.  I kinda suspect the error is a result of mismatch between these quantities.  The specific error code doesn't ring a bell for me, but then again I make sure those quantities match.

- the wristwatch icon must be the "wait until done" that's throwing the error.  I don't see a timeout value wired.  In classic LabVIEW, there's an input for that and when unwired it takes on a default value of 10 sec.  If your waveform is defined for a longer duration than the timeout, that could be your error cause as well.

 

 

-Kevin P

 

P.S. Side rant that as an engineer who would like his coding work to be taken seriously, the NXG icons and new graphical design are a giant leap in the wrong direction.  It just shouts Preschool!  Cartoons!  Play Time!   It seems embarrassing to show it to someone and say, "yeah, I get paid to do this."

    Sorry OP, not your issue, I'm just getting crotchety and have to vent now and then.


All those round corners are so we won't hurt ourselves coding.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 5
(1,978 Views)

Hello Hooovahh, 

 

Unfortunately none of these work. The waveform duration is very short therefor timeout does not occur. The shift register is left intentionally not initialised as that setup produces the correct waveform.

0 Kudos
Message 5 of 5
(1,890 Views)