LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need advise for my DAQmx application

Hello All,

I attache following VI to demonstrate my question.

Here, I am acquiring samples from two AI channels, displaying acquired data in waveform chart and also writing them into a data file.

I have two questions for this VI:
Download All
0 Kudos
Message 1 of 6
(3,006 Views)
As seen in the second attachment, the data are plot from the right side of the chart.

What I want to realize is: every time when I run this VI, the chart is first cleared and then all data ploting are started from the left side.

There is an example coming with LabVIEW, called 'how to clear charts & graphs'.  It uses property node of history data of the waveform chart to clear the charts and graphs and plots starts from the left side of the window. However, the data there are in DBL form, not in waveform instead.

So, anyone can tell me how to clear the charts for twp waveform data from two channels? If a advising VI is given, that would be great.

BTW, I update the block diagram attached above, replacing DAQmx read.vi from 'N channel 1 Sample' to 'N channel N Samples'.
0 Kudos
Message 2 of 6
(2,991 Views)
I hope each time the DAQ 6023E board acquired a set of samples (one sample form each channel, so totally two samples at one DAQ acquisition), it send out a TTL signal to trigle an image board (NI PCI-1411) to acquire an image.

After checking with the 6023E board manual, looks like the 'SCANCLK' pin may serve this purpose since it impulse once after each A/D conversion. However, I am wondering whether the TTL will be send twice due to two channels of acquisition.

Anyone can give me advise on realizing this synchronization function? Thanks a lot.
0 Kudos
Message 3 of 6
(2,989 Views)
I am still waiting online and thank you in advance for any suggestions.
0 Kudos
Message 4 of 6
(2,959 Views)

To answer your first question.  You can clear the chart each time you run the vi in two ways:

1.  On block diagram, create an empty array of DBL  (Create array constant, create a DBL constant, drag DBL into array).  Wire the empty array into the chart terminal or a local variable of the chart.  Put this code at the beginning of your code.

2.  Right click on the chart (block diagram), and select Create Method - Reinit to Default.  Put this node at the beginning of your code.

Either method works.  The Reinit method is best because it has error in and error out which can be wired so that the action takes place before any code is executed.

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 6
(2,954 Views)
For the second question, I would think that one trigger per aquisition would be produced.  Put a scope on the line and see for yourself.  Then you will know for sure.
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(2,949 Views)