How to realize USB3014 two-channel data acquisition?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_1516091
Level 2
Level 2
10 replies posted 5 replies posted 10 questions asked

I need to use two USB3014 device  of data acquisition boards  and achieve high-speed data transmission to the PC on both channels. That is to say, the two acquisition circuit boards are connected to two PC USB3.0 interfaces. Two design all use the synchronous Slave FIFO example  between FPGA and FX3 by auto DMA. However, at firstly,the first data transmission is started normally, but once the second channel data transmission is started, and the first channel will be blocked .At the same time, the second channel will also not work . When the transmission of the acquisition procedure of the second channel is stopped or closed, the first acquisition will resume normal acquisition of data. The second USB3014 needs to be powered off and re-download the firmware to return to normal. My two PC acquisition programs use the API functions such as the BeginDataXfor function. the Producer and Consumer EP of the two design case  firmware procedure is all the different EP. At present, I can only achieve one-way data acquisition, and cannot achieve two-way data acquisition channels at the same time.How to realize USB3014 two-channel data acquisition? Thanks for your advice or other technology support.

948545948.jpg

0 Likes
8 Replies
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

The two FX3 boards are connected to PC separately, is that right? I am wondering if these two board have any electrical dependency.

Meanwhile, how do you design your host application?

0 Likes

Hello,I want connect  two FX3 board to two USB3.0 interface of the one PC separately.The FX3 board powered by USB3.0 interface.I Imodified the firmware program with different PID . The PC could recognize two FX3 device after downloading two different FX3 firmware program.But the host application could not collect data at the same time.Firstly, The one host application open(0) USB device and the second open(1) USB device.Although the PC has two USB 3.0 ports ,we can't collect data two FX3 boards at the same time with one PC?

0 Likes

调用BeginDataXfer出错 - Cypress赛普拉斯创新技术论坛 - 21ic电子技术论坛 http://bbs.21ic.com/icview-2403288-1-1.html?ordertype=1

526448158.jpg

0 Likes

我现在就是主机程序不知道怎么满足设计要求呢,比如集成到一个主机程序里面可以同时控制两个USB3.0接口进行高速实时不间断的大容量数据采集吗?期待你的及时解答,我的手机号13120773362

我现在有两个USB3014数据采集板卡,采用FPGA和USB3014实现,要用一台PC主机的两个USB3.0接口分别同时采集两路高速数据。也就是说,两个采集电路板连接到PC机的两个 USB3.0接口。两个设计都通过自动DMA的同步Slave FIFO传输方式。但是当第一个通道正常启动数据传输后,一旦第二个通道数据传输线程开始但不能采集数据,同时第一个通道也被阻塞。第二个数据通道还要必须重新复位上电才能独立使用。当停止或关闭第二通道的主机程序数据采集线程时,第一个通道的主机数据采集程序也将继续恢复数据采集。我的两个PC采集程序是分别独立编写的两个项目工程,但都是用的同样的API函数,如BeginDataXfor函数。两个设计案例固件程序改了EP端点号和PID号。目前,我只能实现一路数据采集,并不能同时实现多路数据采集。

0 Likes

你好,

对于多个设备,需要采用多线程的方法去实现读取。XferData 是同步的IO操作函数。

0 Likes

你好,我是用的异步Io操作,就是使用另外线程等待OverLapped中的Event事件触发。现在的问题是这完全是两个程序,里面的代码命名都是0和1区分的。我的理解是这个XferData函数占用了操作系统的IO操作时间段,使得别的XferData函数线程的IO操作申请就无法执行?如果我在同一个程序中用多线程切换执行,我如何区分不同的USB接口来操作数据传输呢,毕竟两个USB接口的数据要分别采集到缓存中?我在两个程序中分别打开器件0和器件1,同时访问这两个端点仍然阻塞,我不明白为什么?毕竟两个线程在两个程序中,在操作系统中依然是顺序切换执行?等待时间也设置的1.5秒,完全够后第一个线程执行采集任务后再进行第二个线程的数据采集。你们有相关代码可供参考吗?谢谢,期待及时回复。

0 Likes
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

YangyangC_06

Roy Liu
0 Likes

Hello,

按你说的,两个程序分别访问两个FX3的端点也阻塞,这个比较奇怪。因为这个肯定是没有问题的。

你可以参考下SDK目录下的Streamer的源代码。

0 Likes