LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Datascoket read VI optimised for specific sizes of data?

I am using datasocket write.vi in LabVIEW 6.1 to write a 1D array of I32 to the datasocket server. The speed at which this data is written to the DSS seems independent of the size of the written array.

I am then using datasocket read.vi to read back that array from the DSS on another computer. The speed at which datasocket read.vi reads back the array seems to be dependent on the size of the written array. If the written array starts at about 50 values, the average read time is 0.06 seconds. If I increase the written array size the average read time drops as low as 0.02 seconds.

The optimal size (to minimise the average read time) of the written array appears to be between about 200 and 800 values. If the
written array is bigger than about 800 values, the read time drops but this doesn't surprise me since the more data there is, the longer it should take to read it.

Are datasocket read operations optimised for written array sizes greater than (say) 200 values?

All this programming is being done in LabVIEW 6.1 under Windows 2000 (although I have noticed the problem in previous versions of LabVIEW and Windows).
0 Kudos
Message 1 of 4
(2,794 Views)
I could be mistaken but I don't think the DataSocket Write VI's are optimized for a certain number of array elements. There are many variables involved (CPU speed, available memory, network packet size, etc)that will dictate the rate at which data is sent. The variables may be optimized so that 200 to 800 elements are sent quickly and efficiently.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 4
(2,794 Views)
The problem is not with the Datasocket write VI, which is sending data very fast and efficiently. The problem is that the Datasocket Read VI reads at a speed which seems dependent on the size of the array it is reading. If the size of the array it is reading is very small (say an array of 1x50 I32) the VI takes longer per read cycle than if the array it is reading is much bigger (say 1x100 I32).

When small sets of data are sent by the write VI, the read VI takes so long to read it that the write VI has updated the data several times before the next read operation takes place. This does not happen when the write VI sends bigger data sets -- the read VI reads quickly enough to finish reading a data set and catch the next new set before the it is overwritt
en.

At the moment, I am padding small data sets with zeroes (so that they become big data sets) before writing them. Writing occurs at the same speed as before but reading is much faster. This does not seem to make very much sense.
0 Kudos
Message 3 of 4
(2,794 Views)
Previous comment should read "1x500 I32" in first paragraph and not "1x100 I32". Sorry!
0 Kudos
Message 4 of 4
(2,794 Views)