John,

Thank you for contacting National Instruments.

To answer your first question, whether it is better to wire a URL or
reference into a DataSocket Read/Write depends on your application.
When you are going to be writing or reading multiple times to the same
connection (such as using a loop), it is more efficient to first open
a DataSocket connection before the loop, pass a reference to your
write/read functions within the loop, and then close the connection
after the loop.  Using only a DataSocket Read/Write will cause your
connection to open and close each time the loop repeats.  This can
significantly increase the load on your processor and system
resources.

LabVIEW will allow you to supply a URL directly to a DataSocket
Read/Write, which is useful if you are only going to be making one
read or write.

You can open multiple DataSocket connections simultaneously using
DataSocket Open.  It is recommended, however, that you close every
connection once you have finished performing the necessary tasks for
that connection.  I believe you can perform both read and write
functions to the same connection before closing it if you wire a
=93ReadWrite=94 constant to the =93mode=94 connector of the DataSocket Open
VI.

I hope this helps!

Matthew C
Applications Engineer
National Instruments

Reply via email to