LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output generat wrong signal

Solved!
Go to solution
Dear all,

I want to record and output data with two separate cards (later synchronously).
For data acquisition, I use the NI PCI-6133, for the data output, the NI PCI-6733.
The data collection works, but there are problems with the data output. In the first ms the desired signal (eg. Sinusoidal 25kHz, 1V) is issued, 
but after a certain time a sinusoidal output with about twice as high frequency occurs, the actual signal occurs only sporadically on. The desired and undesired signal seem arbitrary to change. In addition other frequencies were tested which attain the same result.
In the appendix of the current code, and some recording of the problem (with the PCI-6133 & oscilloscop measured). Can anyone explain the error?
0 Kudos
Message 1 of 4
(2,918 Views)

The first step should be to separate the generation and acquisition into separate while loops.  I will post an example if I can later.

Randall Pursley
0 Kudos
Message 2 of 4
(2,877 Views)
Solution
Accepted by topic author VS_03

Personally, I think the First Step is to remove the Sequence Structure -- it is absolutely not needed (you appropriately use the Error Wire to serialize the major steps of Data Flow).  Getting this big, bulky structure out of the Block Diagram will allow you to "shrink" it to a more reasonable size.

 

Here are some questions and comments.

  • You have an Enable Current button, you seem to be configuring an AI Voltage (not an AI Current) Channel.
  • Why is the AO Start Task function in a "First Call" Case Statement?  According to the Block Diagram, this is not in a loop, so it has to be the first call, and the Case Statement is not necessary.
  • I've not done AO Waveform output, so I won't comment on the AO loop.
  • have done AI Sampling.  Why do you have a Stop and Clear Task function inside the loop?  You only want to acquire data once?  [I believe you meant to put these two functions, and the Error Handler, outside the While loop].
  • By putting both the AI and AO functions in the same loop, you are forcing them to run in synchrony.  If that's what you want, and if they have the same "cycle" time, and if there's enough "free time" to do any other computations you need to do inside the While Loop, having one loop may be OK.  Particularly if they are cycling at different rates, you should have them in parallel While loops.

Looking forward to Version 2.  Strive to get as much of your Block Diagram on a single screen as possible.  Don't be afraid to "hide details" in sub-VIs.

 

Bob Schor

0 Kudos
Message 3 of 4
(2,874 Views)

Thanks for your help! Clean up my window/code helped a lot.

 

Now I wanted to synchronize the recording and output, but it comes to the errors mentioned above and the recording does not work. Have I forgotten something? I routed the 20MHzTimebase of output (Dev2/RTSI7) to the recording (Dev1/RTSI7) and let the output trigger recording (Dev2/RTSI6 -> Dev1/RTSI6).RTSI-Lines are connected and added in MAX.

0 Kudos
Message 4 of 4
(2,808 Views)