LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datasockets performance

Hello,

I'm trying to send data between two PC's using datasockets but it
doesn't appear to be fast enough to get a likeable result.

I'm reading samples from a physiological monitoring unit and the
fastest channel is at 200samples/second. I used to poll the encoder
for 20samples of data every 100ms and this worked very well with a
nice smooth update.

Since I've added datasockets to recreated the data on another PC on
the network I've had to slow it down to 40samples every 200ms (the
fastest I can run it without losing data) and so it obviousely isn't
as smooth any more.

Is there a way to optimise/speed up the datasocket read and write
VI's?

Regards,

Adrian Gibbons.
0 Kudos
Message 1 of 4
(2,887 Views)
Buffer the data, don't rely on streaming it continously all the way. Poll data from the buffer using the datasocket connection only as often as is really required (if e.g. the data is polled to be displayed the human eye is quite slow and you do not need to refresh more often than once per 2-300 ms).

Check the general network performance. How are the two PCs connected, is there e.g. a significant latency involved?
0 Kudos
Message 2 of 4
(2,887 Views)
I found a posting from the middle of last year (2002) in which the
author appears to have a similar problem to me - not be able to send
data fast enough.

He says that the Datasocket Read VI takes much longer to process small
arrays of data (e.g. less than 100) than it does for arrays of size in
the range of 200 to 800 items.

I've padded my 20 items with 180 zeros before Datasocket Write at one
end, and removing them after the Datasocket Read at the other and now
it works fine!

It appears that sending more data and operations (adding and removing
zeros) works faster than just sending small quantities of data. This
truly is weird! Does anyone have any ideas why this is the case?

Regards,

Adrian.
0 Kudos
Message 3 of 4
(2,888 Views)
Adrian, can you please describe how you did this, or perhaps post an example VI?
Thanks,
Sima
0 Kudos
Message 4 of 4
(2,726 Views)