Aaziee Posted May 14, 2008 Report Share Posted May 14, 2008 Hi, I am having a problem with data transfer on RT target using global or local variable. My system configuration is: 128 AI channels (4 CRIO 9205) with 2000 Hz sampling rate.(I am using 3M FPGA and 9014 RT controller) I am using DMA FIFO for data transfer from target to host (2 DMA FIFOS) and read 100 ms or 200 samples on RT host. I need to transfer data to HOST PC for analysis. I set up a TCP/IP connection between RT and PC. All works fine when I send data that I read from DMA FIFO in the same loop . What I want is to have a communication loop that runs in parallel with main loop and sends data to the PC. I tried to transfer data using global or local variables but I have encountered a problem of data loss somewhere in that process. My data loss is always on 200 -th, 400 -th etc.. point (I belive that it has to do with reading blocks from FIFO??). What can be the problem. Thank you in advance! Quote Link to comment
jgcode Posted May 14, 2008 Report Share Posted May 14, 2008 There may be some helpful info here: Preston Johnson writes: "Finally, you may note that the DMA buffer read is a blocking operation. In other words, when you call read DMA buffer read, the call blocks all other RT LabVIEW code from executing until the read completes. This means that if you are waiting for data to arrive, nothing else in LabVIEW happens. I normally use a read DMA of 0 bytes and use the backlog number to compare with my desired read. Once the backlog is big enough for the read to execute, I then execute the read. Of course I have a sleep (metranome) in my check the buffer loop. This allows your other calculation functions and data storage functions to work while the DMA buffer is filling." You could also try using Shared Variable with a RT FIFO (static configure) or the RT FIFO queues (dynamic configure) to buffer data for interthread communication rathar than use locals or globals which are prone to being overwritten. Quote Link to comment
Aaziee Posted May 14, 2008 Author Report Share Posted May 14, 2008 OK, i'll try that and let you know the results.. Thank you Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.