Visit our LabVIEW Wiki Real Time article
![]() |
May 13 2008, 09:58 AM
Post
#1
|
|
|
I've come back for more. Member Posts: 2 Joined: 28-March 07 Member No.: 8199 Using LabVIEW Since:2005 LV:8.20 ,. ,.
|
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! Tags
This content has not been tagged yet
|
|
|
|
| Ad |
May 13 2008, 09:58 AM
Post
#
|
|
|
Tags
This content has not been tagged yet
|
|
|
|
May 13 2008, 12:01 PM
Post
#2
|
|
![]() Very Active Premium Member ![]() Posts: 158 Joined: 1-January 08 From: Perth Member No.: 10325 Using LabVIEW Since:2006 LV:8.5.1 ,8.6 ,.
|
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. -------------------- all day...
Tags
This content has not been tagged yet
|
|
|
|
May 13 2008, 02:11 PM
Post
#3
|
|
|
I've come back for more. Member Posts: 2 Joined: 28-March 07 Member No.: 8199 Using LabVIEW Since:2005 LV:8.20 ,. ,.
|
OK,
i'll try that and let you know the results.. Thank you Tags
This content has not been tagged yet
|
|
|
|
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
5 | todd | 2837 | 10th February 2004 - 06:59 PM Last post by: TomWP |
|||
![]() |
2 | donroth | 2579 | 5th September 2003 - 02:01 PM Last post by: donroth |
|||
![]() |
7 | Clara Merino | 3091 | 4th February 2004 - 10:42 AM Last post by: Clara Merino |
|||
![]() |
1 | nicogt | 1666 | 24th March 2004 - 04:22 PM Last post by: nicogt |
|||
![]() ![]() |
| Time is now: 6th October 2008 - 11:18 PM |