LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flexmotion single point acquisition with Analog buffered acquisition

I am trying to read the ADC's with a 7344 motion card using a looping single point acquisition equivalent to 50Hz. This is occurring at the same time as I am performing a buffered analog acquistion on a PCI6023 E-series at 1000Hz.

The values from the ADC's are stored in an array, but when I view this array there are hardly any data points, maybe about 20 in total.

I am guessing that it is because of the buffered acquisition, but can anyone help me understand this problem a little better? Can I accomplish what I have described?

Thanks

Chris
0 Kudos
Message 1 of 12
(3,326 Views)
Flexmotion ADC read VI reads analog value as and when you call the read ADC VI. You may have 20 values in an array if you have called the VI 20 times. Buffered data acuisition is not possible with ADC flexmotion VIs. Also, you cannot perform buffered data acquisition with DAQ VIs on these AI channels on the motion control card.

In the other PCI 6023E case, you can specify the scan rate and number of samples in daq analog VIs and can perform a buffered acquisition.

Hope I answered your question.
0 Kudos
Message 2 of 12
(3,326 Views)
My problem is that I don't seem to be able to read the ADC's on the 7344 very well WHILE an analog acquisition is in process on the 6023E.

I was expecting a lot more data than I received.
0 Kudos
Message 3 of 12
(3,326 Views)
Can you post your VI. I do not think acquiring signals on both daq and 7344 at the same time is a problem
0 Kudos
Message 4 of 12
(3,326 Views)
The two acquisitions should not interfere with one another because they use separate drivers. The bottleneck may be the PCI bus, but doesn't seem likely due to your slow acquisition speed.
Try running your VI without the DAQ portion, to make sure the ADC motion section is working the way you expect it should. If it is not, then it doesn't have anything to do with the DAQ, and you should try an example program to see if that works.

Regards-
Julie S
Applications Engineering
National Instruments
0 Kudos
Message 5 of 12
(3,184 Views)
The VI attached is LV 5.1.1.

The loop below is reading the position and only runs about 5-10 times, but I've used a probe and the condition to is not met until sometime later.

An acquistion on the 6023E of 200 samples is started and when that finishes, another user defined acquisition is started with a digital trigger (both at 1000Hz)

Hopefully the code can be understood.

Thanks

Chris
0 Kudos
Message 6 of 12
(3,326 Views)
sorry the condition to end the while loop
0 Kudos
Message 7 of 12
(3,326 Views)
Chris -
From your code, it looks like you are not starting your onboard program until after the digital part of your data acquisition begins. However, the while loop with the Read Position VI is running long before that. The only reason the while loop would stop is if the value of the boolean changes - which is what happened when I ran the VI on my machine. You may want to take a look at the following example programs for examples on how to program DAQ and Motion simultaneously (most of these are for synchronizing, but uses both DAQ and motion):
Analog Triggered Motion
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3F19356A4E034080020E74861&p_node=DZ52466&p_source=External

Motion Synchronization w
ith DAQ via RTSI:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EA8356A4E034080020E74861&p_node=DZ52480&p_source=External

If your program still doesn't work, try separating the DAQ and motion parts to make sure they work individually.
Hope this helps.
Regards-
Julie S
Applications Engineer
National Instruments
0 Kudos
Message 8 of 12
(3,326 Views)
I checked and the Read Position VI loop runs properly while the motion profile is running (without any analog acquisition through my 6023E card).

Likewise, with no read position loop, all the analog acquisition with motion runs properly.

I have attached a simpler example that I tried, so that there was no triggering involved. The analog acquisition runs, and I find that the Read Position VI loop only starts displaying once the analog acquisition is finished (after 2000 samples/ 2 seconds).

It seems that it cannot do the two processes at once and that the analog DAQ on my 6023E card has priority over the Read position loop????!!!!???

The example is in LV5.1.1 format
Any help would be much appreciated!


Chris
0 Kudos
Message 9 of 12
(3,326 Views)
This is the expected behavior for your program - LabVIEW uses the flow of data to dictate the order of execution. Because you have the Run Program VI wired up in sequence after the DAQ functions, it will not start until the DAQ portion is done.
If you want the two parts of the code to execute simultaneously, try deleting the error wire that connects the Error Out VI with the Run Program VI. Wire the Run Program sequence in parallel with the Data Acquisition functions. Attached is a screenshot of the change.

Hope this helps -
Julie
0 Kudos
Message 10 of 12
(3,326 Views)