NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

如何实现两通道同时采集

        MeasureMent8.0.1里面自带的例子都是各通道独立采集的,即第一个通道的n个点采集完后才开始采集第二个通道的数据,这样依次采完。而我们需要同时采集两个通道的数据(第一个通道采一个点,然后第二个通道采一个点,这样重复循环),请问有没有什么办法?
       比较急,希望大家知道的帮帮忙,谢谢!
 
0 项奖励
1 条消息(共 14 条)
6,603 次查看
采用单点采集方式或选择同步采集卡,如:USB9215。

帖子被jwdz在05-30-2007 09:31 AM时编辑过了

" 一天到晚游泳的鱼"

labview@263.net

我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview
0 项奖励
2 条消息(共 14 条)
6,592 次查看
谢谢回帖!
我们已经购买了PCI-6224采集卡,不知道可不可以实现同步功能。按照实际需求,若采用单点采集,耗费时间太长,不能满足实际需求。
0 项奖励
3 条消息(共 14 条)
6,578 次查看
When creating channels, you may input, for instance, "Dev1/ai0:1" to its pyshical channels.
Then, with task created, perform Analog Read for Multiple Channels.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
4 条消息(共 14 条)
6,575 次查看

       您的意思是我一个通道采样一点,一次循环吧?这样会不会浪费时间?下面是我的一段代码,采样九个通道,每个通道4000点,采样频率4000,这样消耗的时间是1秒多钟。如果单点采集的话应该远远超过这个时间吧,不能满足需要阿!

        各位能不能给一段简单的、能节省时间的代码,不胜感激!

           For i = 0 To 9

                             daqchannel = " Dev1/" + "ai" + CStr(i)
                 myTask.AIChannels.CreateVoltageChannel(daqchannel, "", AITerminalConfiguration.Rse, -5, 5, AIVoltageUnits.Volts)
            Next
            myTask.Timing.ConfigureSampleClock("", 4000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 4000)
            myTask.Control(TaskAction.Verify)
            reader = New AnalogMultiChannelReader(myTask.Stream)
            reader.SynchronizeCallbacks = True

            ar = reader.BeginReadMultiSample(Convert.ToInt32(daqsample), Nothing, Nothing)
            data = reader.EndReadMultiSample(ar)

   

5 条消息(共 14 条)
6,572 次查看
  1. "Dev1/ai0:9"
  2. DAQmx Read > Analog > Multiple Channels > Multiple Samples

 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
6 条消息(共 14 条)
6,568 次查看
我刚试过了,在建立采集任务的时候,采样点数必须不小于2,一个点无法采集,会抱错。请问这是什么原因阿?谢谢!
0 项奖励
7 条消息(共 14 条)
6,568 次查看
Pardon me... I thought you wished to do multiple points (4000 points) acquisition?

帖子被ian fung在05-30-2007 12:10 PM时编辑过了

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
8 条消息(共 14 条)
6,563 次查看

呵呵!是的,每个通道总共采样4000点。但在实际应用中我们需要同时采集两个通道的数据(即每个通道采一个,并根据这两个数据X和Y来得到位移Z)。如果一个通道采完4000点后再采第二个通道的4000,然后根据每个通道的头两个点再来求位移就没有多大意义了,时间差相对来说大了很多。

不知道有没有别的方法,而且我刚也试过了,一个点的采集任务是会出错的,最少要两个点。

谢谢!

0 项奖励
9 条消息(共 14 条)
6,558 次查看

Confused!

Anyway...

You may choose to perform DAQmx Read either

  • Multiple Channels > Single Sample (for 1 sample per channel) or
  • Multiple Channels > Multiple Samples (for >1 samples per channel)

By configuring Dev1/ai0:9, you should be able to acquire all channels at the same time with the above alternatives.

Use index array to extract sample(s) from each channel for post processing.

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
10 条消息(共 14 条)
6,554 次查看