Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ 6229 malfunction

Hello,

 

I am using a USB DAQ 6229, which seems to be malfunctioning. Whenever I send a square wave in which the amplitude increases periodically, and I stop the program, the DAQ sends a DC signal, then "jumps" back to a square wave, and finally returns to DC.

 

Furthermore, if I specify in the VI that the signal should go to zero (to ensure no DC is transmitted after stopping the task), then the square signal goes to zero volts, then "jumps" back to square and ends up in DC !  I am using a rather delicate instrument that would be damaged if any DC voltage is transmitted, so the signal MUST be either square or zero.

 

Please note that this has been happening for a few days, but the DAQ used to work just fine before this. 

 

Please help,

thanks.

Message Edited by Ali84 on 10-16-2009 04:08 PM
0 Kudos
Message 1 of 7
(3,590 Views)
can you post the code?

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 7
(3,575 Views)

Sure, the code I'm using is this. However, I've been using this very same code for months, and has been working fine till now. Also, I've used other codes, and the problems is the same. I have also tried different ports.

 

However, when I use the DAQ assistant, I don't seem to have any problems. Only when I use the Write function. ¿Could it be a configuration problem?

Message Edited by Ali84 on 10-18-2009 03:44 PM
0 Kudos
Message 3 of 7
(3,568 Views)

It would seem that the DAQ card is doing exactly what you have programmed it to do. When you click the stop button, it executes the code in frame 1 once and then the code in frame 2 once before finally stopping. At no place do you specifically program the output to 0 volts. It goes to 0 when the waveform generation stops and probably briefly when programming a new waveform.

 

Having the sequence structure and the while loops really does not make any sense to me. What are you really trying to accomplish?

Message 4 of 7
(3,564 Views)
beat me to it--- drat

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(3,560 Views)

Hello, and thank you for your answer. The thing is, in frame 2 of the programa, I'm sending a square signal with zero amplitude, which is the 0 volts I need. However, my problem is that when stopping the while loop, it is supposed to "skip" both frames 0 and 1 and execute frame 2 before stopping. What the DAQ seems to be doing is skip to frame 2 and send 0 volts (which is OK), but then it "jumps back" to a square wave with amplitde greater than 0 (it varies) and then stop the program, but the DAQ remains at a DC voltage opther than 0, which would be disastrous for the equipment I'm using.

 

And, the very same program didn't use to do that previously, and nothing has been changed in the code. The DAQ just started doing that.

 

Please help?

Thanks, Ali

0 Kudos
Message 6 of 7
(3,534 Views)

There is no way that your current or previous program will skip any frames. Every frame of a seqence structure is always executed. Every while loop will execute at least once. At no place in your program do you set the analog output to 0. You are always setting it to a waveform value. Turn on execution highlighting to see the actual flow.

 

You really need to rewrite the VI. A basic state machine would seem appropriate. When the stop button is pressed, go to a state where you pass a 0 to the DAQmx Write.

0 Kudos
Message 7 of 7
(3,530 Views)