Dear Discussion Forum,
I am implementing a DAQ-monitoring/control application in LabVIEW and need a hint on which would be the best way to implement the communication between the Graphical User Interface VI (which is intended to run on any remote PC), and the Data Acquisistion/Control Loop VI (running on a PC in the lab).
As these processes will run in parallell, and on separate network PCs, I need a way to establish the communication between them.
My first idea was to use the VI Server functionality(?), i.e. let the GUI VI set and/or get control/indicator values on the DAQ VI's frontpanel using a VI refnum and the Invoke Node. However, it was difficult to implement the conveniant communic
ation procedure "Send command - Get result" reliably this way.
So I thought of using the TCP technology, and to implement the DAQ VI as a server, and the GUI VI as a client. As I however need to transfer many different datatypes, it would be nice not having to do the extra work involved in flattening/unflattening data during transfer... my question is thus:
Q) Would it be better to use DataSocket technology instead of TCP?
Regarding DataSocket, I have a few questions (as this feature is new to me):
1) To do 2-way communication, do I necessarily need two URLs/lines (dstp:\\localhost\line, not sure about the terminology here)?
2) Do I need different URLs for different datatypes, or can many datatypes be sent over a single URL? (variant datatype...?)
3) When reading a value from a URL using DS Read.vi, I need to know that it is not an old value. I have tried the Wait For Updated Value together with a non-zero Timeout time, but it seems to work dubiously, the DS Read.vi retur
ning sometimes(!) immediately with a value, although nothing has been written to the URL.
4) Is data that is written to a URL buffered/qeued?
Need to be clear on these points if I will use DS instead of TCP.
Grateful for hints!
/m. eklund